*.pro.user
-
+binaries/
+build/
#
#-------------------------------------------------
+include(../qmake-target-platform.pri)
+include(../qmake-destination-path.pri)
+
QT -= gui
TARGET = cm-lib
target.path = /usr/lib
INSTALLS += target
}
+
+DESTDIR = $$PWD/../binaries/$$DESTINATION_PATH
+OBJECTS_DIR = $$PWD/build/$$DESTINATION_PATH/.obj
+MOC_DIR = $$PWD/build/$$DESTINATION_PATH/.moc
+RCC_DIR = $$PWD/build/$$DESTINATION_PATH/.qrc
+UI_DIR = $$PWD/build/$$DESTINATION_PATH/.ui
+
+message(cm-lib output dir: $${DESTDIR})
+message(cm-lib project dir: $${PWD})
#define MASTERCONTROLLER_H
#include <QObject>
+#include <QString>
#include <cm-lib_global.h>
class CMLIBSHARED_EXPORT MasterController : public QObject
{
Q_OBJECT
+ Q_PROPERTY(QString ui_welcomeMessage MEMBER welcomeMessage CONSTANT)
public:
explicit MasterController(QObject *parent = nullptr);
+ QString welcomeMessage = "This is MasterController to Major Tom";
signals:
#
#-------------------------------------------------
+include(../qmake-target-platform.pri)
+include(../qmake-destination-path.pri)
+
QT += testlib
QT -= gui
SOURCES += \
src/models/client-tests.cpp
+LIBS += -L$$PWD/../binaries/$$DESTINATION_PATH -lcm-lib
+
+
DEFINES += SRCDIR=\\\"$$PWD/\\\"
+
+DESTDIR = $$PWD/../binaries/$$DESTINATION_PATH
+OBJECTS_DIR = $$PWD/build/$$DESTINATION_PATH/.obj
+MOC_DIR = $$PWD/build/$$DESTINATION_PATH/.moc
+RCC_DIR = $$PWD/build/$$DESTINATION_PATH/.qrc
+UI_DIR = $$PWD/build/$$DESTINATION_PATH/.ui
+
+include(../qmake-target-platform.pri)
+include(../qmake-destination-path.pri)
+
QT += qml quick
CONFIG += c++17
# You can also select to disable deprecated APIs only up to a certain version of Qt.
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
-INCLUDEPATH += src
+INCLUDEPATH += src \
+ ../cm-lib/src
SOURCES += src/main.cpp
RESOURCES += views.qrc
+LIBS += -L$$PWD/../binaries/$$DESTINATION_PATH -lcm-lib
+
# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH = $$PWD
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
+
+DESTDIR = $$PWD/../binaries/$$DESTINATION_PATH
+OBJECTS_DIR = $$PWD/build/$$DESTINATION_PATH/.obj
+MOC_DIR = $$PWD/build/$$DESTINATION_PATH/.moc
+RCC_DIR = $$PWD/build/$$DESTINATION_PATH/.qrc
+UI_DIR = $$PWD/build/$$DESTINATION_PATH/.ui
+
#include <QGuiApplication>
#include <QQmlApplicationEngine>
+#include <QQmlContext>
+#include <controllers/master-controller.h>
int main(int argc, char *argv[])
{
#endif
QGuiApplication app(argc, argv);
+ qmlRegisterType<cm::controllers::MasterController>("CM", 1, 0, "MasterController");
+ cm::controllers::MasterController masterController;
QQmlApplicationEngine engine;
+ engine.rootContext()->setContextProperty("masterController", &masterController);
engine.load(QUrl(QStringLiteral("qrc:/views/MasterView.qml")));
if (engine.rootObjects().isEmpty())
return -1;
<RCC>
<qresource prefix="/views">
<file alias="MasterView.qml">views/MasterView.qml</file>
+ <file alias="SplashView.qml">views/SplashView.qml</file>
+ <file alias="DashboardView.qml">views/DashboardView.qml</file>
+ <file alias="CreateClientView.qml">views/CreateClientView.qml</file>
+ <file alias="EditClientView.qml">views/EditClientView.qml</file>
+ <file alias="FindClientView.qml">views/FindClientView.qml</file>
</qresource>
</RCC>
--- /dev/null
+import QtQuick 2.0
+
+Item {
+
+}
--- /dev/null
+import QtQuick 2.0
+
+Item {
+
+}
--- /dev/null
+import QtQuick 2.0
+
+Item {
+
+}
--- /dev/null
+import QtQuick 2.0
+
+Item {
+
+}
visible: true
width: 640
height: 480
- title: qsTr("Hello World")
+ title: qsTr("Client Management")
+
+ Text {
+ text: masterController.ui_welcomeMessage
+ }
}
--- /dev/null
+import QtQuick 2.0
+
+Item {
+
+}
cm-ui \
cm-lib \
cm-tests
+
+message(cm project dir: $${PWD})
--- /dev/null
+platform_path = unknown-platform
+compiler_path = unknown-compiler
+processor_path = unknown-processor
+build_path = unknown-build
+
+PLATFORM_WIN {
+ platform_path = windows
+}
+
+PLATFORM_OSX {
+ platform_path = osx
+}
+
+PLATFORM_LINUX {
+ platform_path = linux
+}
+
+COMPILER_GCC {
+ compiler_path = gcc
+}
+
+COMPILER_MSVC2017 {
+ compiler_path = msvc2017
+}
+
+COMPILER_CLANG {
+ compiler_path = clang
+}
+
+PROCESSOR_x64 {
+ processor_path = x64
+}
+
+PROCESSOR_x86 {
+ processor_path = x86
+}
+
+BUILD_DEBUG {
+ build_path = debug
+} else {
+ build_path = release
+}
+DESTINATION_PATH = $$platform_path/$$compiler_path/$$processor_path/$$build_path
+
+message(Dest path: $${DESTINATION_PATH})
--- /dev/null
+win32 {
+ CONFIG += PLATFORM_WIN
+ message(PLATFORM_WIN)
+ win32-g++ {
+ CONFIG += COMPILER_GCC
+ message(COMPILER_GCC)
+ }
+ win32-msvc2017 {
+ CONFIG += COMPILER_MSVC2017
+ message(COMPILER_MSVC2017)
+ win32-msvc2017:QMAKE_TARGET.arch = x86_64
+ }
+}
+
+linux {
+ CONFIG += PLATFORM_LINUX
+ message(PLATFORM_LINUX)
+ # Make QMAKE_TARGET arch available for Linux
+ !contains(QT_ARCH, x86_64){
+ QMAKE_TARGET.arch = x86
+ } else {
+ QMAKE_TARGET.arch = x86_64
+ }
+ linux-g++{
+ CONFIG += COMPILER_GCC
+ message(COMPILER_GCC)
+ }
+}
+
+macx {
+ CONFIG += PLATFORM_OSX
+ message(PLATFORM_OSX)
+ macx-clang {
+ CONFIG += COMPILER_CLANG
+ message(COMPILER_CLANG)
+ QMAKE_TARGET.arch = x86_64
+ }
+ macx-clang-32{
+ CONFIG += COMPILER_CLANG
+ message(COMPILER_CLANG)
+ QMAKE_TARGET.arch = x86
+ }
+}
+contains(QMAKE_TARGET.arch, x86_64) {
+ CONFIG += PROCESSOR_x64
+ message(PROCESSOR_x64)
+} else {
+ CONFIG += PROCESSOR_x86
+ message(PROCESSOR_x86)
+}
+CONFIG(debug, release|debug) {
+ CONFIG += BUILD_DEBUG
+ message(BUILD_DEBUG)
+} else {
+ CONFIG += BUILD_RELEASE
+ message(BUILD_RELEASE)
+}