diff --git a/limereport/lrpagedesignintf.cpp b/limereport/lrpagedesignintf.cpp index bd0e583..1243bc7 100644 --- a/limereport/lrpagedesignintf.cpp +++ b/limereport/lrpagedesignintf.cpp @@ -73,6 +73,7 @@ PageDesignIntf::PageDesignIntf(QObject *parent): m_itemInsertRect(0), m_itemMode(DesignMode), m_cutterBorder(0), + m_infoPosRect(0), m_currentCommand(-1), m_changeSizeMode(false), m_changePosMode(false), @@ -93,6 +94,7 @@ PageDesignIntf::PageDesignIntf(QObject *parent): m_magneticMovement(false), m_reportSettings(0), m_currentPage(0) + { m_reportEditor = dynamic_cast(parent); updatePageRect(); @@ -314,6 +316,7 @@ void PageDesignIntf::mousePressEvent(QGraphicsSceneMouseEvent *event) void PageDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { + PageItemDesignIntf* page = pageItem() ? pageItem() : getCurrentPage(); if (event->buttons() & Qt::LeftButton) { if (!m_changePosOrSizeMode) { @@ -321,6 +324,25 @@ 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) + { + + + 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); + } + m_infoPosRect->setPlainText("(x: "+QString::number(posX/100)+", y: "+QString::number(posY/100)+") cm"); + + m_infoPosRect->setPos(posX,posY+30); + } if (event->buttons() & Qt::LeftButton && m_multiSelectStarted){ @@ -340,7 +362,6 @@ void PageDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event) m_selectionRect->setRect(selectionRect); } - PageItemDesignIntf* page = pageItem() ? pageItem() : getCurrentPage(); if ((m_insertMode) && (page && page->rect().contains(page->mapFromScene(event->scenePos())))) { if (!m_itemInsertRect->isVisible()) m_itemInsertRect->setVisible(true); qreal posY = div(page->mapFromScene(event->scenePos()).y(), verticalGridStep()).quot * verticalGridStep(); @@ -402,6 +423,11 @@ void PageDesignIntf::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) m_selectionRect = 0; m_multiSelectStarted = false; } + if(m_infoPosRect) + { + delete m_infoPosRect; + m_infoPosRect = 0; + } QGraphicsScene::mouseReleaseEvent(event); } diff --git a/limereport/lrpagedesignintf.h b/limereport/lrpagedesignintf.h index c64b501..1ef209e 100644 --- a/limereport/lrpagedesignintf.h +++ b/limereport/lrpagedesignintf.h @@ -300,6 +300,7 @@ namespace LimeReport { BaseDesignIntf::ItemMode m_itemMode; QGraphicsRectItem* m_cutterBorder; QGraphicsRectItem* m_pageRect; + QGraphicsTextItem* m_infoPosRect; QVector m_commandsList; QVector m_positionStamp; QVector m_geometryStamp; diff --git a/translations/limereport_ar.ts b/translations/limereport_ar.ts index 21a2348..4f982d3 100644 --- a/translations/limereport_ar.ts +++ b/translations/limereport_ar.ts @@ -509,109 +509,6 @@ p, li { white-space: pre-wrap; } - - LimeReport::BorderEditor - - Edit border - - - - Presets - - - - No lines - - - - Outline - - - - Border - - - - ... - - - - Style - - - - No style - - - - Solid - - - - Dash - - - - Dot - - - - Dash dot - - - - Dash dot dot - - - - Width: - - - - 1 - - - - 0.25 - - - - 0.5 - - - - 1.5 - - - - 2 - - - - 3 - - - - 4 - - - - 5 - - - - 6 - - - - Color: - - - - Select - - - LimeReport::BorderFrameEditor diff --git a/translations/limereport_es.ts b/translations/limereport_es.ts index e853314..33c5919 100644 --- a/translations/limereport_es.ts +++ b/translations/limereport_es.ts @@ -638,109 +638,7 @@ p, li { white-space: pre-wrap; } - LimeReport::BorderEditor - - Edit border - - - - Presets - - - - No lines - - - - Outline - - - - Border - - - - ... - - - - Style - - - - No style - - - - Solid - - - - Dash - - - - Dot - - - - Dash dot - - - - Dash dot dot - - - - Width: - - - - 1 - - - - 0.25 - - - - 0.5 - - - - 1.5 - - - - 2 - - - - 3 - - - - 4 - - - - 5 - - - - 6 - - - - Color: - - - - Select - - - - + LimeReport::BorderFrameEditor BorderFrameEditor diff --git a/translations/limereport_fr.ts b/translations/limereport_fr.ts index 6c600d3..e126f36 100644 --- a/translations/limereport_fr.ts +++ b/translations/limereport_fr.ts @@ -610,138 +610,6 @@ p, li { white-space: pre-wrap; } - - LimeReport::BorderEditor - - - Edit border - - - - - Presets - - - - - No lines - - - - - Outline - - - - - Border - - - - - - - - ... - - - - - Style - - - - - No style - - - - - Solid - - - - - Dash - - - - - Dot - - - - - Dash dot - - - - - Dash dot dot - - - - - Width: - - - - - - 1 - - - - - 0.25 - - - - - 0.5 - - - - - 1.5 - - - - - 2 - - - - - 3 - - - - - 4 - - - - - 5 - - - - - 6 - - - - - Color: - - - - - Select - - - LimeReport::BorderFrameEditor @@ -4459,14 +4327,12 @@ Cet aperçu n'est plus valide. - - + Attention! - - + Selected elements have different parent containers Les éléments sélectionnés ont un parent différent diff --git a/translations/limereport_pl.ts b/translations/limereport_pl.ts index 9294011..40c3860 100644 --- a/translations/limereport_pl.ts +++ b/translations/limereport_pl.ts @@ -623,138 +623,7 @@ p, li { white-space: pre-wrap; } - LimeReport::BorderEditor - - - Edit border - - - - - Presets - - - - - No lines - - - - - Outline - - - - - Border - - - - - - - - ... - ... - - - - Style - - - - - No style - - - - - Solid - - - - - Dash - - - - - Dot - - - - - Dash dot - - - - - Dash dot dot - - - - - Width: - - - - - - 1 - - - - - 0.25 - - - - - 0.5 - - - - - 1.5 - - - - - 2 - - - - - 3 - - - - - 4 - - - - - 5 - - - - - 6 - - - - - Color: - - - - - Select - - - - + LimeReport::BorderFrameEditor @@ -4471,14 +4340,12 @@ Ten podgląd nie jest już prawidłowy. Ciąg znaków - - + Attention! Uwaga! - - + Selected elements have different parent containers Wybrane elementy mają różne pojemniki nadrzędne diff --git a/translations/limereport_ru.ts b/translations/limereport_ru.ts index be5561d..989efb9 100644 --- a/translations/limereport_ru.ts +++ b/translations/limereport_ru.ts @@ -515,109 +515,7 @@ p, li { white-space: pre-wrap; } - LimeReport::BorderEditor - - Edit border - - - - Presets - - - - No lines - - - - Outline - - - - Border - - - - ... - ... - - - Style - - - - No style - - - - Solid - - - - Dash - - - - Dot - - - - Dash dot - - - - Dash dot dot - - - - Width: - - - - 1 - - - - 0.25 - - - - 0.5 - - - - 1.5 - - - - 2 - - - - 3 - - - - 4 - - - - 5 - - - - 6 - - - - Color: - - - - Select - - - - + LimeReport::BorderFrameEditor BorderFrameEditor diff --git a/translations/limereport_zh.ts b/translations/limereport_zh.ts index 2811da7..d96250c 100644 --- a/translations/limereport_zh.ts +++ b/translations/limereport_zh.ts @@ -522,109 +522,7 @@ p, li { white-space: pre-wrap; } - LimeReport::BorderEditor - - Edit border - - - - Presets - - - - No lines - - - - Outline - - - - Border - - - - ... - ... - - - Style - - - - No style - - - - Solid - - - - Dash - - - - Dot - - - - Dash dot - - - - Dash dot dot - - - - Width: - - - - 1 - - - - 0.25 - - - - 0.5 - - - - 1.5 - - - - 2 - - - - 3 - - - - 4 - - - - 5 - - - - 6 - - - - Color: - - - - Select - - - - + LimeReport::BorderFrameEditor BorderFrameEditor