add hlayout & handle color

This commit is contained in:
王劲鹏
2021-02-24 10:50:41 +08:00
committed by osborn
parent 028334e530
commit 8ffc0753ef
15 changed files with 81 additions and 668 deletions

View File

@@ -1,6 +1,7 @@
#ifndef UTILS_H
#define UTILS_H
#include <QColor>
#include <QFile>
#include <QResource>
#include <QString>
@@ -25,6 +26,14 @@ public:
static inline bool instanceof (const T *) {
return std::is_base_of<Base, T>::value;
}
static QColor doricColor(long colorValue) {
float a = ((colorValue >> 24) & 0xff);
float r = ((colorValue >> 16) & 0xff);
float g = ((colorValue >> 8) & 0xff);
float b = ((colorValue >> 0) & 0xff);
return QColor(r, g, b, a);
}
};
#endif // UTILS_H