mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 08:40:53 +01:00
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:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user