You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
2.5 KiB

#ifndef TGCVIEWMODEL_H
#define TGCVIEWMODEL_H
#include "viewModel/BaseViewModel.h"
#include "viewModel/tgc/DataTgc.h"
#include "viewModel/tgc/dtoInternal/TgcPresetValues.h"
class TgcViewModel : public BaseViewModel
{
Q_OBJECT
US_VIEW_MODEL(TgcViewModel)
SINGLETON(TgcViewModel)
private:
DataTgc_t _data;
TgcPresetValues_t _presetValues;
QList<float> getTgcData();
void saveUserTgc(int index, QList<int> tgcData);
void applyPreset();
//Default Buttons
US_PROPERTY_VIEW_ONLY(QString, tgcResetStr, "2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048")
US_PROPERTY_VIEW_ONLY(QString, tgcDefault0, "819, 819, 819, 819, 819, 819, 819, 819")
US_PROPERTY_VIEW_ONLY(QString, tgcDefault1, "2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048")
US_PROPERTY_VIEW_ONLY(QString, tgcDefault2, "3277, 3277, 3277, 3277, 3277, 3277, 3277, 3277")
US_PROPERTY_VIEW_ONLY(QString, tgcDefault3, "1229, 1433, 1638, 1843, 2048, 2253, 2458, 2662")
US_PROPERTY_VIEW_ONLY(QString, tgcDefault4, "901, 1187, 1475, 1761, 2048, 2335, 2621, 2908")
US_PROPERTY_VIEW_ONLY(QString, tgcDefault5, "410, 819, 1229, 1638, 2048, 2458, 2867, 3277")
US_PROPERTY_VIEW_ONLY(QString, tgcDefault6, "2662, 2458, 2253, 2048, 1843, 1638, 1433, 1229")
US_PROPERTY_VIEW_ONLY(QString, tgcDefault7, "2908, 2621, 2335, 2048, 1761, 1475, 1187, 901")
US_PROPERTY_VIEW_ONLY(QString, tgcDefault8, "3277, 2867, 2458, 2048, 1638, 1229, 819, 410")
//User Buttons
US_PROPERTY(QString, tgcUser1, "819, 819, 819, 819, 819, 819, 819, 819")
US_PROPERTY(QString, tgcUser2, "2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048")
US_PROPERTY(QString, tgcUser3, "3277, 3277, 3277, 3277, 3277, 3277, 3277, 3277")
//Slider
US_PROPERTY(float, tgc0, 2048)
US_PROPERTY(float, tgc1, 2048)
US_PROPERTY(float, tgc2, 2048)
US_PROPERTY(float, tgc3, 2048)
US_PROPERTY(float, tgc4, 2048)
US_PROPERTY(float, tgc5, 2048)
US_PROPERTY(float, tgc6, 2048)
US_PROPERTY(float, tgc7, 2048)
//Save As
US_SIMPLE_BUTTON(tgcSaveAs, "Save As", "", true, true)
US_SIMPLE_BUTTON(tgcUserButton1, "User 1", "", true, true)
US_SIMPLE_BUTTON(tgcUserButton2, "User 2", "", true, true)
US_SIMPLE_BUTTON(tgcUserButton3, "User 3", "", true, true)
//Reset
US_SIMPLE_BUTTON(tgcReset, "Reset", "qrc:/UI/Images/Icon/Reset.svg", true, true)
US_PROPERTY_VIEW_ONLY(bool, enabled, true)
//Joysticks
//US_JOYSTICK_SIMPLE(tgcNearField, "Near Field", true, true)
//US_JOYSTICK_SIMPLE(tgcFarField, "Far Field", true, true)
//US_JOYSTICK_SIMPLE(tgcOveralGain, "Overal Gain", true, true)
};
#endif //TGCVIEWMODEL_H