1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #ifndef SETTINGNUM_H
- #define SETTINGNUM_H
- #include <QDialog>
- #include "spdlog/spdlog.h"
- #include "EyeMapInfo.h"
- class OneShadow;
- class OneSettingItem;
- namespace Ui {
- class SettingNum;
- }
- class SettingNum : public QDialog
- {
- Q_OBJECT
- public:
- explicit SettingNum(QDialog *parent = nullptr);
- ~SettingNum();
- /* 设置行数和列数 */
- void setRowAndColumn(int row, int column);
- /* 设置每个项的信息 */
- void setEveryEyeMapInfo(const QList<OneEyeMapInfo> &listInfo);
- /* 设置可用的通道信息 */
- void setChannelList(const QList<OneChannelInfo> &listChannelInfo);
- protected:
- void paintEvent(QPaintEvent *event) override;
- private slots:
- /* 关闭按钮槽函数 */
- void do_pBtn_close();
- /* 点击了OK按钮 */
- void do_pBtn_ok();
- /* 点击了取消按钮 */
- void do_pBtn_cancel();
- /* 选择行和列槽函数 */
- void do_selectRowAndColumn(int index);
- /* 通道选择槽函数,选择了一个通道,取消其他项可能已经选择的相同通道 */
- void do_selectChannel(const int channel, const QString &channelName);
- private:
- /* 布局item */
- void layoutItem(int num);
- public:
- int row = 0; /* 行 */
- int column = 0; /* 列 */
- bool isOk = false; /* 是否点击了OK按钮 */
- private:
- Ui::SettingNum *ui;
- std::shared_ptr<spdlog::logger> m_logger = nullptr;
- OneShadow *m_shadow = nullptr;
- QList<OneSettingItem*> m_listItem;
- };
- #endif // SETTINGNUM_H
|