31 lines
790 B
C++
31 lines
790 B
C++
#ifndef STRUCTDATACAUSEEDITDLG_H
|
|
#define STRUCTDATACAUSEEDITDLG_H
|
|
/**
|
|
* 结构化数据展示中的量测事件cause配置界面
|
|
* */
|
|
#include <QDialog>
|
|
#include <QCheckBox>
|
|
#include <QDoubleSpinBox>
|
|
#include <QDialogButtonBox>
|
|
|
|
class StructDataCauseEditDlg : public QDialog {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit StructDataCauseEditDlg(const QMap<QString, double>& initialData,QWidget* parent = nullptr);
|
|
|
|
QMap<QString, double> getData() const;
|
|
void setData(const QMap<QString, double>& data);
|
|
|
|
void setupUI();
|
|
void updateUIFromData();
|
|
void updateTotal();
|
|
private:
|
|
QStringList m_availableKeys;
|
|
QMap<QString, QCheckBox*> m_checkBoxes;
|
|
QMap<QString, QDoubleSpinBox*> m_spinBoxes;
|
|
QDialogButtonBox* m_buttonBox;
|
|
QMap<QString, double> m_data;
|
|
};
|
|
#endif
|