0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-25 00:54:39 +03:00

Merge tag '1.5.76' into develop

Finish 1.5.76
This commit is contained in:
Arin Alexander 2020-12-29 23:57:49 +03:00
commit e69a52bbd7
4 changed files with 18 additions and 3 deletions

View File

@ -1,5 +1,5 @@
# LimeReport v1.5.35 [![Build Status](https://api.travis-ci.org/fralx/LimeReport.svg?branch=master)](https://travis-ci.org/fralx/LimeReport) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/bc31412ea4814f30825b5ed3723e9a70)](https://app.codacy.com/app/fralx/LimeReport?utm_source=github.com&utm_medium=referral&utm_content=fralx/LimeReport&utm_campaign=Badge_Grade_Dashboard) # LimeReport v1.5.35 [![Build Status](https://api.travis-ci.org/fralx/LimeReport.svg?branch=master)](https://travis-ci.org/fralx/LimeReport) [![Build status](https://ci.appveyor.com/api/projects/status/wna5429pix7ilcmo/branch/master?svg=true)](https://ci.appveyor.com/project/fralx/limereport/branch/master) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/bc31412ea4814f30825b5ed3723e9a70)](https://app.codacy.com/app/fralx/LimeReport?utm_source=github.com&utm_medium=referral&utm_content=fralx/LimeReport&utm_campaign=Badge_Grade_Dashboard)
## Official LimeReport web site [http://limereport.ru](http://limereport.ru) ## Official LimeReport web site [http://limereport.ru](http://limereport.ru)

View File

@ -134,7 +134,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc
LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MAJOR = 1
LIMEREPORT_VERSION_MINOR = 5 LIMEREPORT_VERSION_MINOR = 5
LIMEREPORT_VERSION_RELEASE = 73 LIMEREPORT_VERSION_RELEASE = 76
LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}'
DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\"

View File

@ -85,7 +85,9 @@ BaseDesignIntf::BaseDesignIntf(const QString &storageTypeName, QObject *owner, Q
m_fillTransparentInDesignMode(true), m_fillTransparentInDesignMode(true),
m_unitType(Millimeters), m_unitType(Millimeters),
m_itemGeometryLocked(false), m_itemGeometryLocked(false),
m_isChangingPos(false) m_isChangingPos(false),
m_isMoveable(false)
{ {
setGeometry(QRectF(0, 0, m_width, m_height)); setGeometry(QRectF(0, 0, m_width, m_height));
if (BaseDesignIntf *item = dynamic_cast<BaseDesignIntf *>(parent)) { if (BaseDesignIntf *item = dynamic_cast<BaseDesignIntf *>(parent)) {
@ -387,6 +389,10 @@ void BaseDesignIntf::setFixedPos(bool fixedPos)
m_fixedPos = fixedPos; m_fixedPos = fixedPos;
} }
void BaseDesignIntf::onChangeGeometryTimeOut(){
m_isMoveable = true;
}
void BaseDesignIntf::mousePressEvent(QGraphicsSceneMouseEvent *event) void BaseDesignIntf::mousePressEvent(QGraphicsSceneMouseEvent *event)
{ {
if (event->button() == Qt::LeftButton) { if (event->button() == Qt::LeftButton) {
@ -396,6 +402,8 @@ void BaseDesignIntf::mousePressEvent(QGraphicsSceneMouseEvent *event)
m_oldGeometry = geometry(); m_oldGeometry = geometry();
QGraphicsItem::mousePressEvent(event); QGraphicsItem::mousePressEvent(event);
emit(itemSelected(this)); emit(itemSelected(this));
m_isMoveable = false;
m_timer.singleShot(200, this, SLOT(onChangeGeometryTimeOut()));
} }
else QGraphicsItem::mousePressEvent(event); else QGraphicsItem::mousePressEvent(event);
} }
@ -524,6 +532,7 @@ void BaseDesignIntf::hoverEnterEvent(QGraphicsSceneHoverEvent /**event*/)
void BaseDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event) void BaseDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{ {
if (!m_isMoveable) return;
if (!isSelected()){ if (!isSelected()){
QGraphicsItem::mouseMoveEvent(event); QGraphicsItem::mouseMoveEvent(event);
return; return;

View File

@ -403,6 +403,9 @@ private:
Qt::CursorShape getPossibleCursor(int cursorFlags); Qt::CursorShape getPossibleCursor(int cursorFlags);
void updatePossibleDirectionFlags(); void updatePossibleDirectionFlags();
private slots:
void onChangeGeometryTimeOut();
private: private:
QPointF m_startPos; QPointF m_startPos;
int m_resizeHandleSize; int m_resizeHandleSize;
@ -463,6 +466,9 @@ private:
UnitType m_unitType; UnitType m_unitType;
bool m_itemGeometryLocked; bool m_itemGeometryLocked;
bool m_isChangingPos; bool m_isChangingPos;
bool m_isMoveable;
QTimer m_timer;
signals: signals:
void geometryChanged(QObject* object, QRectF newGeometry, QRectF oldGeometry); void geometryChanged(QObject* object, QRectF newGeometry, QRectF oldGeometry);
void posChanging(QObject* object, QPointF newPos, QPointF oldPos); void posChanging(QObject* object, QPointF newPos, QPointF oldPos);