current revision
This commit is contained in:
39
ui/UIHelper.h
Normal file
39
ui/UIHelper.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#ifndef UIHELPER_H
|
||||
#define UIHELPER_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class UIHelper {
|
||||
|
||||
public:
|
||||
|
||||
static int getButtonSize(const QObject* window) {
|
||||
return isLarge(window) ? (48*2) : (48);
|
||||
}
|
||||
|
||||
static int getMainMenuHeight(const QObject* window) {
|
||||
return isLarge(window) ? (64*2) : (64);
|
||||
}
|
||||
|
||||
static int getInfoHeight(const QObject* window) {
|
||||
return isLarge(window) ? (70*2) : (70);
|
||||
}
|
||||
|
||||
static int getPlotHeight(const QObject* window) {
|
||||
return isLarge(window) ? (90*2) : (90);
|
||||
}
|
||||
|
||||
static int getWifiLabelDistY(const QObject* window) {
|
||||
return isLarge(window) ? (13*2) : (13);
|
||||
}
|
||||
static int getWifiLabelDistX(const QObject* window) {
|
||||
return isLarge(window) ? (150*2) : (150);
|
||||
}
|
||||
|
||||
static bool isLarge(const QObject* window) {
|
||||
return (((QWidget*)window)->height() > 1000);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif // UIHELPER_H
|
||||
Reference in New Issue
Block a user