123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- #ifndef EVALSCHEMEWIDGET_H
- #define EVALSCHEMEWIDGET_H
- #include "EvalWidget.h"
- class CSchemeView;
- class PushButton;
- class RoundMenu;
- class QHBoxLayout;
- class QAction;
- /**
- * @brief The EvalSchemeWidget class
- * 评估方案
- */
- class EvalSchemeWidget : public EvalWidget
- {
- Q_OBJECT
- public:
- enum Scheme
- {
- Input = 0b1,
- Index = 0b1 << 1,
- Collect = 0b1 << 2,
- Process = 0b1 << 3,
- Output = 0b1 << 4,
- };
- Q_ENUM(Scheme)
- static QString nameOfScheme(Scheme s);
- enum Algorithm
- {
- Alg1 = Process | 0b1 << 11,
- Alg2 = Process | 0b1 << 12,
- Alg3 = Process | 0b1 << 13,
- Alg4 = Process | 0b1 << 14,
- Alg5 = Process | 0b1 << 15,
- };
- Q_ENUM(Algorithm)
- static QString nameOfAlgorithm(Algorithm a);
- explicit EvalSchemeWidget(ProjectInfo *proj, int type, QWidget *parent);
- void initWidgets();
- void refreshSchemeView();
- void testData();
- signals:
- private slots:
- void slotSelectScheme(Scheme sch, PushButton *btn);
- void slotSelectAlgorithm(Algorithm alg);
- void slotClearScheme();
- private:
- PushButton *m_clear = nullptr;
- RoundMenu *m_menu = nullptr;
- CSchemeView *m_schemeView = nullptr;
- QHBoxLayout *m_buttonLayout = nullptr;
- int m_scheme = 0;
- QList<Algorithm> m_algs;
- };
- #endif // EVALSCHEMEWIDGET_H
|