1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- #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;
- /**
- * @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
|