-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCentralView.cpp
More file actions
44 lines (38 loc) · 978 Bytes
/
CentralView.cpp
File metadata and controls
44 lines (38 loc) · 978 Bytes
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
#include "CentralView.h"
#include "browser/BrowserView.h"
#include "opcua/OpcUaView.h"
#include "settings/SettingsView.h"
#include "ui_CentralView.h"
CentralView::CentralView(BrowserView* browserView,
OpcUaView* opcuaView,
SettingsView *settingsView,
QWidget *parent) :
QWidget(parent),
ui(new Ui::CentralView)
{
ui->setupUi(this);
ui->stackedWidget->addWidget(opcuaView);
ui->stackedWidget->addWidget(browserView);
ui->stackedWidget->addWidget(settingsView);
}
CentralView::~CentralView()
{
delete ui;
}
void CentralView::setView(EView view)
{
switch(view)
{
case EView_OpcUa:
ui->stackedWidget->setCurrentIndex(0);
break;
case EView_DatabaseBrowser:
ui->stackedWidget->setCurrentIndex(1);
break;
case EView_Settings:
ui->stackedWidget->setCurrentIndex(2);
break;
default:
break;
}
}