mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-24 12:34:39 +03:00
Finish 1.4.120
This commit is contained in:
commit
3b94666a33
@ -120,7 +120,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc
|
||||
|
||||
LIMEREPORT_VERSION_MAJOR = 1
|
||||
LIMEREPORT_VERSION_MINOR = 4
|
||||
LIMEREPORT_VERSION_RELEASE = 119
|
||||
LIMEREPORT_VERSION_RELEASE = 120
|
||||
|
||||
LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}'
|
||||
DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\"
|
||||
|
@ -1063,6 +1063,7 @@ QVariant BaseDesignIntf::itemChange(QGraphicsItem::GraphicsItemChange change, co
|
||||
if (change == QGraphicsItem::ItemPositionHasChanged) {
|
||||
updateSelectionMarker();
|
||||
}
|
||||
|
||||
if (change == QGraphicsItem::ItemSelectedChange) {
|
||||
turnOnSelectionMarker(value.toBool());
|
||||
emit itemSelectedHasBeenChanged(this, value.toBool());
|
||||
@ -1157,18 +1158,18 @@ void BaseDesignIntf::setItemPos(const QPointF &newPos)
|
||||
QPointF oldPos = pos();
|
||||
QPointF finalPos = modifyPosForAlignedItem(newPos);
|
||||
QGraphicsItem::setPos(finalPos);
|
||||
emit posChanged(this, finalPos, oldPos);
|
||||
emit posChanging(this, finalPos, oldPos);
|
||||
}
|
||||
|
||||
void BaseDesignIntf::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
||||
{
|
||||
QGraphicsItem::mouseReleaseEvent(event);
|
||||
QRectF newGeometry = geometry();
|
||||
if (newGeometry != m_oldGeometry) {
|
||||
geometryChangedEvent(newGeometry, m_oldGeometry);
|
||||
updateSelectionMarker();
|
||||
emit(geometryChanged(this, newGeometry, m_oldGeometry));
|
||||
emit(posChanged(this, newGeometry.topLeft(), m_oldGeometry.topLeft()));
|
||||
}
|
||||
QGraphicsItem::mouseReleaseEvent(event);
|
||||
}
|
||||
|
||||
QWidget* findRootWidget(QWidget* widget){
|
||||
|
@ -417,6 +417,7 @@ private:
|
||||
|
||||
signals:
|
||||
void geometryChanged(QObject* object, QRectF newGeometry, QRectF oldGeometry);
|
||||
void posChanging(QObject* object, QPointF newPos, QPointF oldPos);
|
||||
void posChanged(QObject* object, QPointF newPos, QPointF oldPos);
|
||||
void itemSelected(LimeReport::BaseDesignIntf *item);
|
||||
void itemSelectedHasBeenChanged(BaseDesignIntf *item, bool value);
|
||||
@ -428,7 +429,6 @@ signals:
|
||||
void propertyesChanged(QVector<QString> propertyNames);
|
||||
void itemAlignChanged(BaseDesignIntf* item, const ItemAlign& oldValue, const ItemAlign& newValue);
|
||||
void itemVisibleHasChanged(BaseDesignIntf* item);
|
||||
|
||||
void beforeRender();
|
||||
void afterData();
|
||||
void afterRender();
|
||||
|
@ -327,7 +327,7 @@ void PageItemDesignIntf::registerBand(BandDesignIntf *band)
|
||||
band->setParentItem(this);
|
||||
band->setWidth(pageRect().width()/band->columnsCount());
|
||||
connect(band, SIGNAL(destroyed(QObject*)),this,SLOT(bandDeleted(QObject*)));
|
||||
connect(band, SIGNAL(geometryChanged(QObject*,QRectF,QRectF)),this,SLOT(bandGeometryChanged(QObject*,QRectF,QRectF)));
|
||||
connect(band, SIGNAL(posChanged(QObject*,QPointF,QPointF)),this,SLOT(bandPositionChanged(QObject*,QPointF,QPointF)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -798,17 +798,17 @@ void PageItemDesignIntf::moveBandFromTo(int from, int to)
|
||||
|
||||
}
|
||||
|
||||
void PageItemDesignIntf::bandGeometryChanged(QObject* object, QRectF newGeometry, QRectF oldGeometry)
|
||||
void PageItemDesignIntf::bandPositionChanged(QObject* object, QPointF newPos, QPointF oldPos)
|
||||
{
|
||||
if (itemMode() == DesignMode){
|
||||
BandDesignIntf* band = dynamic_cast<BandDesignIntf*>(object);
|
||||
int curIndex = band->bandIndex();
|
||||
BandDesignIntf* bandToSwap = 0;
|
||||
foreach(BandDesignIntf* curBand, bands()){
|
||||
if (newGeometry.y() > oldGeometry.y()) {
|
||||
if (newPos.y() > oldPos.y()) {
|
||||
if (curBand->bandType() == band->bandType()
|
||||
&& curIndex < curBand->bandIndex()
|
||||
&& (curBand->pos().y() + (curBand->height()/2)) < newGeometry.y()
|
||||
&& (curBand->pos().y() + (curBand->height()/2)) < newPos.y()
|
||||
&& curBand->parentBand() == band->parentBand())
|
||||
{
|
||||
curIndex = curBand->bandIndex();
|
||||
@ -817,7 +817,7 @@ void PageItemDesignIntf::bandGeometryChanged(QObject* object, QRectF newGeometry
|
||||
} else {
|
||||
if (curBand->bandType() == band->bandType()
|
||||
&& curIndex>curBand->bandIndex()
|
||||
&& (curBand->pos().y() + (curBand->height()/2)) > newGeometry.y()
|
||||
&& (curBand->pos().y() + (curBand->height()/2)) > newPos.y()
|
||||
&& curBand->parentBand() == band->parentBand())
|
||||
{
|
||||
curIndex = curBand->bandIndex();
|
||||
|
@ -148,7 +148,7 @@ signals:
|
||||
void afterLastPageRendered();
|
||||
protected slots:
|
||||
void bandDeleted(QObject* band);
|
||||
void bandGeometryChanged(QObject* object, QRectF newGeometry, QRectF oldGeometry);
|
||||
void bandPositionChanged(QObject* object, QPointF newPos, QPointF oldPos);
|
||||
protected:
|
||||
void collectionLoadFinished(const QString& collectionName);
|
||||
QRectF& pageRect(){return m_pageRect;}
|
||||
|
Loading…
Reference in New Issue
Block a user