Add help line for assist alignement of element

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3591 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2015-01-07 19:21:17 +00:00
parent 16e17438d2
commit ceb2b9bcfd
6 changed files with 242 additions and 28 deletions

View File

@@ -930,9 +930,12 @@ void Diagram::invertSelection() {
}
/**
@return Le rectangle (coordonnees par rapport a la scene) delimitant le bord du schema
*/
QRectF Diagram::border() const {
* @brief Diagram::border
* @return The rectangle (coordinates relative to the scene)
* delimiting the edge of the diagram
*/
QRectF Diagram::border() const
{
return(
QRectF(
margin,
@@ -943,6 +946,32 @@ QRectF Diagram::border() const {
);
}
/**
* @brief Diagram::drawingRect
* @return The rectangle (coordinates relative to the scene)
* delimiting the drawing area of the diagram.
* It's like border without columns, rows, and titleblock
*/
QRectF Diagram::drawingRect() const
{
QPointF topleft(margin, margin);
QSizeF size;
size.setWidth (border_and_titleblock.columnsTotalWidth());
size.setHeight(border_and_titleblock.rowsTotalHeight());
if (border_and_titleblock.rowsAreDisplayed())
topleft.rx() += border_and_titleblock.rowsHeaderWidth();
else
size.rwidth() += border_and_titleblock.rowsHeaderWidth();
if (border_and_titleblock.columnsAreDisplayed())
topleft.ry() += border_and_titleblock.columnsHeaderHeight();
else
size.rheight() += border_and_titleblock.columnsHeaderHeight();
return (QRectF (topleft, size));
}
/**
@return le titre du cartouche
*/