QtHPConnect/mainwindow.h

70 lines
1.4 KiB
C
Raw Normal View History

2019-02-10 15:32:15 +02:00
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
2019-02-10 15:43:00 +02:00
#include <QItemSelection>
#include <QModelIndex>
#include <QMdiArea>
#include <QMdiSubWindow>
#include <QSettings>
#include "global.h"
#include "errorhandler.h"
#include "hpusb.h"
#include "datamodel.h"
#include "treemodel.h"
#include "texteditor.h"
#include "hp_mdiwindow.h"
#include "hp_mdivariableedit.h"
class treeModel;
class errorHandler;
2019-02-10 15:32:15 +02:00
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
2019-02-10 15:43:00 +02:00
void openHP();
void writeStatus(QString);
void writeChatter(QString);
void addDummy();
void createActions();
private slots:
void onOpen();
void selectionChangedSlot(const QItemSelection & /*newSelection*/, const QItemSelection & /*oldSelection*/);
void about();
void showContent();
void showCalculator();
void showMessage();
void showMonitor();
void clickedCalculator(QModelIndex);
void exit();
void createLogWindow();
void testFunction();
treeModel * getTreeModel();
2019-02-10 15:32:15 +02:00
private:
2019-02-10 15:43:00 +02:00
errorHandler *pErr;
dataModel * myModel;
treeModel * hpTreeModel;
hpusb * hpapi;
QMdiSubWindow * msgWindow=0;
hp_MdiWindow * logWindow=0;
QTextEdit * logEdit=0;
2019-02-10 15:32:15 +02:00
Ui::MainWindow *ui;
2019-02-10 15:43:00 +02:00
void loadTextFile();
void createTextWindow();
QMdiArea * getMdi();
2019-02-10 15:32:15 +02:00
};
#endif // MAINWINDOW_H