This repository has been archived by the owner on Mar 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
/
inputdialog.h
110 lines (79 loc) · 2.02 KB
/
inputdialog.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
105
106
107
108
109
110
#ifndef INPUTDIALOG_H
#define INPUTDIALOG_H
#include <QDialog>
#include <QSizeF>
#include <QTimer>
extern int DebugFlat ;
extern QSizeF SizePercent;
namespace Ui {
class InputDialog;
}
class InputDialog : public QDialog
{
Q_OBJECT
signals:
void closedialog(QString &value,bool &SettingMark);
public:
explicit InputDialog(QWidget *parent = nullptr);
~InputDialog();
public:
// QString ReturnValue;
// bool SettingMark = false;
enum Option
{
All = 0,
AD_int = 1,
A_int = 2,
AD_double = 3,
A_double = 4,
C_Lower = 5,
C_Upper = 6 ,
F_ip = 7
};
QStringList Options
{
"-all",
"-int",
"int",
"-double",
"double",
"-lower",
"-upper",
"-ip"
};
public:
void setvalue(QString PlaceholdText , QString InputMode , QString DefaultValue = QString::Null());
private slots:
virtual void on_Btn_Undo_clicked();
virtual void on_Btn_Confirm_clicked();
virtual void on_Func_UL_clicked(bool checked);
virtual void on_Func_Ang_clicked(bool checked);
virtual void on_Func_BS_pressed();
virtual void on_Key_Left_pressed();
virtual void on_Key_Right_pressed();
virtual void on_CharKey_click();
virtual void on_NumKey_click();
virtual void on_SymbKey_click();
virtual void on_Space_clicked();
virtual void on_Beep_clicked();
virtual void released_clicked();
void on_Func_BS_released();
void on_Key_Left_released();
void on_Key_Right_released();
private:
Ui::InputDialog *ui;
// QWidget *FUI;
QList<QPushButton *> NumBtns;
QList<QPushButton *> CharBtns;
QList<QPushButton *> SymbBtns;
QList<QPushButton *> AllBtns;
bool Func_UL_State = false;
bool Func_Ang_State = false;
bool Flag = false;
bool Flag1 = false;
QTimer *timer = new QTimer();
Qt::KeyboardModifier Key_Modifier = Qt::NoModifier;
protected:
void showEvent(QShowEvent *event);
};
#endif // INPUTDIALOG_H