first commit

This commit is contained in:
2026-02-21 17:11:31 +09:00
commit 18b4338361
4001 changed files with 365464 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
#ifndef RM_VALUE_SELECTOR_H
#define RM_VALUE_SELECTOR_H
#include <QObject>
#include <QList>
class QJsonObject;
class RMValueSelector
{
public:
#if (USE_JSON_SETTINGS)
explicit RMValueSelector(int object);
protected:
int _object;
unsigned char realValue(int index);
int realIndex(unsigned char value);
#else // USE_JSON_SETTINGS
public:
RMValueSelector(unsigned char* value,QList<int> indexMap);
unsigned char realValue(int index)
{
return _indexMap.isEmpty() ? (unsigned char)index : (unsigned char)_indexMap[index];
}
int realIndex(unsigned char value)
{
return _indexMap.isEmpty() ? (int)value : _indexMap.indexOf(value);
}
protected:
QList<int> _indexMap;
unsigned char* _value;
#endif // USE_JSON_SETTINGS
};
class RMValueUpdater : public QObject
{
Q_OBJECT
public:
explicit RMValueUpdater(QObject* parent = nullptr) : QObject(parent){
}
// SIGNAL 연동을 위해 사용
static RMValueUpdater* instance()
{
static RMValueUpdater * _instance = 0;
if ( _instance == 0 ) {
_instance = new RMValueUpdater();
}
return _instance;
}
signals:
void updateByValues();
};
#endif // RM_VALUE_SELECTOR_H