-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdetailview.cpp
More file actions
executable file
·45 lines (33 loc) · 1.2 KB
/
detailview.cpp
File metadata and controls
executable file
·45 lines (33 loc) · 1.2 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
#include <QWidget>
#include <QVBoxLayout>
#include <QTabWidget>
#include "detailview.h"
#include "contentview.h"
#include "editorview.h"
#include "graphsview.h"
#include "stackedgraphsview.h"
DetailView::DetailView(ContentView *parent) :
QWidget(parent)
{
this->contentView = parent;
this->setContentsMargins(0, 0, 0, 0);
// Creating a QTabWidget instance
tabView = new QTabWidget(this);
tabView->setTabPosition(QTabWidget::North);
// Creating the editor tab
editorView = new EditorView(this);
// Creating the graphs tab
graphsView = new GraphsView(this->contentView);
// ...
stackedGraphsView = new StackedGraphsView(this->contentView);
// Adding the temp widgets to the QTabWidget instance
tabView->addTab(editorView, "Edit");
tabView->addTab(graphsView, "Graphs");
tabView->addTab(stackedGraphsView, "Stacked graph");
// Creating a dummy layout to host the QTabWidget instance
QVBoxLayout* dummyLayout = new QVBoxLayout(this);
dummyLayout->addWidget(tabView);
// Removing the default padding introduced by the dummy layout
dummyLayout->setMargin(0);
this->setLayout(dummyLayout);
}