-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQPlus.h
36 lines (27 loc) · 1.02 KB
/
QPlus.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
#ifndef DEF_QUTIL_H
#define DEF_QUTIL_H
#include <QIcon>
#include <QPixmap>
#include <QLabel>
#include <QPen>
#include <QPainter>
/*
#include <limits>
std::numeric_limits<quint32>::min();
std::numeric_limits<quint32>::max();
*/
#define QUINT8_MAX_VALUE 255
#define QUINT32_MAX_VALUE 4294967295
QIcon getQIcon(QString path);
QPixmap getQPixmap(QString path, quint16 maxSize = 0);
QLabel* getQLabel(QString path, bool needPointingHandCursor = false, QString name = "", QString context = "", quint16 maxSize = 0);
void setColor(QWidget* qWidget, QColor backgroundColor, QColor foregroundColor = QColor()),
drawCircle(QPainter* painter, quint16 centerX, quint16 centerY, quint16 circleSize, QString text, bool shadow = false);
QString getTime(),
call(QString command),
getHoursMinutesSecondsStr(quint32 time);
extern QString assetsFolder;
int distance(int x0, int y0, int x1, int y1);
bool isInEllipse(int h, int k, int x, int y, int rX, int rY);
QFrame* getHorizontalLine();
#endif