first push
This commit is contained in:
33
APP/APP_KeyButton.h
Normal file
33
APP/APP_KeyButton.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user