chore(cpn): move global variables from flight/drive modes tab to own tab (#6624)
This commit is contained in:
@@ -41,14 +41,16 @@ class FlightModePanel : public ModelPanel
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FlightModePanel(QWidget *parent, ModelData &model, int modeIdx, GeneralSettings & generalSettings, Firmware * firmware,
|
||||
FilteredItemModel * rawSwitchFilteredModel, QString radioType);
|
||||
FlightModePanel(QWidget *parent, ModelData &model, int modeIdx,
|
||||
GeneralSettings & generalSettings,
|
||||
Firmware * firmware,
|
||||
FilteredItemModel * rawSwitchFilteredModel,
|
||||
QString radioMode);
|
||||
virtual ~FlightModePanel();
|
||||
|
||||
virtual void update();
|
||||
|
||||
signals:
|
||||
void gvNameChanged();
|
||||
void phaseDataChanged();
|
||||
void phaseNameChanged();
|
||||
void phaseSwitchChanged();
|
||||
@@ -64,16 +66,6 @@ class FlightModePanel : public ModelPanel
|
||||
void phaseTrimUse_currentIndexChanged(int index);
|
||||
void phaseTrim_valueChanged();
|
||||
void phaseTrimSlider_valueChanged();
|
||||
void GVName_editingFinished();
|
||||
void phaseGVValue_editingFinished();
|
||||
void phaseGVUse_currentIndexChanged(int index);
|
||||
void phaseGVPopupToggled(bool checked);
|
||||
void phaseGVUnit_currentIndexChanged(int index);
|
||||
void phaseGVPrec_currentIndexChanged(int index);
|
||||
void phaseGVMin_editingFinished();
|
||||
void phaseGVMax_editingFinished();
|
||||
void phaseREValue_editingFinished();
|
||||
void phaseREUse_currentIndexChanged(int index);
|
||||
void onCustomContextMenuRequested(QPoint pos);
|
||||
void cmClear(bool prompt = true);
|
||||
void cmClearAll();
|
||||
@@ -84,16 +76,6 @@ class FlightModePanel : public ModelPanel
|
||||
void cmPaste();
|
||||
void cmMoveDown();
|
||||
void cmMoveUp();
|
||||
void gvOnCustomContextMenuRequested(QPoint pos);
|
||||
void gvCmClear(bool prompt = true);
|
||||
void gvCmClearAll();
|
||||
void gvCmCopy();
|
||||
void gvCmCut();
|
||||
void gvCmDelete();
|
||||
void gvCmInsert();
|
||||
void gvCmPaste();
|
||||
void gvCmMoveDown();
|
||||
void gvCmMoveUp();
|
||||
void onItemModelAboutToBeUpdated();
|
||||
void onItemModelUpdateComplete();
|
||||
|
||||
@@ -102,49 +84,22 @@ class FlightModePanel : public ModelPanel
|
||||
int phaseIdx;
|
||||
FlightModeData & phase;
|
||||
int fmCount;
|
||||
int reCount;
|
||||
int gvCount;
|
||||
int gvIdx;
|
||||
int trimCount;
|
||||
int gvCount;
|
||||
QVector<QLabel *> trimsLabel;
|
||||
QLineEdit * gvNames[CPN_MAX_GVARS];
|
||||
QDoubleSpinBox * gvValues[CPN_MAX_GVARS];
|
||||
QCheckBox * gvPopups[CPN_MAX_GVARS];
|
||||
QComboBox * gvUse[CPN_MAX_GVARS];
|
||||
QComboBox * gvUnit[CPN_MAX_GVARS];
|
||||
QComboBox * gvPrec[CPN_MAX_GVARS];
|
||||
QDoubleSpinBox * gvMin[CPN_MAX_GVARS];
|
||||
QDoubleSpinBox * gvMax[CPN_MAX_GVARS];
|
||||
QSpinBox * reValues[CPN_MAX_ENCODERS];
|
||||
QComboBox * reUse[CPN_MAX_ENCODERS];
|
||||
QVector<QComboBox *> trimsUse;
|
||||
QVector<QSpinBox *> trimsValue;
|
||||
QVector<QSlider *> trimsSlider;
|
||||
Board::Type board;
|
||||
QString radioType;
|
||||
QString radioMode;
|
||||
|
||||
void trimUpdate(unsigned int trim);
|
||||
void updateGVar(int index);
|
||||
void updateRotaryEncoder(int index);
|
||||
void setGVSB(QDoubleSpinBox * spinBox, int min, int max, int val);
|
||||
void populateGvarUnitCB(QComboBox * cb);
|
||||
void populateGvarPrecCB(QComboBox * cb);
|
||||
bool hasClipboardData(QByteArray * data = nullptr) const;
|
||||
bool insertAllowed() const;
|
||||
bool moveDownAllowed() const;
|
||||
bool moveUpAllowed() const;
|
||||
void swapData(int idx1, int idx2);
|
||||
bool gvHasClipboardData() const;
|
||||
bool gvHasDefnClipboardData(QByteArray * data = nullptr) const;
|
||||
bool gvHasValueClipboardData(QByteArray * data = nullptr) const;
|
||||
bool gvHasAllValuesClipboardData(QByteArray * data = nullptr) const;
|
||||
bool gvDeleteAllowed() const;
|
||||
bool gvInsertAllowed() const;
|
||||
bool gvMoveDownAllowed() const;
|
||||
bool gvMoveUpAllowed() const;
|
||||
void gvSwapData(int idx1, int idx2);
|
||||
void connectItemModelEvents(const FilteredItemModel * itemModel);
|
||||
void populateGvarUseCB(QComboBox *b, unsigned int phase);
|
||||
};
|
||||
|
||||
class FlightModesPanel : public ModelPanel
|
||||
@@ -152,7 +107,11 @@ class FlightModesPanel : public ModelPanel
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FlightModesPanel(QWidget *parent, ModelData & model, GeneralSettings & generalSettings, Firmware * firmware, CompoundItemModelFactory * sharedItemModels);
|
||||
FlightModesPanel(QWidget *parent, ModelData & model,
|
||||
GeneralSettings & generalSettings,
|
||||
Firmware * firmware,
|
||||
CompoundItemModelFactory * sharedItemModels,
|
||||
QString radioModes);
|
||||
virtual ~FlightModesPanel();
|
||||
|
||||
public slots:
|
||||
@@ -177,7 +136,7 @@ class FlightModesPanel : public ModelPanel
|
||||
CompoundItemModelFactory *sharedItemModels;
|
||||
FilteredItemModel *rawSwitchFilteredModel;
|
||||
QVector<GenericPanel *> panels;
|
||||
QString radioType;
|
||||
QString radioMode;
|
||||
|
||||
void updateItemModels();
|
||||
void connectItemModelEvents(const FilteredItemModel * itemModel);
|
||||
|
||||
Reference in New Issue
Block a user