SonarCloud warnings.
--HG-- branch : develop
This commit is contained in:
parent
6e07d387c7
commit
663ab8aff1
|
@ -1185,8 +1185,8 @@ void MainWindow::ZoomFitBestCurrent()
|
||||||
QTransform transform = ui->view->transform();
|
QTransform transform = ui->view->transform();
|
||||||
|
|
||||||
qreal factor = transform.m11();
|
qreal factor = transform.m11();
|
||||||
factor = qMax(factor, ui->view->MinScale());
|
factor = qMax(factor, VMainGraphicsView::MinScale());
|
||||||
factor = qMin(factor, ui->view->MaxScale());
|
factor = qMin(factor, VMainGraphicsView::MaxScale());
|
||||||
|
|
||||||
transform.setMatrix(factor, transform.m12(), transform.m13(), transform.m21(), factor, transform.m23(),
|
transform.setMatrix(factor, transform.m12(), transform.m13(), transform.m21(), factor, transform.m23(),
|
||||||
transform.m31(), transform.m32(), transform.m33());
|
transform.m31(), transform.m32(), transform.m33());
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
* @param parent parent object.
|
* @param parent parent object.
|
||||||
*/
|
*/
|
||||||
VGraphicsSimpleTextItem::VGraphicsSimpleTextItem(QGraphicsItem * parent)
|
VGraphicsSimpleTextItem::VGraphicsSimpleTextItem(QGraphicsItem * parent)
|
||||||
:QGraphicsSimpleTextItem(parent), fontSize(0), selectionType(SelectionType::ByMouseRelease)
|
:QGraphicsSimpleTextItem(parent), m_fontSize(0), selectionType(SelectionType::ByMouseRelease)
|
||||||
{
|
{
|
||||||
this->setFlag(QGraphicsItem::ItemIsMovable, true);
|
this->setFlag(QGraphicsItem::ItemIsMovable, true);
|
||||||
this->setFlag(QGraphicsItem::ItemIsSelectable, true);
|
this->setFlag(QGraphicsItem::ItemIsSelectable, true);
|
||||||
|
@ -62,7 +62,7 @@ VGraphicsSimpleTextItem::VGraphicsSimpleTextItem(QGraphicsItem * parent)
|
||||||
this->setAcceptHoverEvents(true);
|
this->setAcceptHoverEvents(true);
|
||||||
QFont font = this->font();
|
QFont font = this->font();
|
||||||
font.setPointSize(font.pointSize()+20);
|
font.setPointSize(font.pointSize()+20);
|
||||||
fontSize = font.pointSize();
|
m_fontSize = font.pointSize();
|
||||||
this->setFont(font);
|
this->setFont(font);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ VGraphicsSimpleTextItem::VGraphicsSimpleTextItem(QGraphicsItem * parent)
|
||||||
* @param parent parent object.
|
* @param parent parent object.
|
||||||
*/
|
*/
|
||||||
VGraphicsSimpleTextItem::VGraphicsSimpleTextItem( const QString & text, QGraphicsItem * parent )
|
VGraphicsSimpleTextItem::VGraphicsSimpleTextItem( const QString & text, QGraphicsItem * parent )
|
||||||
:QGraphicsSimpleTextItem(text, parent), fontSize(0), selectionType(SelectionType::ByMouseRelease)
|
:QGraphicsSimpleTextItem(text, parent), m_fontSize(0), selectionType(SelectionType::ByMouseRelease)
|
||||||
{
|
{
|
||||||
this->setFlag(QGraphicsItem::ItemIsMovable, true);
|
this->setFlag(QGraphicsItem::ItemIsMovable, true);
|
||||||
this->setFlag(QGraphicsItem::ItemIsSelectable, true);
|
this->setFlag(QGraphicsItem::ItemIsSelectable, true);
|
||||||
|
|
|
@ -85,7 +85,7 @@ protected:
|
||||||
virtual void keyReleaseEvent ( QKeyEvent * event ) Q_DECL_OVERRIDE;
|
virtual void keyReleaseEvent ( QKeyEvent * event ) Q_DECL_OVERRIDE;
|
||||||
private:
|
private:
|
||||||
/** @brief fontSize label font size. */
|
/** @brief fontSize label font size. */
|
||||||
qint32 fontSize;
|
qint32 m_fontSize;
|
||||||
SelectionType selectionType;
|
SelectionType selectionType;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ private:
|
||||||
*/
|
*/
|
||||||
inline qint32 VGraphicsSimpleTextItem::BaseFontSize() const
|
inline qint32 VGraphicsSimpleTextItem::BaseFontSize() const
|
||||||
{
|
{
|
||||||
return fontSize;
|
return m_fontSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // VGRAPHICSSIMPLETEXTITEM_H
|
#endif // VGRAPHICSSIMPLETEXTITEM_H
|
||||||
|
|
|
@ -140,7 +140,8 @@ void VScenePoint::RefreshLine()
|
||||||
if (not rect().intersects(nRec))
|
if (not rect().intersects(nRec))
|
||||||
{
|
{
|
||||||
const QRectF nameRec = m_namePoint->sceneBoundingRect();
|
const QRectF nameRec = m_namePoint->sceneBoundingRect();
|
||||||
QPointF p1, p2;
|
QPointF p1;
|
||||||
|
QPointF p2;
|
||||||
VGObject::LineIntersectCircle(QPointF(), ScaledRadius(SceneScale(scene())),
|
VGObject::LineIntersectCircle(QPointF(), ScaledRadius(SceneScale(scene())),
|
||||||
QLineF(QPointF(), nameRec.center() - scenePos()), p1, p2);
|
QLineF(QPointF(), nameRec.center() - scenePos()), p1, p2);
|
||||||
const QPointF pRec = VGObject::LineIntersectRect(nameRec, QLineF(scenePos(), nameRec.center()));
|
const QPointF pRec = VGObject::LineIntersectRect(nameRec, QLineF(scenePos(), nameRec.center()));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user