34 lines
794 B
C++
34 lines
794 B
C++
#pragma once
|
|
|
|
#include "APP/APP_KeypadModel.h"
|
|
#include <QtGui/QColor>
|
|
#include <QtWidgets/QPushButton>
|
|
|
|
namespace APP {
|
|
|
|
class APP_KeyButton : public QPushButton
|
|
{
|
|
public:
|
|
explicit APP_KeyButton(const APP_KeyInfo& KeyInfo, QWidget* parent = nullptr);
|
|
|
|
void App_Func_SetLatched(bool IsLatched);
|
|
void App_Func_SetPressed(bool IsPressed);
|
|
void App_Func_SetHintText(const QString& HintText);
|
|
|
|
protected:
|
|
void paintEvent(QPaintEvent* event) override;
|
|
|
|
private:
|
|
QColor App_Func_GetAccentColor() const;
|
|
QColor App_Func_GetBackgroundColor() const;
|
|
QColor App_Func_GetBorderColor() const;
|
|
QColor App_Func_GetTextColor() const;
|
|
|
|
APP_KeyInfo appKeyInfo;
|
|
QString appHintText;
|
|
bool appIsLatched = false;
|
|
bool appIsPressed = false;
|
|
};
|
|
|
|
} // namespace APP
|