Browse Source

thermostat: edit_dlg: add "add" button (WIP)

master
Richard Genoud 4 years ago
parent
commit
0372d2bd97
2 changed files with 10 additions and 0 deletions
  1. +1
    -0
      soft/thermostat/inc/edit_dlg.h
  2. +9
    -0
      soft/thermostat/src/edit_dlg.cpp

+ 1
- 0
soft/thermostat/inc/edit_dlg.h View File

@ -36,6 +36,7 @@ private:
private slots:
void save(void);
void add(void);
void reject(void);
void delete_prog_clicked(void);


+ 9
- 0
soft/thermostat/src/edit_dlg.cpp View File

@ -65,6 +65,7 @@ EditDlg::EditDlg(int idx, QWidget *parent, Qt::WindowFlags f) : QWidget(parent,
upperLayout->addWidget(&m_default_temperature);
QPushButton *ok_btn = new QPushButton(tr("Ok"), this);
QPushButton *add_btn = new QPushButton(tr("Add"), this);
QPushButton *cancel_btn = new QPushButton(tr("Cancel"), this);
@ -73,17 +74,21 @@ EditDlg::EditDlg(int idx, QWidget *parent, Qt::WindowFlags f) : QWidget(parent,
QSizePolicy::PushButton);
set_font(ok_btn);
set_font(add_btn);
set_font(cancel_btn);
ok_btn->setSizePolicy(*szPolicy);
add_btn->setSizePolicy(*szPolicy);
cancel_btn->setSizePolicy(*szPolicy);
connect(ok_btn, SIGNAL(clicked(void)), this, SLOT(save(void)));
connect(add_btn, SIGNAL(clicked(void)), this, SLOT(add(void)));
connect(cancel_btn, SIGNAL(clicked(void)), this, SLOT(reject(void)));
QHBoxLayout *btnLayout = new QHBoxLayout;
btnLayout->addWidget(cancel_btn);
btnLayout->addWidget(add_btn);
btnLayout->addWidget(ok_btn);
QVBoxLayout *topLayout = new QVBoxLayout;
@ -204,6 +209,10 @@ void EditDlg::reject(void)
emit close_edit_dlg();
}
void EditDlg::add(void)
{
}
void EditDlg::delete_prog_clicked(void)
{
QLayoutItem *lineItem, *item;


Loading…
Cancel
Save