0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-05-13 02:43:44 +03:00

Merge tag '1.5.88' into develop

Finish 1.5.88

# Conflicts:
#	limereport/limereport.pri
#	limereport/limereport.pro
This commit is contained in:
fralx 2021-09-11 19:29:52 +03:00
commit 296fc475fd
239 changed files with 2492 additions and 999 deletions

View File

@ -520,7 +520,7 @@ matrix:
- make - make
- make check - make check
- env: Qt5.12.6_Ubuntu_18.04 - env: Qt5.12.10_Ubuntu_18.04
os: linux os: linux
dist: bionic dist: bionic
language: cpp language: cpp
@ -529,7 +529,7 @@ matrix:
addons: addons:
apt: apt:
sources: sources:
- sourceline: 'ppa:beineri/opt-qt-5.12.6-bionic' - sourceline: 'ppa:beineri/opt-qt-5.12.10-bionic'
packages: packages:
- qt512base - qt512base
- qt512script - qt512script
@ -544,7 +544,7 @@ matrix:
- make - make
- make check - make check
- env: Qt5.12.6_Ubuntu_18.04 - env: Qt5.12.10_Ubuntu_18.04
os: linux os: linux
dist: bionic dist: bionic
language: cpp language: cpp
@ -553,7 +553,7 @@ matrix:
addons: addons:
apt: apt:
sources: sources:
- sourceline: 'ppa:beineri/opt-qt-5.12.6-bionic' - sourceline: 'ppa:beineri/opt-qt-5.12.10-bionic'
packages: packages:
- qt512base - qt512base
- qt512script - qt512script
@ -616,7 +616,7 @@ matrix:
- make - make
- make check - make check
- env: Qt5.14.0_Ubuntu_18.04 - env: Qt5.14.2_Ubuntu_18.04
os: linux os: linux
dist: bionic dist: bionic
language: cpp language: cpp
@ -625,7 +625,7 @@ matrix:
addons: addons:
apt: apt:
sources: sources:
- sourceline: 'ppa:beineri/opt-qt-5.14.0-bionic' - sourceline: 'ppa:beineri/opt-qt-5.14.2-bionic'
packages: packages:
- qt514base - qt514base
- qt514script - qt514script
@ -640,7 +640,7 @@ matrix:
- make - make
- make check - make check
- env: Qt5.14.0_Ubuntu_18.04 - env: Qt5.14.2_Ubuntu_18.04
os: linux os: linux
dist: bionic dist: bionic
language: cpp language: cpp
@ -649,7 +649,7 @@ matrix:
addons: addons:
apt: apt:
sources: sources:
- sourceline: 'ppa:beineri/opt-qt-5.14.0-bionic' - sourceline: 'ppa:beineri/opt-qt-5.14.2-bionic'
packages: packages:
- qt514base - qt514base
- qt514script - qt514script
@ -662,7 +662,55 @@ matrix:
- source /opt/qt514/bin/qt514-env.sh - source /opt/qt514/bin/qt514-env.sh
- /opt/qt514/bin/qmake -r limereport.pro - /opt/qt514/bin/qmake -r limereport.pro
- make - make
- make check - 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: notifications:
email: false email: false

View File

@ -1,5 +1,8 @@
ZINT_PATH = $$PWD/zint-2.6.1/ ZINT_PATH = $$PWD/zint-2.6.1
ZINT_VERSION = 2.6.1 ZINT_VERSION = 2.6.1
INCLUDEPATH += $${ZINT_PATH}/backend $${ZINT_PATH}/backend_qt INCLUDEPATH += $${ZINT_PATH}/backend $${ZINT_PATH}/backend_qt
DEPENDPATH += $${ZINT_PATH}/backend $${ZINT_PATH}/backend_qt DEPENDPATH += $${ZINT_PATH}/backend $${ZINT_PATH}/backend_qt
include($${ZINT_PATH}/backend_qt/backend_qt.pro) include($${ZINT_PATH}/backend_qt/backend_qt.pro)
CONFIG -= warn_on
CONFIG += warn_off

View File

@ -1,13 +1,13 @@
DEFINES += NO_PNG DEFINES += NO_PNG
TEMPLATE = lib TEMPLATE = lib
contains(CONFIG, static_build){ CONFIG(static_build) {
message(Static Build) message(Static Build)
CONFIG += staticlib CONFIG += staticlib
DEFINES += QZINT_STATIC_BUILD DEFINES += QZINT_STATIC_BUILD
} }
!contains(CONFIG, staticlib){ !CONFIG(staticlib) {
CONFIG += dll CONFIG += dll
DEFINES += QZINT_LIBRARY DEFINES += QZINT_LIBRARY
} }
@ -24,11 +24,13 @@ unix{
} }
INCLUDEPATH += $$PWD/../backend INCLUDEPATH += $$PWD/../backend
DEFINES += _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS ZINT_VERSION=\\\"$$VERSION\\\"
CONFIG(release, debug|release){ DEFINES += ZINT_VERSION=\\\"$$ZINT_VERSION\\\"
TARGET = QtZint
CONFIG(release, debug|release) {
TARGET = QtZint
} else { } else {
TARGET = QtZintd TARGET = QtZintd
} }
!contains(DEFINES, NO_PNG) { !contains(DEFINES, NO_PNG) {
@ -36,38 +38,30 @@ CONFIG(release, debug|release){
LIBS += -lpng 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 INCLUDEPATH += zint zint/backend zint/backend_qt
HEADERS += $$PWD/../backend/aztec.h \ HEADERS += $$PWD/../backend/aztec.h \
$$PWD/../backend/bmp.h \ $$PWD/../backend/bmp.h \
$$PWD/../backend/code49.h \ $$PWD/../backend/code49.h \
$$PWD/../backend/common.h \ $$PWD/../backend/common.h \
$$PWD/../backend/composite.h \ $$PWD/../backend/composite.h \
$$PWD/../backend/dmatrix.h \ $$PWD/../backend/dmatrix.h \
$$PWD/../backend/eci.h \ $$PWD/../backend/eci.h \
$$PWD/../backend/font.h \ $$PWD/../backend/font.h \
$$PWD/../backend/gridmtx.h \ $$PWD/../backend/gridmtx.h \
$$PWD/../backend/gs1.h \ $$PWD/../backend/gs1.h \
$$PWD/../backend/hanxin.h \ $$PWD/../backend/hanxin.h \
$$PWD/../backend/large.h \ $$PWD/../backend/large.h \
$$PWD/../backend/maxicode.h \ $$PWD/../backend/maxicode.h \
$$PWD/../backend/pcx.h \ $$PWD/../backend/pcx.h \
$$PWD/../backend/pdf417.h \ $$PWD/../backend/pdf417.h \
$$PWD/../backend/reedsol.h \ $$PWD/../backend/reedsol.h \
$$PWD/../backend/rss.h \ $$PWD/../backend/rss.h \
$$PWD/../backend/sjis.h \ $$PWD/../backend/sjis.h \
$$PWD/../backend/stdint_msvc.h \ $$PWD/../backend/stdint_msvc.h \
$$PWD/../backend/zint.h \ $$PWD/../backend/zint.h \
$$PWD/qzint.h \ $$PWD/qzint.h \
$$PWD/qzint_global.h $$PWD/qzint_global.h
SOURCES += $$PWD/../backend/2of5.c \ SOURCES += $$PWD/../backend/2of5.c \
$$PWD/../backend/auspost.c \ $$PWD/../backend/auspost.c \

View File

@ -1,339 +1,441 @@
project(limereport) project(limereport)
cmake_minimum_required(VERSION 3.17) cmake_minimum_required(VERSION 3.14)
find_package(Qt5Core)
find_package(Qt5Widgets)
find_package(Qt5Sql)
find_package(Qt5Network)
find_package(Qt5Xml)
find_package(Qt5Svg)
find_package(Qt5Qml)
find_package(Qt5PrintSupport)
find_package(Qt5Script)
find_package(Qt5UiTools)
find_package(PNG REQUIRED) find_package(PNG REQUIRED)
find_package(
QT NAMES Qt6 Qt5
COMPONENTS Core Widgets Sql Network Xml Svg Qml PrintSupport Script UiTools
)
find_package(
Qt${QT_VERSION_MAJOR}
COMPONENTS Core Widgets Sql Network Xml Svg Qml PrintSupport Script UiTools
)
# Old Qt does not provide QT_VERSION_MAJOR
if (NOT QT_VERSION_MAJOR)
string(SUBSTRING ${QT_VERSION} 0 1 QT_VERSION_MAJOR)
endif()
message(STATUS "Qt version: ${QT_VERSION_MAJOR}")
if (Qt${QT_VERSION_MAJOR}Widgets_FOUND)
message(STATUS "QtGui found")
endif()
if (Qt${QT_VERSION_MAJOR}Widgets_FOUND)
message(STATUS "QtWidgets found")
endif()
set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON) set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_INCLUDE_CURRENT_DIR ON)
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
set ( LIMEREPORT_SOURCES set ( LIMEREPORT_SOURCES
limereport/bands/lrdataband.cpp ${PROJECT_NAME}/bands/lrdataband.cpp
limereport/bands/lrgroupbands.cpp ${PROJECT_NAME}/bands/lrgroupbands.cpp
limereport/bands/lrpagefooter.cpp ${PROJECT_NAME}/bands/lrpagefooter.cpp
limereport/bands/lrpageheader.cpp ${PROJECT_NAME}/bands/lrpageheader.cpp
limereport/bands/lrreportfooter.cpp ${PROJECT_NAME}/bands/lrreportfooter.cpp
limereport/bands/lrreportheader.cpp ${PROJECT_NAME}/bands/lrreportheader.cpp
limereport/bands/lrsubdetailband.cpp ${PROJECT_NAME}/bands/lrsubdetailband.cpp
limereport/bands/lrtearoffband.cpp ${PROJECT_NAME}/bands/lrtearoffband.cpp
limereport/databrowser/lrconnectiondialog.cpp ${PROJECT_NAME}/databrowser/lrconnectiondialog.cpp
limereport/databrowser/lrdatabrowser.cpp ${PROJECT_NAME}/databrowser/lrdatabrowser.cpp
limereport/databrowser/lrdatabrowsertree.cpp ${PROJECT_NAME}/databrowser/lrdatabrowsertree.cpp
limereport/databrowser/lrsqleditdialog.cpp ${PROJECT_NAME}/databrowser/lrsqleditdialog.cpp
limereport/databrowser/lrvariabledialog.cpp ${PROJECT_NAME}/databrowser/lrvariabledialog.cpp
limereport/exporters/lrpdfexporter.cpp ${PROJECT_NAME}/exporters/lrpdfexporter.cpp
limereport/items/charts/lrhorizontalbarchart.cpp ${PROJECT_NAME}/items/charts/lrhorizontalbarchart.cpp
limereport/items/charts/lrlineschart.cpp ${PROJECT_NAME}/items/charts/lrlineschart.cpp
limereport/items/charts/lrpiechart.cpp ${PROJECT_NAME}/items/charts/lrpiechart.cpp
limereport/items/charts/lrverticalbarchart.cpp ${PROJECT_NAME}/items/charts/lrverticalbarchart.cpp
limereport/items/editors/lrfonteditorwidget.cpp ${PROJECT_NAME}/items/editors/lrfonteditorwidget.cpp
limereport/items/editors/lritemeditorwidget.cpp ${PROJECT_NAME}/items/editors/lritemeditorwidget.cpp
limereport/items/editors/lritemsaligneditorwidget.cpp ${PROJECT_NAME}/items/editors/lritemsaligneditorwidget.cpp
limereport/items/editors/lritemsborderseditorwidget.cpp ${PROJECT_NAME}/items/editors/lritemsborderseditorwidget.cpp
limereport/items/editors/lrtextalignmenteditorwidget.cpp ${PROJECT_NAME}/items/editors/lrtextalignmenteditorwidget.cpp
limereport/items/lrabstractlayout.cpp ${PROJECT_NAME}/items/lrabstractlayout.cpp
limereport/items/lralignpropitem.cpp ${PROJECT_NAME}/items/lralignpropitem.cpp
limereport/items/lrbarcodeitem.cpp ${PROJECT_NAME}/items/lrchartitem.cpp
limereport/items/lrchartitem.cpp ${PROJECT_NAME}/items/lrchartitemeditor.cpp
limereport/items/lrchartitemeditor.cpp ${PROJECT_NAME}/items/lrhorizontallayout.cpp
limereport/items/lrhorizontallayout.cpp ${PROJECT_NAME}/items/lrimageitem.cpp
limereport/items/lrimageitem.cpp ${PROJECT_NAME}/items/lrimageitemeditor.cpp
limereport/items/lrimageitemeditor.cpp ${PROJECT_NAME}/items/lrlayoutmarker.cpp
limereport/items/lrlayoutmarker.cpp ${PROJECT_NAME}/items/lrshapeitem.cpp
limereport/items/lrshapeitem.cpp ${PROJECT_NAME}/items/lrsimpletagparser.cpp
limereport/items/lrsimpletagparser.cpp ${PROJECT_NAME}/items/lrsubitemparentpropitem.cpp
limereport/items/lrsubitemparentpropitem.cpp ${PROJECT_NAME}/items/lrsvgitem.cpp
limereport/items/lrsvgitem.cpp ${PROJECT_NAME}/items/lrtextitem.cpp
limereport/items/lrtextitem.cpp ${PROJECT_NAME}/items/lrtextitemeditor.cpp
limereport/items/lrtextitemeditor.cpp ${PROJECT_NAME}/items/lrverticallayout.cpp
limereport/items/lrverticallayout.cpp ${PROJECT_NAME}/lraboutdialog.cpp
limereport/lraboutdialog.cpp ${PROJECT_NAME}/lrbanddesignintf.cpp
limereport/lrbanddesignintf.cpp ${PROJECT_NAME}/lrbandsmanager.cpp
limereport/lrbandsmanager.cpp ${PROJECT_NAME}/lrbasedesignintf.cpp
limereport/lrbasedesignintf.cpp ${PROJECT_NAME}/lrcolorindicator.cpp
limereport/lrcolorindicator.cpp ${PROJECT_NAME}/lrdatadesignintf.cpp
limereport/lrdatadesignintf.cpp ${PROJECT_NAME}/lrdatasourcemanager.cpp
limereport/lrdatasourcemanager.cpp ${PROJECT_NAME}/lrglobal.cpp
limereport/lrfactoryinitializer.cpp ${PROJECT_NAME}/lrgraphicsviewzoom.cpp
limereport/lrglobal.cpp ${PROJECT_NAME}/lrgroupfunctions.cpp
limereport/lrgraphicsviewzoom.cpp ${PROJECT_NAME}/lritemdesignintf.cpp
limereport/lrgroupfunctions.cpp ${PROJECT_NAME}/lritemscontainerdesignitf.cpp
limereport/lritemdesignintf.cpp ${PROJECT_NAME}/lrpagedesignintf.cpp
limereport/lritemscontainerdesignitf.cpp ${PROJECT_NAME}/lrpageitemdesignintf.cpp
limereport/lrpagedesignintf.cpp ${PROJECT_NAME}/lrpreparedpages.cpp
limereport/lrpageitemdesignintf.cpp ${PROJECT_NAME}/lrpreviewreportwidget.cpp
limereport/lrpreparedpages.cpp ${PROJECT_NAME}/lrpreviewreportwindow.cpp
limereport/lrpreviewreportwidget.cpp ${PROJECT_NAME}/lrreportdesignwidget.cpp
limereport/lrpreviewreportwindow.cpp ${PROJECT_NAME}/lrreportdesignwindow.cpp
limereport/lrreportdesignwidget.cpp ${PROJECT_NAME}/lrreportengine.cpp
limereport/lrreportdesignwindow.cpp ${PROJECT_NAME}/lrreportrender.cpp
limereport/lrreportengine.cpp ${PROJECT_NAME}/lrreporttranslation.cpp
limereport/lrreportrender.cpp ${PROJECT_NAME}/lrscriptenginemanager.cpp
limereport/lrreporttranslation.cpp ${PROJECT_NAME}/lrsettingdialog.cpp
limereport/lrscriptenginemanager.cpp ${PROJECT_NAME}/lrsimplecrypt.cpp
limereport/lrsettingdialog.cpp ${PROJECT_NAME}/lrvariablesholder.cpp
limereport/lrsimplecrypt.cpp ${PROJECT_NAME}/objectinspector/editors/lrbuttonlineeditor.cpp
limereport/lrvariablesholder.cpp ${PROJECT_NAME}/objectinspector/editors/lrcheckboxeditor.cpp
limereport/objectinspector/editors/lrbuttonlineeditor.cpp ${PROJECT_NAME}/objectinspector/editors/lrcoloreditor.cpp
limereport/objectinspector/editors/lrcheckboxeditor.cpp ${PROJECT_NAME}/objectinspector/editors/lrcomboboxeditor.cpp
limereport/objectinspector/editors/lrcoloreditor.cpp ${PROJECT_NAME}/objectinspector/editors/lrfonteditor.cpp
limereport/objectinspector/editors/lrcomboboxeditor.cpp ${PROJECT_NAME}/objectinspector/editors/lrimageeditor.cpp
limereport/objectinspector/editors/lrfonteditor.cpp ${PROJECT_NAME}/objectinspector/editors/lrsvgeditor.cpp
limereport/objectinspector/editors/lrimageeditor.cpp ${PROJECT_NAME}/objectinspector/editors/lrtextitempropertyeditor.cpp
limereport/objectinspector/editors/lrsvgeditor.cpp ${PROJECT_NAME}/objectinspector/lrbasedesignobjectmodel.cpp
limereport/objectinspector/editors/lrtextitempropertyeditor.cpp ${PROJECT_NAME}/objectinspector/lrobjectinspectorwidget.cpp
limereport/objectinspector/lrbasedesignobjectmodel.cpp ${PROJECT_NAME}/objectinspector/lrobjectitemmodel.cpp
limereport/objectinspector/lrobjectinspectorwidget.cpp ${PROJECT_NAME}/objectinspector/lrobjectpropitem.cpp
limereport/objectinspector/lrobjectitemmodel.cpp ${PROJECT_NAME}/objectinspector/lrpropertydelegate.cpp
limereport/objectinspector/lrobjectpropitem.cpp ${PROJECT_NAME}/objectinspector/propertyItems/lrboolpropitem.cpp
limereport/objectinspector/lrpropertydelegate.cpp ${PROJECT_NAME}/objectinspector/propertyItems/lrcolorpropitem.cpp
limereport/objectinspector/propertyItems/lrboolpropitem.cpp ${PROJECT_NAME}/objectinspector/propertyItems/lrcontentpropitem.cpp
limereport/objectinspector/propertyItems/lrcolorpropitem.cpp ${PROJECT_NAME}/objectinspector/propertyItems/lrdatasourcepropitem.cpp
limereport/objectinspector/propertyItems/lrcontentpropitem.cpp ${PROJECT_NAME}/objectinspector/propertyItems/lrenumpropitem.cpp
limereport/objectinspector/propertyItems/lrdatasourcepropitem.cpp ${PROJECT_NAME}/objectinspector/propertyItems/lrflagspropitem.cpp
limereport/objectinspector/propertyItems/lrenumpropitem.cpp ${PROJECT_NAME}/objectinspector/propertyItems/lrfontpropitem.cpp
limereport/objectinspector/propertyItems/lrflagspropitem.cpp ${PROJECT_NAME}/objectinspector/propertyItems/lrgroupfieldpropitem.cpp
limereport/objectinspector/propertyItems/lrfontpropitem.cpp ${PROJECT_NAME}/objectinspector/propertyItems/lrimagepropitem.cpp
limereport/objectinspector/propertyItems/lrgroupfieldpropitem.cpp ${PROJECT_NAME}/objectinspector/propertyItems/lrintpropitem.cpp
limereport/objectinspector/propertyItems/lrimagepropitem.cpp ${PROJECT_NAME}/objectinspector/propertyItems/lrmarginpropitem.cpp
limereport/objectinspector/propertyItems/lrintpropitem.cpp ${PROJECT_NAME}/objectinspector/propertyItems/lrqrealpropitem.cpp
limereport/objectinspector/propertyItems/lrmarginpropitem.cpp ${PROJECT_NAME}/objectinspector/propertyItems/lrrectproptem.cpp
limereport/objectinspector/propertyItems/lrqrealpropitem.cpp ${PROJECT_NAME}/objectinspector/propertyItems/lrseriespropitem.cpp
limereport/objectinspector/propertyItems/lrrectproptem.cpp ${PROJECT_NAME}/objectinspector/propertyItems/lrstringpropitem.cpp
limereport/objectinspector/propertyItems/lrseriespropitem.cpp ${PROJECT_NAME}/objectinspector/propertyItems/lrsvgpropitem.cpp
limereport/objectinspector/propertyItems/lrstringpropitem.cpp ${PROJECT_NAME}/objectsbrowser/lrobjectbrowser.cpp
limereport/objectinspector/propertyItems/lrsvgpropitem.cpp ${PROJECT_NAME}/scriptbrowser/lrscriptbrowser.cpp
limereport/objectsbrowser/lrobjectbrowser.cpp ${PROJECT_NAME}/scripteditor/lrcodeeditor.cpp
limereport/scriptbrowser/lrscriptbrowser.cpp ${PROJECT_NAME}/scripteditor/lrscripteditor.cpp
limereport/scripteditor/lrcodeeditor.cpp ${PROJECT_NAME}/scripteditor/lrscripthighlighter.cpp
limereport/scripteditor/lrscripteditor.cpp ${PROJECT_NAME}/serializators/lrxmlbasetypesserializators.cpp
limereport/scripteditor/lrscripthighlighter.cpp ${PROJECT_NAME}/serializators/lrxmlqrectserializator.cpp
limereport/serializators/lrxmlbasetypesserializators.cpp ${PROJECT_NAME}/serializators/lrxmlreader.cpp
limereport/serializators/lrxmlqrectserializator.cpp ${PROJECT_NAME}/serializators/lrxmlwriter.cpp
limereport/serializators/lrxmlreader.cpp ${PROJECT_NAME}/translationeditor/languageselectdialog.cpp
limereport/serializators/lrxmlwriter.cpp ${PROJECT_NAME}/translationeditor/translationeditor.cpp
limereport/translationeditor/languageselectdialog.cpp
limereport/translationeditor/translationeditor.cpp
limereport/bands/lrdataband.h ${PROJECT_NAME}/bands/lrdataband.h
limereport/bands/lrgroupbands.h ${PROJECT_NAME}/bands/lrgroupbands.h
limereport/bands/lrpagefooter.h ${PROJECT_NAME}/bands/lrpagefooter.h
limereport/bands/lrpageheader.h ${PROJECT_NAME}/bands/lrpageheader.h
limereport/bands/lrreportfooter.h ${PROJECT_NAME}/bands/lrreportfooter.h
limereport/bands/lrreportheader.h ${PROJECT_NAME}/bands/lrreportheader.h
limereport/bands/lrsubdetailband.h ${PROJECT_NAME}/bands/lrsubdetailband.h
limereport/bands/lrtearoffband.h ${PROJECT_NAME}/bands/lrtearoffband.h
limereport/base/lrattribsabstractfactory.h ${PROJECT_NAME}/base/lrattribsabstractfactory.h
limereport/base/lrsimpleabstractfactory.h ${PROJECT_NAME}/base/lrsimpleabstractfactory.h
limereport/base/lrsingleton.h ${PROJECT_NAME}/base/lrsingleton.h
limereport/databrowser/lrconnectiondialog.h ${PROJECT_NAME}/databrowser/lrconnectiondialog.h
limereport/databrowser/lrdatabrowser.h ${PROJECT_NAME}/databrowser/lrdatabrowser.h
limereport/databrowser/lrdatabrowsertree.h ${PROJECT_NAME}/databrowser/lrdatabrowsertree.h
limereport/databrowser/lrsqleditdialog.h ${PROJECT_NAME}/databrowser/lrsqleditdialog.h
limereport/databrowser/lrvariabledialog.h ${PROJECT_NAME}/databrowser/lrvariabledialog.h
limereport/exporters/lrpdfexporter.h ${PROJECT_NAME}/exporters/lrpdfexporter.h
limereport/items/charts/lrhorizontalbarchart.h ${PROJECT_NAME}/items/charts/lrhorizontalbarchart.h
limereport/items/charts/lrlineschart.h ${PROJECT_NAME}/items/charts/lrlineschart.h
limereport/items/charts/lrpiechart.h ${PROJECT_NAME}/items/charts/lrpiechart.h
limereport/items/charts/lrverticalbarchart.h ${PROJECT_NAME}/items/charts/lrverticalbarchart.h
limereport/items/editors/lrfonteditorwidget.h ${PROJECT_NAME}/items/editors/lrfonteditorwidget.h
limereport/items/editors/lritemeditorwidget.h ${PROJECT_NAME}/items/editors/lritemeditorwidget.h
limereport/items/editors/lritemsaligneditorwidget.h ${PROJECT_NAME}/items/editors/lritemsaligneditorwidget.h
limereport/items/editors/lritemsborderseditorwidget.h ${PROJECT_NAME}/items/editors/lritemsborderseditorwidget.h
limereport/items/editors/lrtextalignmenteditorwidget.h ${PROJECT_NAME}/items/editors/lrtextalignmenteditorwidget.h
limereport/items/lrabstractlayout.h ${PROJECT_NAME}/items/lrabstractlayout.h
limereport/items/lralignpropitem.h ${PROJECT_NAME}/items/lralignpropitem.h
limereport/items/lrbarcodeitem.h ${PROJECT_NAME}/items/lrchartitem.h
limereport/items/lrchartitem.h ${PROJECT_NAME}/items/lrchartitemeditor.h
limereport/items/lrchartitemeditor.h ${PROJECT_NAME}/items/lreditableimageitemintf.h
limereport/items/lreditableimageitemintf.h ${PROJECT_NAME}/items/lrhorizontallayout.h
limereport/items/lrhorizontallayout.h ${PROJECT_NAME}/items/lrimageitem.h
limereport/items/lrimageitem.h ${PROJECT_NAME}/items/lrimageitemeditor.h
limereport/items/lrimageitemeditor.h ${PROJECT_NAME}/items/lrlayoutmarker.h
limereport/items/lrlayoutmarker.h ${PROJECT_NAME}/items/lrshapeitem.h
limereport/items/lrshapeitem.h ${PROJECT_NAME}/items/lrsimpletagparser.h
limereport/items/lrsimpletagparser.h ${PROJECT_NAME}/items/lrsubitemparentpropitem.h
limereport/items/lrsubitemparentpropitem.h ${PROJECT_NAME}/items/lrsvgitem.h
limereport/items/lrsvgitem.h ${PROJECT_NAME}/items/lrtextitem.h
limereport/items/lrtextitem.h ${PROJECT_NAME}/items/lrtextitemeditor.h
limereport/items/lrtextitemeditor.h ${PROJECT_NAME}/items/lrverticallayout.h
limereport/items/lrverticallayout.h ${PROJECT_NAME}/lraboutdialog.h
limereport/lraboutdialog.h ${PROJECT_NAME}/lrbanddesignintf.h
limereport/lrbanddesignintf.h ${PROJECT_NAME}/lrbandsmanager.h
limereport/lrbandsmanager.h ${PROJECT_NAME}/lrbasedesignintf.h
limereport/lrbasedesignintf.h ${PROJECT_NAME}/lrcollection.h
limereport/lrcallbackdatasourceintf.h ${PROJECT_NAME}/lrcolorindicator.h
limereport/lrcollection.h ${PROJECT_NAME}/lrdatadesignintf.h
limereport/lrcolorindicator.h ${PROJECT_NAME}/lrdatasourcemanager.h
limereport/lrdatadesignintf.h ${PROJECT_NAME}/lrdesignelementsfactory.h
limereport/lrdatasourceintf.h ${PROJECT_NAME}/lrdesignerplugininterface.h
limereport/lrdatasourcemanager.h ${PROJECT_NAME}/lrexporterintf.h
limereport/lrdatasourcemanagerintf.h ${PROJECT_NAME}/lrexportersfactory.h
limereport/lrdesignelementsfactory.h ${PROJECT_NAME}/lrgraphicsviewzoom.h
limereport/lrdesignerplugininterface.h ${PROJECT_NAME}/lrgroupfunctions.h
limereport/lrexporterintf.h ${PROJECT_NAME}/lritemdesignintf.h
limereport/lrexportersfactory.h ${PROJECT_NAME}/lritemscontainerdesignitf.h
limereport/lrfactoryinitializer.h ${PROJECT_NAME}/lrpagedesignintf.h
limereport/lrgraphicsviewzoom.h ${PROJECT_NAME}/lrpageinitintf.h
limereport/lrgroupfunctions.h ${PROJECT_NAME}/lrpageitemdesignintf.h
limereport/lritemdesignintf.h ${PROJECT_NAME}/lrpreparedpages.h
limereport/lritemscontainerdesignitf.h ${PROJECT_NAME}/lrpreviewreportwidget_p.h
limereport/lrpagedesignintf.h ${PROJECT_NAME}/lrpreviewreportwindow.h
limereport/lrpageinitintf.h ${PROJECT_NAME}/lrreportdesignwidget.h
limereport/lrpageitemdesignintf.h ${PROJECT_NAME}/lrreportdesignwindow.h
limereport/lrpreparedpages.h ${PROJECT_NAME}/lrreportengine_p.h
limereport/lrpreparedpagesintf.h ${PROJECT_NAME}/lrreportrender.h
limereport/lrpreviewreportwidget.h ${PROJECT_NAME}/lrreporttranslation.h
limereport/lrpreviewreportwidget_p.h ${PROJECT_NAME}/lrscriptenginemanager.h
limereport/lrpreviewreportwindow.h ${PROJECT_NAME}/lrsettingdialog.h
limereport/lrreportdesignwidget.h ${PROJECT_NAME}/lrsimplecrypt.h
limereport/lrreportdesignwindow.h ${PROJECT_NAME}/lrvariablesholder.h
limereport/lrreportdesignwindowintrerface.h ${PROJECT_NAME}/objectinspector/editors/lrbuttonlineeditor.h
limereport/lrreportengine.h ${PROJECT_NAME}/objectinspector/editors/lrcheckboxeditor.h
limereport/lrreportengine_p.h ${PROJECT_NAME}/objectinspector/editors/lrcoloreditor.h
limereport/lrreportrender.h ${PROJECT_NAME}/objectinspector/editors/lrcomboboxeditor.h
limereport/lrreporttranslation.h ${PROJECT_NAME}/objectinspector/editors/lrfonteditor.h
limereport/lrscriptenginemanager.h ${PROJECT_NAME}/objectinspector/editors/lrimageeditor.h
limereport/lrscriptenginemanagerintf.h ${PROJECT_NAME}/objectinspector/editors/lrsvgeditor.h
limereport/lrsettingdialog.h ${PROJECT_NAME}/objectinspector/editors/lrtextitempropertyeditor.h
limereport/lrsimplecrypt.h ${PROJECT_NAME}/objectinspector/lrbasedesignobjectmodel.h
limereport/lrvariablesholder.h ${PROJECT_NAME}/objectinspector/lrobjectinspectorwidget.h
limereport/objectinspector/editors/lrbuttonlineeditor.h ${PROJECT_NAME}/objectinspector/lrobjectitemmodel.h
limereport/objectinspector/editors/lrcheckboxeditor.h ${PROJECT_NAME}/objectinspector/lrobjectpropitem.h
limereport/objectinspector/editors/lrcoloreditor.h ${PROJECT_NAME}/objectinspector/lrpropertydelegate.h
limereport/objectinspector/editors/lrcomboboxeditor.h ${PROJECT_NAME}/objectinspector/propertyItems/lrboolpropitem.h
limereport/objectinspector/editors/lrfonteditor.h ${PROJECT_NAME}/objectinspector/propertyItems/lrcolorpropitem.h
limereport/objectinspector/editors/lrimageeditor.h ${PROJECT_NAME}/objectinspector/propertyItems/lrcontentpropitem.h
limereport/objectinspector/editors/lrsvgeditor.h ${PROJECT_NAME}/objectinspector/propertyItems/lrdatasourcepropitem.h
limereport/objectinspector/editors/lrtextitempropertyeditor.h ${PROJECT_NAME}/objectinspector/propertyItems/lrenumpropitem.h
limereport/objectinspector/lrbasedesignobjectmodel.h ${PROJECT_NAME}/objectinspector/propertyItems/lrflagspropitem.h
limereport/objectinspector/lrobjectinspectorwidget.h ${PROJECT_NAME}/objectinspector/propertyItems/lrfontpropitem.h
limereport/objectinspector/lrobjectitemmodel.h ${PROJECT_NAME}/objectinspector/propertyItems/lrgroupfieldpropitem.h
limereport/objectinspector/lrobjectpropitem.h ${PROJECT_NAME}/objectinspector/propertyItems/lrimagepropitem.h
limereport/objectinspector/lrpropertydelegate.h ${PROJECT_NAME}/objectinspector/propertyItems/lrintpropitem.h
limereport/objectinspector/propertyItems/lrboolpropitem.h ${PROJECT_NAME}/objectinspector/propertyItems/lrmarginpropitem.h
limereport/objectinspector/propertyItems/lrcolorpropitem.h ${PROJECT_NAME}/objectinspector/propertyItems/lrqrealpropitem.h
limereport/objectinspector/propertyItems/lrcontentpropitem.h ${PROJECT_NAME}/objectinspector/propertyItems/lrrectproptem.h
limereport/objectinspector/propertyItems/lrdatasourcepropitem.h ${PROJECT_NAME}/objectinspector/propertyItems/lrseriespropitem.h
limereport/objectinspector/propertyItems/lrenumpropitem.h ${PROJECT_NAME}/objectinspector/propertyItems/lrstringpropitem.h
limereport/objectinspector/propertyItems/lrflagspropitem.h ${PROJECT_NAME}/objectinspector/propertyItems/lrsvgpropitem.h
limereport/objectinspector/propertyItems/lrfontpropitem.h ${PROJECT_NAME}/objectsbrowser/lrobjectbrowser.h
limereport/objectinspector/propertyItems/lrgroupfieldpropitem.h ${PROJECT_NAME}/scriptbrowser/lrscriptbrowser.h
limereport/objectinspector/propertyItems/lrimagepropitem.h ${PROJECT_NAME}/scripteditor/lrcodeeditor.h
limereport/objectinspector/propertyItems/lrintpropitem.h ${PROJECT_NAME}/scripteditor/lrscripteditor.h
limereport/objectinspector/propertyItems/lrmarginpropitem.h ${PROJECT_NAME}/scripteditor/lrscripthighlighter.h
limereport/objectinspector/propertyItems/lrqrealpropitem.h ${PROJECT_NAME}/serializators/lrserializatorintf.h
limereport/objectinspector/propertyItems/lrrectproptem.h ${PROJECT_NAME}/serializators/lrstorageintf.h
limereport/objectinspector/propertyItems/lrseriespropitem.h ${PROJECT_NAME}/serializators/lrxmlbasetypesserializators.h
limereport/objectinspector/propertyItems/lrstringpropitem.h ${PROJECT_NAME}/serializators/lrxmlqrectserializator.h
limereport/objectinspector/propertyItems/lrsvgpropitem.h ${PROJECT_NAME}/serializators/lrxmlreader.h
limereport/objectsbrowser/lrobjectbrowser.h ${PROJECT_NAME}/serializators/lrxmlserializatorsfactory.h
limereport/scriptbrowser/lrscriptbrowser.h ${PROJECT_NAME}/serializators/lrxmlwriter.h
limereport/scripteditor/lrcodeeditor.h ${PROJECT_NAME}/translationeditor/languageselectdialog.h
limereport/scripteditor/lrscripteditor.h ${PROJECT_NAME}/translationeditor/translationeditor.h
limereport/scripteditor/lrscripthighlighter.h
limereport/serializators/lrserializatorintf.h
limereport/serializators/lrstorageintf.h
limereport/serializators/lrxmlbasetypesserializators.h
limereport/serializators/lrxmlqrectserializator.h
limereport/serializators/lrxmlreader.h
limereport/serializators/lrxmlserializatorsfactory.h
limereport/serializators/lrxmlwriter.h
limereport/translationeditor/languageselectdialog.h
limereport/translationeditor/translationeditor.h
limereport/lrglobal.h
3rdparty/zint-2.6.1/backend/2of5.c
3rdparty/zint-2.6.1/backend/auspost.c ${PROJECT_NAME}/databrowser/lrconnectiondialog.ui
3rdparty/zint-2.6.1/backend/aztec.c ${PROJECT_NAME}/databrowser/lrdatabrowser.ui
3rdparty/zint-2.6.1/backend/bmp.c ${PROJECT_NAME}/databrowser/lrsqleditdialog.ui
3rdparty/zint-2.6.1/backend/codablock.c ${PROJECT_NAME}/databrowser/lrvariabledialog.ui
3rdparty/zint-2.6.1/backend/code.c ${PROJECT_NAME}/dialogdesigner/templates/Dialog.ui
3rdparty/zint-2.6.1/backend/code1.c ${PROJECT_NAME}/items/lrchartitemeditor.ui
3rdparty/zint-2.6.1/backend/code128.c ${PROJECT_NAME}/items/lrimageitemeditor.ui
3rdparty/zint-2.6.1/backend/code16k.c ${PROJECT_NAME}/items/lrtextitemeditor.ui
3rdparty/zint-2.6.1/backend/code49.c ${PROJECT_NAME}/lraboutdialog.ui
3rdparty/zint-2.6.1/backend/common.c ${PROJECT_NAME}/lrpreviewreportwidget.ui
3rdparty/zint-2.6.1/backend/composite.c ${PROJECT_NAME}/lrpreviewreportwindow.ui
3rdparty/zint-2.6.1/backend/dllversion.c ${PROJECT_NAME}/lrsettingdialog.ui
3rdparty/zint-2.6.1/backend/dmatrix.c ${PROJECT_NAME}/objectinspector/editors/ltextitempropertyeditor.ui
3rdparty/zint-2.6.1/backend/dotcode.c ${PROJECT_NAME}/scriptbrowser/lrscriptbrowser.ui
3rdparty/zint-2.6.1/backend/eci.c ${PROJECT_NAME}/scripteditor/lrscripteditor.ui
3rdparty/zint-2.6.1/backend/emf.c ${PROJECT_NAME}/translationeditor/languageselectdialog.ui
3rdparty/zint-2.6.1/backend/gif.c ${PROJECT_NAME}/translationeditor/translationeditor.ui
3rdparty/zint-2.6.1/backend/gridmtx.c
3rdparty/zint-2.6.1/backend/gs1.c
3rdparty/zint-2.6.1/backend/hanxin.c
3rdparty/zint-2.6.1/backend/imail.c
3rdparty/zint-2.6.1/backend/large.c
3rdparty/zint-2.6.1/backend/library.c
3rdparty/zint-2.6.1/backend/libzint.rc
3rdparty/zint-2.6.1/backend/maxicode.c
3rdparty/zint-2.6.1/backend/medical.c
3rdparty/zint-2.6.1/backend/pcx.c
3rdparty/zint-2.6.1/backend/pdf417.c
3rdparty/zint-2.6.1/backend/plessey.c
3rdparty/zint-2.6.1/backend/png.c
3rdparty/zint-2.6.1/backend/postal.c
3rdparty/zint-2.6.1/backend/ps.c
3rdparty/zint-2.6.1/backend/qr.c
3rdparty/zint-2.6.1/backend/raster.c
3rdparty/zint-2.6.1/backend/reedsol.c
3rdparty/zint-2.6.1/backend/render.c
3rdparty/zint-2.6.1/backend/rss.c
3rdparty/zint-2.6.1/backend/svg.c
3rdparty/zint-2.6.1/backend/telepen.c
3rdparty/zint-2.6.1/backend/tif.c
3rdparty/zint-2.6.1/backend/upcean.c
3rdparty/zint-2.6.1/backend_qt/qzint.cpp
limereport/databrowser/lrconnectiondialog.ui ./${PROJECT_NAME}/databrowser/lrdatabrowser.qrc
limereport/databrowser/lrdatabrowser.ui ./${PROJECT_NAME}/dialogdesigner/dialogdesigner.qrc
limereport/databrowser/lrsqleditdialog.ui ./${PROJECT_NAME}/items/items.qrc
limereport/databrowser/lrvariabledialog.ui ./${PROJECT_NAME}/objectinspector/lobjectinspector.qrc
limereport/dialogdesigner/templates/Dialog.ui ./${PROJECT_NAME}/report.qrc
limereport/items/lrchartitemeditor.ui ./${PROJECT_NAME}/scriptbrowser/lrscriptbrowser.qrc
limereport/items/lrimageitemeditor.ui ./${PROJECT_NAME}/translationeditor/translationeditor.qrc
limereport/items/lrtextitemeditor.ui
limereport/lraboutdialog.ui
limereport/lrpreviewreportwidget.ui
limereport/lrpreviewreportwindow.ui
limereport/lrsettingdialog.ui
limereport/objectinspector/editors/ltextitempropertyeditor.ui
limereport/scriptbrowser/lrscriptbrowser.ui
limereport/scripteditor/lrscripteditor.ui
limereport/translationeditor/languageselectdialog.ui
limereport/translationeditor/translationeditor.ui
./limereport/databrowser/lrdatabrowser.qrc
./limereport/dialogdesigner/dialogdesigner.qrc
./limereport/items/items.qrc
./limereport/objectinspector/lobjectinspector.qrc
./limereport/report.qrc
./limereport/scriptbrowser/lrscriptbrowser.qrc
./limereport/translationeditor/translationeditor.qrc
) )
add_library( limereport_static STATIC ${LIMEREPORT_SOURCES}) if (ENABLE_ZINT)
add_library( limereport SHARED ${LIMEREPORT_SOURCES}) list(APPEND LIMEREPORT_SOURCES ${PROJECT_NAME}/items/lrbarcodeitem.cpp)
target_link_libraries( limereport_static PNG::PNG Qt5::Core Qt5::Qml Qt5::Widgets Qt5::Xml Qt5::Sql Qt5::PrintSupport Qt5::Script Qt5::Svg Qt5::UiTools) list(APPEND LIMEREPORT_SOURCES ${PROJECT_NAME}/items/lrbarcodeitem.h)
target_link_libraries( limereport PNG::PNG Qt5::Core Qt5::Widgets Qt5::Qml Qt5::Xml Qt5::Sql Qt5::PrintSupport Qt5::Script Qt5::Svg Qt5::UiTools) endif(ENABLE_ZINT)
target_compile_definitions( limereport_static PUBLIC -DHAVE_QT5 -DHAVE_STATIC_BUILD -DLIMEREPORT_VERSION_STR="dev" -DHAVE_REPORT_DESIGNER -DUSE_QJSENGINE -DHAVE_UI_LOADER )
target_compile_definitions( limereport PUBLIC -DHAVE_QT5 -DLIMEREPORT_VERSION_STR="dev" -DHAVE_REPORT_DESIGNER -DUSE_QJSENGINE -DLIMEREPORT_EXPORTS -DHAVE_UI_LOADER) if (LIMEREPORT_STATIC)
target_include_directories( limereport PRIVATE limereport/ limereport/base limereport/bands limereport/databrowser limereport/items/editors limereport/items limereport/objectinspector limereport/scriptbrowser limereport/serializators 3rdparty/zint-2.6.1/backend_qt 3rdparty/zint-2.6.1/backend limereport/scripteditor) list(APPEND LIMEREPORT_SOURCES ${PROJECT_NAME}/lrfactoryinitializer.cpp)
target_include_directories( limereport_static PRIVATE limereport/ limereport/base limereport/bands limereport/databrowser limereport/items/editors limereport/items limereport/objectinspector limereport/scriptbrowser limereport/serializators 3rdparty/zint-2.6.1/backend_qt 3rdparty/zint-2.6.1/backend limereport/scripteditor ) list(APPEND LIMEREPORT_SOURCES ${PROJECT_NAME}/lrfactoryinitializer.h)
endif(LIMEREPORT_STATIC)
set(EXTRA_FILES
${PROJECT_NAME}/lrglobal.h
${PROJECT_NAME}/lrdatasourcemanagerintf.h
${PROJECT_NAME}/lrdatasourceintf.h
${PROJECT_NAME}/lrreportengine.h
${PROJECT_NAME}/lrscriptenginemanagerintf.h
${PROJECT_NAME}/lrcallbackdatasourceintf.h
${PROJECT_NAME}/lrpreviewreportwidget.h
${PROJECT_NAME}/lrreportdesignwindowintrerface.h
${PROJECT_NAME}/lrpreparedpagesintf.h
)
set(ZINT_FILES
3rdparty/zint-2.6.1/backend/2of5.c
3rdparty/zint-2.6.1/backend/auspost.c
3rdparty/zint-2.6.1/backend/aztec.c
3rdparty/zint-2.6.1/backend/bmp.c
3rdparty/zint-2.6.1/backend/codablock.c
3rdparty/zint-2.6.1/backend/code.c
3rdparty/zint-2.6.1/backend/code1.c
3rdparty/zint-2.6.1/backend/code128.c
3rdparty/zint-2.6.1/backend/code16k.c
3rdparty/zint-2.6.1/backend/code49.c
3rdparty/zint-2.6.1/backend/common.c
3rdparty/zint-2.6.1/backend/composite.c
3rdparty/zint-2.6.1/backend/dllversion.c
3rdparty/zint-2.6.1/backend/dmatrix.c
3rdparty/zint-2.6.1/backend/dotcode.c
3rdparty/zint-2.6.1/backend/eci.c
3rdparty/zint-2.6.1/backend/emf.c
3rdparty/zint-2.6.1/backend/gif.c
3rdparty/zint-2.6.1/backend/gridmtx.c
3rdparty/zint-2.6.1/backend/gs1.c
3rdparty/zint-2.6.1/backend/hanxin.c
3rdparty/zint-2.6.1/backend/imail.c
3rdparty/zint-2.6.1/backend/large.c
3rdparty/zint-2.6.1/backend/library.c
3rdparty/zint-2.6.1/backend/libzint.rc
3rdparty/zint-2.6.1/backend/maxicode.c
3rdparty/zint-2.6.1/backend/medical.c
3rdparty/zint-2.6.1/backend/pcx.c
3rdparty/zint-2.6.1/backend/pdf417.c
3rdparty/zint-2.6.1/backend/plessey.c
3rdparty/zint-2.6.1/backend/png.c
3rdparty/zint-2.6.1/backend/postal.c
3rdparty/zint-2.6.1/backend/ps.c
3rdparty/zint-2.6.1/backend/qr.c
3rdparty/zint-2.6.1/backend/raster.c
3rdparty/zint-2.6.1/backend/reedsol.c
3rdparty/zint-2.6.1/backend/render.c
3rdparty/zint-2.6.1/backend/rss.c
3rdparty/zint-2.6.1/backend/svg.c
3rdparty/zint-2.6.1/backend/telepen.c
3rdparty/zint-2.6.1/backend/tif.c
3rdparty/zint-2.6.1/backend/upcean.c
3rdparty/zint-2.6.1/backend_qt/qzint.cpp
)
set(LIMEREPORT_VERSION_MAJOR 1)
set(LIMEREPORT_VERSION_MINOR 5)
set(LIMEREPORT_VERSION_RELEASE 88)
configure_file(config.h.in config.h @ONLY)
set(GLOBAL_HEADERS
${PROJECT_NAME}/LimeReport
${PROJECT_NAME}/LRCallbackDS
${PROJECT_NAME}/LRDataManager
${PROJECT_NAME}/LRScriptManager
${CMAKE_CURRENT_BINARY_DIR}/config.h
)
if(ENABLE_ZINT)
add_library(QZint STATIC ${ZINT_FILES})
endif(ENABLE_ZINT)
if (LIMEREPORT_STATIC)
message(STATUS "STATIC LIBRARY")
add_library(${PROJECT_NAME} STATIC ${EXTRA_FILES} ${LIMEREPORT_SOURCES})
target_compile_definitions( ${PROJECT_NAME} PUBLIC -DHAVE_STATIC_BUILD)
else()
add_library(${PROJECT_NAME} SHARED ${EXTRA_FILES} ${LIMEREPORT_SOURCES})
target_compile_definitions( ${PROJECT_NAME} PUBLIC -DLIMEREPORT_EXPORTS)
endif()
target_compile_definitions(${PROJECT_NAME} PUBLIC -DCMAKE_CONFIG)
target_link_libraries( ${PROJECT_NAME} PRIVATE PNG::PNG)
if(ENABLE_ZINT)
target_link_libraries( ${PROJECT_NAME} PRIVATE QZint)
target_include_directories( ${PROJECT_NAME} PRIVATE
3rdparty/zint-2.6.1/backend_qt
3rdparty/zint-2.6.1/backend)
endif(ENABLE_ZINT)
if (LIMEREPORT_STATIC AND ENABLE_ZINT)
target_compile_definitions( ${PROJECT_NAME} PRIVATE -DQZINT_STATIC_BUILD)
endif(LIMEREPORT_STATIC AND ENABLE_ZINT)
target_link_libraries( ${PROJECT_NAME} PUBLIC
Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Widgets
Qt${QT_VERSION_MAJOR}::Qml
Qt${QT_VERSION_MAJOR}::Xml
Qt${QT_VERSION_MAJOR}::Sql
Qt${QT_VERSION_MAJOR}::PrintSupport
Qt${QT_VERSION_MAJOR}::Script
Qt${QT_VERSION_MAJOR}::Svg
Qt${QT_VERSION_MAJOR}::UiTools)
target_compile_definitions( ${PROJECT_NAME} PRIVATE -DHAVE_QT5 -DHAVE_REPORT_DESIGNER -DUSE_QJSENGINE -DHAVE_UI_LOADER -D_CRT_SECURE_NO_WARNINGS)
target_include_directories( ${PROJECT_NAME} PRIVATE
limereport/
limereport/base
limereport/bands
limereport/databrowser
limereport/items/editors
limereport/items
limereport/objectinspector
limereport/scriptbrowser
limereport/serializators
limereport/scripteditor )
install(TARGETS
${PROJECT_NAME}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin)
install(FILES
${EXTRA_FILES}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}")
install(FILES
${GLOBAL_HEADERS}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}")

View File

@ -1,78 +1,89 @@
# uncomment to disable translations
#CONFIG += no_build_translations
# uncomment to disable zint
#CONFIG += no_zint
# uncomment to disable svg
#CONFIG += no_svg
# uncomment to enable easy_profiler
#CONFIG *= easy_profiler
isEmpty(BINARY_RESULT_DIR) { isEmpty(BINARY_RESULT_DIR) {
BINARY_RESULT_DIR = $${PWD} BINARY_RESULT_DIR = $${PWD}
} }
!contains(CONFIG, no_build_translations){ !CONFIG(no_build_translations) {
CONFIG += build_translations CONFIG *= build_translations
} }
#CONFIG *= easy_profiler
!contains(CONFIG, no_zint){ !CONFIG(no_zint) {
CONFIG *= zint CONFIG *= zint
} }
!contains(CONGIG, no_svg){ !CONFIG(no_svg) {
QT *= svg QT *= svg
CONFIG *= svg CONFIG *= svg
DEFINES += HAVE_SVG DEFINES *= HAVE_SVG
} }
INCLUDEPATH += $$PWD/3rdparty/easyprofiler/easy_profiler_core/include CONFIG(easy_profiler) {
DEPENDPATH += $$PWD/3rdparty/easyprofiler/easy_profiler_core/include
contains(CONFIG, easy_profiler){
message(EasyProfiler) message(EasyProfiler)
unix|win32: LIBS += -L$$PWD/3rdparty/easyprofiler/build/bin/ -leasy_profiler INCLUDEPATH *= $$PWD/3rdparty/easyprofiler/easy_profiler_core/include
greaterThan(QT_MAJOR_VERSION, 4){ DEPENDPATH *= $$PWD/3rdparty/easyprofiler/easy_profiler_core/include
DEFINES += BUILD_WITH_EASY_PROFILER unix|win32: LIBS *= -L$$PWD/3rdparty/easyprofiler/build/bin/ -leasy_profiler
equals(QT_MAJOR_VERSION, 5) | equals(QT_MAJOR_VERSION, 6) {
DEFINES *= BUILD_WITH_EASY_PROFILER
} }
} }
!contains(CONFIG, qtscriptengine){ !CONFIG(qtscriptengine) {
greaterThan(QT_MAJOR_VERSION, 4){ equals(QT_MAJOR_VERSION, 4) {
greaterThan(QT_MINOR_VERSION, 5){ CONFIG *= qtscriptengine
CONFIG *= qjsengine }
} equals(QT_MAJOR_VERSION, 5) : lessThan(QT_MINOR_VERSION, 6) {
lessThan(QT_MINOR_VERSION, 6){ CONFIG *= qtscriptengine
CONFIG *= qtscriptengine }
} equals(QT_MAJOR_VERSION, 5) : greaterThan(QT_MINOR_VERSION, 5) {
} CONFIG *= qjsengine
lessThan(QT_MAJOR_VERSION, 5){ }
CONFIG *= qtscriptengine equals(QT_MAJOR_VERSION, 6) {
} CONFIG *= qjsengine
}
} }
contains(CONFIG, qtscriptengine){ CONFIG(qtscriptengine) {
CONFIG -= qjsengine CONFIG -= qjsengine
QT *= script QT *= script
DEFINES *= USE_QTSCRIPTENGINE DEFINES *= USE_QTSCRIPTENGINE
message(qtscriptengine) message(qtscriptengine)
} }
!contains(CONFIG, no_formdesigner){ !CONFIG(no_formdesigner) {
CONFIG *= dialogdesigner CONFIG *= dialogdesigner
} }
!contains(CONFIG, no_embedded_designer){ !CONFIG(no_embedded_designer) {
CONFIG *= embedded_designer CONFIG *= embedded_designer
DEFINES += HAVE_REPORT_DESIGNER DEFINES *= HAVE_REPORT_DESIGNER
message(embedded designer) message(embedded designer)
} }
ZINT_PATH = $$PWD/3rdparty/zint-2.6.1 ZINT_PATH = $$PWD/3rdparty/zint-2.6.1
contains(CONFIG,zint){ CONFIG(zint) {
DEFINES *= HAVE_ZINT DEFINES *= HAVE_ZINT
} }
greaterThan(QT_MAJOR_VERSION, 4) { equals(QT_MAJOR_VERSION, 4) {
QT *= uitools
}
lessThan(QT_MAJOR_VERSION, 5){
CONFIG *= uitools CONFIG *= uitools
} }
CONFIG(release, debug|release){ equals(QT_MAJOR_VERSION, 5) | equals(QT_MAJOR_VERSION, 6) {
QT *= uitools
}
CONFIG(release, debug|release) {
message(Release) message(Release)
BUILD_TYPE = release BUILD_TYPE = release
}else{ }else{
@ -83,39 +94,43 @@ CONFIG(release, debug|release){
BUILD_DIR = $${BINARY_RESULT_DIR}/build/$${QT_VERSION} BUILD_DIR = $${BINARY_RESULT_DIR}/build/$${QT_VERSION}
DEST_INCLUDE_DIR = $$PWD/include DEST_INCLUDE_DIR = $$PWD/include
unix{ unix{
ARCH_DIR = $${OUT_PWD}/unix ARCH_DIR = $${OUT_PWD}/unix
ARCH_TYPE = unix ARCH_TYPE = unix
macx{ macx{
ARCH_DIR = $${OUT_PWD}/macx ARCH_DIR = $${OUT_PWD}/macx
ARCH_TYPE = macx ARCH_TYPE = macx
} }
linux{ linux{
!contains(QT_ARCH, x86_64){ !contains(QT_ARCH, x86_64) {
message("Compiling for 32bit system") message("Compiling for 32bit system")
ARCH_DIR = $${OUT_PWD}/linux32 ARCH_DIR = $${OUT_PWD}/linux32
ARCH_TYPE = linux32 ARCH_TYPE = linux32
}else{ }else{
message("Compiling for 64bit system") message("Compiling for 64bit system")
ARCH_DIR = $${OUT_PWD}/linux64 ARCH_DIR = $${OUT_PWD}/linux64
ARCH_TYPE = linux64 ARCH_TYPE = linux64
} }
} }
} }
win32 { win32 {
!contains(QT_ARCH, x86_64) { !contains(QT_ARCH, x86_64) {
message("Compiling for 32bit system") message("Compiling for 32bit system")
ARCH_DIR = $${OUT_PWD}/win32 ARCH_DIR = $${OUT_PWD}/win32
ARCH_TYPE = win32 ARCH_TYPE = win32
} else { } else {
message("Compiling for 64bit system") message("Compiling for 64bit system")
ARCH_DIR = $${OUT_PWD}/win64 ARCH_DIR = $${OUT_PWD}/win64
ARCH_TYPE = win64 ARCH_TYPE = win64
} }
} }
DEST_LIBS = $${BUILD_DIR}/$${ARCH_TYPE}/$${BUILD_TYPE}/lib DEST_LIBS = $${BUILD_DIR}/$${ARCH_TYPE}/$${BUILD_TYPE}/lib
DEST_BINS = $${BUILD_DIR}/$${ARCH_TYPE}/$${BUILD_TYPE}/$${TARGET} DEST_BINS = $${BUILD_DIR}/$${ARCH_TYPE}/$${BUILD_TYPE}/$${TARGET}
MOC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/moc MOC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/moc
UI_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/ui UI_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/ui
@ -126,7 +141,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc
LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MAJOR = 1
LIMEREPORT_VERSION_MINOR = 5 LIMEREPORT_VERSION_MINOR = 5
LIMEREPORT_VERSION_RELEASE = 87 LIMEREPORT_VERSION_RELEASE = 88
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}\\\"
@ -136,24 +151,24 @@ QT *= xml sql
REPORT_PATH = $$PWD/limereport REPORT_PATH = $$PWD/limereport
TRANSLATIONS_PATH = $$PWD/translations TRANSLATIONS_PATH = $$PWD/translations
greaterThan(QT_MAJOR_VERSION, 4) { equals(QT_MAJOR_VERSION, 4) {
DEFINES *= HAVE_QT5 DEFINES *= HAVE_QT4
QT *= printsupport widgets CONFIG(uitools) {
contains(QT,uitools){
message(uitools) message(uitools)
DEFINES *= HAVE_UI_LOADER DEFINES *= HAVE_UI_LOADER
} }
contains(CONFIG, qjsengine){ }
equals(QT_MAJOR_VERSION, 5) | equals(QT_MAJOR_VERSION, 6) {
DEFINES *= HAVE_QT5
QT *= printsupport widgets
contains(QT, uitools) {
message(uitools)
DEFINES *= HAVE_UI_LOADER
}
CONFIG(qjsengine) {
message(qjsengine) message(qjsengine)
DEFINES *= USE_QJSENGINE DEFINES *= USE_QJSENGINE
QT *= qml QT *= qml
} }
} }
lessThan(QT_MAJOR_VERSION, 5){
DEFINES *= HAVE_QT4
CONFIG(uitools){
message(uitools)
DEFINES *= HAVE_UI_LOADER
}
}

7
config.h.in Normal file
View File

@ -0,0 +1,7 @@
#pragma once
#cmakedefine LIMEREPORT_VERSION_MAJOR "@LIMEREPORT_VERSION_MAJOR@"
#cmakedefine LIMEREPORT_VERSION_MINOR "@LIMEREPORT_VERSION_MINOR@"
#cmakedefine LIMEREPORT_VERSION_RELEASE "@LIMEREPORT_VERSION_RELEASE@"
#define LIMEREPORT_VERSION_STR LIMEREPORT_VERSION_MAJOR"." LIMEREPORT_VERSION_MINOR"." LIMEREPORT_VERSION_RELEASE

View File

@ -23,13 +23,12 @@ CONFIG(debug, debug|release) {
} else { } else {
LIBS += -llimereport LIBS += -llimereport
} }
!contains(CONFIG, static_build){
contains(CONFIG,zint){ !CONFIG(static_build) : CONFIG(zint) {
LIBS += -L$${DEST_LIBS} LIBS += -L$${DEST_LIBS}
CONFIG(debug, debug|release) { CONFIG(debug, debug|release) {
LIBS += -lQtZintd LIBS += -lQtZintd
} else { } else {
LIBS += -lQtZint LIBS += -lQtZint
}
} }
} }

View File

@ -21,7 +21,7 @@ int main(int argc, char *argv[])
QApplication::setApplicationVersion(LIMEREPORT_VERSION_STR); QApplication::setApplicationVersion(LIMEREPORT_VERSION_STR);
QStringList vars; QStringList vars;
#if QT_VERSION > QT_VERSION_CHECK(5, 2, 0) #if QT_VERSION > 0x050200
QCommandLineParser parser; QCommandLineParser parser;
parser.addHelpOption(); parser.addHelpOption();
parser.addVersionOption(); parser.addVersionOption();

View File

@ -2,56 +2,56 @@ include(../common.pri)
QT += core gui QT += core gui
CONFIG(release, debug|release) { CONFIG(release, debug|release) {
TARGET = LRDemo_r1 TARGET = LRDemo_r1
} else { } else {
TARGET = LRDemo_r1d TARGET = LRDemo_r1d
} }
TEMPLATE = app TEMPLATE = app
SOURCES += main.cpp\ SOURCES += main.cpp \
mainwindow.cpp mainwindow.cpp
HEADERS += mainwindow.h HEADERS += mainwindow.h
FORMS += mainwindow.ui FORMS += mainwindow.ui
INCLUDEPATH += $$PWD/../include INCLUDEPATH += $$PWD/../include
DEPENDPATH += $$PWD/../include DEPENDPATH += $$PWD/../include
RESOURCES += \ RESOURCES += \
r1.qrc r1.qrc
EXTRA_DIR += $$PWD/demo_reports EXTRA_DIR += $$PWD/demo_reports
DEST_DIR = $${DEST_BINS} DEST_DIR = $${DEST_BINS}
REPORTS_DIR = $${DEST_DIR} REPORTS_DIR = $${DEST_DIR}
macx{ macx{
CONFIG += app_bundle CONFIG += app_bundle
} }
unix:{ unix:{
DESTDIR = $$DEST_DIR DESTDIR = $$DEST_DIR
# QMAKE_POST_LINK += mkdir -p $$quote($$REPORTS_DIR) | # QMAKE_POST_LINK += mkdir -p $$quote($$REPORTS_DIR) |
QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$$EXTRA_DIR\" \"$$REPORTS_DIR\" $$escape_expand(\n\t) QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$$EXTRA_DIR\" \"$$REPORTS_DIR\" $$escape_expand(\n\t)
linux{ linux{
#Link share lib to ../lib rpath #Link share lib to ../lib rpath
QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN
QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN/lib QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN/lib
QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN/../lib QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN/../lib
QMAKE_LFLAGS_RPATH += #. .. ./libs QMAKE_LFLAGS_RPATH += #. .. ./libs
} }
target.path = $${DEST_DIR} target.path = $${DEST_DIR}
INSTALLS = target INSTALLS = target
} }
win32 { win32 {
DESTDIR = $$DEST_DIR DESTDIR = $$DEST_DIR
contains(QMAKE_HOST.os, Linux){ contains(QMAKE_HOST.os, Linux) {
QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$$EXTRA_DIR\" \"$$REPORTS_DIR\" $$escape_expand(\n\t) QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$$EXTRA_DIR\" \"$$REPORTS_DIR\" $$escape_expand(\n\t)
} else { } else {
EXTRA_DIR ~= s,/,\\,g EXTRA_DIR ~= s,/,\\,g
DEST_DIR ~= s,/,\\,g DEST_DIR ~= s,/,\\,g
REPORTS_DIR ~= s,/,\\,g REPORTS_DIR ~= s,/,\\,g
RC_FILE += mainicon.rc RC_FILE += mainicon.rc
@ -67,13 +67,11 @@ CONFIG(debug, debug|release) {
} }
message($$LIBS) message($$LIBS)
!contains(CONFIG, static_build){ !CONFIG(static_build) : CONFIG(zint) {
contains(CONFIG,zint){ LIBS += -L$${DEST_LIBS}
LIBS += -L$${DEST_LIBS} CONFIG(debug, debug|release) {
CONFIG(debug, debug|release) { LIBS += -lQtZintd
LIBS += -lQtZintd } else {
} else { LIBS += -lQtZint
LIBS += -lQtZint }
}
}
} }

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,16 +1,16 @@
include(../common.pri) include(../common.pri)
QT += core gui QT += core gui
CONFIG(release, debug|release){ CONFIG(release, debug|release) {
TARGET = LRDemo_r2 TARGET = LRDemo_r2
} else { } else {
TARGET = LRDemo_r2d TARGET = LRDemo_r2d
} }
TEMPLATE = app TEMPLATE = app
SOURCES += main.cpp\ SOURCES += main.cpp \
mainwindow.cpp mainwindow.cpp
HEADERS += mainwindow.h HEADERS += mainwindow.h
@ -20,7 +20,7 @@ INCLUDEPATH += $$PWD/../include
DEPENDPATH += $$PWD/../include DEPENDPATH += $$PWD/../include
RESOURCES += \ RESOURCES += \
demo_r2.qrc demo_r2.qrc
EXTRA_DIR += $$PWD/demo_reports EXTRA_DIR += $$PWD/demo_reports
@ -34,26 +34,26 @@ macx{
unix:{ unix:{
DESTDIR = $$DEST_DIR DESTDIR = $$DEST_DIR
QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$$EXTRA_DIR\" \"$$REPORTS_DIR\" $$escape_expand(\n\t) QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$$EXTRA_DIR\" \"$$REPORTS_DIR\" $$escape_expand(\n\t)
linux{ linux{
#Link share lib to ../lib rpath #Link share lib to ../lib rpath
QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN
QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN/lib QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN/lib
QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN/../lib QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN/../lib
QMAKE_LFLAGS_RPATH += #. .. ./libs QMAKE_LFLAGS_RPATH += #. .. ./libs
} }
target.path = $${DEST_DIR} target.path = $${DEST_DIR}
INSTALLS = target INSTALLS = target
} }
win32 { win32 {
DESTDIR = $$DEST_DIR DESTDIR = $$DEST_DIR
contains(QMAKE_HOST.os, Linux){ contains(QMAKE_HOST.os, Linux) {
QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$$EXTRA_DIR\" \"$$REPORTS_DIR\" $$escape_expand(\n\t) QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$$EXTRA_DIR\" \"$$REPORTS_DIR\" $$escape_expand(\n\t)
} else { } else {
EXTRA_DIR ~= s,/,\\,g EXTRA_DIR ~= s,/,\\,g
DEST_DIR ~= s,/,\\,g DEST_DIR ~= s,/,\\,g
REPORTS_DIR ~= s,/,\\,g REPORTS_DIR ~= s,/,\\,g
RC_FILE += mainicon.rc RC_FILE += mainicon.rc
QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$$EXTRA_DIR\" \"$$REPORTS_DIR\\demo_reports\" $$escape_expand(\\n\\t) QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$$EXTRA_DIR\" \"$$REPORTS_DIR\\demo_reports\" $$escape_expand(\\n\\t)
} }
} }
@ -65,13 +65,11 @@ CONFIG(debug, debug|release) {
LIBS += -llimereport LIBS += -llimereport
} }
!contains(CONFIG, static_build){ !CONFIG(static_build) : CONFIG(zint) {
contains(CONFIG,zint){ LIBS += -L$${DEST_LIBS}
LIBS += -L$${DEST_LIBS} CONFIG(debug, debug|release) {
CONFIG(debug, debug|release) { LIBS += -lQtZintd
LIBS += -lQtZintd } else {
} else { LIBS += -lQtZint
LIBS += -lQtZint }
}
}
} }

View File

@ -3,7 +3,11 @@
#include <QSqlDatabase> #include <QSqlDatabase>
#include <QDir> #include <QDir>
#include <QDebug> #include <QDebug>
#if QT_VERSION < 0x060000
#include <QDesktopWidget> #include <QDesktopWidget>
#else
#include <QScreen>
#endif
MainWindow::MainWindow(QWidget *parent) : MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent), QMainWindow(parent),
@ -40,10 +44,17 @@ MainWindow::MainWindow(QWidget *parent) :
connect(ui->actionOne_to_One, SIGNAL(triggered()), this, SLOT(slotOneToOne())); connect(ui->actionOne_to_One, SIGNAL(triggered()), this, SLOT(slotOneToOne()));
initPercentCombobox(); initPercentCombobox();
enableUI(false); enableUI(false);
#if QT_VERSION < 0x060000
QDesktopWidget *desktop = QApplication::desktop(); QDesktopWidget *desktop = QApplication::desktop();
int screenWidth = desktop->screenGeometry().width(); int screenWidth = desktop->screenGeometry().width();
int screenHeight = desktop->screenGeometry().height(); int screenHeight = desktop->screenGeometry().height();
#else
QScreen *screen = QGuiApplication::primaryScreen();
int screenWidth = screen->geometry().width();
int screenHeight = screen->geometry().height();
#endif
int x = screenWidth*0.1; int x = screenWidth*0.1;
int y = screenHeight*0.1; int y = screenHeight*0.1;

View File

@ -1,18 +1,19 @@
include(../common.pri) include(../common.pri)
QT += core gui QT += core gui
contains(CONFIG,release) { CONFIG(release) {
TARGET = LRDesigner TARGET = LRDesigner
} else { } else {
TARGET = LRDesignerd TARGET = LRDesignerd
} }
TEMPLATE = app TEMPLATE = app
HEADERS += \ HEADERS += \
designersettingmanager.h designersettingmanager.h
SOURCES += main.cpp \ SOURCES += main.cpp \
designersettingmanager.cpp designersettingmanager.cpp
INCLUDEPATH += $$PWD/../include INCLUDEPATH += $$PWD/../include
DEPENDPATH += $$PWD/../include DEPENDPATH += $$PWD/../include
@ -51,17 +52,15 @@ win32 {
LIBS += -L$${DEST_LIBS} LIBS += -L$${DEST_LIBS}
CONFIG(debug, debug|release) { CONFIG(debug, debug|release) {
LIBS += -llimereportd LIBS += -llimereportd
} else { } else {
LIBS += -llimereport LIBS += -llimereport
} }
!contains(CONFIG, static_build){ !CONFIG(static_build) : CONFIG(zint) {
contains(CONFIG,zint){ CONFIG(debug, debug|release) {
CONFIG(debug, debug|release) { LIBS += -L$${DEST_LIBS} -lQtZintd
LIBS += -L$${DEST_LIBS} -lQtZintd } else {
} else { LIBS += -L$${DEST_LIBS} -lQtZint
LIBS += -L$${DEST_LIBS} -lQtZint
}
} }
} }

View File

@ -4,43 +4,43 @@ include(../common.pri)
include(../limereport/limereport.pri) include(../limereport/limereport.pri)
include(../limereport/designer.pri) include(../limereport/designer.pri)
contains(CONFIG,release) { CONFIG(release) {
TARGET = designer_plugin TARGET = designer_plugin
} else { } else {
TARGET = designer_plugind TARGET = designer_plugind
} }
TEMPLATE = lib TEMPLATE = lib
CONFIG += plugin CONFIG += plugin
HEADERS += \ HEADERS += \
lrdesignerplugin.h lrdesignerplugin.h
SOURCES += \ SOURCES += \
lrdesignerplugin.cpp lrdesignerplugin.cpp
INCLUDEPATH += $$PWD/../include INCLUDEPATH += $$PWD/../include
DEPENDPATH += $$PWD/../include DEPENDPATH += $$PWD/../include
macx{ macx{
CONFIG += lib_bundle CONFIG += lib_bundle
CONFIG += -dll CONFIG += -dll
} }
DESTDIR = $${DEST_LIBS} DESTDIR = $${DEST_LIBS}
unix { unix {
target.path = $${DESTDIR} target.path = $${DESTDIR}
INSTALLS = target INSTALLS = target
} }
contains(CONFIG,zint){ CONFIG(zint) {
message(zint) message(zint)
INCLUDEPATH += $$ZINT_PATH/backend $$ZINT_PATH/backend_qt INCLUDEPATH += $$ZINT_PATH/backend $$ZINT_PATH/backend_qt
DEPENDPATH += $$ZINT_PATH/backend $$ZINT_PATH/backend_qt DEPENDPATH += $$ZINT_PATH/backend $$ZINT_PATH/backend_qt
LIBS += -L$${DEST_LIBS} LIBS += -L$${DEST_LIBS}
CONFIG(debug, debug|release){ CONFIG(debug, debug|release) {
LIBS += -lQtZintd LIBS += -lQtZintd
} else { } else {
LIBS += -lQtZint LIBS += -lQtZint
} }
} }

View File

@ -1 +1 @@
#include "lrcallbackdatasourceintf.h" #include "lrcallbackdatasourceintf.h"

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **
@ -67,7 +67,11 @@ QString replaceHTMLSymbols(const QString &value)
return result; return result;
} }
#if QT_VERSION < 0x060000
QVector<QString> normalizeCaptures(const QRegExp& reg){ QVector<QString> normalizeCaptures(const QRegExp& reg){
#else
QVector<QString> normalizeCaptures(const QRegularExpressionMatch &reg){
#endif
QVector<QString> result; QVector<QString> result;
foreach (QString cap, reg.capturedTexts()) { foreach (QString cap, reg.capturedTexts()) {
if (!cap.isEmpty()) if (!cap.isEmpty())

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **
@ -51,7 +51,7 @@ namespace LimeReport {
#define VARIABLE_IS_NOT_USED #define VARIABLE_IS_NOT_USED
#endif #endif
#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) #if QT_VERSION >= 0x050800
Q_NAMESPACE Q_NAMESPACE
#endif #endif
@ -104,7 +104,11 @@ namespace Const{
QString extractClassName(QString className); QString extractClassName(QString className);
QString escapeSimbols(const QString& value); QString escapeSimbols(const QString& value);
QString replaceHTMLSymbols(const QString &value); QString replaceHTMLSymbols(const QString &value);
#if QT_VERSION < 0x060000
QVector<QString> normalizeCaptures(const QRegExp &reg); QVector<QString> normalizeCaptures(const QRegExp &reg);
#else
QVector<QString> normalizeCaptures(const QRegularExpressionMatch &reg);
#endif
bool isColorDark(QColor color); bool isColorDark(QColor color);
enum ExpandType {EscapeSymbols, NoEscapeSymbols, ReplaceHTMLSymbols}; enum ExpandType {EscapeSymbols, NoEscapeSymbols, ReplaceHTMLSymbols};
@ -148,7 +152,7 @@ namespace Const{
virtual ~IPainterProxy(); virtual ~IPainterProxy();
}; };
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) #if QT_VERSION < 0x050000
typedef QStyleOptionViewItemV4 StyleOptionViewItem; typedef QStyleOptionViewItemV4 StyleOptionViewItem;
#else #else
typedef QStyleOptionViewItem StyleOptionViewItem; typedef QStyleOptionViewItem StyleOptionViewItem;
@ -158,7 +162,7 @@ namespace Const{
{ {
public: public:
enum VariableDataType {Undefined, String, Bool, Int, Real, Date, Time, DateTime}; enum VariableDataType {Undefined, String, Bool, Int, Real, Date, Time, DateTime};
#if (QT_VERSION >= QT_VERSION_CHECK(5,5, 0)) #if QT_VERSION >= 0x050500
Q_ENUM(VariableDataType) Q_ENUM(VariableDataType)
#else #else
Q_ENUMS(VariableDataType) Q_ENUMS(VariableDataType)

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **
@ -31,7 +31,7 @@
#define LRSCRIPTENGINEMANAGERINTF_H #define LRSCRIPTENGINEMANAGERINTF_H
#include "qglobal.h" #include "qglobal.h"
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) #if QT_VERSION >= 0x050600
#ifndef USE_QTSCRIPTENGINE #ifndef USE_QTSCRIPTENGINE
#ifndef USE_QJSENGINE #ifndef USE_QJSENGINE
#define USE_QJSENGINE #define USE_QJSENGINE

View File

@ -1,31 +1,24 @@
TEMPLATE = subdirs TEMPLATE = subdirs
!contains(CONFIG, no_zint){
CONFIG += zint
}
include(common.pri) include(common.pri)
contains(CONFIG, zint){
CONFIG += ordered
CONFIG(zint) {
SUBDIRS += 3rdparty SUBDIRS += 3rdparty
} }
export($$CONFIG)
CONFIG += ordered
SUBDIRS += \ SUBDIRS += \
limereport \ limereport \
demo_r1 \ demo_r1 \
demo_r2 \ demo_r2 \
lrdview \
designer designer
greaterThan(QT_MAJOR_VERSION, 4){ if(equals(QT_MAJOR_VERSION, 5) : greaterThan(QT_MINOR_VERSION, 1)) | equals(QT_MAJOR_VERSION, 6) {
greaterThan(QT_MINOR_VERSION, 1){ SUBDIRS += console
SUBDIRS += console
}
} }
!contains(CONFIG, embedded_designer){ !CONFIG(embedded_designer) : !CONFIG(static_build) {
!contains(CONFIG, static_build){ SUBDIRS += designer_plugin
SUBDIRS += designer_plugin
}
} }

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **
@ -40,11 +40,11 @@ class DataBand : public DataBandDesignIntf
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(bool keepSubdetailTogether READ tryToKeepTogether WRITE setTryToKeepTogether) Q_PROPERTY(bool keepSubdetailTogether READ tryToKeepTogether WRITE setTryToKeepTogether)
Q_PROPERTY(bool splittable READ isSplittable WRITE setSplittable ) Q_PROPERTY(bool splittable READ isSplittable WRITE setSplittable)
Q_PROPERTY(bool keepFooterTogether READ keepFooterTogether WRITE setKeepFooterTogether) Q_PROPERTY(bool keepFooterTogether READ keepFooterTogether WRITE setKeepFooterTogether)
Q_PROPERTY(bool sliceLastRow READ sliceLastRow WRITE setSliceLastRow) Q_PROPERTY(bool sliceLastRow READ sliceLastRow WRITE setSliceLastRow)
Q_PROPERTY(int columnsCount READ columnsCount WRITE setColumnsCount) Q_PROPERTY(int columnsCount READ columnsCount WRITE setColumnsCount)
Q_PROPERTY(BandColumnsLayoutType columnsFillDirection READ columnsFillDirection WRITE setColumnsFillDirection) Q_PROPERTY(BandColumnsLayoutType columnsFillDirection READ columnsFillDirection WRITE setColumnsFillDirection)
Q_PROPERTY(bool startNewPage READ startNewPage WRITE setStartNewPage) Q_PROPERTY(bool startNewPage READ startNewPage WRITE setStartNewPage)
Q_PROPERTY(bool startFromNewPage READ startFromNewPage WRITE setStartFromNewPage) Q_PROPERTY(bool startFromNewPage READ startFromNewPage WRITE setStartFromNewPage)
Q_PROPERTY(QColor alternateBackgroundColor READ alternateBackgroundColor WRITE setAlternateBackgroundColor) Q_PROPERTY(QColor alternateBackgroundColor READ alternateBackgroundColor WRITE setAlternateBackgroundColor)
@ -66,8 +66,8 @@ class DataHeaderBand : public BandDesignIntf
Q_OBJECT Q_OBJECT
Q_PROPERTY(bool reprintOnEachPage READ reprintOnEachPage WRITE setReprintOnEachPage) Q_PROPERTY(bool reprintOnEachPage READ reprintOnEachPage WRITE setReprintOnEachPage)
Q_PROPERTY(int columnsCount READ columnsCount WRITE setColumnsCount) Q_PROPERTY(int columnsCount READ columnsCount WRITE setColumnsCount)
Q_PROPERTY(BandColumnsLayoutType columnsFillDirection READ columnsFillDirection WRITE setColumnsFillDirection) 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) Q_PROPERTY(bool repeatOnEachRow READ repeatOnEachRow WRITE setRepeatOnEachRow)
public: public:
DataHeaderBand(QObject* owner=0, QGraphicsItem* parent=0); DataHeaderBand(QObject* owner=0, QGraphicsItem* parent=0);
@ -88,7 +88,7 @@ class DataFooterBand : public BandDesignIntf
Q_OBJECT Q_OBJECT
Q_PROPERTY(int columnsCount READ columnsCount WRITE setColumnsCount) Q_PROPERTY(int columnsCount READ columnsCount WRITE setColumnsCount)
Q_PROPERTY(bool splittable READ isSplittable WRITE setSplittable) Q_PROPERTY(bool splittable READ isSplittable WRITE setSplittable)
Q_PROPERTY(BandColumnsLayoutType columnsFillDirection READ columnsFillDirection WRITE setColumnsFillDirection) 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: public:
DataFooterBand(QObject* owner=0, QGraphicsItem* parent=0); DataFooterBand(QObject* owner=0, QGraphicsItem* parent=0);

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **
@ -38,7 +38,7 @@ namespace LimeReport{
class ReportHeader : public LimeReport::BandDesignIntf class ReportHeader : public LimeReport::BandDesignIntf
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(bool splittable READ isSplittable WRITE setSplittable ) Q_PROPERTY(bool splittable READ isSplittable WRITE setSplittable)
Q_PROPERTY(bool printBeforePageHeader READ printBeforePageHeader WRITE setPrintBeforePageHeader) Q_PROPERTY(bool printBeforePageHeader READ printBeforePageHeader WRITE setPrintBeforePageHeader)
public: public:
ReportHeader(QObject* owner = 0, QGraphicsItem *parent=0); ReportHeader(QObject* owner = 0, QGraphicsItem *parent=0);

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **
@ -40,7 +40,7 @@ class SubDetailBand : public DataBandDesignIntf
Q_OBJECT Q_OBJECT
Q_PROPERTY(bool splittable READ isSplittable WRITE setSplittable) Q_PROPERTY(bool splittable READ isSplittable WRITE setSplittable)
Q_PROPERTY(int columnsCount READ columnsCount WRITE setColumnsCount) Q_PROPERTY(int columnsCount READ columnsCount WRITE setColumnsCount)
Q_PROPERTY(BandColumnsLayoutType columnsFillDirection READ columnsFillDirection WRITE setColumnsFillDirection) Q_PROPERTY(BandColumnsLayoutType columnsFillDirection READ columnsFillDirection WRITE setColumnsFillDirection)
Q_PROPERTY(bool keepFooterTogether READ keepFooterTogether WRITE setKeepFooterTogether) Q_PROPERTY(bool keepFooterTogether READ keepFooterTogether WRITE setKeepFooterTogether)
Q_PROPERTY(QColor alternateBackgroundColor READ alternateBackgroundColor WRITE setAlternateBackgroundColor) Q_PROPERTY(QColor alternateBackgroundColor READ alternateBackgroundColor WRITE setAlternateBackgroundColor)
Q_PROPERTY(bool useAlternateBackgroundColor READ useAlternateBackgroundColor WRITE setUseAlternateBackgroundColor) Q_PROPERTY(bool useAlternateBackgroundColor READ useAlternateBackgroundColor WRITE setUseAlternateBackgroundColor)
@ -60,7 +60,7 @@ class SubDetailHeaderBand : public BandDesignIntf
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(int columnsCount READ columnsCount WRITE setColumnsCount) Q_PROPERTY(int columnsCount READ columnsCount WRITE setColumnsCount)
Q_PROPERTY(BandColumnsLayoutType columnsFillDirection READ columnsFillDirection WRITE setColumnsFillDirection) 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: public:
SubDetailHeaderBand(QObject* owner = 0, QGraphicsItem* parent=0); SubDetailHeaderBand(QObject* owner = 0, QGraphicsItem* parent=0);
@ -78,8 +78,8 @@ class SubDetailFooterBand : public BandDesignIntf
Q_OBJECT Q_OBJECT
Q_PROPERTY(int columnsCount READ columnsCount WRITE setColumnsCount) Q_PROPERTY(int columnsCount READ columnsCount WRITE setColumnsCount)
Q_PROPERTY(bool splittable READ isSplittable WRITE setSplittable) Q_PROPERTY(bool splittable READ isSplittable WRITE setSplittable)
Q_PROPERTY(BandColumnsLayoutType columnsFillDirection READ columnsFillDirection WRITE setColumnsFillDirection) 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: public:
SubDetailFooterBand(QObject* owner = 0, QGraphicsItem* parent=0); SubDetailFooterBand(QObject* owner = 0, QGraphicsItem* parent=0);
virtual bool isUnique() const; virtual bool isUnique() const;

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **
@ -63,7 +63,8 @@ DataBrowser::DataBrowser(QWidget *parent) :
connect(ui->changeConnection,SIGNAL(clicked()),this,SLOT(slotChangeConnection())); connect(ui->changeConnection,SIGNAL(clicked()),this,SLOT(slotChangeConnection()));
connect(ui->pbConnect,SIGNAL(clicked()),this,SLOT(slotChangeConnectionState())); connect(ui->pbConnect,SIGNAL(clicked()),this,SLOT(slotChangeConnectionState()));
ui->verticalLayout_2->setMargin(Const::DOCKWIDGET_MARGINS); int margin = Const::DOCKWIDGET_MARGINS;
ui->verticalLayout_2->setContentsMargins(margin, margin, margin, margin);
ui->dataTree->setHeaderLabel(tr("Datasources")); ui->dataTree->setHeaderLabel(tr("Datasources"));
ui->pbConnect->setEnabled(false); ui->pbConnect->setEnabled(false);
@ -413,7 +414,7 @@ void DataBrowser::initConnections()
connections.append(connectionName); connections.append(connectionName);
} }
} }
qSort(connections); std::sort(connections.begin(), connections.end());
foreach (QString connectionName, connections) { foreach (QString connectionName, connections) {
QTreeWidgetItem *item=new QTreeWidgetItem( QTreeWidgetItem *item=new QTreeWidgetItem(
ui->dataTree, ui->dataTree,
@ -443,7 +444,7 @@ void DataBrowser::initConnections()
// } // }
// connections = m_report->dataManager()->connectionNames(); // connections = m_report->dataManager()->connectionNames();
// qSort(connections); // std::sort(connections);
// foreach(QString connectionName,connectionName){ // foreach(QString connectionName,connectionName){
// if (!QSqlDatabase::contains(connectionName)){ // if (!QSqlDatabase::contains(connectionName)){
// QTreeWidgetItem *item=new QTreeWidgetItem( // QTreeWidgetItem *item=new QTreeWidgetItem(

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **
@ -78,11 +78,10 @@ void LRVariableDialog::showEvent(QShowEvent *)
QMetaEnum enumerator = LimeReport::Enums::staticMetaObject.enumerator(enumIndex); QMetaEnum enumerator = LimeReport::Enums::staticMetaObject.enumerator(enumIndex);
if (!m_variableName.isEmpty()&&m_variablesContainer&&m_variablesContainer->containsVariable(m_variableName)){ if (!m_variableName.isEmpty()&&m_variablesContainer&&m_variablesContainer->containsVariable(m_variableName)){
ui->leValue->setPlainText(m_variablesContainer->variable(m_variableName).toString()); ui->leValue->setPlainText(m_variablesContainer->variable(m_variableName).toString());
#ifdef HAVE_QT5 #if QT_VERSION < 0x050000
ui->cbbType->setCurrentText(enumerator.valueToKey(m_variablesContainer->variableDataType(m_variableName)));
#endif
#ifdef HAVE_QT4
ui->cbbType->setCurrentIndex(ui->cbbType->findText(enumerator.valueToKey(m_variablesContainer->variableDataType(m_variableName)))); ui->cbbType->setCurrentIndex(ui->cbbType->findText(enumerator.valueToKey(m_variablesContainer->variableDataType(m_variableName))));
#else
ui->cbbType->setCurrentText(enumerator.valueToKey(m_variablesContainer->variableDataType(m_variableName)));
#endif #endif
ui->cbbMandatory->setChecked(m_variablesContainer->variableIsMandatory(m_variableName)); ui->cbbMandatory->setChecked(m_variablesContainer->variableIsMandatory(m_variableName));
} }

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,8 +1,9 @@
include(../common.pri) include(../common.pri)
DEFINES+=HAVE_REPORT_DESIGNER
contains(CONFIG,dialogdesigner){ DEFINES += HAVE_REPORT_DESIGNER
include($$REPORT_PATH/dialogdesigner/dialogdesigner.pri)
CONFIG(dialogdesigner) {
include($$REPORT_PATH/dialogdesigner/dialogdesigner.pri)
} }
INCLUDEPATH += $$REPORT_PATH/objectinspector \ INCLUDEPATH += $$REPORT_PATH/objectinspector \
@ -51,7 +52,7 @@ SOURCES += \
$$REPORT_PATH/lrreportdesignwidget.cpp \ $$REPORT_PATH/lrreportdesignwidget.cpp \
$$REPORT_PATH/lrreportdesignwindow.cpp $$REPORT_PATH/lrreportdesignwindow.cpp
contains(CONFIG, svg){ CONFIG(svg) {
SOURCES += \ SOURCES += \
$$REPORT_PATH/objectinspector/editors/lrsvgeditor.cpp \ $$REPORT_PATH/objectinspector/editors/lrsvgeditor.cpp \
$$REPORT_PATH/objectinspector/propertyItems/lrsvgpropitem.cpp $$REPORT_PATH/objectinspector/propertyItems/lrsvgpropitem.cpp
@ -100,7 +101,7 @@ HEADERS += \
$$REPORT_PATH/lrreportdesignwidget.h \ $$REPORT_PATH/lrreportdesignwidget.h \
$$REPORT_PATH/lrreportdesignwindow.h $$REPORT_PATH/lrreportdesignwindow.h
contains(CONFIG, svg){ contains(CONFIG, svg) {
HEADERS += \ HEADERS += \
$$REPORT_PATH/objectinspector/editors/lrsvgeditor.h \ $$REPORT_PATH/objectinspector/editors/lrsvgeditor.h \
$$REPORT_PATH/objectinspector/propertyItems/lrsvgpropitem.h $$REPORT_PATH/objectinspector/propertyItems/lrsvgpropitem.h

View File

@ -1,11 +1,11 @@
INCLUDEPATH *= $$PWD $$PWD/.. INCLUDEPATH *= $$PWD $$PWD/..
SOURCES += $$PWD/widgethost.cpp \ SOURCES += $$PWD/widgethost.cpp \
$$PWD/sizehandlerect.cpp \ $$PWD/sizehandlerect.cpp \
$$PWD/formresizer.cpp $$PWD/formresizer.cpp
HEADERS += $$PWD/widgethost.h \ HEADERS += $$PWD/widgethost.h \
$$PWD/sizehandlerect.h \ $$PWD/sizehandlerect.h \
$$PWD/formresizer.h \ $$PWD/formresizer.h \
$$PWD/widgethostconstants.h \ $$PWD/widgethostconstants.h \
$$PWD/../namespace_global.h $$PWD/../namespace_global.h

View File

@ -55,12 +55,13 @@ FormResizer::FormResizer(QWidget *parent) :
setBackgroundRole(QPalette::Base); setBackgroundRole(QPalette::Base);
QVBoxLayout *handleLayout = new QVBoxLayout(this); QVBoxLayout *handleLayout = new QVBoxLayout(this);
handleLayout->setMargin(SELECTION_MARGIN); int margin = SELECTION_MARGIN;
handleLayout->setContentsMargins(margin, margin, margin, margin);
handleLayout->addWidget(m_frame); handleLayout->addWidget(m_frame);
m_frame->setFrameStyle(QFrame::Panel | QFrame::Raised); m_frame->setFrameStyle(QFrame::Panel | QFrame::Raised);
QVBoxLayout *layout = new QVBoxLayout(m_frame); QVBoxLayout *layout = new QVBoxLayout(m_frame);
layout->setMargin(0); layout->setContentsMargins(0, 0, 0, 0);
// handles // handles
m_handles.reserve(SizeHandleRect::Left); m_handles.reserve(SizeHandleRect::Left);
for (int i = SizeHandleRect::LeftTop; i <= SizeHandleRect::Left; ++i) { for (int i = SizeHandleRect::LeftTop; i <= SizeHandleRect::Left; ++i) {

View File

@ -70,7 +70,7 @@ void WidgetHost::setFormWindow(QDesignerFormWindowInterface *fw)
setBackgroundRole(QPalette::Base); setBackgroundRole(QPalette::Base);
m_formWindow->setAutoFillBackground(true); m_formWindow->setAutoFillBackground(true);
m_formWindow->setBackgroundRole(QPalette::Background); m_formWindow->setBackgroundRole(QPalette::Window);
connect(m_formResizer, SIGNAL(formWindowSizeChanged(QRect, QRect)), connect(m_formResizer, SIGNAL(formWindowSizeChanged(QRect, QRect)),
this, SLOT(fwSizeWasChanged(QRect, QRect))); this, SLOT(fwSizeWasChanged(QRect, QRect)));

View File

@ -1,27 +1,27 @@
include(../../common.pri) include(../../common.pri)
include($$PWD/3rdparty/qtcreator/designerintegrationv2/designerintegration.pri) include($$PWD/3rdparty/qtcreator/designerintegrationv2/designerintegration.pri)
INCLUDEPATH *= $$PWD/3rdparty/designer INCLUDEPATH *= $$PWD/3rdparty/designer
greaterThan(QT_MAJOR_VERSION, 4) {
contains(QT,uitools){ equals(QT_MAJOR_VERSION, 4) : CONFIG(uitools) {
DEFINES += HAVE_QTDESIGNER_INTEGRATION DEFINES += HAVE_QTDESIGNER_INTEGRATION
}
}
lessThan(QT_MAJOR_VERSION, 5){
contains(CONFIG,uitools){
DEFINES += HAVE_QTDESIGNER_INTEGRATION
}
} }
greaterThan(QT_MAJOR_VERSION, 4) { if(equals(QT_MAJOR_VERSION, 5) | equals(QT_MAJOR_VERSION, 6)) : contains(QT, uitools) {
DEFINES += HAVE_QTDESIGNER_INTEGRATION
}
equals(QT_MAJOR_VERSION, 4) {
CONFIG *= designer
qtAddLibrary(QtDesignerComponents)
}
equals(QT_MAJOR_VERSION, 5) | equals(QT_MAJOR_VERSION, 6) {
QT *= designer designercomponents-private QT *= designer designercomponents-private
} else {
CONFIG *= designer
qtAddLibrary( QtDesignerComponents )
} }
SOURCES += $$PWD/lrdialogdesigner.cpp SOURCES += $$PWD/lrdialogdesigner.cpp
HEADERS += $$PWD/lrdialogdesigner.h HEADERS += $$PWD/lrdialogdesigner.h
RESOURCES += \ RESOURCES += \
$$PWD/dialogdesigner.qrc $$PWD/dialogdesigner.qrc

View File

@ -104,10 +104,9 @@ DialogDesignerManager::DialogDesignerManager(QObject *parent) : QObject(parent)
m_designerToolWindows.append(m_actionEditor); m_designerToolWindows.append(m_actionEditor);
connect(m_actionEditor, SIGNAL(destroyed(QObject*)), this, SLOT(slotObjectDestroyed(QObject*)) ); connect(m_actionEditor, SIGNAL(destroyed(QObject*)), this, SLOT(slotObjectDestroyed(QObject*)) );
#ifdef HAVE_QT4 #if QT_VERSION < 0x050000
m_designerIntegration = new qdesigner_internal::QDesignerIntegration(m_formEditor,this); m_designerIntegration = new qdesigner_internal::QDesignerIntegration(m_formEditor,this);
#endif #else
#ifdef HAVE_QT5
m_designerIntegration = new QDesignerIntegration(m_formEditor,this); m_designerIntegration = new QDesignerIntegration(m_formEditor,this);
#endif #endif
m_formEditor->setIntegration(m_designerIntegration); m_formEditor->setIntegration(m_designerIntegration);

View File

@ -36,7 +36,7 @@ void HorizontalBarChart::paintHorizontalBars(QPainter *painter, QRectF barsRect)
delta = genNextValue(delta); delta = genNextValue(delta);
qreal vStep = (barsRect.height()-painter->fontMetrics().height()) / valuesCount() / seriesCount(); qreal vStep = (barsRect.height()-painter->fontMetrics().height()) / valuesCount() / seriesCount();
qreal hStep = (barsRect.width()-painter->fontMetrics().width(QString::number(maxValue()))) / delta; qreal hStep = (barsRect.width()-painter->fontMetrics().boundingRect(QString::number(maxValue())).width()) / delta;
if (!m_chartItem->series().isEmpty() && (m_chartItem->itemMode() != DesignMode)){ if (!m_chartItem->series().isEmpty() && (m_chartItem->itemMode() != DesignMode)){
int curSeries = 0; int curSeries = 0;

View File

@ -8,13 +8,12 @@ void PieChart::drawPercent(QPainter *painter, QRectF chartRect, qreal startAngle
QPointF center(chartRect.left()+chartRect.width()/2,chartRect.top()+chartRect.height()/2); QPointF center(chartRect.left()+chartRect.width()/2,chartRect.top()+chartRect.height()/2);
qreal percent = angle/3.6; qreal percent = angle/3.6;
#ifdef HAVE_QT4 #if QT_VERSION < 0x050000
qreal radAngle = (angle/2+startAngle)*(M_PI/180); qreal radAngle = (angle/2+startAngle)*(M_PI/180);
#endif #else
#ifdef HAVE_QT5
qreal radAngle = qDegreesToRadians(angle/2+startAngle); qreal radAngle = qDegreesToRadians(angle/2+startAngle);
#endif #endif
qreal radius = painter->fontMetrics().width("99,9%"); qreal radius = painter->fontMetrics().boundingRect("99,9%").width();
qreal border = chartRect.height()*0.02; qreal border = chartRect.height()*0.02;
qreal length = (chartRect.height())/2-(radius/2+border); qreal length = (chartRect.height())/2-(radius/2+border);
qreal x,y; qreal x,y;
@ -155,14 +154,14 @@ QSizeF PieChart::calcChartLegendSize(const QFont &font)
SeriesItem* si = m_chartItem->series().at(0); SeriesItem* si = m_chartItem->series().at(0);
foreach(QString label, si->data()->labels()){ foreach(QString label, si->data()->labels()){
cw += fm.height(); cw += fm.height();
if (maxWidth<fm.width(label)) if (maxWidth<fm.boundingRect(label).width())
maxWidth = fm.width(label)+10; maxWidth = fm.boundingRect(label).width()+10;
} }
} else { } else {
foreach(QString label, m_designLabels){ foreach(QString label, m_designLabels){
cw += fm.height(); cw += fm.height();
if (maxWidth<fm.width(label)) if (maxWidth<fm.boundingRect(label).width())
maxWidth = fm.width(label)+10; maxWidth = fm.boundingRect(label).width()+10;
} }
} }
cw += fm.height(); cw += fm.height();

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **
@ -53,7 +53,7 @@ void ItemsBordersEditorWidget::properyChangedEvent(const QString& property, cons
void ItemsBordersEditorWidget::noBordesClicked() void ItemsBordersEditorWidget::noBordesClicked()
{ {
updateValues(0); updateValues({});
} }
void ItemsBordersEditorWidget::allBordesClicked() void ItemsBordersEditorWidget::allBordesClicked()
@ -148,7 +148,7 @@ void ItemsBordersEditorWidgetForDesigner::buttonClicked(bool)
void ItemsBordersEditorWidgetForDesigner::noBordesClicked() void ItemsBordersEditorWidgetForDesigner::noBordesClicked()
{ {
m_reportEditor->setBorders(0); m_reportEditor->setBorders({});
ItemsBordersEditorWidget::noBordesClicked(); ItemsBordersEditorWidget::noBordesClicked();
} }

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **
@ -108,7 +108,7 @@ void TextAlignmentEditorWidget::updateValues(const Qt::Alignment &align)
Qt::Alignment TextAlignmentEditorWidget::createAlignment() Qt::Alignment TextAlignmentEditorWidget::createAlignment()
{ {
Qt::Alignment align = 0 ; Qt::Alignment align = Qt::Alignment();
if (m_textAliginLeft->isChecked()) align |= Qt::AlignLeft; if (m_textAliginLeft->isChecked()) align |= Qt::AlignLeft;
if (m_textAliginHCenter->isChecked()) align |= Qt::AlignHCenter; if (m_textAliginHCenter->isChecked()) align |= Qt::AlignHCenter;
if (m_textAliginRight->isChecked()) align |= Qt::AlignRight; if (m_textAliginRight->isChecked()) align |= Qt::AlignRight;

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -13,7 +13,7 @@ class AbstractLayout: public LayoutDesignIntf
Q_PROPERTY(int layoutSpacing READ layoutSpacing WRITE setLayoutSpacing) Q_PROPERTY(int layoutSpacing READ layoutSpacing WRITE setLayoutSpacing)
public: public:
enum LayoutType{Layout,Table}; enum LayoutType{Layout,Table};
#if (QT_VERSION >= QT_VERSION_CHECK(5,5, 0)) #if QT_VERSION >= 0x050500
Q_ENUM(LayoutType) Q_ENUM(LayoutType)
#else #else
Q_ENUMS(LayoutType) Q_ENUMS(LayoutType)

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **
@ -37,7 +37,7 @@ namespace LimeReport{
class BarcodeItem : public LimeReport::ContentItemDesignIntf { class BarcodeItem : public LimeReport::ContentItemDesignIntf {
Q_OBJECT Q_OBJECT
Q_PROPERTY(QString content READ content WRITE setContent) Q_PROPERTY(QString content READ content WRITE setContent)
Q_PROPERTY(BarcodeType barcodeType READ barcodeType WRITE setBarcodeType ) Q_PROPERTY(BarcodeType barcodeType READ barcodeType WRITE setBarcodeType)
Q_PROPERTY(QString datasource READ datasource WRITE setDatasource) Q_PROPERTY(QString datasource READ datasource WRITE setDatasource)
Q_PROPERTY(QString field READ field WRITE setField) Q_PROPERTY(QString field READ field WRITE setField)
Q_PROPERTY(QString testValue READ designTestValue WRITE setDesignTestValue) Q_PROPERTY(QString testValue READ designTestValue WRITE setDesignTestValue)
@ -152,7 +152,7 @@ public:
KANJI_INPUT_MODE = 3, KANJI_INPUT_MODE = 3,
SJIS_INPUT_MODE = 4 SJIS_INPUT_MODE = 4
}; };
#if (QT_VERSION >= QT_VERSION_CHECK(5,5, 0)) #if QT_VERSION >= 0x050500
Q_ENUM(BarcodeType) Q_ENUM(BarcodeType)
Q_ENUM(AngleType) Q_ENUM(AngleType)
Q_ENUM(InputMode) Q_ENUM(InputMode)

View File

@ -30,9 +30,9 @@ namespace LimeReport{
QColor generateColor() QColor generateColor()
{ {
int red = (qrand()%(256 - 1)) + 1; int red = (rand()%(256 - 1)) + 1;
int green = (qrand()%(256 - 1)) + 1; int green = (rand()%(256 - 1)) + 1;
int blue = (qrand()%(256 - 1)) + 1;; int blue = (rand()%(256 - 1)) + 1;;
return QColor(red,green,blue); return QColor(red,green,blue);
} }
@ -348,7 +348,7 @@ void ChartItem::paintChartTitle(QPainter *painter, QRectF titleRect)
painter->save(); painter->save();
QFont tmpFont = painter->font(); QFont tmpFont = painter->font();
QFontMetrics fm(tmpFont); QFontMetrics fm(tmpFont);
while ((fm.height()>titleRect.height() || fm.width(m_title)>titleRect.width()) while ((fm.height()>titleRect.height() || fm.boundingRect(m_title).width()>titleRect.width())
&& tmpFont.pixelSize()>1) { && tmpFont.pixelSize()>1) {
tmpFont.setPixelSize(tmpFont.pixelSize()-1); tmpFont.setPixelSize(tmpFont.pixelSize()-1);
fm = QFontMetrics(tmpFont); fm = QFontMetrics(tmpFont);
@ -570,14 +570,14 @@ QSizeF AbstractSeriesChart::calcChartLegendSize(const QFont &font)
if (!m_chartItem->series().isEmpty()){ if (!m_chartItem->series().isEmpty()){
foreach(SeriesItem* series, m_chartItem->series()){ foreach(SeriesItem* series, m_chartItem->series()){
cw += fm.height(); cw += fm.height();
if (maxWidth<fm.width(series->name())) if (maxWidth<fm.boundingRect(series->name()).width())
maxWidth = fm.width(series->name())+10; maxWidth = fm.boundingRect(series->name()).width()+10;
} }
} else { } else {
foreach(QString label, m_designLabels){ foreach(QString label, m_designLabels){
cw += fm.height(); cw += fm.height();
if (maxWidth<fm.width(label)) if (maxWidth<fm.boundingRect(label).width())
maxWidth = fm.width(label)+10; maxWidth = fm.boundingRect(label).width()+10;
} }
} }
cw += fm.height(); cw += fm.height();
@ -591,7 +591,7 @@ bool AbstractSeriesChart::verticalLabels(QPainter* painter, QRectF labelsRect)
qreal hStep = (labelsRect.width() / valuesCount()); qreal hStep = (labelsRect.width() / valuesCount());
QFontMetrics fm = painter->fontMetrics(); QFontMetrics fm = painter->fontMetrics();
foreach(QString label, m_chartItem->labels()){ foreach(QString label, m_chartItem->labels()){
if (fm.width(label) > hStep){ if (fm.boundingRect(label).width() > hStep){
return true; return true;
} }
} }
@ -656,7 +656,7 @@ void AbstractSeriesChart::paintHorizontalGrid(QPainter *painter, QRectF gridRect
delta = genNextValue(delta); delta = genNextValue(delta);
painter->setRenderHint(QPainter::Antialiasing,false); painter->setRenderHint(QPainter::Antialiasing,false);
qreal hStep = (gridRect.width() - painter->fontMetrics().width(QString::number(maxValue()))) / 4; qreal hStep = (gridRect.width() - painter->fontMetrics().boundingRect(QString::number(maxValue())).width()) / 4;
painter->setFont(adaptValuesFont(hStep-4, painter->font())); painter->setFont(adaptValuesFont(hStep-4, painter->font()));
@ -708,7 +708,7 @@ qreal AbstractSeriesChart::valuesHMargin(QPainter *painter)
{ {
int delta = int(maxValue()-minValue()); int delta = int(maxValue()-minValue());
delta = genNextValue(delta); delta = genNextValue(delta);
return painter->fontMetrics().width(QString::number(delta))+4; return painter->fontMetrics().boundingRect(QString::number(delta)).width()+4;
} }
qreal AbstractSeriesChart::valuesVMargin(QPainter *painter) qreal AbstractSeriesChart::valuesVMargin(QPainter *painter)
@ -722,17 +722,21 @@ QFont AbstractSeriesChart::adaptLabelsFont(QRectF rect, QFont font)
QFontMetrics fm(font); QFontMetrics fm(font);
foreach(QString label, m_chartItem->labels()){ foreach(QString label, m_chartItem->labels()){
#if QT_VERSION < 0x060000
foreach (QString currentWord, label.split(QRegExp("\\W+"))){ foreach (QString currentWord, label.split(QRegExp("\\W+"))){
if (fm.width(maxWord) < fm.width(currentWord)) maxWord = currentWord; #else
foreach (QString currentWord, label.split(QRegularExpression("\\W+"))){
#endif
if (fm.boundingRect(maxWord).width() < fm.boundingRect(currentWord).width()) maxWord = currentWord;
} }
} }
qreal curWidth = fm.width(maxWord); qreal curWidth = fm.boundingRect(maxWord).width();
QFont tmpFont = font; QFont tmpFont = font;
while (curWidth>rect.width() && tmpFont.pixelSize() > 1){ while (curWidth>rect.width() && tmpFont.pixelSize() > 1){
tmpFont.setPixelSize(tmpFont.pixelSize() - 1); tmpFont.setPixelSize(tmpFont.pixelSize() - 1);
QFontMetricsF tmpFM(tmpFont); QFontMetricsF tmpFM(tmpFont);
curWidth = tmpFM.width(maxWord); curWidth = tmpFM.boundingRect(maxWord).width();
} }
return tmpFont; return tmpFont;
} }
@ -742,11 +746,11 @@ QFont AbstractSeriesChart::adaptValuesFont(qreal width, QFont font)
QString strValue = QString::number(maxValue()); QString strValue = QString::number(maxValue());
QFont tmpFont = font; QFont tmpFont = font;
QScopedPointer<QFontMetricsF> fm(new QFontMetricsF(tmpFont)); QScopedPointer<QFontMetricsF> fm(new QFontMetricsF(tmpFont));
qreal curWidth = fm->width(strValue); qreal curWidth = fm->boundingRect(strValue).width();
while (curWidth > width && tmpFont.pixelSize() > 1){ while (curWidth > width && tmpFont.pixelSize() > 1){
tmpFont.setPixelSize(tmpFont.pixelSize() - 1); tmpFont.setPixelSize(tmpFont.pixelSize() - 1);
fm.reset(new QFontMetricsF(tmpFont)); fm.reset(new QFontMetricsF(tmpFont));
curWidth = fm->width(strValue); curWidth = fm->boundingRect(strValue).width();
} }
return tmpFont; return tmpFont;
} }
@ -803,8 +807,8 @@ QRectF AbstractBarChart::verticalLabelsRect(QPainter *painter, QRectF labelsRect
qreal maxWidth = 0; qreal maxWidth = 0;
foreach (QString label, m_chartItem->labels()) { foreach (QString label, m_chartItem->labels()) {
if (painter->fontMetrics().width(label)>maxWidth) if (painter->fontMetrics().boundingRect(label).width()>maxWidth)
maxWidth = painter->fontMetrics().width(label); maxWidth = painter->fontMetrics().boundingRect(label).width();
} }
if (maxWidth + hPadding(m_chartItem->rect()) * 2 < labelsRect.width()) if (maxWidth + hPadding(m_chartItem->rect()) * 2 < labelsRect.width())
@ -818,8 +822,8 @@ QRectF AbstractBarChart::horizontalLabelsRect(QPainter *painter, QRectF labelsRe
qreal maxWidth = 0; qreal maxWidth = 0;
foreach (QString label, m_chartItem->labels()) { foreach (QString label, m_chartItem->labels()) {
if (painter->fontMetrics().width(label)>maxWidth) if (painter->fontMetrics().boundingRect(label).width()>maxWidth)
maxWidth = painter->fontMetrics().width(label); maxWidth = painter->fontMetrics().boundingRect(label).width();
} }
if ((maxWidth + vPadding(m_chartItem->rect()) < labelsRect.height()) || !verticalLabels(painter, labelsRect)) if ((maxWidth + vPadding(m_chartItem->rect()) < labelsRect.height()) || !verticalLabels(painter, labelsRect))

View File

@ -27,13 +27,13 @@ private:
class SeriesItem : public QObject{ class SeriesItem : public QObject{
Q_OBJECT Q_OBJECT
Q_PROPERTY(QString name READ name WRITE setName) Q_PROPERTY(QString name READ name WRITE setName)
Q_PROPERTY(QString valuesColumn READ valuesColumn WRITE setValuesColumn ) Q_PROPERTY(QString valuesColumn READ valuesColumn WRITE setValuesColumn)
Q_PROPERTY(QString labelsColumn READ labelsColumn WRITE setLabelsColumn ) Q_PROPERTY(QString labelsColumn READ labelsColumn WRITE setLabelsColumn)
Q_PROPERTY(QColor color READ color WRITE setColor) Q_PROPERTY(QColor color READ color WRITE setColor)
Q_PROPERTY(SeriesItemPreferredType preferredType READ preferredType WRITE setPreferredType) Q_PROPERTY(SeriesItemPreferredType preferredType READ preferredType WRITE setPreferredType)
public: public:
enum SeriesItemPreferredType {Bar, Line}; enum SeriesItemPreferredType {Bar, Line};
#if (QT_VERSION >= QT_VERSION_CHECK(5,5, 0)) #if QT_VERSION >= 0x050500
Q_ENUM(SeriesItemPreferredType) Q_ENUM(SeriesItemPreferredType)
#else #else
Q_ENUMS(SeriesItemPreferredType) Q_ENUMS(SeriesItemPreferredType)
@ -135,7 +135,7 @@ public:
enum LegendAlign{LegendAlignTop,LegendAlignCenter,LegendAlignBottom}; enum LegendAlign{LegendAlignTop,LegendAlignCenter,LegendAlignBottom};
enum TitleAlign{TitleAlignLeft, TitleAlignCenter, TitleAlignRight}; enum TitleAlign{TitleAlignLeft, TitleAlignCenter, TitleAlignRight};
enum ChartType{Pie, VerticalBar, HorizontalBar, Lines}; enum ChartType{Pie, VerticalBar, HorizontalBar, Lines};
#if (QT_VERSION >= QT_VERSION_CHECK(5,5, 0)) #if QT_VERSION >= 0x050500
Q_ENUM(LegendAlign) Q_ENUM(LegendAlign)
Q_ENUM(TitleAlign) Q_ENUM(TitleAlign)
Q_ENUM(ChartType) Q_ENUM(ChartType)

View File

@ -10,7 +10,7 @@ ChartItemEditor::ChartItemEditor(LimeReport::ChartItem *item, LimeReport::PageDe
{ {
ui->setupUi(this); ui->setupUi(this);
QHBoxLayout* colorLayout = new QHBoxLayout(); QHBoxLayout* colorLayout = new QHBoxLayout();
colorLayout->setMargin(0); colorLayout->setContentsMargins(0, 0, 0, 0);
m_colorButton = new QToolButton(); m_colorButton = new QToolButton();
m_colorButton->setText("..."); m_colorButton->setText("...");
m_colorButton->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum); m_colorButton->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum);
@ -118,11 +118,10 @@ void ChartItemEditor::init()
ui->seriesTypeComboBox->addItem(enumerator.key(i)); ui->seriesTypeComboBox->addItem(enumerator.key(i));
} }
#ifdef HAVE_QT5 #if QT_VERSION < 0x050000
ui->labelsFieldComboBox->setCurrentText(m_charItem->labelsField());
#endif
#ifdef HAVE_QT4
ui->labelsFieldComboBox->setCurrentIndex(ui->labelsFieldComboBox->findText( m_charItem->labelsField())); ui->labelsFieldComboBox->setCurrentIndex(ui->labelsFieldComboBox->findText( m_charItem->labelsField()));
#else
ui->labelsFieldComboBox->setCurrentText(m_charItem->labelsField());
#endif #endif
if (!m_charItem->series().isEmpty()){ if (!m_charItem->series().isEmpty()){
enableSeriesEditor(); enableSeriesEditor();
@ -150,11 +149,10 @@ void ChartItemEditor::disableSeriesEditor()
ui->valuesFieldComboBox->setDisabled(true); ui->valuesFieldComboBox->setDisabled(true);
m_colorButton->setDisabled(true); m_colorButton->setDisabled(true);
m_colorIndicator->setDisabled(true); m_colorIndicator->setDisabled(true);
#ifdef HAVE_QT5 #if QT_VERSION < 0x050000
ui->valuesFieldComboBox->setCurrentText("");
#endif
#ifdef HAVE_QT4
ui->valuesFieldComboBox->setEditText(""); ui->valuesFieldComboBox->setEditText("");
#else
ui->valuesFieldComboBox->setCurrentText("");
#endif #endif
ui->seriesTypeComboBox->setDisabled(true); ui->seriesTypeComboBox->setDisabled(true);
} }
@ -208,11 +206,10 @@ void ChartItemEditor::slotAddSeries()
ui->tableWidget->setRowCount(m_charItem->series().count()); ui->tableWidget->setRowCount(m_charItem->series().count());
ui->tableWidget->setItem(m_charItem->series().count()-1, 0, new QTableWidgetItem(series->name())); ui->tableWidget->setItem(m_charItem->series().count()-1, 0, new QTableWidgetItem(series->name()));
ui->tableWidget->selectRow(m_charItem->series().count()-1); ui->tableWidget->selectRow(m_charItem->series().count()-1);
#ifdef HAVE_QT5 #if QT_VERSION < 0x050000
ui->valuesFieldComboBox->setCurrentText("");
#endif
#ifdef HAVE_QT4
ui->valuesFieldComboBox->setEditText(""); ui->valuesFieldComboBox->setEditText("");
#else
ui->valuesFieldComboBox->setCurrentText("");
#endif #endif
} }
@ -235,20 +232,18 @@ void ChartItemEditor::on_tableWidget_itemSelectionChanged()
if (ui->tableWidget->selectionModel()->hasSelection()){ if (ui->tableWidget->selectionModel()->hasSelection()){
LimeReport::SeriesItem* series = m_charItem->series().at(ui->tableWidget->selectionModel()->currentIndex().row()); LimeReport::SeriesItem* series = m_charItem->series().at(ui->tableWidget->selectionModel()->currentIndex().row());
ui->seriesNameLineEdit->setText(series->name()); ui->seriesNameLineEdit->setText(series->name());
#ifdef HAVE_QT5 #if QT_VERSION < 0x050000
ui->valuesFieldComboBox->setCurrentText(series->valuesColumn());
#endif
#ifdef HAVE_QT4
ui->valuesFieldComboBox->setCurrentIndex(ui->valuesFieldComboBox->findText(series->valuesColumn())); ui->valuesFieldComboBox->setCurrentIndex(ui->valuesFieldComboBox->findText(series->valuesColumn()));
#else
ui->valuesFieldComboBox->setCurrentText(series->valuesColumn());
#endif #endif
m_colorIndicator->setColor(series->color()); m_colorIndicator->setColor(series->color());
static int enumIndex = LimeReport::SeriesItem::staticMetaObject.indexOfEnumerator("SeriesItemPreferredType"); static int enumIndex = LimeReport::SeriesItem::staticMetaObject.indexOfEnumerator("SeriesItemPreferredType");
QMetaEnum enumerator = LimeReport::SeriesItem::staticMetaObject.enumerator(enumIndex); QMetaEnum enumerator = LimeReport::SeriesItem::staticMetaObject.enumerator(enumIndex);
#ifdef HAVE_QT5 #if QT_VERSION < 0x050000
ui->seriesTypeComboBox->setCurrentText(enumerator.valueToKey(series->preferredType()));
#endif
#ifdef HAVE_QT4
ui->seriesTypeComboBox->setCurrentIndex(ui->seriesTypeComboBox->findText(enumerator.valueToKey(series->preferredType()))); ui->seriesTypeComboBox->setCurrentIndex(ui->seriesTypeComboBox->findText(enumerator.valueToKey(series->preferredType())));
#else
ui->seriesTypeComboBox->setCurrentText(enumerator.valueToKey(series->preferredType()));
#endif #endif
enableSeriesEditor(); enableSeriesEditor();
} }

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **
@ -140,7 +140,7 @@ void HorizontalLayout::setItemAlign(const BaseDesignIntf::ItemAlign &itemAlign)
void HorizontalLayout::sortChildren() void HorizontalLayout::sortChildren()
{ {
qSort(layoutsChildren().begin(),layoutsChildren().end(),horizontalLessThen); std::sort(layoutsChildren().begin(),layoutsChildren().end(),horizontalLessThen);
} }
void HorizontalLayout::updateLayoutSize() void HorizontalLayout::updateLayoutSize()
@ -177,7 +177,7 @@ void HorizontalLayout::relocateChildren()
layoutsChildren().append(item); layoutsChildren().append(item);
} }
} }
qSort(layoutsChildren().begin(),layoutsChildren().end(),horizontalLessThen); std::sort(layoutsChildren().begin(),layoutsChildren().end(),horizontalLessThen);
qreal curX = spaceBorder; qreal curX = spaceBorder;
setIsRelocating(true); setIsRelocating(true);
foreach (BaseDesignIntf* item, layoutsChildren()) { foreach (BaseDesignIntf* item, layoutsChildren()) {

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **
@ -58,7 +58,7 @@ public:
Hex = 1, Hex = 1,
Base64 = 2 Base64 = 2
}; };
#if (QT_VERSION >= QT_VERSION_CHECK(5,5, 0)) #if QT_VERSION >= 0x050500
Q_ENUM(Format) Q_ENUM(Format)
#else #else
Q_ENUMS(Format) Q_ENUMS(Format)

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **
@ -47,7 +47,7 @@ class ShapeItem: public LimeReport::ItemDesignIntf
Q_PROPERTY(int cornerRadius READ cornerRadius WRITE setCornerRadius) Q_PROPERTY(int cornerRadius READ cornerRadius WRITE setCornerRadius)
public: public:
enum ShapeType{HorizontalLine,VerticalLine,Ellipse,Rectangle}; enum ShapeType{HorizontalLine,VerticalLine,Ellipse,Rectangle};
#if (QT_VERSION >= QT_VERSION_CHECK(5,5, 0)) #if QT_VERSION >= 0x050500
Q_ENUM(ShapeType) Q_ENUM(ShapeType)
#else #else
Q_ENUMS(ShapeType) Q_ENUMS(ShapeType)

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **
@ -28,14 +28,18 @@
* GNU General Public License for more details. * * GNU General Public License for more details. *
****************************************************************************/ ****************************************************************************/
#include "lrsimpletagparser.h" #include "lrsimpletagparser.h"
#include <QRegExp>
#include <QDebug> #include <QDebug>
#include <QStringList> #include <QStringList>
#if QT_VERSION < 0x060000
#include <QRegExp>
#else
#include <QRegularExpression>
#endif
namespace LimeReport{ namespace LimeReport{
void HtmlContext::fillTagVector(QString html) void HtmlContext::fillTagVector(QString html)
{ {
#if QT_VERSION < 0x060000
QRegExp rx("<[^<]*>"); QRegExp rx("<[^<]*>");
QString buff=html; QString buff=html;
int curPos=0; int curPos=0;
@ -49,10 +53,20 @@ void HtmlContext::fillTagVector(QString html)
} }
buff=buff.right(buff.length()-rx.matchedLength()); buff=buff.right(buff.length()-rx.matchedLength());
} }
#else
QRegularExpression rx("<[^<]*>");
QString buff=html;
while(buff.contains(rx)){
QRegularExpressionMatch match = rx.match(buff);
// TODO: Qt6 port
}
#endif
} }
QString HtmlContext::parseTag(QVector<Tag *> &storage, QString text, int &curPos, bool createTag) QString HtmlContext::parseTag(QVector<Tag *> &storage, QString text, int &curPos, bool createTag)
{ {
#if QT_VERSION < 0x060000
QRegExp rx("<[^<]*>"); QRegExp rx("<[^<]*>");
int pos=rx.indexIn(text); int pos=rx.indexIn(text);
int begPos=pos+curPos; int begPos=pos+curPos;
@ -78,12 +92,16 @@ QString HtmlContext::parseTag(QVector<Tag *> &storage, QString text, int &curPos
buff=buff.right(buff.length()-rx.matchedLength()); buff=buff.right(buff.length()-rx.matchedLength());
} }
} }
#else
QRegularExpression rx("<[^<]*>");
// TODO: Qt6 port
#endif
return ""; return "";
} }
void HtmlContext::parseSymbs(QString text) void HtmlContext::parseSymbs(QString text)
{ {
#if QT_VERSION < 0x060000
QRegExp rx("<[^<]*[^/]>"); QRegExp rx("<[^<]*[^/]>");
while (text.contains(rx)){ while (text.contains(rx)){
int pos=rx.indexIn(text); int pos=rx.indexIn(text);
@ -100,6 +118,10 @@ void HtmlContext::parseSymbs(QString text)
text.replace(rx.cap(0)," "); text.replace(rx.cap(0)," ");
} }
} }
#else
QRegularExpression rx("<[^<]*>");
// TODO: Qt6 port
#endif
} }
void HtmlContext::initSymbPatterns() void HtmlContext::initSymbPatterns()

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **
@ -360,7 +360,11 @@ void TextItem::updateLayout()
bool TextItem::isNeedExpandContent() const bool TextItem::isNeedExpandContent() const
{ {
#if QT_VERSION < 0x060000
QRegExp rx("$*\\{[^{]*\\}"); QRegExp rx("$*\\{[^{]*\\}");
#else
QRegularExpression rx("$*\\{[^{]*\\}");
#endif
return content().contains(rx) || isContentBackedUp(); return content().contains(rx) || isContentBackedUp();
} }
@ -448,7 +452,11 @@ QString TextItem::formatNumber(const double value)
if (m_format.contains("%")) if (m_format.contains("%"))
{ {
#if QT_VERSION < 0x050500
str.sprintf(m_format.toStdString().c_str(), value); str.sprintf(m_format.toStdString().c_str(), value);
#else
str.asprintf(m_format.toStdString().c_str(), value);
#endif
str = str.replace(",", QLocale::system().groupSeparator()); str = str.replace(",", QLocale::system().groupSeparator());
str = str.replace(".", QLocale::system().decimalPoint()); str = str.replace(".", QLocale::system().decimalPoint());
} }
@ -813,7 +821,11 @@ void TextItem::expandContent(DataSourceManager* dataManager, RenderPass pass)
{ {
QString context=content(); QString context=content();
foreach (QString variableName, dataManager->variableNamesByRenderPass(SecondPass)) { foreach (QString variableName, dataManager->variableNamesByRenderPass(SecondPass)) {
#if QT_VERSION < 0x060000
QRegExp rx(QString(Const::NAMED_VARIABLE_RX).arg(variableName)); QRegExp rx(QString(Const::NAMED_VARIABLE_RX).arg(variableName));
#else
QRegularExpression rx(QString(Const::NAMED_VARIABLE_RX).arg(variableName));
#endif
if (context.contains(rx) && pass == FirstPass){ if (context.contains(rx) && pass == FirstPass){
backupContent(); backupContent();
break; break;

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **
@ -46,10 +46,10 @@ class TextItem : public ContentItemDesignIntf, IPageInit {
Q_OBJECT Q_OBJECT
Q_PROPERTY(QString content READ content WRITE setContent) Q_PROPERTY(QString content READ content WRITE setContent)
Q_PROPERTY(int margin READ marginSize WRITE setMarginSize) Q_PROPERTY(int margin READ marginSize WRITE setMarginSize)
Q_PROPERTY(Qt::Alignment alignment READ alignment() WRITE setAlignment) Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment)
Q_PROPERTY(AutoWidth autoWidth READ autoWidth() WRITE setAutoWidth) Q_PROPERTY(AutoWidth autoWidth READ autoWidth WRITE setAutoWidth)
Q_PROPERTY(bool autoHeight READ autoHeight() WRITE setAutoHeight) Q_PROPERTY(bool autoHeight READ autoHeight WRITE setAutoHeight)
Q_PROPERTY(QFont font READ font() WRITE setTextItemFont) Q_PROPERTY(QFont font READ font WRITE setTextItemFont)
Q_PROPERTY(int backgroundOpacity READ opacity WRITE setBackgroundOpacity) Q_PROPERTY(int backgroundOpacity READ opacity WRITE setBackgroundOpacity)
Q_PROPERTY(BGMode backgroundMode READ backgroundMode WRITE setBackgroundModeProperty) Q_PROPERTY(BGMode backgroundMode READ backgroundMode WRITE setBackgroundModeProperty)
Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColorProperty) Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColorProperty)
@ -79,7 +79,7 @@ public:
enum AutoWidth{NoneAutoWidth, MaxWordLength, MaxStringLength}; enum AutoWidth{NoneAutoWidth, MaxWordLength, MaxStringLength};
enum AngleType{Angle0, Angle90, Angle180, Angle270, Angle45, Angle315}; enum AngleType{Angle0, Angle90, Angle180, Angle270, Angle45, Angle315};
enum ValueType{Default, DateTime, Double}; enum ValueType{Default, DateTime, Double};
#if (QT_VERSION >= QT_VERSION_CHECK(5,5, 0)) #if QT_VERSION >= 0x050500
Q_ENUM(AutoWidth) Q_ENUM(AutoWidth)
Q_ENUM(AngleType) Q_ENUM(AngleType)
Q_ENUM(ValueType) Q_ENUM(ValueType)

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -63,7 +63,7 @@ void VerticalLayout::relocateChildren()
layoutsChildren().append(item); layoutsChildren().append(item);
} }
} }
qSort(layoutsChildren().begin(),layoutsChildren().end(), verticalLessThen); std::sort(layoutsChildren().begin(),layoutsChildren().end(), verticalLessThen);
qreal curY = spaceBorder; qreal curY = spaceBorder;
setIsRelocating(true); setIsRelocating(true);
foreach (BaseDesignIntf* item, layoutsChildren()) { foreach (BaseDesignIntf* item, layoutsChildren()) {
@ -140,7 +140,7 @@ BaseDesignIntf* VerticalLayout::cloneBottomPart(int height, QObject* owner, QGra
void VerticalLayout::sortChildren() void VerticalLayout::sortChildren()
{ {
qSort(layoutsChildren().begin(),layoutsChildren().end(),verticalLessThen); std::sort(layoutsChildren().begin(),layoutsChildren().end(),verticalLessThen);
} }
void VerticalLayout::divideSpace() void VerticalLayout::divideSpace()

View File

@ -84,15 +84,15 @@ SOURCES += \
$$REPORT_PATH/exporters/lrpdfexporter.cpp \ $$REPORT_PATH/exporters/lrpdfexporter.cpp \
$$REPORT_PATH/lrpreparedpages.cpp $$REPORT_PATH/lrpreparedpages.cpp
contains(CONFIG, staticlib){ CONFIG(staticlib) {
SOURCES += $$REPORT_PATH/lrfactoryinitializer.cpp SOURCES += $$REPORT_PATH/lrfactoryinitializer.cpp
} }
contains(CONFIG, zint){ CONFIG(zint) {
SOURCES += $$REPORT_PATH/items/lrbarcodeitem.cpp SOURCES += $$REPORT_PATH/items/lrbarcodeitem.cpp
} }
contains(CONFIG, svg){ CONFIG(svg){
SOURCES += $$REPORT_PATH/items/lrsvgitem.cpp \ SOURCES += $$REPORT_PATH/items/lrsvgitem.cpp \
} }
@ -187,15 +187,15 @@ HEADERS += \
$$REPORT_PATH/lrpreparedpages.h \ $$REPORT_PATH/lrpreparedpages.h \
$$REPORT_PATH/lrpreparedpagesintf.h $$REPORT_PATH/lrpreparedpagesintf.h
contains(CONFIG, staticlib){ CONFIG(staticlib) {
HEADERS += $$REPORT_PATH/lrfactoryinitializer.h HEADERS += $$REPORT_PATH/lrfactoryinitializer.h
} }
contains(CONFIG,zint){ CONFIG(zint) {
HEADERS += $$REPORT_PATH/items/lrbarcodeitem.h HEADERS += $$REPORT_PATH/items/lrbarcodeitem.h
} }
contains(CONFIG, svg){ CONFIG(svg) {
HEADERS += $$REPORT_PATH/items/lrsvgitem.h HEADERS += $$REPORT_PATH/items/lrsvgitem.h
} }
@ -219,4 +219,3 @@ FORMS += \
RESOURCES += \ RESOURCES += \
$$REPORT_PATH/report.qrc \ $$REPORT_PATH/report.qrc \
$$REPORT_PATH/items/items.qrc $$REPORT_PATH/items/items.qrc

View File

@ -1,4 +1,4 @@
CONFIG(debug, debug|release){ CONFIG(debug, debug|release) {
TARGET = limereportd TARGET = limereportd
} else { } else {
TARGET = limereport TARGET = limereport
@ -6,11 +6,11 @@ CONFIG(debug, debug|release){
TEMPLATE = lib TEMPLATE = lib
contains(CONFIG, static_build){ CONFIG(static_build) {
CONFIG += staticlib CONFIG += staticlib
} }
!contains(CONFIG, staticlib){ !CONFIG(staticlib) {
CONFIG += lib CONFIG += lib
CONFIG += dll CONFIG += dll
} }
@ -19,14 +19,14 @@ CONFIG += create_prl
CONFIG += link_prl CONFIG += link_prl
macx{ macx{
CONFIG -= dll CONFIG -= dll
CONFIG += lib_bundle CONFIG += lib_bundle
CONFIG += plugin CONFIG += plugin
} }
DEFINES += LIMEREPORT_EXPORTS DEFINES += LIMEREPORT_EXPORTS
contains(CONFIG, staticlib){ CONFIG(staticlib) {
DEFINES += HAVE_STATIC_BUILD DEFINES += HAVE_STATIC_BUILD
DEFINES += QZINT_STATIC_BUILD DEFINES += QZINT_STATIC_BUILD
message(STATIC_BUILD) message(STATIC_BUILD)
@ -42,19 +42,20 @@ EXTRA_FILES += \
$$PWD/lrcallbackdatasourceintf.h \ $$PWD/lrcallbackdatasourceintf.h \
$$PWD/lrpreviewreportwidget.h \ $$PWD/lrpreviewreportwidget.h \
$$PWD/lrreportdesignwindowintrerface.h $$PWD/lrreportdesignwindowintrerface.h
$$PWD/lrpreparedpagesintf.h
include(limereport.pri) include(limereport.pri)
unix:{ unix:{
DESTDIR = $${DEST_LIBS} DESTDIR = $${DEST_LIBS}
linux{ linux{
QMAKE_POST_LINK += mkdir -p \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t) # qmake need make mkdir -p on subdirs more than root/ QMAKE_POST_LINK += mkdir -p \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t) # qmake need make mkdir -p on subdirs more than root/
for(FILE,EXTRA_FILES){ for(FILE,EXTRA_FILES) {
QMAKE_POST_LINK += $$QMAKE_COPY \"$$FILE\" \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t) # inside of libs make /include/files QMAKE_POST_LINK += $$QMAKE_COPY \"$$FILE\" \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t) # inside of libs make /include/files
} }
} }
macx{ macx{
for(FILE,EXTRA_FILES){ for(FILE,EXTRA_FILES) {
QMAKE_POST_LINK += $$QMAKE_COPY \"$$FILE\" \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t) QMAKE_POST_LINK += $$QMAKE_COPY \"$$FILE\" \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t)
} }
QMAKE_POST_LINK += mkdir -p \"$${DESTDIR}/include\" $$escape_expand(\\n\\t) QMAKE_POST_LINK += mkdir -p \"$${DESTDIR}/include\" $$escape_expand(\\n\\t)
@ -64,9 +65,9 @@ unix:{
win32 { win32 {
DESTDIR = $${DEST_LIBS} DESTDIR = $${DEST_LIBS}
contains(QMAKE_HOST.os, Linux){ contains(QMAKE_HOST.os, Linux) {
QMAKE_POST_LINK += mkdir -p \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t) # qmake need make mkdir -p on subdirs more than root/ QMAKE_POST_LINK += mkdir -p \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t) # qmake need make mkdir -p on subdirs more than root/
for(FILE,EXTRA_FILES){ for(FILE,EXTRA_FILES) {
QMAKE_POST_LINK += $$QMAKE_COPY \"$$FILE\" \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t) # inside of libs make /include/files QMAKE_POST_LINK += $$QMAKE_COPY \"$$FILE\" \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t) # inside of libs make /include/files
} }
QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$${DEST_INCLUDE_DIR}\" \"$${DESTDIR}\" QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$${DEST_INCLUDE_DIR}\" \"$${DESTDIR}\"
@ -77,23 +78,23 @@ win32 {
DEST_DIR ~= s,/,\\,g DEST_DIR ~= s,/,\\,g
DEST_INCLUDE_DIR ~= s,/,\\,g DEST_INCLUDE_DIR ~= s,/,\\,g
for(FILE,EXTRA_FILES){ for(FILE,EXTRA_FILES) {
QMAKE_POST_LINK += $$QMAKE_COPY \"$$FILE\" \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t) QMAKE_POST_LINK += $$QMAKE_COPY \"$$FILE\" \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t)
} }
QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$${DEST_INCLUDE_DIR}\" \"$${DEST_DIR}\" QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$${DEST_INCLUDE_DIR}\" \"$${DEST_DIR}\"
} }
} }
contains(CONFIG,zint){ CONFIG(zint) {
message(zint) message(zint)
INCLUDEPATH += $$ZINT_PATH/backend $$ZINT_PATH/backend_qt INCLUDEPATH += $$ZINT_PATH/backend $$ZINT_PATH/backend_qt
DEPENDPATH += $$ZINT_PATH/backend $$ZINT_PATH/backend_qt DEPENDPATH += $$ZINT_PATH/backend $$ZINT_PATH/backend_qt
LIBS += -L$${DEST_LIBS} LIBS += -L$${DEST_LIBS}
CONFIG(release, debug|release){ CONFIG(release, debug|release) {
LIBS += -lQtZint LIBS += -lQtZint
} else { } else {
LIBS += -lQtZintd LIBS += -lQtZintd
} }
} }
#### Install mkspecs, headers and libs to QT_INSTALL_DIR #### Install mkspecs, headers and libs to QT_INSTALL_DIR
@ -111,8 +112,8 @@ INSTALLS += target
####Automatically build required translation files (*.qm) ####Automatically build required translation files (*.qm)
contains(CONFIG,build_translations){ CONFIG(build_translations) {
LANGUAGES = ru es_ES ar fr zh LANGUAGES = ru es ar fr zh pl
defineReplace(prependAll) { defineReplace(prependAll) {
for(a,$$1):result += $$2$${a}$$3 for(a,$$1):result += $$2$${a}$$3
@ -138,5 +139,3 @@ contains(CONFIG,build_translations){
} }
#### EN AUTOMATIC TRANSLATIONS #### EN AUTOMATIC TRANSLATIONS

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **
@ -27,6 +27,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
****************************************************************************/ ****************************************************************************/
#ifdef CMAKE_CONFIG
#include <config.h>
#endif
#include "lraboutdialog.h" #include "lraboutdialog.h"
#include "ui_lraboutdialog.h" #include "ui_lraboutdialog.h"

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **

View File

@ -42,7 +42,7 @@ p, li { white-space: pre-wrap; }
&lt;p align=&quot;justify&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt; text-decoration: underline; color:#0000ff;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p align=&quot;justify&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt; text-decoration: underline; color:#0000ff;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt; font-weight:600;&quot;&gt;This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.&lt;/span&gt;&lt;/p&gt; &lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt; font-weight:600;&quot;&gt;This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt; font-weight:600; color:#000000;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p align=&quot;justify&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt; font-weight:600; color:#000000;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Copyright 2015 Arin Alexander. All rights reserved.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Copyright 2021 Arin Alexander. All rights reserved.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **
@ -266,7 +266,7 @@ void BandDesignIntf::paint(QPainter *painter, const QStyleOptionGraphicsItem *op
QFontMetrics fontMetrics(font); QFontMetrics fontMetrics(font);
QVector<QRectF> bandNameRects; QVector<QRectF> bandNameRects;
bandNameRects.push_back(QRectF(8,8,fontMetrics.width(" "+bandText+" "),fontMetrics.height())); bandNameRects.push_back(QRectF(8,8,fontMetrics.boundingRect(" "+bandText+" ").width(),fontMetrics.height()));
//bandNameRects.push_back(QRectF(width()-fontMetrics.width(" "+bandText+" "),2,fontMetrics.width(" "+bandText+" "),fontMetrics.height())); //bandNameRects.push_back(QRectF(width()-fontMetrics.width(" "+bandText+" "),2,fontMetrics.width(" "+bandText+" "),fontMetrics.height()));
//bandNameRects.push_back(QRectF(2,height()-fontMetrics.height(),fontMetrics.width(" "+bandText+" "),fontMetrics.height())); //bandNameRects.push_back(QRectF(2,height()-fontMetrics.height(),fontMetrics.width(" "+bandText+" "),fontMetrics.height()));
//bandNameRects.push_back(QRectF(width()-fontMetrics.width(" "+bandText+" "),height()-fontMetrics.height(),fontMetrics.width(" "+bandText+" "),fontMetrics.height())); //bandNameRects.push_back(QRectF(width()-fontMetrics.width(" "+bandText+" "),height()-fontMetrics.height(),fontMetrics.width(" "+bandText+" "),fontMetrics.height()));
@ -487,7 +487,7 @@ QList<BandDesignIntf *> BandDesignIntf::childrenByType(BandDesignIntf::BandsType
foreach(BandDesignIntf* item,childBands()){ foreach(BandDesignIntf* item,childBands()){
if (item->bandType()==type) resList<<item; if (item->bandType()==type) resList<<item;
} }
qSort(resList.begin(),resList.end(),bandIndexLessThen); std::sort(resList.begin(),resList.end(),bandIndexLessThen);
return resList; return resList;
} }
@ -1223,7 +1223,7 @@ void BandNameLabel::updateLabel(const QString& bandName)
m_rect = QRectF( m_rect = QRectF(
m_band->pos().x()+10, m_band->pos().x()+10,
m_band->pos().y()-(fontMetrics.height()+10), m_band->pos().y()-(fontMetrics.height()+10),
fontMetrics.width(bandName)+20,fontMetrics.height()+10 fontMetrics.boundingRect(bandName).width()+20,fontMetrics.height()+10
); );
update(); update();
} }

View File

@ -1,6 +1,6 @@
/*************************************************************************** /***************************************************************************
* This file is part of the Lime Report project * * This file is part of the Lime Report project *
* Copyright (C) 2015 by Alexander Arin * * Copyright (C) 2021 by Alexander Arin *
* arin_a@bk.ru * * arin_a@bk.ru *
* * * *
** GNU General Public License Usage ** ** GNU General Public License Usage **
@ -103,11 +103,11 @@ private:
class BandDesignIntf : public ItemsContainerDesignInft class BandDesignIntf : public ItemsContainerDesignInft
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(bool autoHeight READ autoHeight WRITE setAutoHeight ) Q_PROPERTY(bool autoHeight READ autoHeight WRITE setAutoHeight)
Q_PROPERTY(int bandIndex READ bandIndex WRITE setBandIndex DESIGNABLE false ) Q_PROPERTY(int bandIndex READ bandIndex WRITE setBandIndex DESIGNABLE false)
Q_PROPERTY(bool keepBottomSpace READ keepBottomSpace WRITE setKeepBottomSpace ) Q_PROPERTY(bool keepBottomSpace READ keepBottomSpace WRITE setKeepBottomSpace)
Q_PROPERTY(bool keepTopSpace READ keepTopSpace WRITE setKeepTopSpace) Q_PROPERTY(bool keepTopSpace READ keepTopSpace WRITE setKeepTopSpace)
Q_PROPERTY(QString parentBand READ parentBandName WRITE setParentBandName DESIGNABLE false ) Q_PROPERTY(QString parentBand READ parentBandName WRITE setParentBandName DESIGNABLE false)
Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor) Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor)
Q_PROPERTY(BrushStyle backgroundBrushStyle READ backgroundBrushStyle WRITE setBackgroundBrushStyle) Q_PROPERTY(BrushStyle backgroundBrushStyle READ backgroundBrushStyle WRITE setBackgroundBrushStyle)
Q_PROPERTY(bool printIfEmpty READ printIfEmpty WRITE setPrintIfEmpty) Q_PROPERTY(bool printIfEmpty READ printIfEmpty WRITE setPrintIfEmpty)
@ -138,7 +138,7 @@ public:
enum BandColumnsLayoutType{ enum BandColumnsLayoutType{
Horizontal, Vertical, VerticalUniform Horizontal, Vertical, VerticalUniform
}; };
#if (QT_VERSION >= QT_VERSION_CHECK(5,5, 0)) #if QT_VERSION >= 0x050500
Q_ENUM(BandColumnsLayoutType) Q_ENUM(BandColumnsLayoutType)
#else #else
Q_ENUMS(BandColumnsLayoutType) Q_ENUMS(BandColumnsLayoutType)
@ -341,7 +341,7 @@ private:
class DataBandDesignIntf : public BandDesignIntf{ class DataBandDesignIntf : public BandDesignIntf{
Q_OBJECT Q_OBJECT
Q_PROPERTY(QString datasource READ datasourceName WRITE setDataSourceName ) Q_PROPERTY(QString datasource READ datasourceName WRITE setDataSourceName)
public: public:
DataBandDesignIntf(BandsType bandType, QString xmlTypeName, QObject* owner = 0, QGraphicsItem* parent=0); DataBandDesignIntf(BandsType bandType, QString xmlTypeName, QObject* owner = 0, QGraphicsItem* parent=0);
}; };

Some files were not shown because too many files have changed in this diff Show More