Skip to content
Browse files

first widget sceleton

  • Loading branch information...
1 parent 3f10fd1 commit 3b7caa902c943497ea39821458357cdf0165ddde @bkubicek committed Nov 12, 2011
Showing with 208 additions and 0 deletions.
  1. +15 −0 QTMarlin.pro
  2. +13 −0 main.cpp
  3. +72 −0 mainwindow.cpp
  4. +45 −0 mainwindow.h
  5. +28 −0 tab_pid.cpp
  6. +35 −0 tab_pid.h
View
15 QTMarlin.pro
@@ -0,0 +1,15 @@
+######################################################################
+# Automatically generated by qmake (2.01a) Sat Nov 12 13:08:01 2011
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+INCLUDEPATH += /home/bkubicek/PVModulMesser/qextserialport/src/ /home/bkubicek/PVModulMesser/qwt-5.2/src
+QMAKE_LIBDIR += /home/bkubicek/PVModulMesser/qwt-5.2/lib/ /home/bkubicek/PVModulMesser/qextserialport/src/build/
+
+# Input
+HEADERS += mainwindow.h tab_pid.h
+SOURCES += main.cpp mainwindow.cpp tab_pid.cpp
+LIBS += -lqextserialport -lqwt
View
13 main.cpp
@@ -0,0 +1,13 @@
+#include <QApplication>
+#include "mainwindow.h"
+
+
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+
+ MainWindow window;
+ window.show();
+
+ return app.exec();
+}
View
72 mainwindow.cpp
@@ -0,0 +1,72 @@
+
+#include "mainwindow.h"
+
+
+
+#include <QList>
+#include <QtDebug>
+
+
+
+#include <iostream>
+#include <stdlib.h>
+#include <sstream>
+#include <fstream>
+#include <vector>
+
+#include <time.h>
+using namespace std;
+
+
+
+
+#include <QFont>
+#include <QPushButton>
+#include <QWidget>
+#include <QCheckBox>
+#include <qwt_plot.h>
+#include <qwt_plot_curve.h>
+#include <qwt_plot_grid.h>
+#include <qwt_legend.h>
+#include <QVBoxLayout>
+#include <QHBoxLayout>
+#include <QThread>
+#include <QStatusBar>
+#include <QTreeWidget>
+#include <QTabWidget>
+#include <QComboBox>
+
+#include "tab_pid.h"
+
+
+
+MainWindow::MainWindow(QWidget *parent): QWidget(parent)
+{
+ QVBoxLayout *layout = new QVBoxLayout;
+
+ QHBoxLayout *comLayout= new QHBoxLayout;
+ portSelector=new QComboBox(this);
+ baudSelector=new QComboBox(this);
+ btConnect= new QPushButton("Connect");;
+ btDisconnect=new QPushButton("Disconnect",this);
+ btRescan= new QPushButton("Rescan",this);
+ comLayout->addWidget(portSelector);
+ comLayout->addWidget(btConnect);
+ comLayout->addWidget(btDisconnect);
+ comLayout->addWidget(btRescan);
+ layout->addLayout(comLayout);
+ tab=new QTabWidget();
+ layout->addWidget(tab);
+
+ tabPID=new TabPID(tab);
+ tab->addTab(tabPID,"PID");
+
+ status=new QStatusBar(this);
+
+
+ layout->addWidget(status);
+ //layout->addWidget(slider);
+ setLayout(layout);
+
+}
+
View
45 mainwindow.h
@@ -0,0 +1,45 @@
+#include <QWidget>
+#include <fstream>
+
+#include <stdint.h>
+#include <QList>
+class MyThread;
+class QwtPlotCurve;
+class QwtPlot;
+class QStatusBar;
+class QCheckBox;
+class QTreeWidget;
+class QTreeWidgetItem;
+class QTabWidget;
+class QComboBox;
+class QPushButton;
+
+class TabPID;
+class MainWindow : public QWidget
+{
+//Q_OBJECT
+
+public:
+ MainWindow(QWidget *parent = 0);
+
+
+
+
+
+public slots:
+ //void setWasRead();
+ //void quit();
+
+
+private:
+ QStatusBar *status;
+ QTabWidget *tab;
+ TabPID *tabPID;
+
+ QComboBox *portSelector;
+ QComboBox *baudSelector;
+ QPushButton *btConnect;
+ QPushButton *btDisconnect;
+ QPushButton *btRescan;
+};
+
View
28 tab_pid.cpp
@@ -0,0 +1,28 @@
+#include "tab_pid.h"
+
+#include <QPushButton>
+#include <QFont>
+#include <QPushButton>
+#include <QWidget>
+#include <QCheckBox>
+#include <qwt_plot.h>
+#include <qwt_plot_curve.h>
+#include <qwt_plot_grid.h>
+#include <qwt_legend.h>
+#include <QVBoxLayout>
+#include <QHBoxLayout>
+#include <QThread>
+#include <QStatusBar>
+#include <QTreeWidget>
+#include <QTabWidget>
+
+TabPID::TabPID(QWidget* parent): QWidget(parent)
+{
+ QVBoxLayout *layout = new QVBoxLayout;
+ test=new QPushButton("test",this);
+
+ layout->addWidget(test);
+ //layout->addWidget(slider);
+ setLayout(layout);
+
+}
View
35 tab_pid.h
@@ -0,0 +1,35 @@
+#include <QWidget>
+#include <fstream>
+
+#include <stdint.h>
+#include <QList>
+class MyThread;
+class QwtPlotCurve;
+class QwtPlot;
+class QStatusBar;
+class QCheckBox;
+class QTreeWidget;
+class QTreeWidgetItem;
+class QTabWidget;
+class QPushButton;
+
+class TabPID : public QWidget
+{
+Q_OBJECT
+
+public:
+ TabPID(QWidget *parent = 0);
+
+
+
+
+
+public slots:
+ //void setWasRead();
+ //void quit();
+
+
+private:
+ QPushButton *test;
+};
+

0 comments on commit 3b7caa9

Please sign in to comment.
Something went wrong with that request. Please try again.