mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-25 04:54:40 +03:00
Finish 1.5.6
This commit is contained in:
commit
e9c917a052
@ -127,7 +127,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc
|
||||
|
||||
LIMEREPORT_VERSION_MAJOR = 1
|
||||
LIMEREPORT_VERSION_MINOR = 5
|
||||
LIMEREPORT_VERSION_RELEASE = 5
|
||||
LIMEREPORT_VERSION_RELEASE = 6
|
||||
|
||||
LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}'
|
||||
DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\"
|
||||
|
@ -356,7 +356,7 @@ void BandDesignIntf::setDataSourceName(const QString &datasource){
|
||||
m_dataSourceName=datasource;
|
||||
}
|
||||
|
||||
void BandDesignIntf::setKeepBottomSpaceOption(bool value){
|
||||
void BandDesignIntf::setKeepBottomSpace(bool value){
|
||||
if (m_keepBottomSpace!=value){
|
||||
m_keepBottomSpace=value;
|
||||
if (!isLoading())
|
||||
@ -584,7 +584,11 @@ void BandDesignIntf::preparePopUpMenu(QMenu &menu)
|
||||
|
||||
currAction = menu.addAction(tr("Keep bottom space"));
|
||||
currAction->setCheckable(true);
|
||||
currAction->setChecked(keepBottomSpaceOption());
|
||||
currAction->setChecked(keepBottomSpace());
|
||||
|
||||
currAction = menu.addAction(tr("Keep top space"));
|
||||
currAction->setCheckable(true);
|
||||
currAction->setChecked(keepTopSpace());
|
||||
|
||||
currAction = menu.addAction(tr("Print if empty"));
|
||||
currAction->setCheckable(true);
|
||||
@ -603,6 +607,9 @@ void BandDesignIntf::processPopUpAction(QAction *action)
|
||||
if (action->text().compare(tr("Keep bottom space")) == 0){
|
||||
setProperty("keepBottomSpace",action->isChecked());
|
||||
}
|
||||
if (action->text().compare(tr("Keep top space")) == 0){
|
||||
setProperty("keepTopSpace",action->isChecked());
|
||||
}
|
||||
|
||||
if (action->text().compare(tr("Print if empty")) == 0){
|
||||
setProperty("printIfEmpty",action->isChecked());
|
||||
@ -1090,10 +1097,10 @@ void BandDesignIntf::setKeepFooterTogether(bool value)
|
||||
|
||||
void BandDesignIntf::updateItemSize(DataSourceManager* dataManager, RenderPass pass, int maxHeight)
|
||||
{
|
||||
qreal spaceBorder=0;
|
||||
if (keepBottomSpaceOption()) spaceBorder = bottomSpace();
|
||||
qreal spaceBorder = 0;
|
||||
if (keepBottomSpace()) spaceBorder = bottomSpace();
|
||||
spaceBorder = spaceBorder > 0 ? spaceBorder : 0;
|
||||
if (borderLines()!=0){
|
||||
if (borderLines() != 0){
|
||||
spaceBorder += borderLineSize();
|
||||
}
|
||||
|
||||
@ -1105,14 +1112,14 @@ void BandDesignIntf::updateItemSize(DataSourceManager* dataManager, RenderPass p
|
||||
arrangeSubItems(pass, dataManager);
|
||||
if (autoHeight()){
|
||||
if (!keepTopSpace()) {
|
||||
qreal minTop = findMinTop();
|
||||
qreal minTop = findMinTop() - spaceBorder;
|
||||
foreach (BaseDesignIntf* item, childBaseItems()) {
|
||||
item->setY(item->y() - minTop);
|
||||
}
|
||||
}
|
||||
setHeight(findMaxBottom()+spaceBorder);
|
||||
setHeight(findMaxBottom() + spaceBorder);
|
||||
}
|
||||
if ((maxHeight>0)&&(height()>maxHeight)){
|
||||
if ((maxHeight > 0) && (height() > maxHeight)){
|
||||
trimToMaxHeight(maxHeight);
|
||||
setHeight(maxHeight);
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ class BandDesignIntf : public ItemsContainerDesignInft
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool autoHeight READ autoHeight WRITE setAutoHeight )
|
||||
Q_PROPERTY(int bandIndex READ bandIndex WRITE setBandIndex DESIGNABLE false )
|
||||
Q_PROPERTY(bool keepBottomSpace READ keepBottomSpaceOption WRITE setKeepBottomSpaceOption )
|
||||
Q_PROPERTY(bool keepBottomSpace READ keepBottomSpace WRITE setKeepBottomSpace )
|
||||
Q_PROPERTY(bool keepTopSpace READ keepTopSpace WRITE setKeepTopSpace)
|
||||
Q_PROPERTY(QString parentBand READ parentBandName WRITE setParentBandName DESIGNABLE false )
|
||||
Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor)
|
||||
@ -162,8 +162,8 @@ public:
|
||||
QString datasourceName();
|
||||
void setDataSourceName(const QString& datasourceName);
|
||||
|
||||
void setKeepBottomSpaceOption(bool value);
|
||||
bool keepBottomSpaceOption() const {return m_keepBottomSpace;}
|
||||
void setKeepBottomSpace(bool value);
|
||||
bool keepBottomSpace() const {return m_keepBottomSpace;}
|
||||
|
||||
bool keepTopSpace() const;
|
||||
void setKeepTopSpace(bool value);
|
||||
|
@ -97,7 +97,9 @@ BaseDesignIntf::BaseDesignIntf(const QString &storageTypeName, QObject *owner, Q
|
||||
|
||||
QRectF BaseDesignIntf::boundingRect() const
|
||||
{
|
||||
return rect();
|
||||
qreal halfpw = pen().widthF() / 2;
|
||||
halfpw += 2;
|
||||
return rect().adjusted(-halfpw, -halfpw, halfpw, halfpw);
|
||||
}
|
||||
|
||||
BaseDesignIntf::~BaseDesignIntf(void) {
|
||||
|
Loading…
Reference in New Issue
Block a user