diff options
Diffstat (limited to 'confui/ui_tab_automations.cpp')
-rw-r--r-- | confui/ui_tab_automations.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/confui/ui_tab_automations.cpp b/confui/ui_tab_automations.cpp index 53349dd..89ad5d4 100644 --- a/confui/ui_tab_automations.cpp +++ b/confui/ui_tab_automations.cpp @@ -8,8 +8,18 @@ using std::pair; class CDAddAutomationWidget : public QWidget { +private: + CDAutomationsTabWidget* _parent; + public: + void new_automation() { + g_cd_mesh_connector->create_link(); + _parent->update(); + } + CDAddAutomationWidget(QWidget* parent) : QWidget(parent) { + _parent = (CDAutomationsTabWidget*) parent; + QHBoxLayout* main_layout = new QHBoxLayout; QPushButton* button_add = new QPushButton("Add automation"); @@ -17,6 +27,8 @@ public: main_layout->addWidget(button_add); main_layout->addStretch(); + connect(button_add, &QPushButton::clicked, this, &CDAddAutomationWidget::new_automation); + setLayout(main_layout); } |