bcrt v1
This commit is contained in:
55
mainwindow.h
Normal file
55
mainwindow.h
Normal file
@@ -0,0 +1,55 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include "declarations.h"
|
||||
|
||||
class MainWindow:public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
void init_mainwindowobj(); //the function of this class
|
||||
void init_connections();
|
||||
explicit MainWindow(); //constructor
|
||||
~MainWindow(); //destructor
|
||||
|
||||
private:
|
||||
void init_table();
|
||||
void set_item(QTableWidget *pTable, int indRow,
|
||||
int indCol, QString data, bool editFlag);
|
||||
|
||||
public slots:
|
||||
//void getlineedit();
|
||||
//void sendcmdwrd();
|
||||
void rthandler();
|
||||
void HexBinChange();
|
||||
|
||||
private:
|
||||
QWidget *Window_1 = new QWidget;
|
||||
QWidget *Window_2 = new QWidget;
|
||||
|
||||
QLabel *HexBinLabel;
|
||||
QPushButton *HexBinButton;
|
||||
|
||||
QLabel *CmdWordLabel;
|
||||
QLineEdit *CmdWordLineEdit;
|
||||
QPushButton *EnterCmdWordButton;
|
||||
QTableWidget *DataTable;
|
||||
|
||||
protected:
|
||||
|
||||
void keyPressEvent(QKeyEvent *event) override
|
||||
{
|
||||
if (loopActive)
|
||||
{
|
||||
loopActive = false;
|
||||
qDebug() << "Key pressed! Stopping loop.";
|
||||
}
|
||||
QWidget::keyPressEvent(event);
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
bool loopActive = true;
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
Reference in New Issue
Block a user