mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-03 11:00:53 +01:00
table item : remove a table remove also all linked tables
This commit is contained in:
@@ -25,15 +25,10 @@ class Diagram;
|
||||
class ElementTextItemGroup;
|
||||
class Terminal;
|
||||
class QetGraphicsTableItem;
|
||||
class QGraphicsScene;
|
||||
|
||||
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;
|
||||
@@ -56,7 +51,8 @@ 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;
|
||||
QHash <QetGraphicsTableItem *, QPointer<QGraphicsScene>> m_table_scene_hash;
|
||||
bool m_remove_linked_table = false;
|
||||
};
|
||||
|
||||
#endif // DELETEQGRAPHICSITEMCOMMAND_H
|
||||
|
||||
Reference in New Issue
Block a user