Finish version/1.7.1

This commit is contained in:
Arin Alex 2023-02-07 01:02:28 +03:00
commit 4f5c27817c
2 changed files with 21 additions and 22 deletions

View File

@ -73,7 +73,7 @@ PageDesignIntf::PageDesignIntf(QObject *parent):
m_itemInsertRect(0), m_itemInsertRect(0),
m_itemMode(DesignMode), m_itemMode(DesignMode),
m_cutterBorder(0), m_cutterBorder(0),
m_infoPosRect(0), // m_infoPosRect(0),
m_currentCommand(-1), m_currentCommand(-1),
m_changeSizeMode(false), m_changeSizeMode(false),
m_changePosMode(false), m_changePosMode(false),
@ -324,24 +324,23 @@ void PageDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
saveSelectedItemsGeometry(); saveSelectedItemsGeometry();
m_changePosOrSizeMode = true; m_changePosOrSizeMode = true;
} }
qreal posY = div(page->mapFromScene(event->scenePos()).y(), verticalGridStep()).quot * verticalGridStep(); // qreal posY = div(page->mapFromScene(event->scenePos()).y(), verticalGridStep()).quot * verticalGridStep();
qreal posX = div(page->mapFromScene(event->scenePos()).x(), verticalGridStep()).quot * horizontalGridStep(); // qreal posX = div(page->mapFromScene(event->scenePos()).x(), verticalGridStep()).quot * horizontalGridStep();
if(!m_infoPosRect)
{
// if(!m_infoPosRect)
// {
// m_infoPosRect = new QGraphicsTextItem();
// m_infoPosRect->setDefaultTextColor(QColor(100,150,50));
m_infoPosRect = new QGraphicsTextItem(); // QFont font("Arial");
m_infoPosRect->setDefaultTextColor(QColor(100,150,50)); // font.setPointSize(16);
// font.setBold(true);
// m_infoPosRect->setFont(font);
// addItem(m_infoPosRect);
// }
QFont font("Arial"); // m_infoPosRect->setPlainText("(x: "+QString::number(posX/100)+", y: "+QString::number(posY/100)+") cm");
font.setPointSize(16); // m_infoPosRect->setPos(posX,posY+30);
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);
} }
@ -423,11 +422,11 @@ void PageDesignIntf::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
m_selectionRect = 0; m_selectionRect = 0;
m_multiSelectStarted = false; m_multiSelectStarted = false;
} }
if(m_infoPosRect) // if(m_infoPosRect)
{ // {
delete m_infoPosRect; // delete m_infoPosRect;
m_infoPosRect = 0; // m_infoPosRect = 0;
} // }
QGraphicsScene::mouseReleaseEvent(event); QGraphicsScene::mouseReleaseEvent(event);
} }

View File

@ -300,7 +300,7 @@ namespace LimeReport {
BaseDesignIntf::ItemMode m_itemMode; BaseDesignIntf::ItemMode m_itemMode;
QGraphicsRectItem* m_cutterBorder; QGraphicsRectItem* m_cutterBorder;
QGraphicsRectItem* m_pageRect; QGraphicsRectItem* m_pageRect;
QGraphicsTextItem* m_infoPosRect; // QGraphicsTextItem* m_infoPosRect;
QVector<CommandIf::Ptr> m_commandsList; QVector<CommandIf::Ptr> m_commandsList;
QVector<ReportItemPos> m_positionStamp; QVector<ReportItemPos> m_positionStamp;
QVector<ReportItemSize> m_geometryStamp; QVector<ReportItemSize> m_geometryStamp;