current revision

This commit is contained in:
2016-09-28 12:16:45 +02:00
parent 075d8bb633
commit d47322e73b
90 changed files with 8228 additions and 606 deletions

39
ui/UIHelper.h Normal file
View 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