-
Notifications
You must be signed in to change notification settings - Fork 0
/
ffoptions.h
72 lines (59 loc) · 1.71 KB
/
ffoptions.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#ifndef FFOPTIONS_H
#define FFOPTIONS_H
#include "AbstructOption.h"
#include <QObject>
#include <QWidget>
#include <QComboBox>
#include <QCheckBox>
#include <QLineEdit>
#include <QString>
#include <QLabel>
#include <QHBoxLayout>
#include <vector>
#include <QMessageBox>
#include <QInputDialog>
#include <set>
using std::pair;
using std::vector;
class FFOptionsCombo : public AbstructOption
{
public:
FFOptionsCombo(QWidget* parent = nullptr);
FFOptionsCombo(QString name, QString base, QString hint, QWidget* parent = nullptr);
virtual ~FFOptionsCombo();
int sum;
QString name, baseCommand, hint;
QLabel* text;
QComboBox* chooseList;
QHBoxLayout* layout;
vector<QString> display_name;
vector<pair<bool, QString>> commands;
std::set<int> customAdd;
virtual QString getCommand();
virtual QString setInside(int now = 0);
virtual int getCurrentState();
virtual void read(const QJsonObject &json);
virtual void write(QJsonObject &json);
void addCustomItem();
void addItem(bool fromBase, QString display, QString command);
void init();
};
class FFOptionsCheck : public AbstructOption
{
Q_OBJECT
public:
FFOptionsCheck(QWidget* parent = nullptr);
FFOptionsCheck(QString name, QString command_checked, QString command_unchecked, int st, QWidget* parent = nullptr);
virtual ~FFOptionsCheck();
int state;
QString name, command_checked, command_unchecked;
QCheckBox* box;
QHBoxLayout* layout;
virtual QString getCommand();
virtual QString setInside(int now = 0);
virtual int getCurrentState();
virtual void read(const QJsonObject &json);
virtual void write(QJsonObject &json);
void init();
};
#endif // FFOPTIONS_H