-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlabprofiledialog.h
More file actions
63 lines (52 loc) · 1.41 KB
/
labprofiledialog.h
File metadata and controls
63 lines (52 loc) · 1.41 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef LABPROFILEDIALOG_H
#define LABPROFILEDIALOG_H
#include <QDialog>
#include <QMap>
#include <QDir>
#include <QSettings>
#include <QListWidget>
#include <QListWidgetItem>
#include <QAction>
#include <QMenu>
#include <QInputDialog>
#include <QKeyEvent>
#include "profiletreewidget.h"
struct Parameter {
QString name;
QStringList codes;
};
struct Table {
QString name;
QString orientation;
QStringList order;
QList<Parameter> parameters;
};
namespace Ui {
class LabProfileDialog;
}
class LabProfileDialog : public QDialog
{
Q_OBJECT
public:
explicit LabProfileDialog(QWidget *parent = nullptr);
~LabProfileDialog();
private slots:
void on_profileListWidget_itemDoubleClicked(QListWidgetItem *item);
void on_profileListWidget_customContextMenuRequested(const QPoint &pos);
void on_okButton_clicked();
void on_cancelButton_clicked();
void on_predefinedTreeWidget_customContextMenuRequested(const QPoint &pos);
private:
Ui::LabProfileDialog *ui;
QMap<QString, QSettings*> *profiles;
QString selectedProfile;
ProfileTreeWidget *profWidget;
QSettings *settings;
void loadProfiles();
void saveProfile();
void saveParameters();
void loadPreDefined();
void selectLabProfile(QString profileName);
bool createProfileFile(QString profileName);
};
#endif // LABPROFILEDIALOG_H