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

Merge pull request #336 from darktorres/master

Some small changes
This commit is contained in:
Alexander Arin 2021-08-18 16:49:03 +03:00 committed by GitHub
commit c9a46683c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 116 additions and 62 deletions

View File

@ -520,7 +520,7 @@ matrix:
- make
- make check
- env: Qt5.12.6_Ubuntu_18.04
- env: Qt5.12.10_Ubuntu_18.04
os: linux
dist: bionic
language: cpp
@ -529,7 +529,7 @@ matrix:
addons:
apt:
sources:
- sourceline: 'ppa:beineri/opt-qt-5.12.6-bionic'
- sourceline: 'ppa:beineri/opt-qt-5.12.10-bionic'
packages:
- qt512base
- qt512script
@ -544,7 +544,7 @@ matrix:
- make
- make check
- env: Qt5.12.6_Ubuntu_18.04
- env: Qt5.12.10_Ubuntu_18.04
os: linux
dist: bionic
language: cpp
@ -553,7 +553,7 @@ matrix:
addons:
apt:
sources:
- sourceline: 'ppa:beineri/opt-qt-5.12.6-bionic'
- sourceline: 'ppa:beineri/opt-qt-5.12.10-bionic'
packages:
- qt512base
- qt512script
@ -616,7 +616,7 @@ matrix:
- make
- make check
- env: Qt5.14.0_Ubuntu_18.04
- env: Qt5.14.2_Ubuntu_18.04
os: linux
dist: bionic
language: cpp
@ -625,7 +625,7 @@ matrix:
addons:
apt:
sources:
- sourceline: 'ppa:beineri/opt-qt-5.14.0-bionic'
- sourceline: 'ppa:beineri/opt-qt-5.14.2-bionic'
packages:
- qt514base
- qt514script
@ -640,7 +640,7 @@ matrix:
- make
- make check
- env: Qt5.14.0_Ubuntu_18.04
- env: Qt5.14.2_Ubuntu_18.04
os: linux
dist: bionic
language: cpp
@ -649,7 +649,7 @@ matrix:
addons:
apt:
sources:
- sourceline: 'ppa:beineri/opt-qt-5.14.0-bionic'
- sourceline: 'ppa:beineri/opt-qt-5.14.2-bionic'
packages:
- qt514base
- qt514script
@ -664,5 +664,53 @@ matrix:
- make
- make check
- env: Qt5.15.2_Ubuntu_18.04
os: linux
dist: bionic
language: cpp
compiler: gcc
cache: ccache
addons:
apt:
sources:
- sourceline: 'ppa:beineri/opt-qt-5.15.2-bionic'
packages:
- qt515base
- qt515script
- qt515tools
- qt515svg
- mesa-common-dev
- libgl1-mesa-dev
script:
- source /opt/qt515/bin/qt515-env.sh
- /opt/qt515/bin/qmake -r limereport.pro
- make
- make check
- env: Qt5.15.2_Ubuntu_18.04
os: linux
dist: bionic
language: cpp
compiler: clang
cache: ccache
addons:
apt:
sources:
- sourceline: 'ppa:beineri/opt-qt-5.15.2-bionic'
packages:
- qt515base
- qt515script
- qt515tools
- qt515svg
- mesa-common-dev
- libgl1-mesa-dev
script:
- source /opt/qt515/bin/qt515-env.sh
- /opt/qt515/bin/qmake -r limereport.pro
- make
- make check
notifications:
email: false

View File

@ -3,3 +3,6 @@ ZINT_VERSION = 2.6.1
INCLUDEPATH += $${ZINT_PATH}/backend $${ZINT_PATH}/backend_qt
DEPENDPATH += $${ZINT_PATH}/backend $${ZINT_PATH}/backend_qt
include($${ZINT_PATH}/backend_qt/backend_qt.pro)
CONFIG -= warn_on
CONFIG += warn_off

View File

@ -24,7 +24,9 @@ unix{
}
INCLUDEPATH += $$PWD/../backend
DEFINES += _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS ZINT_VERSION=\\\"$$VERSION\\\"
DEFINES += ZINT_VERSION=\\\"$$ZINT_VERSION\\\"
CONFIG(release, debug|release){
TARGET = QtZint
} else {
@ -36,14 +38,6 @@ CONFIG(release, debug|release){
LIBS += -lpng
}
win32-msvc* {
DEFINES += _CRT_SECURE_NO_WARNINGS
#QMAKE_CFLAGS += /TP /wd4018 /wd4244 /wd4305
#QMAKE_CXXFLAGS += /TP /wd4018 /wd4244 /wd4305
}
INCLUDEPATH += zint zint/backend zint/backend_qt
HEADERS += $$PWD/../backend/aztec.h \

View File

@ -67,7 +67,7 @@ class DataHeaderBand : public BandDesignIntf
Q_PROPERTY(bool reprintOnEachPage READ reprintOnEachPage WRITE setReprintOnEachPage)
Q_PROPERTY(int columnsCount READ columnsCount WRITE setColumnsCount)
Q_PROPERTY(BandColumnsLayoutType columnsFillDirection READ columnsFillDirection WRITE setColumnsFillDirection)
Q_PROPERTY(bool printAlways READ printAlways() WRITE setPrintAlways())
Q_PROPERTY(bool printAlways READ printAlways WRITE setPrintAlways)
Q_PROPERTY(bool repeatOnEachRow READ repeatOnEachRow WRITE setRepeatOnEachRow)
public:
DataHeaderBand(QObject* owner=0, QGraphicsItem* parent=0);

View File

@ -79,7 +79,7 @@ class SubDetailFooterBand : public BandDesignIntf
Q_PROPERTY(int columnsCount READ columnsCount WRITE setColumnsCount)
Q_PROPERTY(bool splittable READ isSplittable WRITE setSplittable)
Q_PROPERTY(BandColumnsLayoutType columnsFillDirection READ columnsFillDirection WRITE setColumnsFillDirection)
Q_PROPERTY(bool printAlways READ printAlways() WRITE setPrintAlways())
Q_PROPERTY(bool printAlways READ printAlways WRITE setPrintAlways)
public:
SubDetailFooterBand(QObject* owner = 0, QGraphicsItem* parent=0);
virtual bool isUnique() const;

View File

@ -46,10 +46,10 @@ class TextItem : public ContentItemDesignIntf, IPageInit {
Q_OBJECT
Q_PROPERTY(QString content READ content WRITE setContent)
Q_PROPERTY(int margin READ marginSize WRITE setMarginSize)
Q_PROPERTY(Qt::Alignment alignment READ alignment() WRITE setAlignment)
Q_PROPERTY(AutoWidth autoWidth READ autoWidth() WRITE setAutoWidth)
Q_PROPERTY(bool autoHeight READ autoHeight() WRITE setAutoHeight)
Q_PROPERTY(QFont font READ font() WRITE setTextItemFont)
Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment)
Q_PROPERTY(AutoWidth autoWidth READ autoWidth WRITE setAutoWidth)
Q_PROPERTY(bool autoHeight READ autoHeight WRITE setAutoHeight)
Q_PROPERTY(QFont font READ font WRITE setTextItemFont)
Q_PROPERTY(int backgroundOpacity READ opacity WRITE setBackgroundOpacity)
Q_PROPERTY(BGMode backgroundMode READ backgroundMode WRITE setBackgroundModeProperty)
Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColorProperty)

View File

@ -99,7 +99,7 @@ namespace LimeReport {
class PageDesignIntf : public QGraphicsScene, public ObjectLoadingStateIntf{
Q_OBJECT
Q_PROPERTY(QObject* pageItem READ pageItem())
Q_PROPERTY(QObject* pageItem READ pageItem)
public:
friend class PropertyChangedCommand;
friend class InsertHLayoutCommand;

View File

@ -147,6 +147,7 @@ QWidget *ReportDesignWidget::toolWindow(ReportDesignWidget::ToolWindowType windo
case SignalSlotEditor:
return dialogDesignerManager()->signalSlotEditor();
}
return NULL;
}
#endif

View File

@ -105,7 +105,7 @@ private:
class ReportDesignWidget : public QWidget
{
Q_OBJECT
Q_PROPERTY(QObject* datasourcesManager READ dataManager())
Q_PROPERTY(QObject* datasourcesManager READ dataManager)
public:
enum ToolWindowType{
WidgetBox = 1,

View File

@ -1383,7 +1383,7 @@ ReportPages ReportEnginePrivate::renderToPages()
ReportPages ReportEnginePrivate::appendPages(ReportPages s1, ReportPages s2, AppendType appendType)
{
if (!s1.isEmpty()>0 && s1.size() == s2.size() && appendType == MixPages){
if (!s1.isEmpty() && s1.size() == s2.size() && appendType == MixPages){
ReportPages result;
ReportPages::Iterator s1It;
ReportPages::Iterator s2It;

View File

@ -138,7 +138,7 @@ class ReportEnginePrivate : public QObject,
{
Q_OBJECT
Q_DECLARE_PUBLIC(ReportEngine)
Q_PROPERTY(ACollectionProperty pages READ fakeCollectionReader())
Q_PROPERTY(ACollectionProperty pages READ fakeCollectionReader)
Q_PROPERTY(QObject* datasourcesManager READ dataManager)
Q_PROPERTY(QObject* scriptContext READ scriptContext)
Q_PROPERTY(bool suppressFieldAndVarError READ suppressFieldAndVarError WRITE setSuppressFieldAndVarError)

View File

@ -1352,7 +1352,7 @@ void ReportRender::cutGroups()
m_popupedExpression.clear();
m_popupedValues.clear();
//foreach(BandDesignIntf* groupBand,m_childBands.keys()){
for(BandDesignIntf* groupBand : m_childBands.keys()){
foreach(BandDesignIntf* groupBand, m_childBands.keys()){
if (m_childBands.value(groupBand)->tryToKeepTogether()){
foreach(BandDesignIntf* band, *m_childBands.value(groupBand)){
m_renderPageItem->removeBand(band);

View File

@ -86,7 +86,7 @@ private:
class ReportRender: public QObject
{
Q_OBJECT
Q_PROPERTY(QObject* datasourcesManager READ datasources())
Q_PROPERTY(QObject* datasourcesManager READ datasources)
public:
enum DataRenderMode {StartNewPageAsNeeded, NotStartNewPage, ForcedStartPage};
enum BandPrintMode {PrintAlwaysPrintable, PrintNotAlwaysPrintable };

View File

@ -42,6 +42,7 @@ QString MarginPropItem::displayValue() const
return QString("%1 %2").arg((propertyValue().toDouble() * Const::mmFACTOR) / (item->unitFactor() * 10), 0, 'f', 2)
.arg(QObject::tr("''"));
}
return QString();
}
QWidget *MarginPropItem::createProperyEditor(QWidget *parent) const
@ -74,6 +75,7 @@ qreal MarginPropItem::valueInUnits(qreal value) const
case LimeReport::BaseDesignIntf::Inches:
return (value * Const::mmFACTOR) / (item->unitFactor() * 10);
}
return 0;
}
qreal MarginPropItem::valueInReportUnits(qreal value) const
@ -84,8 +86,8 @@ qreal MarginPropItem::valueInReportUnits(qreal value) const
return value;
case LimeReport::BaseDesignIntf::Inches:
return (value * (item->unitFactor() * 10)) / Const::mmFACTOR;
}
return 0;
}
QString MarginPropItem::unitShortName() const
@ -97,6 +99,7 @@ QString MarginPropItem::unitShortName() const
case LimeReport::BaseDesignIntf::Inches:
return QObject::tr("''");
}
return QString();
}
} // namespace LimeReport

View File

@ -171,6 +171,7 @@ qreal LimeReport::RectUnitValuePropItem::valueInUnits(qreal value) const
case LimeReport::BaseDesignIntf::Inches:
return value / (item->unitFactor() * 10);
}
return 0;
}
qreal LimeReport::RectUnitValuePropItem::valueInReportUnits(qreal value) const
@ -182,6 +183,7 @@ qreal LimeReport::RectUnitValuePropItem::valueInReportUnits(qreal value) const
case LimeReport::BaseDesignIntf::Inches:
return value * (item->unitFactor() * 10);
}
return 0;
}
QString LimeReport::RectUnitValuePropItem::unitShortName() const
@ -193,6 +195,7 @@ QString LimeReport::RectUnitValuePropItem::unitShortName() const
case LimeReport::BaseDesignIntf::Inches:
return QObject::tr("''");
}
return QString();
}
QString LimeReport::RectUnitValuePropItem::displayValue() const
@ -258,6 +261,7 @@ QRectF LimeReport::RectUnitPropItem::rectInUnits(QRectF rect) const
rect.width() / (item->unitFactor() * 10),
rect.height() / (item->unitFactor() * 10));
}
return QRectF();
}
QString LimeReport::RectUnitPropItem::unitShortName() const
@ -269,4 +273,5 @@ QString LimeReport::RectUnitPropItem::unitShortName() const
case LimeReport::BaseDesignIntf::Inches:
return QObject::tr("''");
}
return QString();
}