func:1.添加删除添加功能。

2.添加编辑属性界面
3.删除添加同步到界面未完成。
This commit is contained in:
2024-05-15 23:06:48 +08:00
parent 950949c130
commit 41713baede
12 changed files with 534 additions and 69 deletions

40
src/attribute_edit.h Normal file
View File

@@ -0,0 +1,40 @@
#ifndef ATTRIBUTE_EDIT_H
#define ATTRIBUTE_EDIT_H
#include <QDialog>
#include <QTableWidget>
#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);
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_{};
};
#endif // ATTRIBUTE_EDIT_H