mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 06:20:53 +01:00
Ajout d'un champ "informations" dans le format .elmt afin de stocker diverses informations complementaires, a commencer par l'auteur et la licence de l'element.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@845 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -590,3 +590,32 @@ void AllowInternalConnectionsCommand::undo() {
|
||||
void AllowInternalConnectionsCommand::redo() {
|
||||
element -> setInternalConnections(ic);
|
||||
}
|
||||
|
||||
/**
|
||||
Constructeur
|
||||
@param elmt ElementScene concernee
|
||||
@param old_infos Informations complementaires precedentes
|
||||
@param old_infos Nouvelles informations complementaires
|
||||
@param parent QUndoCommand parent
|
||||
*/
|
||||
ChangeInformationsCommand::ChangeInformationsCommand(ElementScene *elmt, const QString &old_infos, const QString &new_infos, QUndoCommand *parent) :
|
||||
QUndoCommand(QObject::tr("modification informations complementaires", "undo caption"), parent),
|
||||
element(elmt),
|
||||
old_informations_(old_infos),
|
||||
new_informations_(new_infos)
|
||||
{
|
||||
}
|
||||
|
||||
/// Destructeur
|
||||
ChangeInformationsCommand::~ChangeInformationsCommand() {
|
||||
}
|
||||
|
||||
/// Annule le changement d'autorisation pour les connexions internes
|
||||
void ChangeInformationsCommand::undo() {
|
||||
element -> setInformations(old_informations_);
|
||||
}
|
||||
|
||||
/// Refait le changement d'autorisation pour les connexions internes
|
||||
void ChangeInformationsCommand::redo() {
|
||||
element -> setInformations(new_informations_);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user