From 772a15b8678870d4d55c04b8c0a9e211801eafc6 Mon Sep 17 00:00:00 2001 From: Arin Alex Date: Tue, 7 Feb 2023 01:02:21 +0300 Subject: [PATCH] Temporary removed information label (it should be redesigned) --- limereport/lrpagedesignintf.cpp | 41 ++++++++++++++++----------------- limereport/lrpagedesignintf.h | 2 +- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/limereport/lrpagedesignintf.cpp b/limereport/lrpagedesignintf.cpp index 1243bc7..383ec8d 100644 --- a/limereport/lrpagedesignintf.cpp +++ b/limereport/lrpagedesignintf.cpp @@ -73,7 +73,7 @@ PageDesignIntf::PageDesignIntf(QObject *parent): m_itemInsertRect(0), m_itemMode(DesignMode), m_cutterBorder(0), - m_infoPosRect(0), +// m_infoPosRect(0), m_currentCommand(-1), m_changeSizeMode(false), m_changePosMode(false), @@ -324,24 +324,23 @@ void PageDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event) saveSelectedItemsGeometry(); m_changePosOrSizeMode = true; } - qreal posY = div(page->mapFromScene(event->scenePos()).y(), verticalGridStep()).quot * verticalGridStep(); - qreal posX = div(page->mapFromScene(event->scenePos()).x(), verticalGridStep()).quot * horizontalGridStep(); - if(!m_infoPosRect) - { +// qreal posY = div(page->mapFromScene(event->scenePos()).y(), verticalGridStep()).quot * verticalGridStep(); +// qreal posX = div(page->mapFromScene(event->scenePos()).x(), verticalGridStep()).quot * horizontalGridStep(); +// if(!m_infoPosRect) +// { +// m_infoPosRect = new QGraphicsTextItem(); +// m_infoPosRect->setDefaultTextColor(QColor(100,150,50)); - m_infoPosRect = new QGraphicsTextItem(); - m_infoPosRect->setDefaultTextColor(QColor(100,150,50)); +// QFont font("Arial"); +// font.setPointSize(16); +// font.setBold(true); +// m_infoPosRect->setFont(font); +// addItem(m_infoPosRect); +// } - QFont font("Arial"); - font.setPointSize(16); - font.setBold(true); - m_infoPosRect->setFont(font); - addItem(m_infoPosRect); - } - m_infoPosRect->setPlainText("(x: "+QString::number(posX/100)+", y: "+QString::number(posY/100)+") cm"); - - m_infoPosRect->setPos(posX,posY+30); +// m_infoPosRect->setPlainText("(x: "+QString::number(posX/100)+", y: "+QString::number(posY/100)+") cm"); +// m_infoPosRect->setPos(posX,posY+30); } @@ -423,11 +422,11 @@ void PageDesignIntf::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) m_selectionRect = 0; m_multiSelectStarted = false; } - if(m_infoPosRect) - { - delete m_infoPosRect; - m_infoPosRect = 0; - } +// if(m_infoPosRect) +// { +// delete m_infoPosRect; +// m_infoPosRect = 0; +// } QGraphicsScene::mouseReleaseEvent(event); } diff --git a/limereport/lrpagedesignintf.h b/limereport/lrpagedesignintf.h index 1ef209e..fe3209d 100644 --- a/limereport/lrpagedesignintf.h +++ b/limereport/lrpagedesignintf.h @@ -300,7 +300,7 @@ namespace LimeReport { BaseDesignIntf::ItemMode m_itemMode; QGraphicsRectItem* m_cutterBorder; QGraphicsRectItem* m_pageRect; - QGraphicsTextItem* m_infoPosRect; +// QGraphicsTextItem* m_infoPosRect; QVector m_commandsList; QVector m_positionStamp; QVector m_geometryStamp;