#ifndef SINGLECAMERAOPERATIONWND_H #define SINGLECAMERAOPERATIONWND_H #include #include #include namespace Ui { class SingleCameraOperationWnd; } class SingleCameraOperationWnd : public QMainWindow { Q_OBJECT public: explicit SingleCameraOperationWnd(QWidget *parent = nullptr); ~SingleCameraOperationWnd(); void initFrom(); void connectSliderAndLineEdit(QSlider* slider, QLineEdit* lineEdit); void initSliders(); void initLineEdits(); void saveSliderStates(); void loadSliderStates(); void closeEvent(QCloseEvent *event); void loadGroupSettings(int Id, int Index); public slots: // 确保这里声明了槽函数 void onComboBoxIndexChanged(int index); // 确保签名匹配 QString getImagePathFromIndex(int index); protected: void wheelEvent(QWheelEvent *event); void loadSettings(); void checkSettings(); void showEvent(QShowEvent *event) override; void hideEvent(QHideEvent *event) override; private slots: void on_ZoomUpButton_clicked(); QPixmap getCurrentPixmap() const { return currentPixmap; } void on_ZoomOutButton_clicked(); private: Ui::SingleCameraOperationWnd *ui; QPixmap currentPixmap; qreal scaleFactor; int lastGroupId = -1; int lastIndex = -1; }; #endif // SINGLECAMERAOPERATIONWND_H