This repository has been archived on 2020-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
Files
YASMIN/ui/UIHelper.h
2016-09-28 12:16:45 +02:00

40 lines
804 B
C++

#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