#ifndef CHARTSANDCAMERASWND_H #define CHARTSANDCAMERASWND_H #include #include #include #include #include "chartline.h" namespace Ui { class ChartsAndCamerasWnd; } // struct SeriesInfo { // QString seriesName; // QColor lineColor; // QPixmap markerIcon; // QList data; // }; class ChartsAndCamerasWnd : public QMainWindow { Q_OBJECT public: explicit ChartsAndCamerasWnd(QWidget *parent = nullptr); ~ChartsAndCamerasWnd(); void initFrom(); void connectSliderAndLineEdit(QSlider* slider, QLineEdit* lineEdit); void initLineEdits(); void initSliders(); protected: void wheelEvent(QWheelEvent *event); void loadSettings(); void checkSettings(); void loadGroupSettings(int Id, int Index); void showEvent(QShowEvent *event) override; void hideEvent(QHideEvent *event) override; private slots: void on_ZoomUpButton_clicked(); QPixmap getCurrentPixmap() const { return currentPixmap; } // 通用槽函数 void on_CheckBox_clicked(); void on_ZoomOutButton_clicked(); // void on_GreenDiamondcheckBox_clicked(); // void on_YellowDiamondcheckBox_clicked(); // void on_BlackDiamondcheckBox_clicked(); // void on_BlueDiamondcheckBox_clicked(); // void on_BlueHorizontalLinecheckBox_clicked(); // void on_BlueVerticalBarcheckBox_clicked(); // void on_GreenVerticalBarcheckBox_clicked(); // void on_PurpleVerticalBarcheckBox_clicked(); // void on_RedDiamondcheckBox_clicked(); // void on_RedHorizontalLinecheckBox_clicked(); // void on_WhiteVerticalBarcheckBox_clicked(); private: Ui::ChartsAndCamerasWnd *ui; // // 三个 ChartLine 实例 // ChartLine *chartLine; // ChartLine *chartLine1; // ChartLine *chartLine2; // ChartLine 实例 ChartLine *chartLine; ChartLine *chartLine1; ChartLine *chartLine2; // 存储所有系列信息 QMap m_seriesMap; // 初始化系列信息 void initializeSeriesInfo(); QPixmap currentPixmap; qreal scaleFactor; int lastGroupId = -1; int lastIndex = -1; }; #endif // CHARTSANDCAMERASWND_H