first commit
This commit is contained in:
68
project/fm_viewer/cfg/window_settings_emt_kr.h
Normal file
68
project/fm_viewer/cfg/window_settings_emt_kr.h
Normal file
@@ -0,0 +1,68 @@
|
||||
#ifndef WINDOW_SETTINGS_H
|
||||
#define WINDOW_SETTINGS_H
|
||||
#if (USE_DEVICE_SETTINGS && !USE_DEVICE_SETTINGS_JSON && RM_MODEL_EMT_KR)
|
||||
|
||||
#include "../rm_include.h"
|
||||
#include "rm_settings_window_base.h"
|
||||
|
||||
#include "../ui/rm_popup.h"
|
||||
#include <QGroupBox>
|
||||
#include <QRadioButton>
|
||||
|
||||
#define SETTING_NUM_ROW 2
|
||||
|
||||
class RMTextEdit;
|
||||
class WindowSettings : public RMSettingsWindowBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit WindowSettings(QWidget *parent = 0);
|
||||
~WindowSettings();
|
||||
virtual void afterSave() override;
|
||||
virtual bool validateData() override;
|
||||
|
||||
private:
|
||||
QHash<QString,QObject*> _controlByNames; ///! 명칭으로 Contro(Combo,Button) 확인
|
||||
QHash<QObject*,QString> _controlByObjects; ///! 컨트롤로 명칭 확인
|
||||
QHash<QObject*,QStringList> _controlEvents; ///! 컨트롤로 이벤트 확인
|
||||
|
||||
|
||||
// Utility
|
||||
QVBoxLayout* _createRow(QWidget** rw);
|
||||
|
||||
void _createRowS(QWidget* parent, QLayout* playout, QJsonArray items, int depth, int value_column_width = -1);
|
||||
|
||||
// 이벤트가 존재하는 항목 확인하여 ENABLE/DISABLED 등 처리함
|
||||
// 항목 사용에 따라 값을 변경
|
||||
void _refresh(QJsonArray items,int depth);
|
||||
|
||||
// 설정 항목별 리스트를 확인
|
||||
static QStringList _valueStrings(QJsonObject& object,const char* key);
|
||||
|
||||
// 설정 항목별 저장값을 확인
|
||||
static QList<int> _valueIndices(QJsonObject& object,const char* key);
|
||||
|
||||
void _processEvent(QString& key, QStringList& events, int index);
|
||||
|
||||
//! \brief 항목이 변경되면 다른 항목을 업데이트함
|
||||
//! \param event
|
||||
//! \param index
|
||||
void _processUpdateEvent(QString& key, QString& event, int index);
|
||||
void _processEnableEvent(QString& key, QString& event, int index);
|
||||
|
||||
//! \brief 항목이 변경되면 다른 항목을 (UpdateEvent) 를 참조하여 업데이트함
|
||||
//! eg. 화질설정이 변경되면 프리셋을 프리셋내의 UPDATES.. 를 확인하여 업데이트
|
||||
//! \param event
|
||||
//! \param index
|
||||
void _processUpdateOtherEvent(QString& key, QString& event, int index);
|
||||
|
||||
int _getObjectIndex(QString& id);
|
||||
void _setObjectIndex(QObject* sender, int index);
|
||||
void _setObjectEnable(QObject* sender, bool enabled);
|
||||
private slots:
|
||||
void onSelected(int index);
|
||||
|
||||
};
|
||||
#endif // #if (USE_DEVICE_SETTINGS)
|
||||
#endif // WINDOW_SETTINGS_H
|
||||
Reference in New Issue
Block a user