-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBaseClass.cpp
More file actions
33 lines (27 loc) · 939 Bytes
/
Copy pathBaseClass.cpp
File metadata and controls
33 lines (27 loc) · 939 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
#include "BaseClass.h"
BaseClass::BaseClass(QWidget* parent) : QDialog(parent)
{
windowSetup();
mainLayout = new QVBoxLayout(this);
// top label
topLabel = new QLabel(this);
mainLayout->addWidget(topLabel);
// logo label
logoLabel = new QLabel(this);
mainLayout->addWidget(logoLabel);
// button box
buttonBox = new QDialogButtonBox(this);
leftButton = new QPushButton(this);
rightButton = new QPushButton(this);
buttonBox->addButton(leftButton, QDialogButtonBox::NoRole); // derived classes choose role
buttonBox->addButton(rightButton, QDialogButtonBox::NoRole);
mainLayout->addWidget(buttonBox);
setLayout(mainLayout);
}
void BaseClass::windowSetup()
{
QPixmap logoPixmap(":/images/logo/logo.png");
setWindowIcon(QIcon(logoPixmap));
setWindowFlags(windowFlags() | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint);
setWindowTitle("DSP");
}