#ifndef ATTRIBUTE_EDIT_H #define ATTRIBUTE_EDIT_H #include #include #include "xml_opr.h" namespace Ui { class CAttributeEdit; } class CAttributeEdit : public QDialog { Q_OBJECT public: explicit CAttributeEdit(QWidget* parent = nullptr); ~CAttributeEdit(); protected: void showEvent(QShowEvent* event) override; public: void set_attribute(const Property_t& property, bool is_key_edit = true); void get_attribute(Property_t& property); private: void show_before(); void init_table(); void handle_ok(); public: bool is_ok_{}; private: Ui::CAttributeEdit* ui; Property_t property_{}; QTableWidget* table_{}; bool is_key_edit_{true}; }; #endif // ATTRIBUTE_EDIT_H