forked from psemiletov/tea-qt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gui_utils.h
52 lines (39 loc) · 1.57 KB
/
gui_utils.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
#ifndef GUI_UTILS_H
#define GUI_UTILS_H
#include <QObject>
#include <QMenu>
#include <QLineEdit>
#include <QSpinBox>
#include <QComboBox>
#include <QBoxLayout>
#include <QDir>
void create_menu_from_list (QObject *handler,
QMenu *menu,
const QStringList &list,
const char *method
);
void create_menu_from_themes (QObject *handler,
QMenu *menu,
const QString &dir,
const char *method
);
void create_menu_from_dir (QObject *handler,
QMenu *menu,
const QString &dir,
const char *method
);
QImage image_scale_by (const QImage &source,
bool by_side,
int value,
Qt::TransformationMode mode);
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);
QComboBox* new_combobox (QBoxLayout *layout,
const QString &label,
const QStringList &items,
const QString &def_value);
QComboBox* new_combobox (QBoxLayout *layout,
const QString &label,
const QStringList &items,
int index);
#endif // GUI_UTILS_H