-
Notifications
You must be signed in to change notification settings - Fork 1
/
leftmenu.cpp
46 lines (34 loc) · 1.11 KB
/
leftmenu.cpp
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
#include "leftmenu.h"
#include <QVBoxLayout>
#include <QApplication>
#include <QDesktopWidget>
#include "mainwindow.h"
#include "inputmenu.h"
#include "displaymenu.h"
#include "outputmenu.h"
LeftMenu::LeftMenu(MainWindow *window)
{
setParent(window);
int screenHeight = QApplication::desktop()->height();
vertSpace = Tools::intRound(screenHeight*1.0/360);
createSubMenus();
}
void LeftMenu::createSubMenus()
{
inputMenu = new InputMenu(this);
inputMenu->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
inputMenu->setEnabled(true);
outputMenu = new OutputMenu(this);
outputMenu->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
outputMenu->setEnabled(false);
displayMenu = new DisplayMenu(this);
displayMenu->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
displayMenu->setEnabled(false);
layout = new QVBoxLayout;
layout->setMargin(3);
layout->setSpacing(10);
layout->addWidget(inputMenu, Qt::AlignCenter);
layout->addWidget(outputMenu, Qt::AlignCenter);
layout->addWidget(displayMenu, Qt::AlignCenter);
setLayout(layout);
}