mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Clean up some code
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3834 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -65,13 +65,6 @@ BorderTitleBlock::BorderTitleBlock(QObject *parent) :
|
|||||||
BorderTitleBlock::~BorderTitleBlock() {
|
BorderTitleBlock::~BorderTitleBlock() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
@return la hauteur du cartouche
|
|
||||||
*/
|
|
||||||
qreal BorderTitleBlock::titleBlockHeight() const {
|
|
||||||
return(titleblock_template_renderer_ -> height());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief BorderTitleBlock::titleBlockRect
|
* @brief BorderTitleBlock::titleBlockRect
|
||||||
* @return the rectangle of the titleblock in scene coordinate.
|
* @return the rectangle of the titleblock in scene coordinate.
|
||||||
@@ -79,9 +72,9 @@ qreal BorderTitleBlock::titleBlockHeight() const {
|
|||||||
QRectF BorderTitleBlock::titleBlockRect() const
|
QRectF BorderTitleBlock::titleBlockRect() const
|
||||||
{
|
{
|
||||||
if (m_edge == Qt::BottomEdge)
|
if (m_edge == Qt::BottomEdge)
|
||||||
return QRectF(diagram_rect_.bottomLeft(), QSize(diagram_rect_.width(), titleBlockHeight()));
|
return QRectF(diagram_rect_.bottomLeft(), QSize(diagram_rect_.width(), titleblock_template_renderer_ -> height()));
|
||||||
else
|
else
|
||||||
return QRectF(diagram_rect_.topRight(), QSize(titleBlockHeight(), diagram_rect_.height()));
|
return QRectF(diagram_rect_.topRight(), QSize(titleblock_template_renderer_ -> height(), diagram_rect_.height()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -99,32 +92,71 @@ QRectF BorderTitleBlock::titleBlockRectForQPainter() const
|
|||||||
if (m_edge == Qt::BottomEdge) //Rect at bottom have same position and dimension of displayed rect
|
if (m_edge == Qt::BottomEdge) //Rect at bottom have same position and dimension of displayed rect
|
||||||
return titleBlockRect();
|
return titleBlockRect();
|
||||||
else
|
else
|
||||||
return QRectF (diagram_rect_.bottomRight(), QSize(diagram_rect_.height(), titleBlockHeight()));
|
return QRectF (diagram_rect_.bottomRight(), QSize(diagram_rect_.height(), titleblock_template_renderer_ -> height()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief BorderTitleBlock::borderRect
|
* @brief BorderTitleBlock::borderAndTitleBlockRect
|
||||||
* @return the bounding rectangle of diagram and titleblock.
|
* @return the bounding rectangle of diagram and titleblock.
|
||||||
|
* It's like unite outsideBorderRect and titleBlockRect.
|
||||||
|
* The rect is in scene coordinate
|
||||||
*/
|
*/
|
||||||
QRectF BorderTitleBlock::borderRect() const {
|
QRectF BorderTitleBlock::borderAndTitleBlockRect() const {
|
||||||
return diagram_rect_ | titleBlockRect();
|
return diagram_rect_ | titleBlockRect();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief BorderTitleBlock::borderWidth
|
* @brief BorderTitleBlock::columnsRect
|
||||||
* @return the border width
|
* @return The columns rect in scene coordinate.
|
||||||
|
* If column is not displayed, return a null QRectF
|
||||||
*/
|
*/
|
||||||
qreal BorderTitleBlock::borderWidth() const {
|
QRectF BorderTitleBlock::columnsRect() const
|
||||||
return borderRect().width();
|
{
|
||||||
|
if (!display_columns_) return QRectF();
|
||||||
|
return QRectF (Diagram::margin, Diagram::margin, (columns_count_*columns_width_) + rows_header_width_, columns_header_height_);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief BorderTitleBlock::borderHeight
|
* @brief BorderTitleBlock::rowsRect
|
||||||
* @return the border height
|
* @return The rows rect in scene coordinate.
|
||||||
|
* If row is not displayed, return a null QRectF
|
||||||
*/
|
*/
|
||||||
qreal BorderTitleBlock::borderHeight() const {
|
QRectF BorderTitleBlock::rowsRect() const
|
||||||
return borderRect().height();
|
{
|
||||||
|
if (!display_rows_) return QRectF();
|
||||||
|
return QRectF (Diagram::margin, Diagram::margin, rows_header_width_, (rows_count_*rows_height_) + columns_header_height_);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief BorderTitleBlock::outsideBorderRect
|
||||||
|
* @return The rect of outside border (diagram with columns and rows)
|
||||||
|
* The rect is in scene coordinate
|
||||||
|
*/
|
||||||
|
QRectF BorderTitleBlock::outsideBorderRect() const
|
||||||
|
{
|
||||||
|
return QRectF (Diagram::margin, Diagram::margin,
|
||||||
|
(columns_width_*columns_count_) + rows_header_width_,
|
||||||
|
(rows_height_*rows_count_) + columns_header_height_);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief BorderTitleBlock::insideBorderRect
|
||||||
|
* @return The rect of the inside border, in other word, the drawing area.
|
||||||
|
* This method take care about if rows or columns are displayed or not.
|
||||||
|
* The rect is in scene coordinate
|
||||||
|
*/
|
||||||
|
QRectF BorderTitleBlock::insideBorderRect() const
|
||||||
|
{
|
||||||
|
qreal left = Diagram::margin;
|
||||||
|
qreal top = Diagram::margin;
|
||||||
|
qreal width = columns_width_*columns_count_;
|
||||||
|
qreal height = rows_height_*rows_count_;
|
||||||
|
|
||||||
|
display_rows_ ? left += rows_header_width_ : width += rows_header_width_;
|
||||||
|
display_columns_ ? top += columns_header_height_ : height += columns_header_height_;
|
||||||
|
|
||||||
|
return QRectF (left, top, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -609,31 +641,23 @@ void BorderTitleBlock::setDiagramHeight(const qreal &height) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@param pos Position cartesienne (ex : 10.3, 45.2) a transformer en position
|
* @brief BorderTitleBlock::convertPosition
|
||||||
dans la grille (ex : B2)
|
* Convert a Point in cartesian coordinate (x : 12.5, 56.9) to a point in grid coordinate (ex : B2)
|
||||||
@return la position dans la grille correspondant a pos
|
* @param pos : position to convert
|
||||||
*/
|
* @return the converted point in grid coordinate.
|
||||||
DiagramPosition BorderTitleBlock::convertPosition(const QPointF &pos) {
|
*/
|
||||||
// recupere le rectangle quadrille par les en-tetes
|
DiagramPosition BorderTitleBlock::convertPosition(const QPointF &pos)
|
||||||
QRectF grid_rect(
|
{
|
||||||
rowsHeaderWidth(),
|
if(!insideBorderRect().contains(pos))
|
||||||
columnsHeaderHeight(),
|
return (DiagramPosition("", 0));
|
||||||
diagramWidth(),
|
|
||||||
diagramHeight()
|
QPointF relative_pos = pos - insideBorderRect().topLeft();
|
||||||
);
|
|
||||||
|
|
||||||
if (!grid_rect.contains(pos)) {
|
|
||||||
return(DiagramPosition("", 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
QPointF relative_pos = pos - grid_rect.topLeft();
|
|
||||||
int row_number = int(ceil(relative_pos.x() / columnsWidth()));
|
int row_number = int(ceil(relative_pos.x() / columnsWidth()));
|
||||||
int column_number = int(ceil(relative_pos.y() / rowsHeight()));
|
int column_number = int(ceil(relative_pos.y() / rowsHeight()));
|
||||||
|
|
||||||
QString letter = "A";
|
QString letter = "A";
|
||||||
for (int i = 1 ; i < column_number ; ++ i) {
|
for (int i = 1 ; i < column_number ; ++ i)
|
||||||
letter = incrementLetters(letter);
|
letter = incrementLetters(letter);
|
||||||
}
|
|
||||||
|
|
||||||
return(DiagramPosition(letter, row_number));
|
return(DiagramPosition(letter, row_number));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,18 +73,17 @@ class BorderTitleBlock : public QObject
|
|||||||
qreal diagramWidth() const { return(columnsTotalWidth() + rowsHeaderWidth()); }
|
qreal diagramWidth() const { return(columnsTotalWidth() + rowsHeaderWidth()); }
|
||||||
/// @return the diagram height, i.e. the height of the border without title block
|
/// @return the diagram height, i.e. the height of the border without title block
|
||||||
qreal diagramHeight() const { return(rowsTotalHeight() + columnsHeaderHeight()); }
|
qreal diagramHeight() const { return(rowsTotalHeight() + columnsHeaderHeight()); }
|
||||||
|
|
||||||
// title block
|
|
||||||
qreal titleBlockHeight() const;
|
|
||||||
|
|
||||||
QRectF titleBlockRect () const;
|
QRectF titleBlockRect () const;
|
||||||
private:
|
private:
|
||||||
QRectF titleBlockRectForQPainter () const;
|
QRectF titleBlockRectForQPainter () const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QRectF borderRect () const;
|
QRectF borderAndTitleBlockRect () const;
|
||||||
qreal borderWidth () const;
|
QRectF columnsRect () const;
|
||||||
qreal borderHeight() const;
|
QRectF rowsRect () const;
|
||||||
|
QRectF outsideBorderRect() const;
|
||||||
|
QRectF insideBorderRect() const;
|
||||||
|
|
||||||
// methods to get title block basic data
|
// methods to get title block basic data
|
||||||
/// @return the value of the title block "Author" field
|
/// @return the value of the title block "Author" field
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ void Diagram::drawBackground(QPainter *p, const QRectF &r) {
|
|||||||
p->setPen(pen);
|
p->setPen(pen);
|
||||||
|
|
||||||
p -> setBrush(Qt::NoBrush);
|
p -> setBrush(Qt::NoBrush);
|
||||||
QRectF rect = drawingRect().intersected(r);
|
QRectF rect = border_and_titleblock.insideBorderRect().intersected(r);
|
||||||
qreal limite_x = rect.x() + rect.width();
|
qreal limite_x = rect.x() + rect.width();
|
||||||
qreal limite_y = rect.y() + rect.height();
|
qreal limite_y = rect.y() + rect.height();
|
||||||
|
|
||||||
@@ -372,8 +372,8 @@ bool Diagram::toPaintDevice(QPaintDevice &pix, int width, int height, Qt::Aspect
|
|||||||
source_area = QRectF(
|
source_area = QRectF(
|
||||||
0.0,
|
0.0,
|
||||||
0.0,
|
0.0,
|
||||||
border_and_titleblock.borderWidth () + 2.0 * margin,
|
border_and_titleblock.borderAndTitleBlockRect().width() + 2.0 * margin,
|
||||||
border_and_titleblock.borderHeight() + 2.0 * margin
|
border_and_titleblock.borderAndTitleBlockRect().height() + 2.0 * margin
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -415,8 +415,8 @@ QSize Diagram::imageSize() const {
|
|||||||
image_width = items_rect.width();
|
image_width = items_rect.width();
|
||||||
image_height = items_rect.height();
|
image_height = items_rect.height();
|
||||||
} else {
|
} else {
|
||||||
image_width = border_and_titleblock.borderWidth();
|
image_width = border_and_titleblock.borderAndTitleBlockRect().width();
|
||||||
image_height = border_and_titleblock.borderHeight();
|
image_height = border_and_titleblock.borderAndTitleBlockRect().height();
|
||||||
}
|
}
|
||||||
|
|
||||||
image_width += 2.0 * margin;
|
image_width += 2.0 * margin;
|
||||||
@@ -1069,41 +1069,6 @@ void Diagram::invertSelection() {
|
|||||||
emit(selectionChanged());
|
emit(selectionChanged());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Diagram::border
|
|
||||||
* @return The rectangle (coordinates relative to the scene)
|
|
||||||
* delimiting the edge of the diagram
|
|
||||||
*/
|
|
||||||
QRectF Diagram::border() const {
|
|
||||||
return border_and_titleblock.borderRect();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @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
|
@return le titre du cartouche
|
||||||
*/
|
*/
|
||||||
@@ -1246,11 +1211,8 @@ ExportProperties Diagram::applyProperties(const ExportProperties &new_properties
|
|||||||
@return la position dans la grille correspondant a pos
|
@return la position dans la grille correspondant a pos
|
||||||
*/
|
*/
|
||||||
DiagramPosition Diagram::convertPosition(const QPointF &pos) {
|
DiagramPosition Diagram::convertPosition(const QPointF &pos) {
|
||||||
// decale la position pour prendre en compte les marges en haut a gauche du schema
|
|
||||||
QPointF final_pos = pos - QPointF(margin, margin);
|
|
||||||
|
|
||||||
// delegue le calcul au BorderTitleBlock
|
// delegue le calcul au BorderTitleBlock
|
||||||
DiagramPosition diagram_position = border_and_titleblock.convertPosition(final_pos);
|
DiagramPosition diagram_position = border_and_titleblock.convertPosition(pos);
|
||||||
|
|
||||||
// embarque la position cartesienne
|
// embarque la position cartesienne
|
||||||
diagram_position.setPosition(pos);
|
diagram_position.setPosition(pos);
|
||||||
|
|||||||
@@ -179,9 +179,6 @@ class Diagram : public QGraphicsScene
|
|||||||
void setDrawTerminals(bool);
|
void setDrawTerminals(bool);
|
||||||
bool drawColoredConductors() const;
|
bool drawColoredConductors() const;
|
||||||
void setDrawColoredConductors(bool);
|
void setDrawColoredConductors(bool);
|
||||||
|
|
||||||
QRectF border () const;
|
|
||||||
QRectF drawingRect () const;
|
|
||||||
|
|
||||||
QString title() const;
|
QString title() const;
|
||||||
bool toPaintDevice(QPaintDevice &, int = -1, int = -1, Qt::AspectRatioMode = Qt::KeepAspectRatio);
|
bool toPaintDevice(QPaintDevice &, int = -1, int = -1, Qt::AspectRatioMode = Qt::KeepAspectRatio);
|
||||||
|
|||||||
@@ -876,14 +876,14 @@ ChangeTitleBlockCommand::~ChangeTitleBlockCommand() {
|
|||||||
void ChangeTitleBlockCommand::undo() {
|
void ChangeTitleBlockCommand::undo() {
|
||||||
diagram -> showMe();
|
diagram -> showMe();
|
||||||
diagram -> border_and_titleblock.importTitleBlock(old_titleblock);
|
diagram -> border_and_titleblock.importTitleBlock(old_titleblock);
|
||||||
diagram -> invalidate(diagram -> border());
|
diagram -> invalidate(diagram -> border_and_titleblock.borderAndTitleBlockRect());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Refait la modification de cartouche
|
/// Refait la modification de cartouche
|
||||||
void ChangeTitleBlockCommand::redo() {
|
void ChangeTitleBlockCommand::redo() {
|
||||||
diagram -> showMe();
|
diagram -> showMe();
|
||||||
diagram -> border_and_titleblock.importTitleBlock(new_titleblock);
|
diagram -> border_and_titleblock.importTitleBlock(new_titleblock);
|
||||||
diagram -> invalidate(diagram -> border());
|
diagram -> invalidate(diagram -> border_and_titleblock.borderAndTitleBlockRect());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -92,9 +92,9 @@ QString DiagramPrintDialog::docName() const {
|
|||||||
QRect DiagramPrintDialog::diagramRect(Diagram *diagram, const ExportProperties &options) const {
|
QRect DiagramPrintDialog::diagramRect(Diagram *diagram, const ExportProperties &options) const {
|
||||||
if (!diagram) return(QRect());
|
if (!diagram) return(QRect());
|
||||||
|
|
||||||
QRectF diagram_rect = diagram -> border();
|
QRectF diagram_rect = diagram -> border_and_titleblock.borderAndTitleBlockRect();
|
||||||
if (!options.draw_titleblock) {
|
if (!options.draw_titleblock) {
|
||||||
qreal titleblock_height = diagram -> border_and_titleblock.titleBlockHeight();
|
qreal titleblock_height = diagram -> border_and_titleblock.titleBlockRect().height();
|
||||||
diagram_rect.setHeight(diagram_rect.height() - titleblock_height);
|
diagram_rect.setHeight(diagram_rect.height() - titleblock_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -778,7 +778,7 @@ void DiagramView::adjustSceneRect() {
|
|||||||
QRectF elements_bounding_rect = scene -> itemsBoundingRect();
|
QRectF elements_bounding_rect = scene -> itemsBoundingRect();
|
||||||
|
|
||||||
// rectangle contenant le cadre = colonnes + cartouche
|
// rectangle contenant le cadre = colonnes + cartouche
|
||||||
QRectF border_bounding_rect = scene -> border().adjusted(-Diagram::margin, -Diagram::margin, Diagram::margin, Diagram::margin);
|
QRectF border_bounding_rect = scene -> border_and_titleblock.borderAndTitleBlockRect().adjusted(-Diagram::margin, -Diagram::margin, Diagram::margin, Diagram::margin);
|
||||||
|
|
||||||
// ajuste la sceneRect
|
// ajuste la sceneRect
|
||||||
QRectF new_scene_rect = elements_bounding_rect.united(border_bounding_rect);
|
QRectF new_scene_rect = elements_bounding_rect.united(border_bounding_rect);
|
||||||
@@ -1180,26 +1180,10 @@ void DiagramView::mouseDoubleClickEvent(QMouseEvent *e) {
|
|||||||
|
|
||||||
BorderTitleBlock &bi = scene -> border_and_titleblock;
|
BorderTitleBlock &bi = scene -> border_and_titleblock;
|
||||||
|
|
||||||
// Get the rectangle of the header column
|
|
||||||
QRectF columns_rect(
|
|
||||||
Diagram::margin,
|
|
||||||
Diagram::margin,
|
|
||||||
bi.borderWidth(),
|
|
||||||
bi.columnsHeaderHeight()
|
|
||||||
);
|
|
||||||
|
|
||||||
// Get the rectangle of the header row
|
|
||||||
QRectF rows_rect(
|
|
||||||
Diagram::margin,
|
|
||||||
Diagram::margin,
|
|
||||||
bi.rowsHeaderWidth(),
|
|
||||||
bi.diagramHeight()
|
|
||||||
);
|
|
||||||
|
|
||||||
//Get the click pos on the diagram
|
//Get the click pos on the diagram
|
||||||
QPointF click_pos = viewportTransform().inverted().map(e -> pos());
|
QPointF click_pos = viewportTransform().inverted().map(e -> pos());
|
||||||
|
|
||||||
if (bi.titleBlockRect().contains(click_pos) || columns_rect.contains(click_pos) || rows_rect.contains(click_pos)) {
|
if (bi.titleBlockRect().contains(click_pos) || bi.columnsRect().contains(click_pos) || bi.rowsRect().contains(click_pos)) {
|
||||||
e->accept();
|
e->accept();
|
||||||
editDiagramProperties();
|
editDiagramProperties();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ void DVEventAddShape::updateHelpCross(const QPoint &p)
|
|||||||
pen.setCosmetic(true);
|
pen.setCosmetic(true);
|
||||||
pen.setColor(Qt::darkGray);
|
pen.setColor(Qt::darkGray);
|
||||||
|
|
||||||
QRectF rect = m_diagram -> drawingRect();
|
QRectF rect = m_diagram -> border_and_titleblock.insideBorderRect();
|
||||||
|
|
||||||
if (!m_help_horiz)
|
if (!m_help_horiz)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -54,12 +54,10 @@ bool centerToBottomDiagram (QGraphicsItem *item_to_center, Element *element_to_f
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QRectF border = element_to_follow -> diagram() -> border();
|
QRectF border = element_to_follow -> diagram() -> border_and_titleblock.insideBorderRect();
|
||||||
QPointF point = element_to_follow -> sceneBoundingRect().center();
|
QPointF point = element_to_follow -> sceneBoundingRect().center();
|
||||||
|
|
||||||
point.setY(border.height() -
|
point.setY(border.bottom() - item_to_center -> boundingRect().height() - 5);
|
||||||
element_to_follow -> diagram() -> border_and_titleblock.titleBlockHeight() -
|
|
||||||
item_to_center -> boundingRect().height());
|
|
||||||
|
|
||||||
point.rx() -= (item_to_center -> boundingRect().width()/2 +
|
point.rx() -= (item_to_center -> boundingRect().width()/2 +
|
||||||
item_to_center -> boundingRect().left()); //< we add boundingrect.left because this value can be négative
|
item_to_center -> boundingRect().left()); //< we add boundingrect.left because this value can be négative
|
||||||
|
|||||||
@@ -318,7 +318,7 @@ void Terminal::paint(QPainter *p, const QStyleOptionGraphicsItem *options, QWidg
|
|||||||
m_help_line_a -> setPen(pen);
|
m_help_line_a -> setPen(pen);
|
||||||
}
|
}
|
||||||
|
|
||||||
QRectF rect = diagram() -> drawingRect();
|
QRectF rect = diagram() -> border_and_titleblock.insideBorderRect();
|
||||||
QLineF line;
|
QLineF line;
|
||||||
|
|
||||||
if (Qet::isHorizontal(orientation()))
|
if (Qet::isHorizontal(orientation()))
|
||||||
@@ -376,7 +376,7 @@ void Terminal::drawHelpLine(bool draw)
|
|||||||
QLineF Terminal::HelpLine() const
|
QLineF Terminal::HelpLine() const
|
||||||
{
|
{
|
||||||
QPointF scene_dock = dockConductor();
|
QPointF scene_dock = dockConductor();
|
||||||
QRectF rect = diagram() -> drawingRect();
|
QRectF rect = diagram() -> border_and_titleblock.insideBorderRect();
|
||||||
|
|
||||||
QLineF line(scene_dock , QPointF());
|
QLineF line(scene_dock , QPointF());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user