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:
xavier
2010-02-07 17:07:22 +00:00
parent 7d9bea480c
commit 275d08b2bc
11 changed files with 147 additions and 2 deletions

View File

@@ -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_);
}