Les modifications concernant la taille du schema sont desormais annulables

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@143 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavierqet
2007-09-28 21:48:59 +00:00
parent d9d966e4e9
commit 0405ac447d
3 changed files with 103 additions and 9 deletions

View File

@@ -524,30 +524,36 @@ bool DiagramView::hasSelectedItems() {
Ajoute une colonne au schema.
*/
void DiagramView::addColumn() {
scene -> border_and_inset.addColumn();
ChangeBorderCommand *cbc = new ChangeBorderCommand(scene);
cbc -> columnsCountDifference = 1;
scene -> undoStack().push(cbc);
}
/**
Enleve une colonne au schema.
*/
void DiagramView::removeColumn() {
scene -> border_and_inset.removeColumn();
ChangeBorderCommand *cbc = new ChangeBorderCommand(scene);
cbc -> columnsCountDifference = -1;
scene -> undoStack().push(cbc);
}
/**
Agrandit le schema en hauteur
*/
void DiagramView::expand() {
qreal new_height = scene -> border_and_inset.columnsHeight() + 20.0;
scene -> border_and_inset.setColumnsHeight(new_height);
ChangeBorderCommand *cbc = new ChangeBorderCommand(scene);
cbc -> columnsHeightDifference = 20.0;
scene -> undoStack().push(cbc);
}
/**
Retrecit le schema en hauteur
*/
void DiagramView::shrink() {
qreal new_height = scene -> border_and_inset.columnsHeight() - 20.0;
scene -> border_and_inset.setColumnsHeight(new_height);
ChangeBorderCommand *cbc = new ChangeBorderCommand(scene);
cbc -> columnsHeightDifference = 20.0;
scene -> undoStack().push(cbc);
}
/**