12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- #ifndef EDITNODEWIDGET_H
- #define EDITNODEWIDGET_H
- #include <QDialog>
- #include <CNode.h>
- class LineEdit;
- class PushButton;
- class TextEdit;
- class QLabel;
- class QVBoxLayout;
- class QHBoxLayout;
- class QGridLayout;
- class QComboBox;
- class CheckBox;
- /**
- * @brief The EditNodeWidget class
- * 编辑节点
- */
- class EditNodeWidget : public QDialog
- {
- Q_OBJECT
- public:
- EditNodeWidget(QWidget *parent = nullptr);
- CNodeData node() const;
- void setNode(CNodeData n);
- void initWindow();
- void initWidgets();
- void initLayout();
- void connectSignalsAndSlots();
- public slots:
- void slotEditChanged();
- void slotCostComboChanged(int);
- void slotConfirmCLicked();
- void slotConcelClicked();
- signals:
- void sigSaveNode(CNodeData n);
- private:
- void setUpCostTypes();
- private:
- CNodeData m_node;
- /// 名称
- QLabel *m_nameLabel = nullptr;
- LineEdit *m_name = nullptr;
- /// 内涵
- QLabel *m_remarkLabel = nullptr;
- TextEdit *m_remark = nullptr;
- /// 量纲
- QLabel *m_dimenLabel = nullptr;
- LineEdit *m_dimen = nullptr;
- /// 成本效益类型
- QLabel *m_costLabel = nullptr;
- QComboBox *m_costComboBox = nullptr;
- /// 是否生效
- QLabel *m_validLabel = nullptr;
- CheckBox *m_validCheckBox = nullptr;
- PushButton *m_confirm = nullptr;
- PushButton *m_cancel = nullptr;
- QVBoxLayout *m_layout = nullptr;
- QGridLayout *m_gridLayout = nullptr;
- QHBoxLayout *m_btnLayout = nullptr;
- };
- #endif // EDITNODEWIDGET_H
|