-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.cpp
More file actions
41 lines (36 loc) · 857 Bytes
/
options.cpp
File metadata and controls
41 lines (36 loc) · 857 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
#include "options.h"
#include "ui_options.h"
options::options(QWidget *parent) :
QDialog(parent),
m_ui(new Ui::options)
{
m_ui->setupUi(this);
for (int index = 0; index < QStyleFactory::keys().size(); index++)
{
m_ui->selected_style->addItem(QStyleFactory::keys()[index]);
}
m_ui->selected_plot->addItem("Cartesian");
m_ui->selected_plot->addItem("Polar");
}
options::~options()
{
delete m_ui;
}
int options::chartType() const
{
return m_ui->selected_plot->currentIndex();
}
void options::changeEvent(QEvent *e)
{
switch (e->type()) {
case QEvent::LanguageChange:
m_ui->retranslateUi(this);
break;
default:
break;
}
}
void options::on_buttonBox_accepted() const
{
QApplication::setStyle(m_ui->selected_style->itemText(m_ui->selected_style->currentIndex()));
}