-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtimeintervaldialog.cpp
More file actions
44 lines (37 loc) · 1.04 KB
/
timeintervaldialog.cpp
File metadata and controls
44 lines (37 loc) · 1.04 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
#include "timeintervaldialog.h"
#include "ui_timeintervaldialog.h"
TimeIntervalDialog::TimeIntervalDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::TimeIntervalDialog)
{
ui->setupUi(this);
QSettings settings("Krzysztof Kruk", "AutonomousDroneCrashSystem");
settings.beginGroup("TIME_INTERVAL");
timeInterval = settings.value("SEND_TIME_INTERVAL", 1).toInt();
ui->spinBoxTimeInterval->setValue(timeInterval);
settings.endGroup();
}
TimeIntervalDialog::~TimeIntervalDialog()
{
QSettings settings("Krzysztof Kruk", "AutonomousDroneCrashSystem");
settings.beginGroup("TIME_INTERVAL");
settings.setValue("SEND_TIME_INTERVAL", timeInterval);
settings.endGroup();
delete ui;
}
void TimeIntervalDialog::on_buttonBox_accepted()
{
timeInterval = ui->spinBoxTimeInterval->value();
}
void TimeIntervalDialog::on_buttonBox_rejected()
{
//do nothing
}
int TimeIntervalDialog::getTimeInterval() const
{
return timeInterval;
}
void TimeIntervalDialog::setTimeInterval(int value)
{
timeInterval = value;
}