Il est desormais possible d'autoriser ou non les connexions internes dans l'editeur d'element

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@227 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavierqet
2007-12-09 10:54:59 +00:00
parent 649c74d8b2
commit 2e77efce00
4 changed files with 77 additions and 1 deletions

View File

@@ -475,3 +475,30 @@ void ChangeZValueCommand::applySendBackward(const QList<QGraphicsItem *> &items_
foreach(QGraphicsItem *qgi, selected_items) redo_hash.insert(qgi, z ++);
foreach(QGraphicsItem *qgi, non_selected_items) redo_hash.insert(qgi, z ++);
}
/**
Constructeur
@param elmt ElementScene concernee
@param allow true pour que les connexions internes soient acceptees, false sinon
@param parent QUndoCommand parent
*/
AllowInternalConnectionsCommand::AllowInternalConnectionsCommand(ElementScene *elmt, bool allow, QUndoCommand *parent) :
QUndoCommand(QObject::tr("modification connexions internes"), parent),
element(elmt),
ic(allow)
{
}
/// Destructeur
AllowInternalConnectionsCommand::~AllowInternalConnectionsCommand() {
}
/// Annule le changement d'autorisation pour les connexions internes
void AllowInternalConnectionsCommand::undo() {
element -> setInternalConnections(!ic);
}
/// Refait le changement d'autorisation pour les connexions internes
void AllowInternalConnectionsCommand::redo() {
element -> setInternalConnections(ic);
}