#ifndef CHANNELONLYDIALOG_H #define CHANNELONLYDIALOG_H #include #include #include "dataformate.h" #include "commonStruct.h" namespace Ui { class ChannelOnlyDialog; } class ChannelOnlyDialog : public QDialog { Q_OBJECT public: explicit ChannelOnlyDialog(QWidget *parent = nullptr); ~ChannelOnlyDialog(); void initWidget(); void setTitle(int title); void setMuscleConnectState(bool flag); // 判断是否打开开关 ST_MuscleParam getValue(); void setFrequentRange(int min,int max); void setPlusRange(int min,int max); void setMinCurrentRange(int min,int max); void setMaxCurrentRange(int min,int max); void setFrequentValue(int value); void setPlusValue(int value); void setMinCurrentValue(int value); void setMaxCurrentValue(int value); int* getMaxCurrentData(); //获取八个通道最大电流值 void setMuscleState(QList); private slots: void on_confirm_Btn_clicked(); void on_frequentMinus_Btn_clicked(); void on_frequentPlus_Btn_clicked(); void on_frequent_Slider_valueChanged(int value); void on_plus_Slider_valueChanged(int value); void on_minCurrent_Slider_valueChanged(int value); void on_maxCurrent_Slider_valueChanged(int value); void on_PWMMinus_Btn_clicked(); void on_PWMPlus_Btn_clicked(); void on_minCurrentMinus_Btn_clicked(); void on_minCurrentPlus_Btn_clicked(); void on_maxCurrentMinus_Btn_clicked(); void on_maxCurrentPlus_Btn_clicked(); void on_switch_Btn_clicked(); void on_frequent_Slider_sliderReleased(); void on_plus_Slider_sliderReleased(); void on_minCurrent_Slider_sliderReleased(); void on_maxCurrent_Slider_sliderReleased(); protected: void paintEvent(QPaintEvent *event); void showEvent(QShowEvent *event); virtual void chcangeEvent(QEvent* event); private: Ui::ChannelOnlyDialog *ui; ST_MuscleParam st_MuscleParam; int m_currentChannel; //当前通道 AnalogSetting st_AnalogSetting; int m_deviceNo; //当前设备号 1,2,3,4 int m_deviceChannel;//当前设备通道 1,2 int maxCurrentData[8]; //最大电流 }; #endif // CHANNELONLYDIALOG_H