2026-03-26 10:45:29 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
2026-04-17 16:25:19 +08:00
|
|
|
#include <QtCore/QHash>
|
|
|
|
|
#include <QtCore/QString>
|
|
|
|
|
#include <QtCore/QVector>
|
2026-03-26 10:45:29 +08:00
|
|
|
|
|
|
|
|
struct Lgc_Core_Struct_State;
|
|
|
|
|
|
2026-04-17 16:25:19 +08:00
|
|
|
enum class Lgc_FunctionFeature_Type : quint8
|
2026-03-26 10:45:29 +08:00
|
|
|
{
|
2026-04-17 16:25:19 +08:00
|
|
|
KeyCombination = 0,
|
|
|
|
|
KeySequence = 1,
|
|
|
|
|
Website = 2
|
2026-03-26 10:45:29 +08:00
|
|
|
};
|
|
|
|
|
|
2026-04-17 16:25:19 +08:00
|
|
|
struct Lgc_FunctionFeature_Definition
|
|
|
|
|
{
|
|
|
|
|
int Id = 0;
|
|
|
|
|
QString Name;
|
|
|
|
|
QString Description;
|
|
|
|
|
Lgc_FunctionFeature_Type Type = Lgc_FunctionFeature_Type::KeyCombination;
|
|
|
|
|
QString SequenceText;
|
|
|
|
|
QString WebsiteUrl;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct Lgc_FunctionButton_Config
|
|
|
|
|
{
|
|
|
|
|
QHash<int, Lgc_FunctionFeature_Definition> FeatureMap;
|
|
|
|
|
QHash<quint16, int> UsageFeatureIdMap;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
QString Lgc_FunctionButton_GetUsageShortText(quint16 Usage);
|
|
|
|
|
QString Lgc_FunctionButton_GetFeatureTypeText(Lgc_FunctionFeature_Type Type);
|
|
|
|
|
QVector<quint16> Lgc_FunctionButton_GetConfigurableUsages();
|
|
|
|
|
QVector<int> Lgc_FunctionButton_GetFeatureIdList(const Lgc_FunctionButton_Config& Config);
|
|
|
|
|
Lgc_FunctionFeature_Definition Lgc_FunctionButton_GetFeature(
|
|
|
|
|
const Lgc_FunctionButton_Config& Config,
|
|
|
|
|
int FeatureId);
|
|
|
|
|
QString Lgc_FunctionButton_GetFeatureName(const Lgc_FunctionFeature_Definition& Feature);
|
|
|
|
|
QString Lgc_FunctionButton_GetFeatureDescription(const Lgc_FunctionFeature_Definition& Feature);
|
|
|
|
|
QString Lgc_FunctionButton_GetFeatureDescriptionById(
|
|
|
|
|
const Lgc_FunctionButton_Config& Config,
|
|
|
|
|
int FeatureId);
|
|
|
|
|
QString Lgc_FunctionButton_GetFeatureBindingSummary(
|
|
|
|
|
const Lgc_FunctionButton_Config& Config,
|
|
|
|
|
int FeatureId);
|
|
|
|
|
int Lgc_FunctionButton_AddFeature(Lgc_FunctionButton_Config& Config);
|
|
|
|
|
void Lgc_FunctionButton_RemoveFeature(Lgc_FunctionButton_Config& Config, int FeatureId);
|
|
|
|
|
void Lgc_FunctionButton_SetFeature(
|
|
|
|
|
Lgc_FunctionButton_Config& Config,
|
|
|
|
|
const Lgc_FunctionFeature_Definition& Feature);
|
|
|
|
|
int Lgc_FunctionButton_GetUsageFeatureId(
|
|
|
|
|
const Lgc_FunctionButton_Config& Config,
|
|
|
|
|
quint16 Usage);
|
|
|
|
|
void Lgc_FunctionButton_SetUsageFeatureId(
|
|
|
|
|
Lgc_FunctionButton_Config& Config,
|
|
|
|
|
quint16 Usage,
|
|
|
|
|
int FeatureId);
|
|
|
|
|
bool Lgc_FunctionButton_HasUsageFeature(
|
|
|
|
|
const Lgc_FunctionButton_Config& Config,
|
|
|
|
|
quint16 Usage);
|
|
|
|
|
|
|
|
|
|
bool Lgc_FunctionButton_SendUsageToWindows(quint16 Usage, bool IsPressed);
|
|
|
|
|
bool Lgc_FunctionButton_RunBinding(
|
|
|
|
|
Lgc_Core_Struct_State& State,
|
2026-03-26 10:45:29 +08:00
|
|
|
quint16 Usage,
|
2026-04-17 16:25:19 +08:00
|
|
|
QString& TextStatus);
|