hivemind 1.0.0
Loading...
Searching...
No Matches
main_content.cpp
Go to the documentation of this file.
1#include "gui/main_content.h"
2
4
5#include <QPushButton>
6#include <QSplitter>
7
8namespace Gui
9{
10 MainContent::MainContent(QWidget* parent)
11 : QWidget(parent), m_Layout(new QGridLayout(this)),
12// m_Scenario(std::make_shared<Scenario>(
13// "Test scenario", GeographicalCoordinate(59.66584230, 9.65059460),
14// 2700)),
15 m_Sidebar(new Sidebar), m_TabWidget(new TabWidget(this))
16 {
17 setObjectName("MainContent");
18 QSplitter* splitter = new QSplitter(Qt::Horizontal, this);
19 splitter->addWidget(m_Sidebar);
20 splitter->addWidget(m_TabWidget);
21 splitter->setStretchFactor(0, 1);
22 splitter->setStretchFactor(1, 1000);
23
24 splitter->setChildrenCollapsible(false);
25
26 m_Layout->addWidget(splitter, 0, 0);
27 m_Layout->setColumnStretch(0, 1);
28 m_Layout->setRowStretch(0, 1);
29 }
30
31} // namespace Gui
MainContent(QWidget *parent=nullptr)
Constructs the main content widget.
Sidebar * m_Sidebar
The sidebar of the main content.
Definition: main_content.h:35
TabWidget * m_TabWidget
The tab widget of the main content.
Definition: main_content.h:43
QGridLayout * m_Layout
The layout of the main content.
Definition: main_content.h:29
The sidebar of the main window.
Definition: sidebar.h:23
The tab widget of the main window.
Definition: tab_widget.h:19
Definition: action.h:6