diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..494cb0b --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,20 @@ +{ + "configurations": [ + { + "name": "Linux", + "includePath": [ + "${workspaceFolder}/**", + "${workspaceFolder}/../open-zwave/cpp/src/**", + "${workspaceFolder}/../qt-openzwave/qt-openzwave/include/**", + "${workspaceFolder}/../qt-openzwave/qt-openzwavedatabase/include/**", + "/usr/include/qt5/**" + ], + "defines": [], + "compilerPath": "/usr/bin/gcc", + "cStandard": "c11", + "cppStandard": "c++17", + "intelliSenseMode": "clang-x64" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..04bb21a --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,17 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "Make", + "type": "shell", + "command": "make", + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": ["$gcc"] + } + ] +} \ No newline at end of file diff --git a/ozwadmin-main/mainwindow.cpp b/ozwadmin-main/mainwindow.cpp index 1aad945..91c4160 100644 --- a/ozwadmin-main/mainwindow.cpp +++ b/ozwadmin-main/mainwindow.cpp @@ -43,6 +43,7 @@ #include "valuetable.h" #include "nodeflagswidget.h" #include "qt-ads/DockAreaWidget.h" +#include "ozwcore.h" @@ -58,6 +59,7 @@ MainWindow::MainWindow(QWidget *parent) : this->ui->setupUi(this); this->m_DockManager = new ads::CDockManager(this); + OZWCore::get()->initilize(); DeviceInfo *di = new DeviceInfo(this); NodeStatus *ni = new NodeStatus(this); diff --git a/ozwadmin-main/ozwadmin-main.pro b/ozwadmin-main/ozwadmin-main.pro index f3fb59c..7a6eb7d 100644 --- a/ozwadmin-main/ozwadmin-main.pro +++ b/ozwadmin-main/ozwadmin-main.pro @@ -26,6 +26,7 @@ SOURCES += main.cpp\ metadatawindow.cpp \ nodestatus.cpp \ nodetablewidget.cpp \ + ozwcore.cpp \ splashdialog.cpp \ startup.cpp \ startupprogress.cpp \ @@ -40,6 +41,7 @@ HEADERS += mainwindow.h \ metadatawindow.h \ nodestatus.h \ nodetablewidget.h \ + ozwcore.h \ splashdialog.h \ startup.h \ startupprogress.h \ diff --git a/ozwadmin-main/ozwcore.cpp b/ozwadmin-main/ozwcore.cpp index 3ce5fee..38245b9 100644 --- a/ozwadmin-main/ozwcore.cpp +++ b/ozwadmin-main/ozwcore.cpp @@ -1,6 +1,18 @@ +#include #include "ozwcore.h" +Q_GLOBAL_STATIC(OZWCore, globalState) + OZWCore::OZWCore(QObject *parent) : QObject(parent) { - + qDebug() << "Created"; } + +OZWCore *OZWCore::get() { + return globalState(); +} + + +void OZWCore::initilize() { + +} \ No newline at end of file diff --git a/ozwadmin-main/ozwcore.h b/ozwadmin-main/ozwcore.h index 124fafa..0f054d5 100644 --- a/ozwadmin-main/ozwcore.h +++ b/ozwadmin-main/ozwcore.h @@ -8,10 +8,13 @@ class OZWCore : public QObject Q_OBJECT public: explicit OZWCore(QObject *parent = nullptr); - + static OZWCore *get(); + void initilize(); signals: public slots: }; + + #endif // OZWCORE_H