Replace AddItemCommand class by AddGraphicsObjectCommand

The class is the same except the name and the use of QPointer to avoid
segfault with deleted QGraphicsObject.
This commit is contained in:
joshua
2021-02-07 16:20:55 +01:00
parent ac23010559
commit 0c4f87bd76
14 changed files with 180 additions and 94 deletions

View File

@@ -1,5 +1,5 @@
/*
Copyright 2006-2020 The QElectroTech Team
Copyright 2006-2021 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
@@ -29,20 +29,6 @@
#include <QPropertyAnimation>
QString itemText(const QetGraphicsItem *item) {
return item->name();
}
QString itemText(const IndependentTextItem *item) {
Q_UNUSED(item)
return QObject::tr("un champ texte");
}
QString itemText(const Conductor *item) {
Q_UNUSED(item)
return QObject::tr("un conducteur");
}
/**
@brief PasteDiagramCommand::PasteDiagramCommand
Constructor