#ifndef EDITNODEWIDGET_H #define EDITNODEWIDGET_H #include #include class LineEdit; class PushButton; class TextEdit; class QLabel; class QVBoxLayout; class QHBoxLayout; class QGridLayout; /** * @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 slotConfirmCLicked(); void slotConcelClicked(); signals: void sigSaveNode(CNodeData n); 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; PushButton *m_confirm = nullptr; PushButton *m_cancel = nullptr; QVBoxLayout *m_layout = nullptr; QGridLayout *m_gridLayout = nullptr; QHBoxLayout *m_btnLayout = nullptr; }; #endif // EDITNODEWIDGET_H