configwindow.cpp 1.34 KB
#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){

}