forked from Lucky-spirit/Financial-analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathevgwindow.cpp
More file actions
56 lines (43 loc) · 1.07 KB
/
evgwindow.cpp
File metadata and controls
56 lines (43 loc) · 1.07 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
46
47
48
49
50
51
52
53
54
55
56
#include "evgwindow.h"
#include <iostream>
EvgWindow::EvgWindow(QWidget *parent) :
QMainWindow(parent)
{
createMenus();
createTabs();
createAllModels();
this->statusBar();
this->setWindowIcon(QIcon(":/all/main_icon"));
}
EvgWindow::~EvgWindow()
{
std::cout << "EvgWindow Destructor is called!" << std::endl;
}
QMenuBar *EvgWindow::menuBar() const
{
return pItsMenuBar;
}
void EvgWindow::mayToQuit()
{
delete this;
}
void EvgWindow::createMenus()
{
pItsMenuBar = new EvgMenuBar(this);
this->setMenuBar(pItsMenuBar);
connect(pItsMenuBar, SIGNAL(signToQuit()), this, SLOT(mayToQuit()));
}
void EvgWindow::createTabs()
{
pItsTabWidget = new QTabWidget(this);
this->setCentralWidget(pItsTabWidget);
}
void EvgWindow::createAllModels()
{
pAllModels = new EvgAllModels(this);
connect(pItsMenuBar, SIGNAL(calculateAll()), pAllModels, SLOT(calculateAllModels()));
for (int i = TypeModelInput; i < TypeModelMAX; i++)
{
pItsTabWidget->insertTab(i, pAllModels->model(i), pAllModels->model(i)->getName());
}
}