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