-
Notifications
You must be signed in to change notification settings - Fork 0
/
DriverSettings.h
executable file
·50 lines (41 loc) · 1.02 KB
/
DriverSettings.h
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
47
48
49
50
#ifndef DRIVERSETTINGS_H
#define DRIVERSETTINGS_H
#include <QScopedPointer>
#include <QWidget>
class QSettings;
namespace Ui {
class DriverSettings;
}
class DriverSettings : public QWidget {
Q_OBJECT
public:
explicit DriverSettings(QWidget *parent = nullptr);
~DriverSettings();
struct Information {
QString driverName;
QString driverCode;
QString driverPhone;
QString employerName;
QString vehicleCode;
QString stringify() const {
static const QString result(
"Driver Name: %1 , \tDriverCode: %2\n"
"Driver Phone: %3,\n"
"Employer Name: %4,\n"
"Vehicle Code: %5.\n");
return result.arg(driverName)
.arg(driverCode)
.arg(driverPhone)
.arg(employerName)
.arg(vehicleCode);
}
};
Information info() const;
private slots:
void load();
void save();
private:
Ui::DriverSettings *ui;
QScopedPointer<QSettings> _settings;
};
#endif // DRIVERSETTINGS_H