-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.cpp
39 lines (29 loc) · 870 Bytes
/
mainwindow.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
#include "mainwindow.h"
#include "plotwidget.h"
#include <qtgui>
MainWindow::MainWindow(QWidget *parent) :
QWidget(parent)
{
auto* v = new QVBoxLayout(this);
QSettings setting("setting.ini", QSettings::IniFormat);
setting.beginGroup("title");
QString title = setting.value("title","2010 Chile Earthquake Response Spectrum").toString();
setting.endGroup();
QLabel* label = new QLabel(title);
label->setAlignment(Qt::AlignCenter);
setStyleSheet("background-color : white");
QFont ft = font();
ft.setPointSizeF(16);
label->setFont(ft);
v->addWidget(label);
PlotWidget* plot = new PlotWidget;
v->addWidget(plot);
v->setSpacing(20);
setWindowTitle("CV6103 - GFM & KA");
setting.beginGroup("title");
setting.setValue("title", title);
setting.endGroup();
}
MainWindow::~MainWindow()
{
}