]> rtime.felk.cvut.cz Git - sojka/tekpic.git/commitdiff
Convert to Qt5, add serial port as command line parameter
authorMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 1 Apr 2015 07:23:27 +0000 (09:23 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 1 Apr 2015 07:23:27 +0000 (09:23 +0200)
src/mainwindow.h
src/osccommthread.cpp
src/src.pro
src/tekpic.cpp

index 77a358bdbf76b48107f1211047448095c68f2c15..74f37f9b8291b51f96c9fc7e6c598747231a4f20 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef MAINWINDOW_H
 #define MAINWINDOW_H
 
-#include <qdialog.h>
+#include <QDialog>
 #include "ui_main.h"
 #include "osccommthread.h"
 #include <string>
index c1722de120a64036dec25e4285579bd5cb8e0b5f..e1aad7736b2e4f3978747f77e8800d0b4fba690d 100644 (file)
@@ -24,6 +24,8 @@
 #include <poll.h>
 #include <iomanip>
 #include <iostream>
+#include <unistd.h>
+
 using namespace std;
 
 ostream& operator<<(ostream& s, OscImage& im)
index e8b107f4e690e92117314a6b20cf262e4a101226..a5c7033e22b959aee16302f4112f853f0691a4a7 100644 (file)
@@ -15,3 +15,5 @@ SOURCES += tekpic.cpp \
            mainwindow.cpp \
            serial.cpp \
            osccommthread.cpp 
+
+QT += widgets
index 008da2ffe2c8d9c6e73a1ddc74f9aa35a2f57dda..14e82f148b18b0a2b6acb58f99720574329ccbec 100644 (file)
 
 int main(int argc, char *argv[])
 {
+        string port("/dev/ttyS0");
         QApplication app(argc, argv);
-        MainWindow *window = new MainWindow(string("/dev/ttyS0"));
+        if (argc > 1)
+          port = argv[1];
+        MainWindow *window = new MainWindow(port);
 
         window->show();
         return app.exec();