Qet graphics table item can be removed from diagram

This commit is contained in:
Claveau Joshua
2020-05-12 11:17:25 +02:00
parent 50f061697c
commit 0015f4a694
11 changed files with 154 additions and 52 deletions

View File

@@ -24,9 +24,16 @@
class Diagram;
class ElementTextItemGroup;
class Terminal;
class QetGraphicsTableItem;
class DeleteQGraphicsItemCommand : public QUndoCommand
{
private :
struct tableStatus {
QetGraphicsTableItem *previous = nullptr;
QetGraphicsTableItem *next = nullptr;
};
public:
DeleteQGraphicsItemCommand(Diagram *diagram, const DiagramContent &content, QUndoCommand * parent = nullptr);
~DeleteQGraphicsItemCommand() override;
@@ -49,6 +56,7 @@ class DeleteQGraphicsItemCommand : public QUndoCommand
QHash <DynamicElementTextItem *, Element *> m_elmt_text_hash; /// Keep the parent element of each deleted dynamic element text item
QHash <DynamicElementTextItem *, ElementTextItemGroup *> m_grp_texts_hash; ///Keep the parent group of each deleted element text item
QList <QPair<Terminal *, Terminal *>> m_connected_terminals;
QHash <QetGraphicsTableItem *, tableStatus> m_tables_status;
};
#endif // DELETEQGRAPHICSITEMCOMMAND_H