mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2025-01-12 04:41:03 +03:00
Finish 1.4.97
This commit is contained in:
commit
5ffca400db
@ -70,7 +70,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 = 96
|
LIMEREPORT_VERSION_RELEASE = 97
|
||||||
|
|
||||||
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}\"
|
||||||
|
@ -128,7 +128,7 @@ BandDesignIntf::BandDesignIntf(BandsType bandType, const QString &xmlTypeName, Q
|
|||||||
m_startFromNewPage(false),
|
m_startFromNewPage(false),
|
||||||
m_printAlways(false),
|
m_printAlways(false),
|
||||||
m_repeatOnEachRow(false),
|
m_repeatOnEachRow(false),
|
||||||
m_bottomSpace()
|
m_bottomSpace(0)
|
||||||
{
|
{
|
||||||
setPossibleResizeDirectionFlags(ResizeBottom);
|
setPossibleResizeDirectionFlags(ResizeBottom);
|
||||||
setPossibleMoveFlags(TopBotom);
|
setPossibleMoveFlags(TopBotom);
|
||||||
@ -549,7 +549,6 @@ BaseDesignIntf* BandDesignIntf::cloneUpperPart(int height, QObject *owner, QGrap
|
|||||||
{
|
{
|
||||||
int maxBottom = 0;
|
int maxBottom = 0;
|
||||||
BandDesignIntf* upperPart = dynamic_cast<BandDesignIntf*>(createSameTypeItem(owner,parent));
|
BandDesignIntf* upperPart = dynamic_cast<BandDesignIntf*>(createSameTypeItem(owner,parent));
|
||||||
upperPart->m_bottomSpace = this->bottomSpace();
|
|
||||||
BaseDesignIntf* upperItem = 0;
|
BaseDesignIntf* upperItem = 0;
|
||||||
|
|
||||||
upperPart->initFromItem(this);
|
upperPart->initFromItem(this);
|
||||||
@ -596,7 +595,6 @@ bool itemLessThen(QGraphicsItem* i1, QGraphicsItem* i2){
|
|||||||
BaseDesignIntf *BandDesignIntf::cloneBottomPart(int height, QObject *owner, QGraphicsItem *parent)
|
BaseDesignIntf *BandDesignIntf::cloneBottomPart(int height, QObject *owner, QGraphicsItem *parent)
|
||||||
{
|
{
|
||||||
BandDesignIntf* bottomPart = dynamic_cast<BandDesignIntf*>(createSameTypeItem(owner,parent));
|
BandDesignIntf* bottomPart = dynamic_cast<BandDesignIntf*>(createSameTypeItem(owner,parent));
|
||||||
bottomPart->m_bottomSpace = this->bottomSpace();
|
|
||||||
bottomPart->initFromItem(this);
|
bottomPart->initFromItem(this);
|
||||||
|
|
||||||
QList<QGraphicsItem*> bandItems;
|
QList<QGraphicsItem*> bandItems;
|
||||||
@ -794,7 +792,7 @@ void BandDesignIntf::setAlternateBackgroundColor(const QColor &alternateBackgrou
|
|||||||
|
|
||||||
qreal BandDesignIntf::bottomSpace() const
|
qreal BandDesignIntf::bottomSpace() const
|
||||||
{
|
{
|
||||||
return m_bottomSpace.isValid() ? m_bottomSpace.value() : height()-findMaxBottom();
|
return height()-findMaxBottom();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BandDesignIntf::slotPropertyObjectNameChanged(const QString &, const QString& newName)
|
void BandDesignIntf::slotPropertyObjectNameChanged(const QString &, const QString& newName)
|
||||||
@ -804,6 +802,16 @@ void BandDesignIntf::slotPropertyObjectNameChanged(const QString &, const QStrin
|
|||||||
m_bandNameLabel->updateLabel(newName);
|
m_bandNameLabel->updateLabel(newName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int BandDesignIntf::bootomSpace() const
|
||||||
|
{
|
||||||
|
return m_bottomSpace;
|
||||||
|
}
|
||||||
|
|
||||||
|
void BandDesignIntf::setBootomSpace(int bootomSpace)
|
||||||
|
{
|
||||||
|
m_bottomSpace = bootomSpace;
|
||||||
|
}
|
||||||
|
|
||||||
bool BandDesignIntf::repeatOnEachRow() const
|
bool BandDesignIntf::repeatOnEachRow() const
|
||||||
{
|
{
|
||||||
return m_repeatOnEachRow;
|
return m_repeatOnEachRow;
|
||||||
@ -974,6 +982,8 @@ void BandDesignIntf::updateItemSize(DataSourceManager* dataManager, RenderPass p
|
|||||||
if (borderLines()!=0){
|
if (borderLines()!=0){
|
||||||
spaceBorder += borderLineSize();
|
spaceBorder += borderLineSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
spaceBorder += m_bottomSpace;
|
||||||
restoreLinks();
|
restoreLinks();
|
||||||
snapshotItemsLayout();
|
snapshotItemsLayout();
|
||||||
arrangeSubItems(pass, dataManager);
|
arrangeSubItems(pass, dataManager);
|
||||||
|
@ -240,8 +240,10 @@ public:
|
|||||||
qreal bottomSpace() const;
|
qreal bottomSpace() const;
|
||||||
void setBackgroundModeProperty(BGMode value);
|
void setBackgroundModeProperty(BGMode value);
|
||||||
void setBackgroundOpacity(int value);
|
void setBackgroundOpacity(int value);
|
||||||
|
int bootomSpace() const;
|
||||||
|
void setBootomSpace(int bootomSpace);
|
||||||
signals:
|
signals:
|
||||||
void bandRendered(BandDesignIntf* band);
|
void bandRendered(BandDesignIntf* band);
|
||||||
protected:
|
protected:
|
||||||
void trimToMaxHeight(int maxHeight);
|
void trimToMaxHeight(int maxHeight);
|
||||||
void setBandTypeText(const QString& value);
|
void setBandTypeText(const QString& value);
|
||||||
@ -295,7 +297,7 @@ private:
|
|||||||
bool m_repeatOnEachRow;
|
bool m_repeatOnEachRow;
|
||||||
QMap<QString,BaseDesignIntf*> m_slicedItems;
|
QMap<QString,BaseDesignIntf*> m_slicedItems;
|
||||||
QColor m_alternateBackgroundColor;
|
QColor m_alternateBackgroundColor;
|
||||||
InitializedValue m_bottomSpace;
|
int m_bottomSpace;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DataBandDesignIntf : public BandDesignIntf{
|
class DataBandDesignIntf : public BandDesignIntf{
|
||||||
|
@ -396,8 +396,16 @@ void PageItemDesignIntf::relocateBands()
|
|||||||
m_bands[i+1]->columnsCount());
|
m_bands[i+1]->columnsCount());
|
||||||
}
|
}
|
||||||
if (m_bands[i+1]->columnIndex()==0){
|
if (m_bands[i+1]->columnIndex()==0){
|
||||||
m_bands[i+1]->setPos(pageRect().x(),posByColumn[0]);
|
if ( ((m_bands[i]->borderLines() & BandDesignIntf::BottomLine) &&
|
||||||
posByColumn[0] += m_bands[i+1]->height()+bandSpace;
|
(m_bands[i+1]->borderLines() & BandDesignIntf::TopLine)) ||
|
||||||
|
(!(m_bands[i]->borderLines() & BandDesignIntf::BottomLine) &&
|
||||||
|
!(m_bands[i+1]->borderLines() & BandDesignIntf::TopLine)) ){
|
||||||
|
m_bands[i+1]->setPos(pageRect().x(),posByColumn[0]);
|
||||||
|
posByColumn[0] += m_bands[i+1]->height()+bandSpace;
|
||||||
|
} else {
|
||||||
|
m_bands[i+1]->setPos(pageRect().x(),posByColumn[0]+2);
|
||||||
|
posByColumn[0] += m_bands[i+1]->height()+bandSpace+2;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
m_bands[i+1]->setPos(m_bands[i+1]->pos().x(),posByColumn[m_bands[i+1]->columnIndex()]);
|
m_bands[i+1]->setPos(m_bands[i+1]->pos().x(),posByColumn[m_bands[i+1]->columnIndex()]);
|
||||||
posByColumn[m_bands[i+1]->columnIndex()] += m_bands[i+1]->height()+bandSpace;
|
posByColumn[m_bands[i+1]->columnIndex()] += m_bands[i+1]->height()+bandSpace;
|
||||||
|
@ -45,7 +45,7 @@ namespace LimeReport{
|
|||||||
|
|
||||||
PreviewReportWindow::PreviewReportWindow(ReportEnginePrivate *report,QWidget *parent, QSettings *settings, Qt::WindowFlags flags) :
|
PreviewReportWindow::PreviewReportWindow(ReportEnginePrivate *report,QWidget *parent, QSettings *settings, Qt::WindowFlags flags) :
|
||||||
QMainWindow(parent,flags),
|
QMainWindow(parent,flags),
|
||||||
ui(new Ui::PreviewReportWindow), m_settings(settings), m_ownedSettings(false)
|
ui(new Ui::PreviewReportWindow), m_settings(settings), m_ownedSettings(false), m_scalePercentChanging(false)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
setWindowTitle("Lime Report Preview");
|
setWindowTitle("Lime Report Preview");
|
||||||
@ -402,12 +402,20 @@ void PreviewReportWindow::on_actionOne_to_one_triggered()
|
|||||||
|
|
||||||
void PreviewReportWindow::scaleComboboxChanged(QString text)
|
void PreviewReportWindow::scaleComboboxChanged(QString text)
|
||||||
{
|
{
|
||||||
|
if (m_scalePercentChanging) return;
|
||||||
|
m_scalePercentChanging = true;
|
||||||
m_previewReportWidget->setScalePercent(text.remove(text.count()-1,1).toInt());
|
m_previewReportWidget->setScalePercent(text.remove(text.count()-1,1).toInt());
|
||||||
|
m_scalePercentChanging = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreviewReportWindow::slotScalePercentChanged(int percent)
|
void PreviewReportWindow::slotScalePercentChanged(int percent)
|
||||||
{
|
{
|
||||||
|
if (m_scalePercentChanging) return;
|
||||||
|
m_scalePercentChanging = true;
|
||||||
|
if (m_scalePercent->findText(QString("%1%").arg(percent)) == -1)
|
||||||
|
m_scalePercent->setCurrentIndex(-1);
|
||||||
m_scalePercent->setEditText(QString("%1%").arg(percent));
|
m_scalePercent->setEditText(QString("%1%").arg(percent));
|
||||||
|
m_scalePercentChanging = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreviewReportWindow::on_actionShowMessages_toggled(bool value)
|
void PreviewReportWindow::on_actionShowMessages_toggled(bool value)
|
||||||
|
@ -120,6 +120,7 @@ private:
|
|||||||
QComboBox* m_scalePercent;
|
QComboBox* m_scalePercent;
|
||||||
ScaleType m_previewScaleType;
|
ScaleType m_previewScaleType;
|
||||||
int m_previewScalePercent;
|
int m_previewScalePercent;
|
||||||
|
bool m_scalePercentChanging;
|
||||||
|
|
||||||
};
|
};
|
||||||
} //namespace LimeReport
|
} //namespace LimeReport
|
||||||
|
@ -63,7 +63,7 @@ ReportEnginePrivate::ReportEnginePrivate(QObject *parent) :
|
|||||||
m_showProgressDialog(true), m_reportName(""), m_activePreview(0),
|
m_showProgressDialog(true), m_reportName(""), m_activePreview(0),
|
||||||
m_previewWindowIcon(":/report/images/logo32"), m_previewWindowTitle(tr("Preview")),
|
m_previewWindowIcon(":/report/images/logo32"), m_previewWindowTitle(tr("Preview")),
|
||||||
m_reportRendering(false), m_resultIsEditable(true), m_passPhrase("HjccbzHjlbyfCkjy"),
|
m_reportRendering(false), m_resultIsEditable(true), m_passPhrase("HjccbzHjlbyfCkjy"),
|
||||||
m_fileWatcher( new QFileSystemWatcher( this ) ),
|
m_fileWatcher( new QFileSystemWatcher( this ) ), m_previewLayoutDirection(Qt::LayoutDirectionAuto),
|
||||||
m_previewScaleType(FitWidth), m_previewScalePercent(0)
|
m_previewScaleType(FitWidth), m_previewScalePercent(0)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_STATIC_BUILD
|
#ifdef HAVE_STATIC_BUILD
|
||||||
|
@ -428,6 +428,8 @@ BandDesignIntf* ReportRender::renderBand(BandDesignIntf *patternBand, BandDesign
|
|||||||
bandClone=renderData(patternBand);
|
bandClone=renderData(patternBand);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isLast) bandClone->setBootomSpace(1);
|
||||||
|
|
||||||
if (mode == ForcedStartPage){
|
if (mode == ForcedStartPage){
|
||||||
savePage();
|
savePage();
|
||||||
startNewPage();
|
startNewPage();
|
||||||
|
Loading…
Reference in New Issue
Block a user