0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-24 08:34:38 +03:00

Finish 1.4.117

This commit is contained in:
Arin Alexander 2019-01-18 20:19:47 +03:00
commit cf0886c8eb
4 changed files with 32 additions and 29 deletions

View File

@ -77,7 +77,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc
LIMEREPORT_VERSION_MAJOR = 1
LIMEREPORT_VERSION_MINOR = 4
LIMEREPORT_VERSION_RELEASE = 116
LIMEREPORT_VERSION_RELEASE = 117
LIMEREPORT_VERSION = '\\"$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}\\"'
DEFINES += LIMEREPORT_VERSION_STR=\"$${LIMEREPORT_VERSION}\"

View File

@ -113,6 +113,7 @@ void TextItem::processPopUpAction(QAction *action)
if (action->text().compare(tr("Edit")) == 0){
this->showEditorDialog();
}
if (page()){
if (action->text().compare(tr("Auto height")) == 0){
page()->setPropertyToSelectedItems("autoHeight",action->isChecked());
}
@ -125,6 +126,7 @@ void TextItem::processPopUpAction(QAction *action)
if (action->text().compare(tr("Stretch to max height")) == 0){
page()->setPropertyToSelectedItems("stretchToMaxHeight",action->isChecked());
}
}
}
void TextItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* style, QWidget* widget) {

View File

@ -544,11 +544,13 @@ void BaseDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
setItemPos(QPointF(div(m_startPos.x(), hStep).quot * hStep, div(m_startPos.y(), vStep).quot * vStep) - delta);
if (!isBand() && scene()->selectedItems().count()>1)
if (page()){
if (!isBand() && page()->selectedItems().count()>1)
moveSelectedItems(tmpPos - pos());
if (scene()->selectedItems().count()==1 && (page()->magneticMovement()))
if (page()->selectedItems().count()==1 && (page()->magneticMovement()))
page()->itemMoved(this);
}
}
}
int BaseDesignIntf::possibleResizeDirectionFlags() const
@ -806,29 +808,29 @@ void BaseDesignIntf::setBorderLineSize(int value)
void BaseDesignIntf::moveRight()
{
if (!m_fixedPos) setItemPos(pos().x() + page()->horizontalGridStep(), pos().y());
if (!m_fixedPos && page()) setItemPos(pos().x() + page()->horizontalGridStep(), pos().y());
}
void BaseDesignIntf::moveLeft()
{
if (!m_fixedPos) setItemPos(pos().x() - page()->horizontalGridStep(), pos().y());
if (!m_fixedPos && page()) setItemPos(pos().x() - page()->horizontalGridStep(), pos().y());
}
void BaseDesignIntf::moveDown()
{
if (!m_fixedPos) setItemPos(pos().x(), pos().y() + page()->verticalGridStep());
if (!m_fixedPos && page()) setItemPos(pos().x(), pos().y() + page()->verticalGridStep());
}
void BaseDesignIntf::moveUp()
{
if (!m_fixedPos) setItemPos(pos().x(), pos().y() - page()->verticalGridStep());
if (!m_fixedPos && page()) setItemPos(pos().x(), pos().y() - page()->verticalGridStep());
}
void BaseDesignIntf::sizeRight()
{
if ((m_possibleResizeDirectionFlags & ResizeLeft) ||
(m_possibleResizeDirectionFlags & ResizeRight)) {
setWidth(width() + page()->horizontalGridStep());
if (page()) setWidth(width() + page()->horizontalGridStep());
}
}
@ -836,7 +838,7 @@ void BaseDesignIntf::sizeLeft()
{
if ((m_possibleResizeDirectionFlags & ResizeLeft) ||
(m_possibleResizeDirectionFlags & ResizeRight)) {
setWidth(width() - page()->horizontalGridStep());
if(page()) setWidth(width() - page()->horizontalGridStep());
}
}
@ -844,7 +846,7 @@ void BaseDesignIntf::sizeUp()
{
if ((m_possibleResizeDirectionFlags & ResizeTop) ||
(m_possibleResizeDirectionFlags & ResizeBottom)) {
setHeight(height() - page()->verticalGridStep());
if (page()) setHeight(height() - page()->verticalGridStep());
}
}
@ -852,7 +854,7 @@ void BaseDesignIntf::sizeDown()
{
if ((m_possibleResizeDirectionFlags & ResizeTop) ||
(m_possibleResizeDirectionFlags & ResizeBottom)) {
setHeight(height() + page()->verticalGridStep());
if (page()) setHeight(height() + page()->verticalGridStep());
}
}
@ -1325,7 +1327,7 @@ void BaseDesignIntf::collectionLoadFinished(const QString &collectionName)
foreach(QObject * obj, QObject::children()) {
#endif
BaseDesignIntf *item = dynamic_cast<BaseDesignIntf *>(obj);
if (item) {
if (item && page()) {
page()->registerItem(item);
}
}

View File

@ -690,9 +690,8 @@ void PageItemDesignIntf::bandGeometryChanged(QObject* object, QRectF newGeometry
}
}
}
if (curIndex != band->bandIndex()){
//swapBands(band, bandToSwap);
//page()->saveCommand(BandSwapCommand::create(page(), band->objectName(), bandToSwap->objectName()), true);
if (curIndex != band->bandIndex() && itemMode() == DesignMode){
if (page())
page()->saveCommand(BandMoveFromToCommand::create(page(), band->bandIndex(), bandToSwap->bandIndex()), true);
}
relocateBands();