-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathQtUtil.h
33 lines (28 loc) · 1019 Bytes
/
QtUtil.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
#ifndef QTUTIL_H
#define QTUTIL_H
//// use expression as sub-expression,
//// then make type of full expression int, discard result
//#define UNUSED(x) (void)(sizeof((x), 0))
#include <QImage>
class QtUtil
{
public:
static QString getAppsPath();
static QString getRealAppDirPath();
static QString getTempFolderPath();
static QString getGsPath();
static QString getGxpsPath();
static QString eventTypeName(QEvent *event);
static QString extensionFromPath(QString path);
static QString extensionFromFilter(QString filter);
static QRect mapToGlobal ( QWidget*widget, QRect r);
static QRect mapFromGlobal ( QWidget*widget, QRect r);
static QStringList getRecentFileList();
static void setRecentFileList (QStringList list);
static void addRecentFile(QString path);
static void removeRecentFile(QString path);
static const int maxRecentFiles = 10;
static QString getLastOpenFileDir();
static void setLastOpenFileDir(QString val);
};
#endif // QTUTIL_H