forked from psemiletov/eko
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgui_utils.h
More file actions
65 lines (48 loc) · 1.86 KB
/
gui_utils.h
File metadata and controls
65 lines (48 loc) · 1.86 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
64
65
#ifndef GUI_UTILS_H
#define GUI_UTILS_H
#include <QObject>
#include <QMenu>
#include <QLineEdit>
#include <QSpinBox>
#include <QComboBox>
#include <QBoxLayout>
#include <QDialog>
#include <QListWidget>
class CTextListWindow: public QDialog
{
Q_OBJECT
public:
QListWidget *list;
CTextListWindow (const QString &title, const QString &label_text);
};
QAction* menu_add_item (QObject *obj,
QMenu *menu,
const QString &caption,
const char *method,
const QString &shortkt = "",
const QString &iconpath = ""
);
void create_menu_from_list (QObject *handler,
QMenu *menu,
const QStringList &list,
const char *method
);
void create_menu_from_dir (QObject *handler,
QMenu *menu,
const QString &dir,
const char *method
);
void create_menu_from_dir_dir (QObject *handler,
QMenu *menu,
const QString &dir,
const char *method
);
QLineEdit* new_line_edit (QBoxLayout *layout, const QString &label, const QString &def_value);
QSpinBox* new_spin_box (QBoxLayout *layout, const QString &label, int min, int max, int value, int step = 1);
double input_double_value (const QString &caption, const QString &lbl,
double minval, double maxval, double defval, double step);
QComboBox* new_combobox (QBoxLayout *layout,
const QString &label,
const QStringList &items,
const QString &def_value);
#endif // GUI_UTILS_H