mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-23 16:22:58 +03:00
Temporary removed information label (it should be redesigned)
This commit is contained in:
parent
8ed3fb6344
commit
772a15b867
@ -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);
|
||||
}
|
||||
|
||||
|
@ -300,7 +300,7 @@ namespace LimeReport {
|
||||
BaseDesignIntf::ItemMode m_itemMode;
|
||||
QGraphicsRectItem* m_cutterBorder;
|
||||
QGraphicsRectItem* m_pageRect;
|
||||
QGraphicsTextItem* m_infoPosRect;
|
||||
// QGraphicsTextItem* m_infoPosRect;
|
||||
QVector<CommandIf::Ptr> m_commandsList;
|
||||
QVector<ReportItemPos> m_positionStamp;
|
||||
QVector<ReportItemSize> m_geometryStamp;
|
||||
|
Loading…
Reference in New Issue
Block a user