Skip to content

Commit 91e2aa5

Browse files
committed
Start Moving OZWAdmin over to the new QT Wrapper
1 parent 9e48b69 commit 91e2aa5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+310
-6644
lines changed

ozwadmin-main/associations.cpp

-145
This file was deleted.

ozwadmin-main/associations.h

-70
This file was deleted.

ozwadmin-main/logwindow.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include <QDebug>
3232
#include "logwindow.h"
3333

34+
#if 0
3435
ozwAdminLog::ozwAdminLog()
3536
{
3637
}
@@ -253,3 +254,5 @@ void LogBrowser::show() {
253254
//win->addSubWindow(browserDialog);
254255
browserDialog->show();
255256
}
257+
258+
#endif

ozwadmin-main/logwindow.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@
2020
#include <QObject>
2121
#include <QDialog>
2222
#include <QMdiArea>
23-
#include <platform/Log.h>
2423
#include <string>
2524

2625
/* our Custom Logging Class */
27-
26+
#if 0
2827
class ozwAdminLog : public QObject, public OpenZWave::i_LogImpl
2928
{
3029
Q_OBJECT
@@ -42,7 +41,6 @@ class ozwAdminLog : public QObject, public OpenZWave::i_LogImpl
4241

4342

4443

45-
4644
class LogBrowserDialog;
4745

4846
class LogBrowser : public QObject
@@ -94,4 +92,6 @@ protected slots:
9492
QPushButton *saveButton;
9593
};
9694

95+
#endif
96+
9797
#endif // LOGWINDOW_H

ozwadmin-main/main.cpp

+3-44
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@
2424
#include <QDebug>
2525
#include <QLoggingCategory>
2626
#include <QTreeView>
27-
#include "valueid.h"
28-
#include "qtopenzwave.h"
29-
#include "qtozwmanager.h"
30-
#include "websocketiodevice.h"
3127

3228
int main(int argc, char *argv[])
3329
{
@@ -42,49 +38,12 @@ int main(int argc, char *argv[])
4238
QLoggingCategory::setFilterRules("default.debug=true");
4339
#endif
4440

45-
qRegisterMetaType<QtValueID>();
46-
qRegisterMetaType<uint8>("uint8");
47-
qRegisterMetaType<QVector<int>>("QVector<int>");
4841
QCoreApplication::setOrganizationName("OpenZWave");
4942
QCoreApplication::setOrganizationDomain("openzwave.net");
5043
QCoreApplication::setApplicationName("ozw-admin");
5144
QApplication a(argc, argv);
5245

53-
QTOpenZwave *ozw = new QTOpenZwave();
54-
QTOZWManager *manager = ozw->GetManager();
55-
qDebug() << manager;
56-
#if 0
57-
QTreeView view;
58-
view.setWindowTitle(QStringLiteral("LocalView"));
59-
view.resize(640,480);
60-
view.setModel(manager->getNodeModel());
61-
view.show();
62-
63-
QTreeView view2;
64-
view2.setWindowTitle(QStringLiteral("LocalView"));
65-
view2.resize(640,480);
66-
view2.setModel(manager->getValueModel());
67-
view2.show();
68-
69-
QTreeView view3;
70-
view3.setWindowTitle(QStringLiteral("Associations"));
71-
view3.resize(640,480);
72-
view3.setModel(manager->getAssociationModel());
73-
view3.show();
74-
#endif
75-
76-
a.exec();
77-
#if 0
78-
try {
79-
80-
MainWindow w;
81-
w.show();
82-
return a.exec();
83-
} catch (OpenZWave::OZWException &e) {
84-
QMessageBox::critical(nullptr, "Exception",
85-
QString("A unhandled Exception was caught: ").append(e.GetMsg().c_str()),
86-
QMessageBox::Abort);
87-
exit(-1);
88-
}
89-
#endif
46+
MainWindow w;
47+
w.show();
48+
return a.exec();
9049
}

0 commit comments

Comments
 (0)