diff options
Diffstat (limited to 'confui/ui_tab_node_overview.cpp')
-rw-r--r-- | confui/ui_tab_node_overview.cpp | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/confui/ui_tab_node_overview.cpp b/confui/ui_tab_node_overview.cpp index b60085c..44ef788 100644 --- a/confui/ui_tab_node_overview.cpp +++ b/confui/ui_tab_node_overview.cpp @@ -5,49 +5,16 @@ #include "ui_tab_node_overview.h" #include "ui_node.h" -#include "ui_automation.h" - -class CDAddAutomationWidget : public QWidget { -public: - CDAddAutomationWidget(QWidget* parent) : QWidget(parent) { - QHBoxLayout* main_layout = new QHBoxLayout; - QPushButton* button_add = new QPushButton("Add automation"); - - main_layout->addStretch(); - main_layout->addWidget(button_add); - main_layout->addStretch(); - - setLayout(main_layout); - } - - ~CDAddAutomationWidget() {} -}; CDNodeOverviewTabWidget::~CDNodeOverviewTabWidget() { } CDNodeOverviewTabWidget::CDNodeOverviewTabWidget(CDMainWindow* main_window) : QWidget(main_window) { this->mainwindow = main_window; - - QVBoxLayout* main_layout = new QVBoxLayout; - QScrollArea* scroll_area = new QScrollArea; - QWidget* scroll_container = new QWidget; - QVBoxLayout* scroll_inner = new QVBoxLayout; - - scroll_area->setWidgetResizable(true); - scroll_area->setFrameShape(QFrame::NoFrame); - scroll_area->setBackgroundRole(QPalette::Window); - scroll_area->setFrameShadow(QFrame::Plain); - scroll_area->setWidget(scroll_container); - scroll_area->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); - - scroll_container->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); - scroll_container->setLayout(scroll_inner); + main_layout = new CDScrollContainerLayout(this); vector<cd_s_node*> nodes = this->mainwindow->mesh_connector->get_nodes(); CDNodeWidget* nd_w = new CDNodeWidget(nodes[0], this); - scroll_inner->addWidget(nd_w); - - main_layout->addWidget(scroll_area); + main_layout->addWidget(nd_w); update(); setLayout(main_layout); |