-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathparameterpanel.h
104 lines (84 loc) · 2.19 KB
/
parameterpanel.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#ifndef PARAMETERPANEL_H
#define PARAMETERPANEL_H
#include <QMainWindow>
#include <QLabel>
#include <QComboBox>
#include <QLineEdit>
#include <QListWidget>
#include <QListWidgetItem>
#include <QSettings>
#include <QCheckBox>
#include <QMenu>
#include "Utilities/paneldialog.h"
#include "Ffplay/CommandOptions.h"
#include "configpanel.h"
using namespace std;
class StoredOption : public QListWidgetItem
{
public:
StoredOption(const QString& text);
const QString toString();
QString arg;
};
class SavedCmdLines : public QListWidget
{
Q_OBJECT
public:
SavedCmdLines(QMainWindow *parent);
void keyPressEvent(QKeyEvent *event) override;
void mouseDoubleClickEvent(QMouseEvent *event) override;
QMainWindow *mainWindow;
public slots:
void remove();
void rename();
};
class ParameterPanel : public Panel
{
Q_OBJECT
public:
ParameterPanel(QMainWindow *parent);
void setCmdLine();
void addOptionToSaver(OptionDef option);
const QString getOptionStorageString();
void applyStyle(const ColorProfile& profile);
void saveSettings();
void clearSettings();
void restoreSettings();
void fillAutoCmds();
void set(int option_index, QString option_arg);
QComboBox *options;
QLineEdit *parameter;
QLabel *cmdLineEquiv;
QLineEdit *cmdLineName;
SavedCmdLines *savedCmdLines;
vector<OptionDef> saved_options;
QMenu *menu;
QString filters;
QCheckBox *autoLoad;
QComboBox *cmds;
QString currentAutoCmd;
const QString cmdKey = "ParameterPanel/savedCmdLine_";
const QString autoLoadKey = "ParameterPanel/autoLoad";
const QString autoCmdKey = "ParamaterPanel/autoCmd";
public slots:
void set();
void clear();
//void apply();
void optionChanged(int);
void parameterEntered();
void saveCmdLine();
void itemChanged(QListWidgetItem*);
void itemDoubleClicked(QListWidgetItem*);
void showContextMenu(const QPoint&);
void comboActivated(int);
void autoLoadClicked(bool);
void autoCmdIndexChanged(int);
};
class ParameterDialog : public PanelDialog
{
Q_OBJECT
public:
ParameterDialog(QMainWindow *parent);
void show();
};
#endif // PARAMETERPANEL_H