Start Work on a Global State and commit vscode files

This commit is contained in:
Justin Hammond 2020-05-24 23:20:43 +08:00
parent da0c303920
commit 1ad62549d9
6 changed files with 58 additions and 2 deletions

20
.vscode/c_cpp_properties.json vendored Normal file
View file

@ -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
}

17
.vscode/tasks.json vendored Normal file
View file

@ -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"]
}
]
}

View file

@ -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);

View file

@ -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 \

View file

@ -1,6 +1,18 @@
#include <QDebug>
#include "ozwcore.h"
Q_GLOBAL_STATIC(OZWCore, globalState)
OZWCore::OZWCore(QObject *parent) : QObject(parent)
{
qDebug() << "Created";
}
OZWCore *OZWCore::get() {
return globalState();
}
void OZWCore::initilize() {
}

View file

@ -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