configwindow.cpp
1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#include "configwindow.h"
#include "ui_configwindow.h"
#include "functiontestwindow.h"
#include "engineermenuwindow.h"
#include "configpanelbutton.h"
ConfigWindow::ConfigWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::ConfigWindow)
{
ui->setupUi(this);
ui->clockContainer->setParent(ui->upperStack);
setAttribute(Qt::WA_DeleteOnClose);
ui->scrollAreaMenuLayout->setAlignment(Qt::AlignTop);
ConfigPanelButton *configbtn;
for(int i = 0;i <20;i++){
configbtn = new ConfigPanelButton(this,i);
configbtn->showFavoriteButton();
configbtn->setText("TEST");
configbtn->setValue("test");
ui->scrollAreaMenuLayout->addWidget(configbtn);
connect(configbtn,SIGNAL(clicked(uint16_t)),SLOT(onConfigBtnClicked(uint16_t)));
}
}
ConfigWindow::~ConfigWindow()
{
delete ui;
}
void ConfigWindow::on_pushButton_clicked()
{
}
void ConfigWindow::on_backButton_clicked()
{
close();
}
void ConfigWindow::on_pushButton_3_clicked()
{
EngineerMenuWindow *w = new EngineerMenuWindow(this);
w->setWindowModality(Qt::WindowModal);
w->showFullScreen();
}
void ConfigWindow::on_pushButton_8_clicked()
{
}
void ConfigWindow::onConfigBtnClicked(uint16_t id){
qDebug() << "pressed id " << id;
}
void ConfigWindow::onConfigCheckBtnClicked(uint16_t id, bool checked){
}