PowerMaster/dataPanel/dpConfigurationDialog.h

72 lines
1.6 KiB
C
Raw Normal View History

2025-01-14 18:39:52 +08:00
#ifndef DPCONFIGURATIONDIALOG_H
#define DPCONFIGURATIONDIALOG_H
#include <QDialog>
#include "dpGlobals.h"
2025-01-14 18:39:52 +08:00
QT_BEGIN_NAMESPACE
namespace Ui {
class dpConfigurationDialog;
}
QT_END_NAMESPACE
class DataPanel;
class QStandardItemModel;
2025-01-22 15:40:50 +08:00
class QStandardItem;
2025-01-14 18:39:52 +08:00
class dpConfigurationDialog : public QDialog
{
Q_OBJECT
public:
dpConfigurationDialog(QWidget *parent = nullptr);
~dpConfigurationDialog();
void setPanel(DataPanel*);
signals:
void sgl_hide();
public slots:
void onBtnClicked_tabBtn();
void onBtnClicked_confirm();
void onBtnClicked_cancle();
void onBtnClicked_remove_type();
void onBtnClicked_remove_source();
void onRadioBtnToggled(bool checked);
void onItemClicked_typeSource(const QModelIndex&);
2025-01-22 15:40:50 +08:00
void onItemClicked_dataSource(const QModelIndex&);
void onComboBoxIndexChanged_axis(int index);
2025-01-22 15:40:50 +08:00
protected:
void showEvent(QShowEvent*);
2025-01-14 18:39:52 +08:00
private:
void initialize();
void copyModelData(QStandardItemModel*, QStandardItemModel*);
2025-01-22 15:40:50 +08:00
void createDataSourceList();
void removeDataSelected(int);
2025-01-14 18:39:52 +08:00
Ui::dpConfigurationDialog* ui;
QPushButton* m_curActiveTab;
DataPanel* m_pDataPanel;
2025-01-22 15:40:50 +08:00
///Models
//dataType
QStandardItemModel* m_pModel_typeSource;
QStandardItemModel* m_pModel_typeSelected;
2025-01-22 15:40:50 +08:00
//dataSource
QStandardItemModel* m_pModel_dataSource;
QStandardItemModel* m_pModel_dataSelected;
2025-09-01 19:57:02 +08:00
//特定配置项
QHash<RealTimeDataType, AxisCfgInfo> m_axisCfgMap;
int m_curAxisComboBoxIndex;
2025-01-14 18:39:52 +08:00
};
#endif