Add Companion Outputs context menu (#5665)

* Start of cut copy paste delete

* Outputs context menu continued

* Mods from testing

* Add tool tip to channel label
This commit is contained in:
Neil Horne
2018-03-25 09:44:41 +02:00
committed by Bertrand Songis
parent 6e756c434a
commit 33998c2981
4 changed files with 241 additions and 98 deletions
+24 -9
View File
@@ -33,16 +33,17 @@ class LimitsGroup
Q_DECLARE_TR_FUNCTIONS(LimitsGroup)
public:
LimitsGroup(Firmware * firmware, TableLayout *tableLayout, int row, int col, int & value, const ModelData & model, int min, int max, int deflt, ModelPanel * panel=NULL);
LimitsGroup(Firmware * firmware, TableLayout * tableLayout, int row, int col, int & value, const ModelData & model, int min, int max, int deflt, ModelPanel * panel=NULL);
~LimitsGroup();
void setValue(int val);
void updateMinMax(int max);
protected:
Firmware * firmware;
QDoubleSpinBox * spinbox;
GVarGroup * gvarGroup;
int & value;
Firmware *firmware;
QDoubleSpinBox *spinbox;
GVarGroup *gvarGroup;
int &value;
double displayStep;
};
@@ -51,12 +52,9 @@ class Channels : public ModelPanel
Q_OBJECT
public:
Channels(QWidget *parent, ModelData & model, GeneralSettings & generalSettings, Firmware * firmware);
Channels(QWidget * parent, ModelData & model, GeneralSettings & generalSettings, Firmware * firmware);
~Channels();
private:
QVector<LimitsGroup *> limitsGroups;
public slots:
void refreshExtendedLimits();
@@ -66,7 +64,24 @@ class Channels : public ModelPanel
void invEdited();
void curveEdited();
void ppmcenterEdited();
void update();
void updateLine(int index);
void chnDelete();
void chnCopy();
void chnPaste();
void chnCut();
void chn_customContextMenuRequested(QPoint pos);
private:
QLineEdit *name[CPN_MAX_CHNOUT];
LimitsGroup *chnOffset[CPN_MAX_CHNOUT];
LimitsGroup *chnMin[CPN_MAX_CHNOUT];
LimitsGroup *chnMax[CPN_MAX_CHNOUT];
QComboBox *invCB[CPN_MAX_CHNOUT];
QComboBox *curveCB[CPN_MAX_CHNOUT];
QSpinBox *centerSB[CPN_MAX_CHNOUT];
QCheckBox *symlimitsChk[CPN_MAX_CHNOUT];
int selectedChannel;
};
#endif // _CHANNELS_H_