71 lines
1.5 KiB
C++
71 lines
1.5 KiB
C++
#ifndef DPCONFIGURATIONDIALOG_H
|
|
#define DPCONFIGURATIONDIALOG_H
|
|
|
|
#include <QDialog>
|
|
#include "dpGlobals.h"
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
namespace Ui {
|
|
class dpConfigurationDialog;
|
|
}
|
|
QT_END_NAMESPACE
|
|
|
|
class DataPanel;
|
|
class QStandardItemModel;
|
|
class QStandardItem;
|
|
|
|
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&);
|
|
void onItemClicked_dataSource(const QModelIndex&);
|
|
|
|
void onComboBoxIndexChanged_axis(int index);
|
|
|
|
protected:
|
|
void showEvent(QShowEvent*);
|
|
|
|
private:
|
|
void initialize();
|
|
void copyModelData(QStandardItemModel*, QStandardItemModel*);
|
|
void createDataSourceList();
|
|
void removeDataSelected(int);
|
|
|
|
Ui::dpConfigurationDialog* ui;
|
|
QPushButton* m_curActiveTab;
|
|
|
|
DataPanel* m_pDataPanel;
|
|
|
|
///Models
|
|
//dataType
|
|
QStandardItemModel* m_pModel_typeSource;
|
|
QStandardItemModel* m_pModel_typeSelected;
|
|
//dataSource
|
|
QStandardItemModel* m_pModel_dataSource;
|
|
QStandardItemModel* m_pModel_dataSelected;
|
|
|
|
QHash<RealTimeDataType, AxisCfgInfo> m_axisCfgMap;
|
|
int m_curAxisComboBoxIndex;
|
|
};
|
|
|
|
|
|
#endif
|