element editor: improve the drag of the scene with wheel click

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2419 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2013-08-08 19:58:15 +00:00
parent 5523d06d8a
commit 835288f02f
5 changed files with 22 additions and 43 deletions

View File

@@ -496,24 +496,6 @@ void ElementScene::fromXml(
}
}
/**
@return le rectangle representant les limites de l'element.
Ce rectangle a pour dimensions la taille de l'element et pour coin
superieur gauche les coordonnees opposees du hotspot.
*/
QRectF ElementScene::borderRect() const {
return(QRectF(-elementSceneGeometricRect().topLeft(), QSizeF(width(), height())));
}
/**
@return un rectangle englobant toutes les parties ainsi que le
"bounding rect" de l'element
*/
QRectF ElementScene::sceneContent() const {
qreal adjustment = 5.0;
return(elementContentBoundingRect(items()).unite(borderRect()).adjusted(-adjustment, -adjustment, adjustment, adjustment));
}
/**
@return the minimum, margin-less rectangle the element can fit into, in scene
coordinates. It is different from itemsBoundingRect() because it is not supposed
@@ -531,15 +513,6 @@ QRectF ElementScene::elementSceneGeometricRect() const{
return (esgr);
}
/**
@return true si toutes les parties graphiques composant l'element sont
integralement contenues dans le rectangle representant les limites de
l'element.
*/
bool ElementScene::borderContainsEveryParts() const {
return(borderRect().contains(elementContentBoundingRect(items())));
}
/**
@return true si l'element comporte au moins une borne, false s'il n'en a
aucune.