diff --git a/limereport/lrpagedesignintf.cpp b/limereport/lrpagedesignintf.cpp index 2427d67..a45567a 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 0a49b4d..622593b 100644 --- a/limereport/lrpagedesignintf.h +++ b/limereport/lrpagedesignintf.h @@ -295,6 +295,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/limereport/lrscriptenginemanager.cpp b/limereport/lrscriptenginemanager.cpp index 5b70554..7a65a6d 100644 --- a/limereport/lrscriptenginemanager.cpp +++ b/limereport/lrscriptenginemanager.cpp @@ -701,7 +701,7 @@ int ScriptEngineManager::getPageFreeSpace(PageItemDesignIntf* page){ } else height += band->height(); } - return page->height() - height; + return page->height() - height - (page->pageFooter()?page->pageFooter()->height() : 0); } else return -1; } diff --git a/translations/limereport_ar.ts b/translations/limereport_ar.ts index bf3a955..94cd017 100644 --- a/translations/limereport_ar.ts +++ b/translations/limereport_ar.ts @@ -520,6 +520,17 @@ p, li { white-space: pre-wrap; } + + LimeReport::BorderFrameEditor + + BorderFrameEditor + + + + Text + + + LimeReport::ConnectionDesc diff --git a/translations/limereport_es.ts b/translations/limereport_es.ts index 7219087..7bac4e7 100644 --- a/translations/limereport_es.ts +++ b/translations/limereport_es.ts @@ -648,6 +648,17 @@ p, li { white-space: pre-wrap; } + + LimeReport::BorderFrameEditor + + BorderFrameEditor + + + + Text + + + LimeReport::ConnectionDesc diff --git a/translations/limereport_fr.ts b/translations/limereport_fr.ts index b7d37b4..da93d65 100644 --- a/translations/limereport_fr.ts +++ b/translations/limereport_fr.ts @@ -623,6 +623,19 @@ p, li { white-space: pre-wrap; } + + LimeReport::BorderFrameEditor + + + BorderFrameEditor + + + + + Text + + + LimeReport::ConnectionDesc @@ -4214,14 +4227,14 @@ 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 aca5301..57c25f8 100644 --- a/translations/limereport_pl.ts +++ b/translations/limereport_pl.ts @@ -635,6 +635,19 @@ p, li { white-space: pre-wrap; } + + LimeReport::BorderFrameEditor + + + BorderFrameEditor + + + + + Text + + + LimeReport::ConnectionDesc @@ -4226,14 +4239,14 @@ 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 3dd7d0b..d769de0 100644 --- a/translations/limereport_ru.ts +++ b/translations/limereport_ru.ts @@ -525,6 +525,17 @@ p, li { white-space: pre-wrap; } + + LimeReport::BorderFrameEditor + + BorderFrameEditor + + + + Text + + + LimeReport::ConnectionDesc diff --git a/translations/limereport_zh.ts b/translations/limereport_zh.ts index 3e62d44..bc872a0 100644 --- a/translations/limereport_zh.ts +++ b/translations/limereport_zh.ts @@ -532,6 +532,17 @@ p, li { white-space: pre-wrap; } + + LimeReport::BorderFrameEditor + + BorderFrameEditor + + + + Text + + + LimeReport::ConnectionDesc