first push

This commit is contained in:
2026-04-03 09:26:10 +08:00
parent 2937a44e07
commit 025b88e366
41 changed files with 6842 additions and 0 deletions

52
APP/APP_KeypadModel.h Normal file
View File

@@ -0,0 +1,52 @@
#pragma once
#include <QtCore/QString>
#include <QtCore/QStringList>
#include <QtCore/QVector>
namespace APP {
enum class APP_KeyTone
{
Normal,
Aqua,
Amber,
Blue
};
struct APP_KeyInfo
{
QString id;
QString label;
QString hint;
quint16 usage = 0;
int row = 0;
int column = 0;
int rowSpan = 1;
int columnSpan = 1;
APP_KeyTone tone = APP_KeyTone::Normal;
};
class APP_KeypadModel
{
public:
APP_KeypadModel();
const QVector<APP_KeyInfo>& App_Func_GetKeyList() const;
bool App_Func_IsLatched(const QString& KeyId) const;
bool App_Func_IsPressed(const QString& KeyId) const;
quint16 App_Func_GetUsageFromKeyId(const QString& KeyId) const;
QString App_Func_GetKeyIdFromUsage(quint16 Usage) const;
QString App_Func_GetLabelFromUsage(quint16 Usage) const;
QString App_Func_GetDefaultHint(const QString& KeyId) const;
void App_Func_SetNumLockOn(bool IsOn);
void App_Func_ClearPressedKeys();
void App_Func_SetPressedKeysFromUsageList(const QVector<quint16>& UsageList);
private:
QVector<APP_KeyInfo> appKeyList;
QStringList appPressedKeyIdList;
bool appNumLockOn = false;
};
} // namespace APP