1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- #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);
- /* 刷新布局 */
- void refreshLayout();
- signals:
- /* 执行了exec信号 */
- void signal_exec();
- protected:
- /* 事件过滤器 */
- bool eventFilter(QObject *watched, QEvent *event) override;
- /* 显示事件 */
- void showEvent(QShowEvent *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 OscChnNum channel, const QString &channelName);
- /* 刷新listWidget */
- void do_layoutItem();
- /* 重新设置序号并刷新显示 */
- void do_setItemNum();
- private:
- /* 布局item */
- void layoutItem(int num);
- /* 重新设置Item序号 */
- void resetItemNum();
- /* 添加或删除项 */
- void addOrDelItem(int num);
- public:
- int m_row = 0; /* 行 */
- int m_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;
- QList<OneChannelInfo> m_listChannelInfo; /* 可用的通道信息 */
- };
- #endif // SETTINGNUM_H
|