include planemanager include QVBoxLayout include widgets plane PlaneMa

 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
#include "planemanager.h"
#include <QVBoxLayout>
#include "widgets/plane.h"
PlaneManager::PlaneManager()
{
ui.setupUi(this);
this->setup_ui();
this->setup_signals();
}
PlaneManager::~PlaneManager()
{
}
void PlaneManager::setup_ui()
{
scroll_vbox = new QVBoxLayout();
ui.scroll_area_widget->setLayout(scroll_vbox);
}
void PlaneManager::setup_signals()
{
this->connect(ui.add_button, SIGNAL(clicked()), this, SLOT(add_plane()));
}
void PlaneManager::add_plane()
{
Plane *plane = new Plane();
this->scroll_vbox->addWidget(plane);
}