Merge branch 'master' into master

This commit is contained in:
yanis60 2023-01-19 06:02:04 +00:00 committed by GitHub
commit a2f72fdad7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
104 changed files with 31265 additions and 2634 deletions

174
.github/workflows/cmake.yml vendored Normal file
View File

@ -0,0 +1,174 @@
name: CMake
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-${{ matrix.ubuntu_version }}
name: Ubuntu-${{ matrix.ubuntu_version }}-Qt-${{ matrix.qt_version }}-static-${{ matrix.static }}
strategy:
fail-fast: false
matrix:
ubuntu_version: [20.04, 22.04]
qt_version: [5.15.2, 6.4.0]
static: [ON, OFF]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_version }}
cache: 'true'
cache-key-prefix: ${{ runner.os }}-Qt-Cache-${{ matrix.qt_version }}
dir: ${{ github.workspace }}/Qt
- name: Configure CMake for Qt5
if: "startsWith(matrix.qt_version, '5.')"
run: cmake -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -DLIMEREPORT_DEMO=ON -B "${{github.workspace}}/build"
- name: Configure CMake for Qt6
if: "startsWith(matrix.qt_version, '6.')"
run: cmake -DUSE_QT6=ON -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -DLIMEREPORT_DEMO=ON -B "${{github.workspace}}/build"
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
MSVC:
name: windows-${{ matrix.win_version }}-Qt-${{ matrix.qt_version }}-static-${{ matrix.static }}
runs-on: windows-${{ matrix.win_version }}
strategy:
fail-fast: false
matrix:
win_version: [2019, 2022]
qt_version: [5.15.2, 6.4.0]
static: [ON, OFF]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_version }}
cache: 'true'
cache-key-prefix: ${{ runner.os }}-Qt-Cache-${{ matrix.qt_version }}
dir: ${{ github.workspace }}/Qt
- name: Configure CMake for Qt5
if: "startsWith(matrix.qt_version, '5.')"
run: cmake -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -DLIMEREPORT_DEMO=ON -B "${{github.workspace}}/build"
- name: Configure CMake for Qt6
if: "startsWith(matrix.qt_version, '6.')"
run: cmake -DUSE_QT6=ON -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -DLIMEREPORT_DEMO=ON -B "${{github.workspace}}/build"
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
MinGW-w64:
runs-on: windows-2022
name: msys2-${{ matrix.msystem }}-Qt-${{ matrix.qt_version }}-static-${{ matrix.static }}
strategy:
fail-fast: false
matrix:
qt_version: [5, 6]
msystem: [UCRT64, CLANG64]
static: [ON, OFF]
defaults:
run:
shell: msys2 {0}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install MinGW-w64 packages Qt5
if: "startsWith(matrix.qt_version, '5')"
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
release: false
update: true
pacboy: >-
cc:p
cmake:p
ninja:p
qt${{ matrix.qt_version }}-base:p
qt${{ matrix.qt_version }}-svg:p
qt${{ matrix.qt_version }}-tools:p
qt${{ matrix.qt_version }}-quickcontrols:p
- name: Install MinGW-w64 packages Qt6
if: "startsWith(matrix.qt_version, '6')"
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
release: false
update: true
pacboy: >-
cc:p
cmake:p
ninja:p
qt${{ matrix.qt_version }}-base:p
qt${{ matrix.qt_version }}-svg:p
qt${{ matrix.qt_version }}-tools:p
qt${{ matrix.qt_version }}-declarative:p
- name: Configure CMake for Qt5
if: "startsWith(matrix.qt_version, '5')"
run: cmake -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -DLIMEREPORT_DEMO=ON -B "${{github.workspace}}/build"
- name: Configure CMake for Qt6
if: "startsWith(matrix.qt_version, '6')"
run: cmake -DUSE_QT6=ON -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -DLIMEREPORT_DEMO=ON -B "${{github.workspace}}/build"
- name: Build
run: cmake --build '${{github.workspace}}/build' --config ${{env.BUILD_TYPE}}
macos:
runs-on: macos-${{ matrix.macos_version }}
name: macos-${{ matrix.macos_version }}-Qt-${{ matrix.qt_version }}-static-${{ matrix.static }}
strategy:
fail-fast: false
matrix:
macos_version: [11, 12]
qt_version: [5.15.2, 6.4.0]
static: [ON, OFF]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_version }}
cache: 'true'
cache-key-prefix: ${{ runner.os }}-Qt-Cache-${{ matrix.qt_version }}
dir: ${{ github.workspace }}/Qt
- name: Configure CMake for Qt5
if: "startsWith(matrix.qt_version, '5.')"
run: cmake -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -DLIMEREPORT_DEMO=ON -B "${{github.workspace}}/build"
- name: Configure CMake for Qt6
if: "startsWith(matrix.qt_version, '6.')"
run: cmake -DUSE_QT6=ON -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DLIMEREPORT_STATIC=${{ matrix.static }} -DLIMEREPORT_DEMO=ON -B "${{github.workspace}}/build"
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

8
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

1
.idea/.name Normal file
View File

@ -0,0 +1 @@
limereport

2
.idea/LimeReport.iml Normal file
View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<module classpath="CMake" type="CPP_MODULE" version="4" />

4
.idea/misc.xml Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/LimeReport.iml" filepath="$PROJECT_DIR$/.idea/LimeReport.iml" />
</modules>
</component>
</project>

7
.idea/vcs.xml Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/3rdparty/qtxlsx" vcs="Git" />
</component>
</project>

BIN
3rdparty/zint-2.10.0-src.tar.gz vendored Normal file

Binary file not shown.

View File

@ -1,17 +1,20 @@
project(limereport)
cmake_minimum_required(VERSION 3.14) cmake_minimum_required(VERSION 3.14)
project(limereport)
set(LIMEREPORT_VERSION_MAJOR 1) set(LIMEREPORT_VERSION_MAJOR 1)
set(LIMEREPORT_VERSION_MINOR 6) set(LIMEREPORT_VERSION_MINOR 6)
set(LIMEREPORT_VERSION_RELEASE 6) set(LIMEREPORT_VERSION_RELEASE 8)
option(ENABLE_ZINT "Enable libzint build for barcode support" OFF) option(ENABLE_ZINT "Enable libzint build for barcode support" OFF)
option(LIMEREPORT_STATIC "Build LimeReport as static library" OFF) option(LIMEREPORT_STATIC "Build LimeReport as static library" OFF)
option(LIMEREPORT_DEMO "Build LimeReport demos" OFF)
option(USE_QT6 "Use Qt6" OFF)
find_package( if(USE_QT6)
QT NAMES Qt6 Qt5 find_package(QT NAMES Qt6)
COMPONENTS Core Widgets Sql Network Xml Svg Qml PrintSupport REQUIRED else()
) find_package(QT NAMES Qt5)
endif(USE_QT6)
find_package( find_package(
Qt${QT_VERSION_MAJOR} Qt${QT_VERSION_MAJOR}
COMPONENTS Core Widgets Sql Network Xml Svg Qml PrintSupport REQUIRED COMPONENTS Core Widgets Sql Network Xml Svg Qml PrintSupport REQUIRED
@ -35,8 +38,11 @@ if (Qt${QT_VERSION_MAJOR}Widgets_FOUND)
endif() endif()
add_subdirectory(3rdparty) add_subdirectory(3rdparty)
add_subdirectory(designer EXCLUDE_FROM_ALL)
add_subdirectory(demo_r1 EXCLUDE_FROM_ALL) if (LIMEREPORT_DEMO)
add_subdirectory(designer)
add_subdirectory(demo_r1)
endif()
set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOUIC ON)
@ -77,12 +83,16 @@ ${PROJECT_NAME}/items/editors/lritemsborderseditorwidget.cpp
${PROJECT_NAME}/items/editors/lrtextalignmenteditorwidget.cpp ${PROJECT_NAME}/items/editors/lrtextalignmenteditorwidget.cpp
${PROJECT_NAME}/items/lrabstractlayout.cpp ${PROJECT_NAME}/items/lrabstractlayout.cpp
${PROJECT_NAME}/items/lralignpropitem.cpp ${PROJECT_NAME}/items/lralignpropitem.cpp
${PROJECT_NAME}/items/lrborderframeeditor.cpp
${PROJECT_NAME}/items/lrbordereditor.cpp
${PROJECT_NAME}/items/lrchartitem.cpp ${PROJECT_NAME}/items/lrchartitem.cpp
${PROJECT_NAME}/items/lrchartaxiseditor.cpp
${PROJECT_NAME}/items/lrchartitemeditor.cpp ${PROJECT_NAME}/items/lrchartitemeditor.cpp
${PROJECT_NAME}/items/lrhorizontallayout.cpp ${PROJECT_NAME}/items/lrhorizontallayout.cpp
${PROJECT_NAME}/items/lrimageitem.cpp ${PROJECT_NAME}/items/lrimageitem.cpp
${PROJECT_NAME}/items/lrimageitemeditor.cpp ${PROJECT_NAME}/items/lrimageitemeditor.cpp
${PROJECT_NAME}/items/lrlayoutmarker.cpp ${PROJECT_NAME}/items/lrlayoutmarker.cpp
${PROJECT_NAME}/items/lrpageeditor.cpp
${PROJECT_NAME}/items/lrshapeitem.cpp ${PROJECT_NAME}/items/lrshapeitem.cpp
${PROJECT_NAME}/items/lrsubitemparentpropitem.cpp ${PROJECT_NAME}/items/lrsubitemparentpropitem.cpp
${PROJECT_NAME}/items/lrsvgitem.cpp ${PROJECT_NAME}/items/lrsvgitem.cpp
@ -188,13 +198,17 @@ ${PROJECT_NAME}/items/editors/lritemsborderseditorwidget.h
${PROJECT_NAME}/items/editors/lrtextalignmenteditorwidget.h ${PROJECT_NAME}/items/editors/lrtextalignmenteditorwidget.h
${PROJECT_NAME}/items/lrabstractlayout.h ${PROJECT_NAME}/items/lrabstractlayout.h
${PROJECT_NAME}/items/lralignpropitem.h ${PROJECT_NAME}/items/lralignpropitem.h
${PROJECT_NAME}/items/lrborderframeeditor.h
${PROJECT_NAME}/items/lrbordereditor.h
${PROJECT_NAME}/items/lrchartitem.h ${PROJECT_NAME}/items/lrchartitem.h
${PROJECT_NAME}/items/lrchartaxiseditor.h
${PROJECT_NAME}/items/lrchartitemeditor.h ${PROJECT_NAME}/items/lrchartitemeditor.h
${PROJECT_NAME}/items/lreditableimageitemintf.h ${PROJECT_NAME}/items/lreditableimageitemintf.h
${PROJECT_NAME}/items/lrhorizontallayout.h ${PROJECT_NAME}/items/lrhorizontallayout.h
${PROJECT_NAME}/items/lrimageitem.h ${PROJECT_NAME}/items/lrimageitem.h
${PROJECT_NAME}/items/lrimageitemeditor.h ${PROJECT_NAME}/items/lrimageitemeditor.h
${PROJECT_NAME}/items/lrlayoutmarker.h ${PROJECT_NAME}/items/lrlayoutmarker.h
${PROJECT_NAME}/items/lrpageeditor.h
${PROJECT_NAME}/items/lrshapeitem.h ${PROJECT_NAME}/items/lrshapeitem.h
${PROJECT_NAME}/items/lrsubitemparentpropitem.h ${PROJECT_NAME}/items/lrsubitemparentpropitem.h
${PROJECT_NAME}/items/lrsvgitem.h ${PROJECT_NAME}/items/lrsvgitem.h
@ -284,8 +298,12 @@ ${PROJECT_NAME}/databrowser/lrdatabrowser.ui
${PROJECT_NAME}/databrowser/lrsqleditdialog.ui ${PROJECT_NAME}/databrowser/lrsqleditdialog.ui
${PROJECT_NAME}/databrowser/lrvariabledialog.ui ${PROJECT_NAME}/databrowser/lrvariabledialog.ui
${PROJECT_NAME}/dialogdesigner/templates/Dialog.ui ${PROJECT_NAME}/dialogdesigner/templates/Dialog.ui
${PROJECT_NAME}/items/lrborderframeeditor.ui
${PROJECT_NAME}/items/lrbordereditor.ui
${PROJECT_NAME}/items/lrchartitemeditor.ui ${PROJECT_NAME}/items/lrchartitemeditor.ui
${PROJECT_NAME}/items/lrchartaxiseditor.ui
${PROJECT_NAME}/items/lrimageitemeditor.ui ${PROJECT_NAME}/items/lrimageitemeditor.ui
${PROJECT_NAME}/items/lrpageeditor.ui
${PROJECT_NAME}/items/lrtextitemeditor.ui ${PROJECT_NAME}/items/lrtextitemeditor.ui
${PROJECT_NAME}/lraboutdialog.ui ${PROJECT_NAME}/lraboutdialog.ui
${PROJECT_NAME}/lrpreviewreportwidget.ui ${PROJECT_NAME}/lrpreviewreportwidget.ui
@ -340,13 +358,16 @@ set(GLOBAL_HEADERS
${CMAKE_CURRENT_BINARY_DIR}/config.h ${CMAKE_CURRENT_BINARY_DIR}/config.h
) )
set(PROJECT_NAME ${PROJECT_NAME}-qt${QT_VERSION_MAJOR})
if (LIMEREPORT_STATIC) if (LIMEREPORT_STATIC)
message(STATUS "STATIC LIBRARY") message(STATUS "STATIC LIBRARY")
add_library(${PROJECT_NAME} STATIC ${EXTRA_FILES} ${LIMEREPORT_SOURCES}) add_library(${PROJECT_NAME} STATIC ${EXTRA_FILES} ${LIMEREPORT_SOURCES})
target_compile_definitions( ${PROJECT_NAME} PUBLIC -DHAVE_STATIC_BUILD) target_compile_definitions( ${PROJECT_NAME} PUBLIC -DHAVE_STATIC_BUILD)
else() else()
add_library(${PROJECT_NAME} SHARED ${EXTRA_FILES} ${LIMEREPORT_SOURCES}) add_library(${PROJECT_NAME} SHARED ${EXTRA_FILES} ${LIMEREPORT_SOURCES})
target_compile_definitions( ${PROJECT_NAME} PUBLIC -DLIMEREPORT_EXPORTS) target_compile_definitions( ${PROJECT_NAME} PRIVATE -DLIMEREPORT_EXPORTS)
target_compile_definitions( ${PROJECT_NAME} INTERFACE -DLIMEREPORT_IMPORTS)
endif() endif()
target_compile_definitions(${PROJECT_NAME} PUBLIC -DCMAKE_CONFIG) target_compile_definitions(${PROJECT_NAME} PUBLIC -DCMAKE_CONFIG)
@ -385,16 +406,16 @@ target_include_directories( ${PROJECT_NAME} PRIVATE
limereport/serializators limereport/serializators
limereport/scripteditor ) limereport/scripteditor )
target_include_directories( ${PROJECT_NAME} INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/include)
list (APPEND GLOBAL_HEADERS ${EXTRA_FILES})
set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "${GLOBAL_HEADERS}")
install(TARGETS install(TARGETS
${PROJECT_NAME} ${PROJECT_NAME}
ARCHIVE DESTINATION lib ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib LIBRARY DESTINATION lib
RUNTIME DESTINATION bin) RUNTIME DESTINATION bin
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/limereport)
install(FILES
${EXTRA_FILES}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}")
install(FILES
${GLOBAL_HEADERS}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}")

View File

@ -1,5 +1,5 @@
# LimeReport v1.5.87 [![Build Status](https://app.travis-ci.com/fralx/LimeReport.svg?branch=master)](https://app.travis-ci.com/fralx/LimeReport) [![Build status](https://ci.appveyor.com/api/projects/status/wna5429pix7ilcmo/branch/master?svg=true)](https://ci.appveyor.com/project/fralx/limereport/branch/master) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/bc31412ea4814f30825b5ed3723e9a70)](https://app.codacy.com/app/fralx/LimeReport?utm_source=github.com&utm_medium=referral&utm_content=fralx/LimeReport&utm_campaign=Badge_Grade_Dashboard) # LimeReport v1.5.87 [![Build status](https://ci.appveyor.com/api/projects/status/wna5429pix7ilcmo/branch/master?svg=true)](https://ci.appveyor.com/project/fralx/limereport/branch/master) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/bc31412ea4814f30825b5ed3723e9a70)](https://app.codacy.com/app/fralx/LimeReport?utm_source=github.com&utm_medium=referral&utm_content=fralx/LimeReport&utm_campaign=Badge_Grade_Dashboard) ![Cmake Build Status](https://github.com/fralx/limereport/actions/workflows/cmake.yml/badge.svg)
## Official LimeReport web site [http://limereport.ru](http://limereport.ru) ## Official LimeReport web site [http://limereport.ru](http://limereport.ru)
@ -23,8 +23,37 @@
### How to use it ### How to use it
1. Build limereport.pro. It will create a limereport shared library #### QMake
2. In your project connect the limereport library then in source code add:
- Build limereport.pro. It will create a limereport shared library
- In your project connect the limereport library
#### CMake
To use in your application without installation
There are 2 possible ways:
- Use cmake subdirectory in your CMakeLists.txt:
```cmake
add_subdirectory(LimeReport)
target_link_libraries(myapp PRIVATE limereport-qt${QT_VERSION_MAJOR})
```
- Use cmake FetchContent in your CMakeLists.txt:
```cmake
include(FetchContent)
FetchContent_Declare(
LimeReport
GIT_REPOSITORY https://github.com/fralx/LimeReport.git
GIT_TAG sha-of-the-commit
)
FetchContent_MakeAvailable(LimeReport)
target_link_libraries(myapp PRIVATE limereport-qt${QT_VERSION_MAJOR})
```
- Then in source code add:
```cpp ```cpp
#include "lrreportengine.h" to add report engine #include "lrreportengine.h" to add report engine

View File

@ -141,7 +141,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc
LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MAJOR = 1
LIMEREPORT_VERSION_MINOR = 6 LIMEREPORT_VERSION_MINOR = 6
LIMEREPORT_VERSION_RELEASE = 0 LIMEREPORT_VERSION_RELEASE = 8
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}\\\"

8
demo_r1/.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<module classpath="CMake" type="CPP_MODULE" version="4" />

4
demo_r1/.idea/misc.xml Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
</project>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/demo_r1.iml" filepath="$PROJECT_DIR$/.idea/demo_r1.iml" />
</modules>
</component>
</project>

6
demo_r1/.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>

View File

@ -1,3 +1,5 @@
project(demo_r1)
set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON) set(CMAKE_AUTORCC ON)
@ -9,15 +11,14 @@ set(PROJECT_SOURCES
mainwindow.ui mainwindow.ui
) )
add_executable(demo_r1 main.cpp ${PROJECT_SOURCES}) add_executable(${PROJECT_NAME} main.cpp ${PROJECT_SOURCES})
target_include_directories( demo_r1 PRIVATE ../include/ ) target_link_libraries(${PROJECT_NAME} PRIVATE
target_link_libraries(demo_r1 PRIVATE
Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Widgets
Qt${QT_VERSION_MAJOR}::PrintSupport Qt${QT_VERSION_MAJOR}::PrintSupport
Qt${QT_VERSION_MAJOR}::Qml Qt${QT_VERSION_MAJOR}::Qml
Qt${QT_VERSION_MAJOR}::Sql Qt${QT_VERSION_MAJOR}::Sql
${PROJECT_NAME} limereport-qt${QT_VERSION_MAJOR}
) )

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,492 @@
<?xml version="1.0" encoding="UTF8"?>
<Report>
<object ClassName="LimeReport::ReportEnginePrivate" Type="Object">
<objectName Type="QString"></objectName>
<pages Type="Collection">
<item ClassName="LimeReport::PageDesignIntf" Type="Object">
<objectName Type="QString">page1</objectName>
<sceneRect y="-50" Type="QRect" x="-50" width="2200" height="3075"/>
<bspTreeDepth Value="5" Type="int"/>
<font weight="50" italic="0" underline="0" Type="QFont" family="MS Shell Dlg 2" pointSize="8"/>
<sortCacheEnabled Value="0" Type="bool"/>
<stickyFocus Value="0" Type="bool"/>
<minimumRenderSize Value="0" Type="qreal"/>
<focusOnTouch Value="1" Type="bool"/>
<pageItem ClassName="PageItem" Type="Object">
<objectName Type="QString">Reportpage1</objectName>
<geometry y="0" Type="QRect" x="0" width="2100" height="2970"/>
<children Type="Collection">
<item ClassName="Data" Type="Object">
<objectName Type="QString">DataBand1</objectName>
<geometry y="184" Type="QRect" x="50" width="2000" height="100"/>
<children Type="Collection">
<item ClassName="HLayout" Type="Object">
<objectName Type="QString">HorizontalLayout9</objectName>
<geometry y="26" Type="QRect" x="46" width="644" height="50"/>
<children Type="Collection">
<item ClassName="TextItem" Type="Object">
<objectName Type="QString">TextItem3</objectName>
<geometry y="0" Type="QRect" x="0" width="200" height="50"/>
<children Type="Collection"/>
<zOrder Value="-1" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">HorizontalLayout9</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<itemLocation Value="0" Type="enumAndFlags"/>
<stretchToMaxHeight Value="0" Type="bool"/>
<itemAlign Value="4" Type="enumAndFlags"/>
<content Type="QString">$S{if (!datasources.get("d1")) $D{d1.1}; else ""}</content>
<margin Value="4" Type="int"/>
<alignment Value="36" Type="enumAndFlags"/>
<autoWidth Value="0" Type="enumAndFlags"/>
<autoHeight Value="0" Type="bool"/>
<font weight="50" italic="0" underline="0" Type="QFont" family="Arial" pointSize="10"/>
<backgroundOpacity Value="100" Type="int"/>
<backgroundMode Value="1" Type="enumAndFlags"/>
<backgroundColor Value="#ffffff" Type="QColor"/>
<fontColor Value="#000000" Type="QColor"/>
<angle Value="0" Type="enumAndFlags"/>
<foregroundOpacity Value="100" Type="int"/>
<underlines Value="0" Type="bool"/>
<adaptFontToSize Value="0" Type="bool"/>
<trimValue Value="1" Type="bool"/>
<lineSpacing Value="1" Type="int"/>
<underlineLineSize Value="1" Type="int"/>
<allowHTML Value="0" Type="bool"/>
<allowHTMLInFields Value="0" Type="bool"/>
<format Type="QString"></format>
<valueType Value="0" Type="enumAndFlags"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<textIndent Value="0" Type="qreal"/>
<textLayoutDirection Value="2" Type="enumAndFlags"/>
<fillInSecondPass Value="0" Type="bool"/>
<watermark Value="0" Type="bool"/>
<replaceCRwithBR Value="0" Type="bool"/>
<hideIfEmpty Value="0" Type="bool"/>
<fontLetterSpacing Value="0" Type="int"/>
</item>
<item ClassName="TextItem" Type="Object">
<objectName Type="QString">TextItem4</objectName>
<geometry y="0" Type="QRect" x="200" width="244" height="50"/>
<children Type="Collection"/>
<zOrder Value="-1" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">HorizontalLayout9</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<itemLocation Value="0" Type="enumAndFlags"/>
<stretchToMaxHeight Value="0" Type="bool"/>
<itemAlign Value="4" Type="enumAndFlags"/>
<content Type="QString">$S{if (!datasources.get("d2")) $D{d2.1}; else ""}</content>
<margin Value="4" Type="int"/>
<alignment Value="36" Type="enumAndFlags"/>
<autoWidth Value="0" Type="enumAndFlags"/>
<autoHeight Value="0" Type="bool"/>
<font weight="50" italic="0" underline="0" Type="QFont" family="Arial" pointSize="10"/>
<backgroundOpacity Value="100" Type="int"/>
<backgroundMode Value="1" Type="enumAndFlags"/>
<backgroundColor Value="#ffffff" Type="QColor"/>
<fontColor Value="#000000" Type="QColor"/>
<angle Value="0" Type="enumAndFlags"/>
<foregroundOpacity Value="100" Type="int"/>
<underlines Value="0" Type="bool"/>
<adaptFontToSize Value="0" Type="bool"/>
<trimValue Value="1" Type="bool"/>
<lineSpacing Value="1" Type="int"/>
<underlineLineSize Value="1" Type="int"/>
<allowHTML Value="0" Type="bool"/>
<allowHTMLInFields Value="0" Type="bool"/>
<format Type="QString"></format>
<valueType Value="0" Type="enumAndFlags"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<textIndent Value="0" Type="qreal"/>
<textLayoutDirection Value="2" Type="enumAndFlags"/>
<fillInSecondPass Value="0" Type="bool"/>
<watermark Value="0" Type="bool"/>
<replaceCRwithBR Value="0" Type="bool"/>
<hideIfEmpty Value="0" Type="bool"/>
<fontLetterSpacing Value="0" Type="int"/>
</item>
<item ClassName="TextItem" Type="Object">
<objectName Type="QString">TextItem5</objectName>
<geometry y="0" Type="QRect" x="444" width="200" height="50"/>
<children Type="Collection"/>
<zOrder Value="-1" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">HorizontalLayout9</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<itemLocation Value="0" Type="enumAndFlags"/>
<stretchToMaxHeight Value="0" Type="bool"/>
<itemAlign Value="4" Type="enumAndFlags"/>
<content Type="QString">$S{if (!datasources.get("d3")) $D{d3.1}; else ""}</content>
<margin Value="4" Type="int"/>
<alignment Value="36" Type="enumAndFlags"/>
<autoWidth Value="0" Type="enumAndFlags"/>
<autoHeight Value="0" Type="bool"/>
<font weight="50" italic="0" underline="0" Type="QFont" family="Arial" pointSize="10"/>
<backgroundOpacity Value="100" Type="int"/>
<backgroundMode Value="1" Type="enumAndFlags"/>
<backgroundColor Value="#ffffff" Type="QColor"/>
<fontColor Value="#000000" Type="QColor"/>
<angle Value="0" Type="enumAndFlags"/>
<foregroundOpacity Value="100" Type="int"/>
<underlines Value="0" Type="bool"/>
<adaptFontToSize Value="0" Type="bool"/>
<trimValue Value="1" Type="bool"/>
<lineSpacing Value="1" Type="int"/>
<underlineLineSize Value="1" Type="int"/>
<allowHTML Value="0" Type="bool"/>
<allowHTMLInFields Value="0" Type="bool"/>
<format Type="QString"></format>
<valueType Value="0" Type="enumAndFlags"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<textIndent Value="0" Type="qreal"/>
<textLayoutDirection Value="2" Type="enumAndFlags"/>
<fillInSecondPass Value="0" Type="bool"/>
<watermark Value="0" Type="bool"/>
<replaceCRwithBR Value="0" Type="bool"/>
<hideIfEmpty Value="0" Type="bool"/>
<fontLetterSpacing Value="0" Type="int"/>
</item>
</children>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">DataBand1</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<itemLocation Value="0" Type="enumAndFlags"/>
<stretchToMaxHeight Value="0" Type="bool"/>
<itemAlign Value="4" Type="enumAndFlags"/>
<hideEmptyItems Value="0" Type="bool"/>
<layoutSpacing Value="0" Type="int"/>
<layoutType Value="0" Type="enumAndFlags"/>
</item>
</children>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">Reportpage1</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<autoHeight Value="1" Type="bool"/>
<bandIndex Value="2" Type="int"/>
<keepBottomSpace Value="0" Type="bool"/>
<keepTopSpace Value="1" Type="bool"/>
<parentBand Type="QString"></parentBand>
<backgroundColor Value="#ffffff" Type="QColor"/>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<printIfEmpty Value="0" Type="bool"/>
<backgroundMode Value="0" Type="enumAndFlags"/>
<backgroundOpacity Value="100" Type="int"/>
<shiftItems Value="0" Type="int"/>
<datasource Type="QString">d3</datasource>
<keepSubdetailTogether Value="0" Type="bool"/>
<splittable Value="0" Type="bool"/>
<keepFooterTogether Value="0" Type="bool"/>
<sliceLastRow Value="0" Type="bool"/>
<columnsCount Value="1" Type="int"/>
<columnsFillDirection Value="0" Type="enumAndFlags"/>
<startNewPage Value="0" Type="bool"/>
<startFromNewPage Value="0" Type="bool"/>
<alternateBackgroundColor Value="#ffffff" Type="QColor"/>
<useAlternateBackgroundColor Value="0" Type="bool"/>
</item>
<item ClassName="DataHeader" Type="Object">
<objectName Type="QString">DataHeaderBand5</objectName>
<geometry y="50" Type="QRect" x="50" width="2000" height="134"/>
<children Type="Collection">
<item ClassName="HLayout" Type="Object">
<objectName Type="QString">HorizontalLayout8</objectName>
<geometry y="28" Type="QRect" x="44" width="644" height="82"/>
<children Type="Collection">
<item ClassName="TextItem" Type="Object">
<objectName Type="QString">TextItem6</objectName>
<geometry y="0" Type="QRect" x="0" width="200" height="82"/>
<children Type="Collection"/>
<zOrder Value="-1" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">HorizontalLayout8</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<itemLocation Value="0" Type="enumAndFlags"/>
<stretchToMaxHeight Value="0" Type="bool"/>
<itemAlign Value="4" Type="enumAndFlags"/>
<content Type="QString">Datasource "d1"</content>
<margin Value="4" Type="int"/>
<alignment Value="36" Type="enumAndFlags"/>
<autoWidth Value="0" Type="enumAndFlags"/>
<autoHeight Value="0" Type="bool"/>
<font weight="50" italic="0" underline="0" Type="QFont" family="Arial" pointSize="10"/>
<backgroundOpacity Value="100" Type="int"/>
<backgroundMode Value="1" Type="enumAndFlags"/>
<backgroundColor Value="#ffffff" Type="QColor"/>
<fontColor Value="#000000" Type="QColor"/>
<angle Value="0" Type="enumAndFlags"/>
<foregroundOpacity Value="100" Type="int"/>
<underlines Value="0" Type="bool"/>
<adaptFontToSize Value="0" Type="bool"/>
<trimValue Value="1" Type="bool"/>
<lineSpacing Value="1" Type="int"/>
<underlineLineSize Value="1" Type="int"/>
<allowHTML Value="0" Type="bool"/>
<allowHTMLInFields Value="0" Type="bool"/>
<format Type="QString"></format>
<valueType Value="0" Type="enumAndFlags"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<textIndent Value="0" Type="qreal"/>
<textLayoutDirection Value="2" Type="enumAndFlags"/>
<fillInSecondPass Value="0" Type="bool"/>
<watermark Value="0" Type="bool"/>
<replaceCRwithBR Value="0" Type="bool"/>
<hideIfEmpty Value="0" Type="bool"/>
<fontLetterSpacing Value="0" Type="int"/>
</item>
<item ClassName="TextItem" Type="Object">
<objectName Type="QString">TextItem7</objectName>
<geometry y="0" Type="QRect" x="200" width="244" height="82"/>
<children Type="Collection"/>
<zOrder Value="-1" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">HorizontalLayout8</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<itemLocation Value="0" Type="enumAndFlags"/>
<stretchToMaxHeight Value="0" Type="bool"/>
<itemAlign Value="4" Type="enumAndFlags"/>
<content Type="QString">Datasource "d2"</content>
<margin Value="4" Type="int"/>
<alignment Value="36" Type="enumAndFlags"/>
<autoWidth Value="0" Type="enumAndFlags"/>
<autoHeight Value="0" Type="bool"/>
<font weight="50" italic="0" underline="0" Type="QFont" family="Arial" pointSize="10"/>
<backgroundOpacity Value="100" Type="int"/>
<backgroundMode Value="1" Type="enumAndFlags"/>
<backgroundColor Value="#ffffff" Type="QColor"/>
<fontColor Value="#000000" Type="QColor"/>
<angle Value="0" Type="enumAndFlags"/>
<foregroundOpacity Value="100" Type="int"/>
<underlines Value="0" Type="bool"/>
<adaptFontToSize Value="0" Type="bool"/>
<trimValue Value="1" Type="bool"/>
<lineSpacing Value="1" Type="int"/>
<underlineLineSize Value="1" Type="int"/>
<allowHTML Value="0" Type="bool"/>
<allowHTMLInFields Value="0" Type="bool"/>
<format Type="QString"></format>
<valueType Value="0" Type="enumAndFlags"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<textIndent Value="0" Type="qreal"/>
<textLayoutDirection Value="2" Type="enumAndFlags"/>
<fillInSecondPass Value="0" Type="bool"/>
<watermark Value="0" Type="bool"/>
<replaceCRwithBR Value="0" Type="bool"/>
<hideIfEmpty Value="0" Type="bool"/>
<fontLetterSpacing Value="0" Type="int"/>
</item>
<item ClassName="TextItem" Type="Object">
<objectName Type="QString">TextItem8</objectName>
<geometry y="0" Type="QRect" x="444" width="200" height="82"/>
<children Type="Collection"/>
<zOrder Value="-1" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">HorizontalLayout8</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<itemLocation Value="0" Type="enumAndFlags"/>
<stretchToMaxHeight Value="0" Type="bool"/>
<itemAlign Value="4" Type="enumAndFlags"/>
<content Type="QString">Datasource "d3"</content>
<margin Value="4" Type="int"/>
<alignment Value="36" Type="enumAndFlags"/>
<autoWidth Value="0" Type="enumAndFlags"/>
<autoHeight Value="0" Type="bool"/>
<font weight="50" italic="0" underline="0" Type="QFont" family="Arial" pointSize="10"/>
<backgroundOpacity Value="100" Type="int"/>
<backgroundMode Value="1" Type="enumAndFlags"/>
<backgroundColor Value="#ffffff" Type="QColor"/>
<fontColor Value="#000000" Type="QColor"/>
<angle Value="0" Type="enumAndFlags"/>
<foregroundOpacity Value="100" Type="int"/>
<underlines Value="0" Type="bool"/>
<adaptFontToSize Value="0" Type="bool"/>
<trimValue Value="1" Type="bool"/>
<lineSpacing Value="1" Type="int"/>
<underlineLineSize Value="1" Type="int"/>
<allowHTML Value="0" Type="bool"/>
<allowHTMLInFields Value="0" Type="bool"/>
<format Type="QString"></format>
<valueType Value="0" Type="enumAndFlags"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<textIndent Value="0" Type="qreal"/>
<textLayoutDirection Value="2" Type="enumAndFlags"/>
<fillInSecondPass Value="0" Type="bool"/>
<watermark Value="0" Type="bool"/>
<replaceCRwithBR Value="0" Type="bool"/>
<hideIfEmpty Value="0" Type="bool"/>
<fontLetterSpacing Value="0" Type="int"/>
</item>
</children>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">DataHeaderBand5</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<itemLocation Value="0" Type="enumAndFlags"/>
<stretchToMaxHeight Value="0" Type="bool"/>
<itemAlign Value="4" Type="enumAndFlags"/>
<hideEmptyItems Value="0" Type="bool"/>
<layoutSpacing Value="0" Type="int"/>
<layoutType Value="0" Type="enumAndFlags"/>
</item>
</children>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">Reportpage1</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<autoHeight Value="1" Type="bool"/>
<bandIndex Value="1" Type="int"/>
<keepBottomSpace Value="0" Type="bool"/>
<keepTopSpace Value="1" Type="bool"/>
<parentBand Type="QString">DataBand1</parentBand>
<backgroundColor Value="#ffffff" Type="QColor"/>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<printIfEmpty Value="0" Type="bool"/>
<backgroundMode Value="0" Type="enumAndFlags"/>
<backgroundOpacity Value="100" Type="int"/>
<shiftItems Value="0" Type="int"/>
<reprintOnEachPage Value="0" Type="bool"/>
<columnsCount Value="1" Type="int"/>
<columnsFillDirection Value="0" Type="enumAndFlags"/>
<printAlways Value="0" Type="bool"/>
<repeatOnEachRow Value="0" Type="bool"/>
</item>
</children>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString"></parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<topMargin Value="5" Type="int"/>
<bottomMargin Value="5" Type="int"/>
<rightMargin Value="5" Type="int"/>
<leftMargin Value="5" Type="int"/>
<pageOrientation Value="0" Type="enumAndFlags"/>
<pageSize Value="0" Type="enumAndFlags"/>
<gridStep Value="1" Type="int"/>
<fullPage Value="0" Type="bool"/>
<oldPrintMode Value="0" Type="bool"/>
<resetPageNumber Value="0" Type="bool"/>
<isExtendedInDesignMode Value="0" Type="bool"/>
<extendedHeight Value="1000" Type="int"/>
<pageIsTOC Value="0" Type="bool"/>
<setPageSizeToPrinter Value="0" Type="bool"/>
<endlessHeight Value="0" Type="bool"/>
<printable Value="1" Type="bool"/>
<printerName Type="QString"></printerName>
<units Value="0" Type="enumAndFlags"/>
<printBehavior Value="1" Type="enumAndFlags"/>
<dropPrinterMargins Value="0" Type="bool"/>
<notPrintIfEmpty Value="0" Type="bool"/>
<mixWithPriorPage Value="0" Type="bool"/>
</pageItem>
</item>
</pages>
<datasourcesManager ClassName="LimeReport::DataSourceManager" Type="Object">
<objectName Type="QString">datasources</objectName>
<connections Type="Collection"/>
<queries Type="Collection"/>
<subqueries Type="Collection"/>
<subproxies Type="Collection"/>
<variables Type="Collection">
<item ClassName="LimeReport::VarDesc" Type="Object">
<objectName Type="QString"></objectName>
<name Type="QString">base_ds</name>
<value Type="QString">d2</value>
<isMandatory Value="0" Type="bool"/>
<dataType Value="0" Type="int"/>
</item>
</variables>
<csvs Type="Collection">
<item ClassName="LimeReport::CSVDesc" Type="Object">
<objectName Type="QString"></objectName>
<name Type="QString">d1</name>
<csvText Type="QString">1;2
2;4</csvText>
<separator Type="QString">;</separator>
<firstRowIsHeader Value="0" Type="bool"/>
</item>
<item ClassName="LimeReport::CSVDesc" Type="Object">
<objectName Type="QString"></objectName>
<name Type="QString">d3</name>
<csvText Type="QString">4;4
5;8
1;9</csvText>
<separator Type="QString">;</separator>
<firstRowIsHeader Value="0" Type="bool"/>
</item>
<item ClassName="LimeReport::CSVDesc" Type="Object">
<objectName Type="QString"></objectName>
<name Type="QString">d2</name>
<csvText Type="QString">3;5
2;8
4;1
6;8</csvText>
<separator Type="QString">;</separator>
<firstRowIsHeader Value="0" Type="bool"/>
</item>
</csvs>
</datasourcesManager>
<scriptContext ClassName="LimeReport::ScriptEngineContext" Type="Object">
<objectName Type="QString"></objectName>
<dialogs Type="Collection"/>
<initScript Type="QString">Reportpage1_DataBand1.afterRender.connect(AF)
Reportpage1_DataBand1.datasource = getVariable("base_ds")
var ds_names = ["d1","d2","d3"]
var datasources = new Map()
for (name of ds_names){ datasources.set(name, false) }
function AF(){
for (ds of datasources){
if (ds[0] !== getVariable("base_ds")){
DatasourceFunctions.next(ds[0])
datasources.set(ds[0], DatasourceFunctions.isEOF(ds[0]))
}
}
}</initScript>
</scriptContext>
<suppressFieldAndVarError Value="0" Type="bool"/>
<translation Type="Translation"/>
</object>
</Report>

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -0,0 +1,617 @@
<?xml version="1.0" encoding="UTF8"?>
<Report>
<object Type="Object" ClassName="LimeReport::ReportEnginePrivate">
<objectName Type="QString"></objectName>
<pages Type="Collection">
<item Type="Object" ClassName="LimeReport::PageDesignIntf">
<objectName Type="QString">page1</objectName>
<itemIndexMethod Type="enumAndFlags" Value="0"/>
<sceneRect Type="QRect" x="-50" y="-50" width="2200" height="3075"/>
<bspTreeDepth Type="int" Value="5"/>
<font Type="QFont" weight="50" pointSize="8" italic="0" family="MS Shell Dlg 2" underline="0"/>
<sortCacheEnabled Type="bool" Value="0"/>
<stickyFocus Type="bool" Value="0"/>
<minimumRenderSize Type="qreal" Value="0"/>
<focusOnTouch Type="bool" Value="1"/>
<pageItem Type="Object" ClassName="PageItem">
<objectName Type="QString">Reportpage1</objectName>
<geometry Type="QRect" x="0" y="0" width="2100" height="2970"/>
<children Type="Collection">
<item Type="Object" ClassName="Data">
<objectName Type="QString">DataBand1</objectName>
<geometry Type="QRect" x="50" y="210" width="2000" height="60"/>
<children Type="Collection">
<item Type="Object" ClassName="TextItem">
<objectName Type="QString">TextItem1</objectName>
<geometry Type="QRect" x="730" y="0" width="200" height="50"/>
<children Type="Collection"/>
<zOrder Type="qreal" Value="-1"/>
<borders Type="enumAndFlags" Value="15"/>
<parentName Type="QString">DataBand1</parentName>
<borderLineSize Type="int" Value="1"/>
<isVisible Type="bool" Value="1"/>
<borderColor Type="QColor" Value="#000000"/>
<geometryLocked Type="bool" Value="0"/>
<itemLocation Type="enumAndFlags" Value="0"/>
<stretchToMaxHeight Type="bool" Value="0"/>
<itemAlign Type="enumAndFlags" Value="4"/>
<content Type="QString">$D{test.first}</content>
<margin Type="int" Value="4"/>
<alignment Type="enumAndFlags" Value="33"/>
<autoWidth Type="enumAndFlags" Value="0"/>
<autoHeight Type="bool" Value="0"/>
<font Type="QFont" weight="50" pointSize="10" italic="0" family="Arial" underline="0"/>
<backgroundOpacity Type="int" Value="100"/>
<backgroundMode Type="enumAndFlags" Value="1"/>
<backgroundColor Type="QColor" Value="#ffffff"/>
<fontColor Type="QColor" Value="#000000"/>
<angle Type="enumAndFlags" Value="0"/>
<foregroundOpacity Type="int" Value="100"/>
<underlines Type="bool" Value="0"/>
<adaptFontToSize Type="bool" Value="1"/>
<trimValue Type="bool" Value="1"/>
<lineSpacing Type="int" Value="1"/>
<underlineLineSize Type="int" Value="1"/>
<allowHTML Type="bool" Value="0"/>
<allowHTMLInFields Type="bool" Value="0"/>
<format Type="QString"></format>
<valueType Type="enumAndFlags" Value="0"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Type="enumAndFlags" Value="1"/>
<textIndent Type="qreal" Value="0"/>
<textLayoutDirection Type="enumAndFlags" Value="2"/>
<fillInSecondPass Type="bool" Value="0"/>
<watermark Type="bool" Value="0"/>
<replaceCRwithBR Type="bool" Value="0"/>
<hideIfEmpty Type="bool" Value="0"/>
<fontLetterSpacing Type="int" Value="0"/>
</item>
<item Type="Object" ClassName="TextItem">
<objectName Type="QString">TextItem4</objectName>
<geometry Type="QRect" x="1130" y="0" width="200" height="50"/>
<children Type="Collection"/>
<zOrder Type="qreal" Value="-1"/>
<borders Type="enumAndFlags" Value="15"/>
<parentName Type="QString">DataBand1</parentName>
<borderLineSize Type="int" Value="1"/>
<isVisible Type="bool" Value="1"/>
<borderColor Type="QColor" Value="#000000"/>
<geometryLocked Type="bool" Value="0"/>
<itemLocation Type="enumAndFlags" Value="0"/>
<stretchToMaxHeight Type="bool" Value="0"/>
<itemAlign Type="enumAndFlags" Value="4"/>
<content Type="QString">$D{test.summ}</content>
<margin Type="int" Value="4"/>
<alignment Type="enumAndFlags" Value="33"/>
<autoWidth Type="enumAndFlags" Value="0"/>
<autoHeight Type="bool" Value="0"/>
<font Type="QFont" weight="50" pointSize="10" italic="0" family="Arial" underline="0"/>
<backgroundOpacity Type="int" Value="100"/>
<backgroundMode Type="enumAndFlags" Value="1"/>
<backgroundColor Type="QColor" Value="#ffffff"/>
<fontColor Type="QColor" Value="#000000"/>
<angle Type="enumAndFlags" Value="0"/>
<foregroundOpacity Type="int" Value="100"/>
<underlines Type="bool" Value="0"/>
<adaptFontToSize Type="bool" Value="1"/>
<trimValue Type="bool" Value="1"/>
<lineSpacing Type="int" Value="1"/>
<underlineLineSize Type="int" Value="1"/>
<allowHTML Type="bool" Value="0"/>
<allowHTMLInFields Type="bool" Value="0"/>
<format Type="QString"></format>
<valueType Type="enumAndFlags" Value="0"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Type="enumAndFlags" Value="1"/>
<textIndent Type="qreal" Value="0"/>
<textLayoutDirection Type="enumAndFlags" Value="2"/>
<fillInSecondPass Type="bool" Value="0"/>
<watermark Type="bool" Value="0"/>
<replaceCRwithBR Type="bool" Value="0"/>
<hideIfEmpty Type="bool" Value="0"/>
<fontLetterSpacing Type="int" Value="0"/>
</item>
<item Type="Object" ClassName="TextItem">
<objectName Type="QString">TextItem2</objectName>
<geometry Type="QRect" x="930" y="0" width="200" height="50"/>
<children Type="Collection"/>
<zOrder Type="qreal" Value="-1"/>
<borders Type="enumAndFlags" Value="15"/>
<parentName Type="QString">DataBand1</parentName>
<borderLineSize Type="int" Value="1"/>
<isVisible Type="bool" Value="1"/>
<borderColor Type="QColor" Value="#000000"/>
<geometryLocked Type="bool" Value="0"/>
<itemLocation Type="enumAndFlags" Value="0"/>
<stretchToMaxHeight Type="bool" Value="0"/>
<itemAlign Type="enumAndFlags" Value="4"/>
<content Type="QString">$D{test.sec}</content>
<margin Type="int" Value="4"/>
<alignment Type="enumAndFlags" Value="33"/>
<autoWidth Type="enumAndFlags" Value="0"/>
<autoHeight Type="bool" Value="0"/>
<font Type="QFont" weight="50" pointSize="10" italic="0" family="Arial" underline="0"/>
<backgroundOpacity Type="int" Value="100"/>
<backgroundMode Type="enumAndFlags" Value="1"/>
<backgroundColor Type="QColor" Value="#ffffff"/>
<fontColor Type="QColor" Value="#000000"/>
<angle Type="enumAndFlags" Value="0"/>
<foregroundOpacity Type="int" Value="100"/>
<underlines Type="bool" Value="0"/>
<adaptFontToSize Type="bool" Value="1"/>
<trimValue Type="bool" Value="1"/>
<lineSpacing Type="int" Value="1"/>
<underlineLineSize Type="int" Value="1"/>
<allowHTML Type="bool" Value="0"/>
<allowHTMLInFields Type="bool" Value="0"/>
<format Type="QString"></format>
<valueType Type="enumAndFlags" Value="0"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Type="enumAndFlags" Value="1"/>
<textIndent Type="qreal" Value="0"/>
<textLayoutDirection Type="enumAndFlags" Value="2"/>
<fillInSecondPass Type="bool" Value="0"/>
<watermark Type="bool" Value="0"/>
<replaceCRwithBR Type="bool" Value="0"/>
<hideIfEmpty Type="bool" Value="0"/>
<fontLetterSpacing Type="int" Value="0"/>
</item>
</children>
<zOrder Type="qreal" Value="0"/>
<borders Type="enumAndFlags" Value="0"/>
<parentName Type="QString">Reportpage1</parentName>
<borderLineSize Type="int" Value="1"/>
<isVisible Type="bool" Value="1"/>
<borderColor Type="QColor" Value="#000000"/>
<geometryLocked Type="bool" Value="0"/>
<autoHeight Type="bool" Value="1"/>
<bandIndex Type="int" Value="6"/>
<keepBottomSpace Type="bool" Value="0"/>
<keepTopSpace Type="bool" Value="1"/>
<parentBand Type="QString"></parentBand>
<backgroundColor Type="QColor" Value="#ffffff"/>
<backgroundBrushStyle Type="enumAndFlags" Value="1"/>
<printIfEmpty Type="bool" Value="0"/>
<backgroundMode Type="enumAndFlags" Value="0"/>
<backgroundOpacity Type="int" Value="100"/>
<shiftItems Type="int" Value="0"/>
<datasource Type="QString">test</datasource>
<keepSubdetailTogether Type="bool" Value="0"/>
<splittable Type="bool" Value="0"/>
<keepFooterTogether Type="bool" Value="0"/>
<sliceLastRow Type="bool" Value="0"/>
<columnsCount Type="int" Value="1"/>
<columnsFillDirection Type="enumAndFlags" Value="0"/>
<startNewPage Type="bool" Value="0"/>
<startFromNewPage Type="bool" Value="0"/>
<alternateBackgroundColor Type="QColor" Value="#ffffff"/>
<useAlternateBackgroundColor Type="bool" Value="0"/>
</item>
<item Type="Object" ClassName="GroupHeader">
<objectName Type="QString">GroupBandHeader4</objectName>
<geometry Type="QRect" x="50" y="100" width="2000" height="110"/>
<children Type="Collection">
<item Type="Object" ClassName="TextItem">
<objectName Type="QString">TextItem5</objectName>
<geometry Type="QRect" x="730" y="60" width="200" height="50"/>
<children Type="Collection"/>
<zOrder Type="qreal" Value="0"/>
<borders Type="enumAndFlags" Value="0"/>
<parentName Type="QString">GroupBandHeader4</parentName>
<borderLineSize Type="int" Value="1"/>
<isVisible Type="bool" Value="1"/>
<borderColor Type="QColor" Value="#000000"/>
<geometryLocked Type="bool" Value="0"/>
<itemLocation Type="enumAndFlags" Value="0"/>
<stretchToMaxHeight Type="bool" Value="0"/>
<itemAlign Type="enumAndFlags" Value="4"/>
<content Type="QString">Start first $D{test.first}</content>
<margin Type="int" Value="4"/>
<alignment Type="enumAndFlags" Value="33"/>
<autoWidth Type="enumAndFlags" Value="0"/>
<autoHeight Type="bool" Value="0"/>
<font Type="QFont" weight="50" pointSize="10" italic="0" family="Arial" underline="0"/>
<backgroundOpacity Type="int" Value="100"/>
<backgroundMode Type="enumAndFlags" Value="1"/>
<backgroundColor Type="QColor" Value="#ffffff"/>
<fontColor Type="QColor" Value="#000000"/>
<angle Type="enumAndFlags" Value="0"/>
<foregroundOpacity Type="int" Value="100"/>
<underlines Type="bool" Value="0"/>
<adaptFontToSize Type="bool" Value="1"/>
<trimValue Type="bool" Value="1"/>
<lineSpacing Type="int" Value="1"/>
<underlineLineSize Type="int" Value="1"/>
<allowHTML Type="bool" Value="0"/>
<allowHTMLInFields Type="bool" Value="0"/>
<format Type="QString"></format>
<valueType Type="enumAndFlags" Value="0"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Type="enumAndFlags" Value="1"/>
<textIndent Type="qreal" Value="0"/>
<textLayoutDirection Type="enumAndFlags" Value="2"/>
<fillInSecondPass Type="bool" Value="0"/>
<watermark Type="bool" Value="0"/>
<replaceCRwithBR Type="bool" Value="0"/>
<hideIfEmpty Type="bool" Value="0"/>
<fontLetterSpacing Type="int" Value="0"/>
</item>
</children>
<zOrder Type="qreal" Value="0"/>
<borders Type="enumAndFlags" Value="0"/>
<parentName Type="QString">Reportpage1</parentName>
<borderLineSize Type="int" Value="1"/>
<isVisible Type="bool" Value="1"/>
<borderColor Type="QColor" Value="#000000"/>
<geometryLocked Type="bool" Value="0"/>
<autoHeight Type="bool" Value="1"/>
<bandIndex Type="int" Value="3"/>
<keepBottomSpace Type="bool" Value="0"/>
<keepTopSpace Type="bool" Value="1"/>
<parentBand Type="QString">DataBand1</parentBand>
<backgroundColor Type="QColor" Value="#ffffff"/>
<backgroundBrushStyle Type="enumAndFlags" Value="1"/>
<printIfEmpty Type="bool" Value="0"/>
<backgroundMode Type="enumAndFlags" Value="0"/>
<backgroundOpacity Type="int" Value="100"/>
<shiftItems Type="int" Value="0"/>
<groupFieldName Type="QString">first</groupFieldName>
<splittable Type="bool" Value="0"/>
<keepGroupTogether Type="bool" Value="0"/>
<startNewPage Type="bool" Value="0"/>
<resetPageNumber Type="bool" Value="0"/>
<reprintOnEachPage Type="bool" Value="0"/>
<condition Type="QString"></condition>
</item>
<item Type="Object" ClassName="GroupFooter">
<objectName Type="QString">GroupBandFooter4</objectName>
<geometry Type="QRect" x="50" y="270" width="2000" height="60"/>
<children Type="Collection">
<item Type="Object" ClassName="TextItem">
<objectName Type="QString">TextItem62</objectName>
<geometry Type="QRect" x="1130" y="10" width="470" height="50"/>
<children Type="Collection"/>
<zOrder Type="qreal" Value="-1"/>
<borders Type="enumAndFlags" Value="0"/>
<parentName Type="QString">GroupBandFooter4</parentName>
<borderLineSize Type="int" Value="1"/>
<isVisible Type="bool" Value="1"/>
<borderColor Type="QColor" Value="#000000"/>
<geometryLocked Type="bool" Value="0"/>
<itemLocation Type="enumAndFlags" Value="0"/>
<stretchToMaxHeight Type="bool" Value="0"/>
<itemAlign Type="enumAndFlags" Value="4"/>
<content Type="QString">$S{SUM("$D{test.summ}", "DataBand1")}</content>
<margin Type="int" Value="4"/>
<alignment Type="enumAndFlags" Value="33"/>
<autoWidth Type="enumAndFlags" Value="0"/>
<autoHeight Type="bool" Value="0"/>
<font Type="QFont" weight="50" pointSize="10" italic="0" family="Arial" underline="0"/>
<backgroundOpacity Type="int" Value="100"/>
<backgroundMode Type="enumAndFlags" Value="1"/>
<backgroundColor Type="QColor" Value="#ffffff"/>
<fontColor Type="QColor" Value="#000000"/>
<angle Type="enumAndFlags" Value="0"/>
<foregroundOpacity Type="int" Value="100"/>
<underlines Type="bool" Value="0"/>
<adaptFontToSize Type="bool" Value="1"/>
<trimValue Type="bool" Value="1"/>
<lineSpacing Type="int" Value="1"/>
<underlineLineSize Type="int" Value="1"/>
<allowHTML Type="bool" Value="0"/>
<allowHTMLInFields Type="bool" Value="0"/>
<format Type="QString"></format>
<valueType Type="enumAndFlags" Value="0"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Type="enumAndFlags" Value="1"/>
<textIndent Type="qreal" Value="0"/>
<textLayoutDirection Type="enumAndFlags" Value="2"/>
<fillInSecondPass Type="bool" Value="0"/>
<watermark Type="bool" Value="0"/>
<replaceCRwithBR Type="bool" Value="0"/>
<hideIfEmpty Type="bool" Value="0"/>
<fontLetterSpacing Type="int" Value="0"/>
</item>
<item Type="Object" ClassName="TextItem">
<objectName Type="QString">TextItem65</objectName>
<geometry Type="QRect" x="730" y="10" width="200" height="50"/>
<children Type="Collection"/>
<zOrder Type="qreal" Value="-1"/>
<borders Type="enumAndFlags" Value="0"/>
<parentName Type="QString">GroupBandFooter4</parentName>
<borderLineSize Type="int" Value="1"/>
<isVisible Type="bool" Value="1"/>
<borderColor Type="QColor" Value="#000000"/>
<geometryLocked Type="bool" Value="0"/>
<itemLocation Type="enumAndFlags" Value="0"/>
<stretchToMaxHeight Type="bool" Value="0"/>
<itemAlign Type="enumAndFlags" Value="4"/>
<content Type="QString">End first $D{test.first}</content>
<margin Type="int" Value="4"/>
<alignment Type="enumAndFlags" Value="33"/>
<autoWidth Type="enumAndFlags" Value="0"/>
<autoHeight Type="bool" Value="0"/>
<font Type="QFont" weight="50" pointSize="10" italic="0" family="Arial" underline="0"/>
<backgroundOpacity Type="int" Value="100"/>
<backgroundMode Type="enumAndFlags" Value="1"/>
<backgroundColor Type="QColor" Value="#ffffff"/>
<fontColor Type="QColor" Value="#000000"/>
<angle Type="enumAndFlags" Value="0"/>
<foregroundOpacity Type="int" Value="100"/>
<underlines Type="bool" Value="0"/>
<adaptFontToSize Type="bool" Value="1"/>
<trimValue Type="bool" Value="1"/>
<lineSpacing Type="int" Value="1"/>
<underlineLineSize Type="int" Value="1"/>
<allowHTML Type="bool" Value="0"/>
<allowHTMLInFields Type="bool" Value="0"/>
<format Type="QString"></format>
<valueType Type="enumAndFlags" Value="0"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Type="enumAndFlags" Value="1"/>
<textIndent Type="qreal" Value="0"/>
<textLayoutDirection Type="enumAndFlags" Value="2"/>
<fillInSecondPass Type="bool" Value="0"/>
<watermark Type="bool" Value="0"/>
<replaceCRwithBR Type="bool" Value="0"/>
<hideIfEmpty Type="bool" Value="0"/>
<fontLetterSpacing Type="int" Value="0"/>
</item>
</children>
<zOrder Type="qreal" Value="0"/>
<borders Type="enumAndFlags" Value="0"/>
<parentName Type="QString">Reportpage1</parentName>
<borderLineSize Type="int" Value="1"/>
<isVisible Type="bool" Value="1"/>
<borderColor Type="QColor" Value="#000000"/>
<geometryLocked Type="bool" Value="0"/>
<autoHeight Type="bool" Value="1"/>
<bandIndex Type="int" Value="9"/>
<keepBottomSpace Type="bool" Value="0"/>
<keepTopSpace Type="bool" Value="1"/>
<parentBand Type="QString">GroupBandHeader4</parentBand>
<backgroundColor Type="QColor" Value="#ffffff"/>
<backgroundBrushStyle Type="enumAndFlags" Value="1"/>
<printIfEmpty Type="bool" Value="0"/>
<backgroundMode Type="enumAndFlags" Value="0"/>
<backgroundOpacity Type="int" Value="100"/>
<shiftItems Type="int" Value="0"/>
</item>
<item Type="Object" ClassName="DataHeader">
<objectName Type="QString">DataHeaderBand1</objectName>
<geometry Type="QRect" x="50" y="50" width="2000" height="50"/>
<children Type="Collection">
<item Type="Object" ClassName="TextItem">
<objectName Type="QString">TextItem3</objectName>
<geometry Type="QRect" x="930" y="0" width="200" height="50"/>
<children Type="Collection"/>
<zOrder Type="qreal" Value="-1"/>
<borders Type="enumAndFlags" Value="15"/>
<parentName Type="QString">DataHeaderBand1</parentName>
<borderLineSize Type="int" Value="1"/>
<isVisible Type="bool" Value="1"/>
<borderColor Type="QColor" Value="#000000"/>
<geometryLocked Type="bool" Value="0"/>
<itemLocation Type="enumAndFlags" Value="0"/>
<stretchToMaxHeight Type="bool" Value="0"/>
<itemAlign Type="enumAndFlags" Value="4"/>
<content Type="QString">sec</content>
<margin Type="int" Value="4"/>
<alignment Type="enumAndFlags" Value="132"/>
<autoWidth Type="enumAndFlags" Value="0"/>
<autoHeight Type="bool" Value="0"/>
<font Type="QFont" weight="50" pointSize="10" italic="0" family="Arial" underline="0"/>
<backgroundOpacity Type="int" Value="100"/>
<backgroundMode Type="enumAndFlags" Value="1"/>
<backgroundColor Type="QColor" Value="#ffffff"/>
<fontColor Type="QColor" Value="#000000"/>
<angle Type="enumAndFlags" Value="0"/>
<foregroundOpacity Type="int" Value="100"/>
<underlines Type="bool" Value="0"/>
<adaptFontToSize Type="bool" Value="1"/>
<trimValue Type="bool" Value="1"/>
<lineSpacing Type="int" Value="1"/>
<underlineLineSize Type="int" Value="1"/>
<allowHTML Type="bool" Value="0"/>
<allowHTMLInFields Type="bool" Value="0"/>
<format Type="QString"></format>
<valueType Type="enumAndFlags" Value="0"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Type="enumAndFlags" Value="1"/>
<textIndent Type="qreal" Value="0"/>
<textLayoutDirection Type="enumAndFlags" Value="2"/>
<fillInSecondPass Type="bool" Value="0"/>
<watermark Type="bool" Value="0"/>
<replaceCRwithBR Type="bool" Value="0"/>
<hideIfEmpty Type="bool" Value="0"/>
<fontLetterSpacing Type="int" Value="0"/>
</item>
<item Type="Object" ClassName="TextItem">
<objectName Type="QString">TextItem6</objectName>
<geometry Type="QRect" x="1130" y="0" width="200" height="50"/>
<children Type="Collection"/>
<zOrder Type="qreal" Value="-1"/>
<borders Type="enumAndFlags" Value="15"/>
<parentName Type="QString">DataHeaderBand1</parentName>
<borderLineSize Type="int" Value="1"/>
<isVisible Type="bool" Value="1"/>
<borderColor Type="QColor" Value="#000000"/>
<geometryLocked Type="bool" Value="0"/>
<itemLocation Type="enumAndFlags" Value="0"/>
<stretchToMaxHeight Type="bool" Value="0"/>
<itemAlign Type="enumAndFlags" Value="4"/>
<content Type="QString">summ</content>
<margin Type="int" Value="4"/>
<alignment Type="enumAndFlags" Value="132"/>
<autoWidth Type="enumAndFlags" Value="0"/>
<autoHeight Type="bool" Value="0"/>
<font Type="QFont" weight="50" pointSize="10" italic="0" family="Arial" underline="0"/>
<backgroundOpacity Type="int" Value="100"/>
<backgroundMode Type="enumAndFlags" Value="1"/>
<backgroundColor Type="QColor" Value="#ffffff"/>
<fontColor Type="QColor" Value="#000000"/>
<angle Type="enumAndFlags" Value="0"/>
<foregroundOpacity Type="int" Value="100"/>
<underlines Type="bool" Value="0"/>
<adaptFontToSize Type="bool" Value="1"/>
<trimValue Type="bool" Value="1"/>
<lineSpacing Type="int" Value="1"/>
<underlineLineSize Type="int" Value="1"/>
<allowHTML Type="bool" Value="0"/>
<allowHTMLInFields Type="bool" Value="0"/>
<format Type="QString"></format>
<valueType Type="enumAndFlags" Value="0"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Type="enumAndFlags" Value="1"/>
<textIndent Type="qreal" Value="0"/>
<textLayoutDirection Type="enumAndFlags" Value="2"/>
<fillInSecondPass Type="bool" Value="0"/>
<watermark Type="bool" Value="0"/>
<replaceCRwithBR Type="bool" Value="0"/>
<hideIfEmpty Type="bool" Value="0"/>
<fontLetterSpacing Type="int" Value="0"/>
</item>
<item Type="Object" ClassName="TextItem">
<objectName Type="QString">TextItem7</objectName>
<geometry Type="QRect" x="730" y="0" width="200" height="50"/>
<children Type="Collection"/>
<zOrder Type="qreal" Value="-1"/>
<borders Type="enumAndFlags" Value="15"/>
<parentName Type="QString">DataHeaderBand1</parentName>
<borderLineSize Type="int" Value="1"/>
<isVisible Type="bool" Value="1"/>
<borderColor Type="QColor" Value="#000000"/>
<geometryLocked Type="bool" Value="0"/>
<itemLocation Type="enumAndFlags" Value="0"/>
<stretchToMaxHeight Type="bool" Value="0"/>
<itemAlign Type="enumAndFlags" Value="4"/>
<content Type="QString">first</content>
<margin Type="int" Value="4"/>
<alignment Type="enumAndFlags" Value="132"/>
<autoWidth Type="enumAndFlags" Value="0"/>
<autoHeight Type="bool" Value="0"/>
<font Type="QFont" weight="50" pointSize="10" italic="0" family="Arial" underline="0"/>
<backgroundOpacity Type="int" Value="100"/>
<backgroundMode Type="enumAndFlags" Value="1"/>
<backgroundColor Type="QColor" Value="#ffffff"/>
<fontColor Type="QColor" Value="#000000"/>
<angle Type="enumAndFlags" Value="0"/>
<foregroundOpacity Type="int" Value="100"/>
<underlines Type="bool" Value="0"/>
<adaptFontToSize Type="bool" Value="1"/>
<trimValue Type="bool" Value="1"/>
<lineSpacing Type="int" Value="1"/>
<underlineLineSize Type="int" Value="1"/>
<allowHTML Type="bool" Value="0"/>
<allowHTMLInFields Type="bool" Value="0"/>
<format Type="QString"></format>
<valueType Type="enumAndFlags" Value="0"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Type="enumAndFlags" Value="1"/>
<textIndent Type="qreal" Value="0"/>
<textLayoutDirection Type="enumAndFlags" Value="2"/>
<fillInSecondPass Type="bool" Value="0"/>
<watermark Type="bool" Value="0"/>
<replaceCRwithBR Type="bool" Value="0"/>
<hideIfEmpty Type="bool" Value="0"/>
<fontLetterSpacing Type="int" Value="0"/>
</item>
</children>
<zOrder Type="qreal" Value="0"/>
<borders Type="enumAndFlags" Value="0"/>
<parentName Type="QString">Reportpage1</parentName>
<borderLineSize Type="int" Value="1"/>
<isVisible Type="bool" Value="1"/>
<borderColor Type="QColor" Value="#000000"/>
<geometryLocked Type="bool" Value="0"/>
<autoHeight Type="bool" Value="1"/>
<bandIndex Type="int" Value="2"/>
<keepBottomSpace Type="bool" Value="0"/>
<keepTopSpace Type="bool" Value="1"/>
<parentBand Type="QString">DataBand1</parentBand>
<backgroundColor Type="QColor" Value="#ffffff"/>
<backgroundBrushStyle Type="enumAndFlags" Value="1"/>
<printIfEmpty Type="bool" Value="0"/>
<backgroundMode Type="enumAndFlags" Value="0"/>
<backgroundOpacity Type="int" Value="100"/>
<shiftItems Type="int" Value="0"/>
<reprintOnEachPage Type="bool" Value="0"/>
<columnsCount Type="int" Value="1"/>
<columnsFillDirection Type="enumAndFlags" Value="0"/>
<printAlways Type="bool" Value="0"/>
<repeatOnEachRow Type="bool" Value="0"/>
</item>
</children>
<zOrder Type="qreal" Value="0"/>
<borders Type="enumAndFlags" Value="0"/>
<parentName Type="QString"></parentName>
<borderLineSize Type="int" Value="1"/>
<isVisible Type="bool" Value="1"/>
<borderColor Type="QColor" Value="#000000"/>
<geometryLocked Type="bool" Value="0"/>
<topMargin Type="int" Value="5"/>
<bottomMargin Type="int" Value="5"/>
<rightMargin Type="int" Value="5"/>
<leftMargin Type="int" Value="5"/>
<pageOrientation Type="enumAndFlags" Value="0"/>
<pageSize Type="enumAndFlags" Value="0"/>
<gridStep Type="int" Value="10"/>
<fullPage Type="bool" Value="0"/>
<oldPrintMode Type="bool" Value="0"/>
<resetPageNumber Type="bool" Value="0"/>
<isExtendedInDesignMode Type="bool" Value="0"/>
<extendedHeight Type="int" Value="1000"/>
<pageIsTOC Type="bool" Value="0"/>
<setPageSizeToPrinter Type="bool" Value="0"/>
<endlessHeight Type="bool" Value="0"/>
<printable Type="bool" Value="1"/>
<printerName Type="QString"></printerName>
<units Type="enumAndFlags" Value="0"/>
<printBehavior Type="enumAndFlags" Value="1"/>
<dropPrinterMargins Type="bool" Value="0"/>
<notPrintIfEmpty Type="bool" Value="0"/>
<mixWithPriorPage Type="bool" Value="0"/>
</pageItem>
</item>
</pages>
<datasourcesManager Type="Object" ClassName="LimeReport::DataSourceManager">
<objectName Type="QString">datasources</objectName>
<connections Type="Collection">
<item Type="Object" ClassName="LimeReport::ConnectionDesc">
<objectName Type="QString"></objectName>
<name Type="QString">db</name>
<driver Type="QString">QSQLITE</driver>
<databaseName Type="QString">./db.sqlite3</databaseName>
<userName Type="QString"></userName>
<password Type="QString" Value=""/>
<host Type="QString"></host>
<autoconnect Type="bool" Value="0"/>
<keepDBCredentials Type="bool" Value="1"/>
<port Type="QString"></port>
</item>
</connections>
<queries Type="Collection">
<item Type="Object" ClassName="LimeReport::QueryDesc">
<objectName Type="QString"></objectName>
<queryName Type="QString">test</queryName>
<queryText Type="QString">SELECT first, sec, SUM(summ) AS summ
FROM test_table
GROUP BY first, sec
ORDER BY first, sec</queryText>
<connectionName Type="QString">db</connectionName>
</item>
</queries>
<subqueries Type="Collection"/>
<subproxies Type="Collection"/>
<variables Type="Collection"/>
<csvs Type="Collection"/>
</datasourcesManager>
<scriptContext Type="Object" ClassName="LimeReport::ScriptEngineContext">
<objectName Type="QString"></objectName>
<dialogs Type="Collection"/>
<initScript Type="QString"></initScript>
</scriptContext>
<suppressFieldAndVarError Type="bool" Value="0"/>
<translation Type="Translation"/>
</object>
</Report>

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,432 @@
<?xml version="1.0" encoding="UTF8"?>
<Report>
<object Type="Object" ClassName="LimeReport::ReportEnginePrivate">
<objectName Type="QString"></objectName>
<pages Type="Collection">
<item Type="Object" ClassName="LimeReport::PageDesignIntf">
<objectName Type="QString">page1</objectName>
<itemIndexMethod Value="0" Type="enumAndFlags"/>
<sceneRect y="-50" x="-50" Type="QRect" height="3075" width="2200"/>
<bspTreeDepth Value="5" Type="int"/>
<font underline="0" Type="QFont" weight="50" italic="0" pointSize="9" family="SimSun"/>
<sortCacheEnabled Value="0" Type="bool"/>
<stickyFocus Value="0" Type="bool"/>
<minimumRenderSize Value="0" Type="qreal"/>
<focusOnTouch Value="1" Type="bool"/>
<pageItem Type="Object" ClassName="PageItem">
<objectName Type="QString">Reportpage1</objectName>
<geometry y="0" x="0" Type="QRect" height="2970" width="2100"/>
<children Type="Collection">
<item Type="Object" ClassName="PageHeader">
<objectName Type="QString">PageHeader1</objectName>
<geometry y="50" x="50" Type="QRect" height="234" width="2000"/>
<children Type="Collection">
<item Type="Object" ClassName="TextItem">
<objectName Type="QString">TextItem4</objectName>
<geometry y="17" x="541" Type="QRect" height="205" width="361"/>
<children Type="Collection"/>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">PageHeader1</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<itemLocation Value="0" Type="enumAndFlags"/>
<stretchToMaxHeight Value="0" Type="bool"/>
<itemAlign Value="4" Type="enumAndFlags"/>
<content Type="QString">test</content>
<margin Value="4" Type="int"/>
<alignment Value="33" Type="enumAndFlags"/>
<autoWidth Value="0" Type="enumAndFlags"/>
<autoHeight Value="0" Type="bool"/>
<font underline="0" Type="QFont" weight="50" italic="0" pointSize="10" family="宋体"/>
<backgroundOpacity Value="100" Type="int"/>
<backgroundMode Value="1" Type="enumAndFlags"/>
<backgroundColor Value="#ffffff" Type="QColor"/>
<fontColor Value="#000000" Type="QColor"/>
<angle Value="0" Type="enumAndFlags"/>
<foregroundOpacity Value="100" Type="int"/>
<underlines Value="0" Type="bool"/>
<adaptFontToSize Value="0" Type="bool"/>
<trimValue Value="1" Type="bool"/>
<lineSpacing Value="1" Type="int"/>
<underlineLineSize Value="1" Type="int"/>
<allowHTML Value="0" Type="bool"/>
<allowHTMLInFields Value="0" Type="bool"/>
<format Type="QString"></format>
<valueType Value="0" Type="enumAndFlags"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<textIndent Value="0" Type="qreal"/>
<textLayoutDirection Value="2" Type="enumAndFlags"/>
<fillInSecondPass Value="0" Type="bool"/>
<watermark Value="0" Type="bool"/>
<replaceCRwithBR Value="0" Type="bool"/>
<hideIfEmpty Value="0" Type="bool"/>
<fontLetterSpacing Value="0" Type="int"/>
</item>
</children>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">Reportpage1</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<autoHeight Value="1" Type="bool"/>
<bandIndex Value="0" Type="int"/>
<keepBottomSpace Value="0" Type="bool"/>
<keepTopSpace Value="1" Type="bool"/>
<parentBand Type="QString"></parentBand>
<backgroundColor Value="#ffffff" Type="QColor"/>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<printIfEmpty Value="0" Type="bool"/>
<backgroundMode Value="0" Type="enumAndFlags"/>
<backgroundOpacity Value="100" Type="int"/>
<shiftItems Value="0" Type="int"/>
<printOnFirstPage Value="1" Type="bool"/>
<printOnLastPage Value="1" Type="bool"/>
</item>
<item Type="Object" ClassName="Data">
<objectName Type="QString">DataBand1</objectName>
<geometry y="284" x="50" Type="QRect" height="50" width="2000"/>
<children Type="Collection">
<item Type="Object" ClassName="TextItem">
<objectName Type="QString">TextItem1</objectName>
<geometry y="0" x="57" Type="QRect" height="49" width="945"/>
<children Type="Collection"/>
<zOrder Value="0" Type="qreal"/>
<borders Value="15" Type="enumAndFlags"/>
<parentName Type="QString">DataBand1</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="1" Type="bool"/>
<itemLocation Value="0" Type="enumAndFlags"/>
<stretchToMaxHeight Value="0" Type="bool"/>
<itemAlign Value="4" Type="enumAndFlags"/>
<content Type="QString">$D{test.1}</content>
<margin Value="4" Type="int"/>
<alignment Value="33" Type="enumAndFlags"/>
<autoWidth Value="0" Type="enumAndFlags"/>
<autoHeight Value="0" Type="bool"/>
<font underline="0" Type="QFont" weight="50" italic="0" pointSize="10" family="宋体"/>
<backgroundOpacity Value="100" Type="int"/>
<backgroundMode Value="1" Type="enumAndFlags"/>
<backgroundColor Value="#ffffff" Type="QColor"/>
<fontColor Value="#000000" Type="QColor"/>
<angle Value="0" Type="enumAndFlags"/>
<foregroundOpacity Value="100" Type="int"/>
<underlines Value="0" Type="bool"/>
<adaptFontToSize Value="0" Type="bool"/>
<trimValue Value="1" Type="bool"/>
<lineSpacing Value="1" Type="int"/>
<underlineLineSize Value="1" Type="int"/>
<allowHTML Value="0" Type="bool"/>
<allowHTMLInFields Value="0" Type="bool"/>
<format Type="QString"></format>
<valueType Value="0" Type="enumAndFlags"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<textIndent Value="0" Type="qreal"/>
<textLayoutDirection Value="2" Type="enumAndFlags"/>
<fillInSecondPass Value="0" Type="bool"/>
<watermark Value="0" Type="bool"/>
<replaceCRwithBR Value="0" Type="bool"/>
<hideIfEmpty Value="0" Type="bool"/>
<fontLetterSpacing Value="0" Type="int"/>
</item>
</children>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">Reportpage1</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<autoHeight Value="1" Type="bool"/>
<bandIndex Value="1" Type="int"/>
<keepBottomSpace Value="0" Type="bool"/>
<keepTopSpace Value="1" Type="bool"/>
<parentBand Type="QString"></parentBand>
<backgroundColor Value="#ffffff" Type="QColor"/>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<printIfEmpty Value="0" Type="bool"/>
<backgroundMode Value="0" Type="enumAndFlags"/>
<backgroundOpacity Value="100" Type="int"/>
<shiftItems Value="0" Type="int"/>
<datasource Type="QString">test</datasource>
<keepSubdetailTogether Value="0" Type="bool"/>
<splittable Value="0" Type="bool"/>
<keepFooterTogether Value="1" Type="bool"/>
<sliceLastRow Value="0" Type="bool"/>
<columnsCount Value="1" Type="int"/>
<columnsFillDirection Value="0" Type="enumAndFlags"/>
<startNewPage Value="0" Type="bool"/>
<startFromNewPage Value="0" Type="bool"/>
<alternateBackgroundColor Value="#ffffff" Type="QColor"/>
<useAlternateBackgroundColor Value="0" Type="bool"/>
</item>
<item Type="Object" ClassName="PageFooter">
<objectName Type="QString">PageFooter1</objectName>
<geometry y="2819" x="50" Type="QRect" height="100" width="2000"/>
<children Type="Collection">
<item Type="Object" ClassName="TextItem">
<objectName Type="QString">TextItem5</objectName>
<geometry y="9" x="460" Type="QRect" height="75" width="256"/>
<children Type="Collection"/>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">PageFooter1</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<itemLocation Value="0" Type="enumAndFlags"/>
<stretchToMaxHeight Value="0" Type="bool"/>
<itemAlign Value="4" Type="enumAndFlags"/>
<content Type="QString">page footer</content>
<margin Value="4" Type="int"/>
<alignment Value="33" Type="enumAndFlags"/>
<autoWidth Value="0" Type="enumAndFlags"/>
<autoHeight Value="0" Type="bool"/>
<font underline="0" Type="QFont" weight="50" italic="0" pointSize="10" family="宋体"/>
<backgroundOpacity Value="100" Type="int"/>
<backgroundMode Value="1" Type="enumAndFlags"/>
<backgroundColor Value="#ffffff" Type="QColor"/>
<fontColor Value="#000000" Type="QColor"/>
<angle Value="0" Type="enumAndFlags"/>
<foregroundOpacity Value="100" Type="int"/>
<underlines Value="0" Type="bool"/>
<adaptFontToSize Value="0" Type="bool"/>
<trimValue Value="1" Type="bool"/>
<lineSpacing Value="1" Type="int"/>
<underlineLineSize Value="1" Type="int"/>
<allowHTML Value="0" Type="bool"/>
<allowHTMLInFields Value="0" Type="bool"/>
<format Type="QString"></format>
<valueType Value="0" Type="enumAndFlags"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<textIndent Value="0" Type="qreal"/>
<textLayoutDirection Value="2" Type="enumAndFlags"/>
<fillInSecondPass Value="0" Type="bool"/>
<watermark Value="0" Type="bool"/>
<replaceCRwithBR Value="0" Type="bool"/>
<hideIfEmpty Value="0" Type="bool"/>
<fontLetterSpacing Value="0" Type="int"/>
</item>
</children>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">Reportpage1</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<autoHeight Value="0" Type="bool"/>
<bandIndex Value="3" Type="int"/>
<keepBottomSpace Value="0" Type="bool"/>
<keepTopSpace Value="1" Type="bool"/>
<parentBand Type="QString"></parentBand>
<backgroundColor Value="#ffffff" Type="QColor"/>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<printIfEmpty Value="0" Type="bool"/>
<backgroundMode Value="0" Type="enumAndFlags"/>
<backgroundOpacity Value="100" Type="int"/>
<shiftItems Value="0" Type="int"/>
<printOnFirstPage Value="1" Type="bool"/>
<printOnLastPage Value="1" Type="bool"/>
<removeGap Value="0" Type="bool"/>
</item>
<item Type="Object" ClassName="DataFooter">
<objectName Type="QString">DataFooterBand6</objectName>
<geometry y="334" x="50" Type="QRect" height="2485" width="2000"/>
<children Type="Collection">
<item Type="Object" ClassName="TextItem">
<objectName Type="QString">TextItem6</objectName>
<geometry y="1" x="57" Type="QRect" height="2446" width="945"/>
<children Type="Collection"/>
<zOrder Value="0" Type="qreal"/>
<borders Value="14" Type="enumAndFlags"/>
<parentName Type="QString">DataFooterBand6</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="1" Type="bool"/>
<itemLocation Value="0" Type="enumAndFlags"/>
<stretchToMaxHeight Value="0" Type="bool"/>
<itemAlign Value="4" Type="enumAndFlags"/>
<content Type="QString"></content>
<margin Value="4" Type="int"/>
<alignment Value="33" Type="enumAndFlags"/>
<autoWidth Value="0" Type="enumAndFlags"/>
<autoHeight Value="0" Type="bool"/>
<font underline="0" Type="QFont" weight="50" italic="0" pointSize="10" family="宋体"/>
<backgroundOpacity Value="100" Type="int"/>
<backgroundMode Value="1" Type="enumAndFlags"/>
<backgroundColor Value="#ffffff" Type="QColor"/>
<fontColor Value="#000000" Type="QColor"/>
<angle Value="0" Type="enumAndFlags"/>
<foregroundOpacity Value="100" Type="int"/>
<underlines Value="0" Type="bool"/>
<adaptFontToSize Value="0" Type="bool"/>
<trimValue Value="1" Type="bool"/>
<lineSpacing Value="1" Type="int"/>
<underlineLineSize Value="1" Type="int"/>
<allowHTML Value="0" Type="bool"/>
<allowHTMLInFields Value="0" Type="bool"/>
<format Type="QString"></format>
<valueType Value="0" Type="enumAndFlags"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<textIndent Value="0" Type="qreal"/>
<textLayoutDirection Value="2" Type="enumAndFlags"/>
<fillInSecondPass Value="0" Type="bool"/>
<watermark Value="0" Type="bool"/>
<replaceCRwithBR Value="0" Type="bool"/>
<hideIfEmpty Value="0" Type="bool"/>
<fontLetterSpacing Value="0" Type="int"/>
</item>
<item Type="Object" ClassName="TextItem">
<objectName Type="QString">TextItem7</objectName>
<geometry y="20" x="74" Type="QRect" height="86" width="867"/>
<children Type="Collection"/>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">DataFooterBand6</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<itemLocation Value="0" Type="enumAndFlags"/>
<stretchToMaxHeight Value="0" Type="bool"/>
<itemAlign Value="4" Type="enumAndFlags"/>
<content Type="QString">note: follow up the last row in databand</content>
<margin Value="4" Type="int"/>
<alignment Value="33" Type="enumAndFlags"/>
<autoWidth Value="0" Type="enumAndFlags"/>
<autoHeight Value="0" Type="bool"/>
<font underline="0" Type="QFont" weight="50" italic="0" pointSize="10" family="宋体"/>
<backgroundOpacity Value="100" Type="int"/>
<backgroundMode Value="1" Type="enumAndFlags"/>
<backgroundColor Value="#ffffff" Type="QColor"/>
<fontColor Value="#000000" Type="QColor"/>
<angle Value="0" Type="enumAndFlags"/>
<foregroundOpacity Value="100" Type="int"/>
<underlines Value="0" Type="bool"/>
<adaptFontToSize Value="0" Type="bool"/>
<trimValue Value="1" Type="bool"/>
<lineSpacing Value="1" Type="int"/>
<underlineLineSize Value="1" Type="int"/>
<allowHTML Value="0" Type="bool"/>
<allowHTMLInFields Value="0" Type="bool"/>
<format Type="QString"></format>
<valueType Value="0" Type="enumAndFlags"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<textIndent Value="0" Type="qreal"/>
<textLayoutDirection Value="2" Type="enumAndFlags"/>
<fillInSecondPass Value="0" Type="bool"/>
<watermark Value="0" Type="bool"/>
<replaceCRwithBR Value="0" Type="bool"/>
<hideIfEmpty Value="0" Type="bool"/>
<fontLetterSpacing Value="0" Type="int"/>
</item>
</children>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">Reportpage1</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<autoHeight Value="1" Type="bool"/>
<bandIndex Value="2" Type="int"/>
<keepBottomSpace Value="0" Type="bool"/>
<keepTopSpace Value="1" Type="bool"/>
<parentBand Type="QString">DataBand1</parentBand>
<backgroundColor Value="#ffffff" Type="QColor"/>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<printIfEmpty Value="0" Type="bool"/>
<backgroundMode Value="0" Type="enumAndFlags"/>
<backgroundOpacity Value="100" Type="int"/>
<shiftItems Value="0" Type="int"/>
<columnsCount Value="1" Type="int"/>
<splittable Value="0" Type="bool"/>
<columnsFillDirection Value="0" Type="enumAndFlags"/>
<printAlways Value="0" Type="bool"/>
</item>
</children>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString"></parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<topMargin Value="5" Type="int"/>
<bottomMargin Value="5" Type="int"/>
<rightMargin Value="5" Type="int"/>
<leftMargin Value="5" Type="int"/>
<pageOrientation Value="0" Type="enumAndFlags"/>
<pageSize Value="0" Type="enumAndFlags"/>
<gridStep Value="1" Type="int"/>
<fullPage Value="0" Type="bool"/>
<oldPrintMode Value="0" Type="bool"/>
<resetPageNumber Value="0" Type="bool"/>
<isExtendedInDesignMode Value="0" Type="bool"/>
<extendedHeight Value="1000" Type="int"/>
<pageIsTOC Value="0" Type="bool"/>
<setPageSizeToPrinter Value="0" Type="bool"/>
<endlessHeight Value="0" Type="bool"/>
<printable Value="1" Type="bool"/>
<printerName Type="QString"></printerName>
<units Value="0" Type="enumAndFlags"/>
<printBehavior Value="1" Type="enumAndFlags"/>
<dropPrinterMargins Value="0" Type="bool"/>
<notPrintIfEmpty Value="0" Type="bool"/>
<mixWithPriorPage Value="0" Type="bool"/>
</pageItem>
</item>
</pages>
<datasourcesManager Type="Object" ClassName="LimeReport::DataSourceManager">
<objectName Type="QString">datasources</objectName>
<connections Type="Collection"/>
<queries Type="Collection"/>
<subqueries Type="Collection"/>
<subproxies Type="Collection"/>
<variables Type="Collection"/>
<csvs Type="Collection">
<item Type="Object" ClassName="LimeReport::CSVDesc">
<objectName Type="QString"></objectName>
<name Type="QString">test</name>
<csvText Type="QString">12
13
14
15
16
17
18
45
67
59</csvText>
<separator Type="QString">;</separator>
<firstRowIsHeader Value="0" Type="bool"/>
</item>
</csvs>
</datasourcesManager>
<scriptContext Type="Object" ClassName="LimeReport::ScriptEngineContext">
<objectName Type="QString"></objectName>
<dialogs Type="Collection"/>
<initScript Type="QString">Reportpage1_DataBand1.afterRender.connect(rr)
function rr(){
Reportpage1_DataFooterBand6.setItemHeight(253-Reportpage1_DataBand1.geometry.height/10.0);
Reportpage1_TextItem6.setItemHeight(248-Reportpage1_DataBand1.geometry.height/10.0);
}</initScript>
</scriptContext>
<suppressFieldAndVarError Value="0" Type="bool"/>
<translation Type="Translation"/>
</object>
</Report>

View File

@ -0,0 +1,843 @@
<?xml version="1.0" encoding="UTF8"?>
<Report>
<object Type="Object" ClassName="LimeReport::ReportEnginePrivate">
<objectName Type="QString"></objectName>
<pages Type="Collection">
<item Type="Object" ClassName="LimeReport::PageDesignIntf">
<objectName Type="QString">page1</objectName>
<itemIndexMethod Value="0" Type="enumAndFlags"/>
<sceneRect y="-50" height="3075" Type="QRect" x="-50" width="2200"/>
<bspTreeDepth Value="5" Type="int"/>
<font italic="0" family="SimSun" pointSize="9" underline="0" Type="QFont" weight="50"/>
<sortCacheEnabled Value="0" Type="bool"/>
<stickyFocus Value="0" Type="bool"/>
<minimumRenderSize Value="0" Type="qreal"/>
<focusOnTouch Value="1" Type="bool"/>
<pageItem Type="Object" ClassName="PageItem">
<objectName Type="QString">Reportpage1</objectName>
<geometry y="0" height="2970" Type="QRect" x="0" width="2100"/>
<children Type="Collection">
<item Type="Object" ClassName="TextItem">
<objectName Type="QString">TextItem1</objectName>
<geometry y="600" height="288" Type="QRect" x="466" width="556"/>
<children Type="Collection"/>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">Reportpage1</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<itemLocation Value="1" Type="enumAndFlags"/>
<stretchToMaxHeight Value="0" Type="bool"/>
<itemAlign Value="4" Type="enumAndFlags"/>
<content Type="QString">test1</content>
<margin Value="4" Type="int"/>
<alignment Value="33" Type="enumAndFlags"/>
<autoWidth Value="0" Type="enumAndFlags"/>
<autoHeight Value="0" Type="bool"/>
<font italic="0" family="宋体" pointSize="10" underline="0" Type="QFont" weight="50"/>
<backgroundOpacity Value="100" Type="int"/>
<backgroundMode Value="1" Type="enumAndFlags"/>
<backgroundColor Value="#ffffff" Type="QColor"/>
<fontColor Value="#000000" Type="QColor"/>
<angle Value="0" Type="enumAndFlags"/>
<foregroundOpacity Value="100" Type="int"/>
<underlines Value="0" Type="bool"/>
<adaptFontToSize Value="0" Type="bool"/>
<trimValue Value="1" Type="bool"/>
<lineSpacing Value="1" Type="int"/>
<underlineLineSize Value="1" Type="int"/>
<allowHTML Value="0" Type="bool"/>
<allowHTMLInFields Value="0" Type="bool"/>
<format Type="QString"></format>
<valueType Value="0" Type="enumAndFlags"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<textIndent Value="0" Type="qreal"/>
<textLayoutDirection Value="2" Type="enumAndFlags"/>
<fillInSecondPass Value="0" Type="bool"/>
<watermark Value="0" Type="bool"/>
<replaceCRwithBR Value="0" Type="bool"/>
<hideIfEmpty Value="0" Type="bool"/>
<fontLetterSpacing Value="0" Type="int"/>
</item>
</children>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString"></parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<topMargin Value="5" Type="int"/>
<bottomMargin Value="5" Type="int"/>
<rightMargin Value="5" Type="int"/>
<leftMargin Value="5" Type="int"/>
<pageOrientation Value="0" Type="enumAndFlags"/>
<pageSize Value="0" Type="enumAndFlags"/>
<gridStep Value="1" Type="int"/>
<fullPage Value="0" Type="bool"/>
<oldPrintMode Value="0" Type="bool"/>
<resetPageNumber Value="0" Type="bool"/>
<isExtendedInDesignMode Value="0" Type="bool"/>
<extendedHeight Value="1000" Type="int"/>
<pageIsTOC Value="0" Type="bool"/>
<setPageSizeToPrinter Value="0" Type="bool"/>
<endlessHeight Value="0" Type="bool"/>
<printable Value="1" Type="bool"/>
<printerName Type="QString"></printerName>
<units Value="0" Type="enumAndFlags"/>
<printBehavior Value="1" Type="enumAndFlags"/>
<dropPrinterMargins Value="0" Type="bool"/>
<notPrintIfEmpty Value="0" Type="bool"/>
<mixWithPriorPage Value="0" Type="bool"/>
</pageItem>
</item>
<item Type="Object" ClassName="LimeReport::PageDesignIntf">
<objectName Type="QString">page2</objectName>
<itemIndexMethod Value="0" Type="enumAndFlags"/>
<sceneRect y="-50" height="3075" Type="QRect" x="-50" width="2200"/>
<bspTreeDepth Value="5" Type="int"/>
<font italic="0" family="SimSun" pointSize="9" underline="0" Type="QFont" weight="50"/>
<sortCacheEnabled Value="0" Type="bool"/>
<stickyFocus Value="0" Type="bool"/>
<minimumRenderSize Value="0" Type="qreal"/>
<focusOnTouch Value="1" Type="bool"/>
<pageItem Type="Object" ClassName="PageItem">
<objectName Type="QString">Reportpage2</objectName>
<geometry y="0" height="2970" Type="QRect" x="0" width="2100"/>
<children Type="Collection">
<item Type="Object" ClassName="TextItem">
<objectName Type="QString">TextItem1</objectName>
<geometry y="1006" height="468" Type="QRect" x="552" width="958"/>
<children Type="Collection"/>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">Reportpage2</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<itemLocation Value="1" Type="enumAndFlags"/>
<stretchToMaxHeight Value="0" Type="bool"/>
<itemAlign Value="4" Type="enumAndFlags"/>
<content Type="QString">test2</content>
<margin Value="4" Type="int"/>
<alignment Value="33" Type="enumAndFlags"/>
<autoWidth Value="0" Type="enumAndFlags"/>
<autoHeight Value="0" Type="bool"/>
<font italic="0" family="Arial" pointSize="10" underline="0" Type="QFont" weight="50"/>
<backgroundOpacity Value="100" Type="int"/>
<backgroundMode Value="1" Type="enumAndFlags"/>
<backgroundColor Value="#ffffff" Type="QColor"/>
<fontColor Value="#000000" Type="QColor"/>
<angle Value="0" Type="enumAndFlags"/>
<foregroundOpacity Value="100" Type="int"/>
<underlines Value="0" Type="bool"/>
<adaptFontToSize Value="0" Type="bool"/>
<trimValue Value="1" Type="bool"/>
<lineSpacing Value="1" Type="int"/>
<underlineLineSize Value="1" Type="int"/>
<allowHTML Value="0" Type="bool"/>
<allowHTMLInFields Value="0" Type="bool"/>
<format Type="QString"></format>
<valueType Value="0" Type="enumAndFlags"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<textIndent Value="0" Type="qreal"/>
<textLayoutDirection Value="2" Type="enumAndFlags"/>
<fillInSecondPass Value="0" Type="bool"/>
<watermark Value="0" Type="bool"/>
<replaceCRwithBR Value="0" Type="bool"/>
<hideIfEmpty Value="0" Type="bool"/>
<fontLetterSpacing Value="0" Type="int"/>
</item>
</children>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString"></parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<topMargin Value="5" Type="int"/>
<bottomMargin Value="5" Type="int"/>
<rightMargin Value="5" Type="int"/>
<leftMargin Value="5" Type="int"/>
<pageOrientation Value="0" Type="enumAndFlags"/>
<pageSize Value="0" Type="enumAndFlags"/>
<gridStep Value="1" Type="int"/>
<fullPage Value="0" Type="bool"/>
<oldPrintMode Value="0" Type="bool"/>
<resetPageNumber Value="0" Type="bool"/>
<isExtendedInDesignMode Value="0" Type="bool"/>
<extendedHeight Value="1000" Type="int"/>
<pageIsTOC Value="0" Type="bool"/>
<setPageSizeToPrinter Value="0" Type="bool"/>
<endlessHeight Value="0" Type="bool"/>
<printable Value="1" Type="bool"/>
<printerName Type="QString"></printerName>
<units Value="0" Type="enumAndFlags"/>
<printBehavior Value="1" Type="enumAndFlags"/>
<dropPrinterMargins Value="0" Type="bool"/>
<notPrintIfEmpty Value="0" Type="bool"/>
<mixWithPriorPage Value="0" Type="bool"/>
</pageItem>
</item>
<item Type="Object" ClassName="LimeReport::PageDesignIntf">
<objectName Type="QString">page3</objectName>
<itemIndexMethod Value="0" Type="enumAndFlags"/>
<sceneRect y="-50" height="3075" Type="QRect" x="-50" width="2200"/>
<bspTreeDepth Value="5" Type="int"/>
<font italic="0" family="SimSun" pointSize="9" underline="0" Type="QFont" weight="50"/>
<sortCacheEnabled Value="0" Type="bool"/>
<stickyFocus Value="0" Type="bool"/>
<minimumRenderSize Value="0" Type="qreal"/>
<focusOnTouch Value="1" Type="bool"/>
<pageItem Type="Object" ClassName="PageItem">
<objectName Type="QString">TOC</objectName>
<geometry y="0" height="2970" Type="QRect" x="0" width="2100"/>
<children Type="Collection">
<item Type="Object" ClassName="TextItem">
<objectName Type="QString">TextItem1</objectName>
<geometry y="620" height="456" Type="QRect" x="272" width="1276"/>
<children Type="Collection"/>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">TOC</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<itemLocation Value="1" Type="enumAndFlags"/>
<stretchToMaxHeight Value="0" Type="bool"/>
<itemAlign Value="4" Type="enumAndFlags"/>
<content Type="QString">index</content>
<margin Value="4" Type="int"/>
<alignment Value="33" Type="enumAndFlags"/>
<autoWidth Value="0" Type="enumAndFlags"/>
<autoHeight Value="0" Type="bool"/>
<font italic="0" family="Arial" pointSize="10" underline="0" Type="QFont" weight="50"/>
<backgroundOpacity Value="100" Type="int"/>
<backgroundMode Value="1" Type="enumAndFlags"/>
<backgroundColor Value="#ffffff" Type="QColor"/>
<fontColor Value="#000000" Type="QColor"/>
<angle Value="0" Type="enumAndFlags"/>
<foregroundOpacity Value="100" Type="int"/>
<underlines Value="0" Type="bool"/>
<adaptFontToSize Value="0" Type="bool"/>
<trimValue Value="1" Type="bool"/>
<lineSpacing Value="1" Type="int"/>
<underlineLineSize Value="1" Type="int"/>
<allowHTML Value="0" Type="bool"/>
<allowHTMLInFields Value="0" Type="bool"/>
<format Type="QString"></format>
<valueType Value="0" Type="enumAndFlags"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<textIndent Value="0" Type="qreal"/>
<textLayoutDirection Value="2" Type="enumAndFlags"/>
<fillInSecondPass Value="0" Type="bool"/>
<watermark Value="0" Type="bool"/>
<replaceCRwithBR Value="0" Type="bool"/>
<hideIfEmpty Value="0" Type="bool"/>
<fontLetterSpacing Value="0" Type="int"/>
</item>
</children>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString"></parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<topMargin Value="5" Type="int"/>
<bottomMargin Value="5" Type="int"/>
<rightMargin Value="5" Type="int"/>
<leftMargin Value="5" Type="int"/>
<pageOrientation Value="0" Type="enumAndFlags"/>
<pageSize Value="0" Type="enumAndFlags"/>
<gridStep Value="1" Type="int"/>
<fullPage Value="0" Type="bool"/>
<oldPrintMode Value="0" Type="bool"/>
<resetPageNumber Value="0" Type="bool"/>
<isExtendedInDesignMode Value="0" Type="bool"/>
<extendedHeight Value="1000" Type="int"/>
<pageIsTOC Value="1" Type="bool"/>
<setPageSizeToPrinter Value="0" Type="bool"/>
<endlessHeight Value="0" Type="bool"/>
<printable Value="1" Type="bool"/>
<printerName Type="QString"></printerName>
<units Value="0" Type="enumAndFlags"/>
<printBehavior Value="1" Type="enumAndFlags"/>
<dropPrinterMargins Value="0" Type="bool"/>
<notPrintIfEmpty Value="0" Type="bool"/>
<mixWithPriorPage Value="0" Type="bool"/>
</pageItem>
</item>
<item Type="Object" ClassName="LimeReport::PageDesignIntf">
<objectName Type="QString">page4</objectName>
<itemIndexMethod Value="0" Type="enumAndFlags"/>
<sceneRect y="-50" height="3075" Type="QRect" x="-50" width="2200"/>
<bspTreeDepth Value="5" Type="int"/>
<font italic="0" family="SimSun" pointSize="9" underline="0" Type="QFont" weight="50"/>
<sortCacheEnabled Value="0" Type="bool"/>
<stickyFocus Value="0" Type="bool"/>
<minimumRenderSize Value="0" Type="qreal"/>
<focusOnTouch Value="1" Type="bool"/>
<pageItem Type="Object" ClassName="PageItem">
<objectName Type="QString">Reportpage4</objectName>
<geometry y="0" height="2970" Type="QRect" x="0" width="2100"/>
<children Type="Collection">
<item Type="Object" ClassName="TextItem">
<objectName Type="QString">TextItem1</objectName>
<geometry y="754" height="502" Type="QRect" x="276" width="830"/>
<children Type="Collection"/>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">Reportpage4</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<itemLocation Value="1" Type="enumAndFlags"/>
<stretchToMaxHeight Value="0" Type="bool"/>
<itemAlign Value="4" Type="enumAndFlags"/>
<content Type="QString">test4</content>
<margin Value="4" Type="int"/>
<alignment Value="33" Type="enumAndFlags"/>
<autoWidth Value="0" Type="enumAndFlags"/>
<autoHeight Value="0" Type="bool"/>
<font italic="0" family="Arial" pointSize="10" underline="0" Type="QFont" weight="50"/>
<backgroundOpacity Value="100" Type="int"/>
<backgroundMode Value="1" Type="enumAndFlags"/>
<backgroundColor Value="#ffffff" Type="QColor"/>
<fontColor Value="#000000" Type="QColor"/>
<angle Value="0" Type="enumAndFlags"/>
<foregroundOpacity Value="100" Type="int"/>
<underlines Value="0" Type="bool"/>
<adaptFontToSize Value="0" Type="bool"/>
<trimValue Value="1" Type="bool"/>
<lineSpacing Value="1" Type="int"/>
<underlineLineSize Value="1" Type="int"/>
<allowHTML Value="0" Type="bool"/>
<allowHTMLInFields Value="0" Type="bool"/>
<format Type="QString"></format>
<valueType Value="0" Type="enumAndFlags"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<textIndent Value="0" Type="qreal"/>
<textLayoutDirection Value="2" Type="enumAndFlags"/>
<fillInSecondPass Value="0" Type="bool"/>
<watermark Value="0" Type="bool"/>
<replaceCRwithBR Value="0" Type="bool"/>
<hideIfEmpty Value="0" Type="bool"/>
<fontLetterSpacing Value="0" Type="int"/>
</item>
</children>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString"></parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<topMargin Value="5" Type="int"/>
<bottomMargin Value="5" Type="int"/>
<rightMargin Value="5" Type="int"/>
<leftMargin Value="5" Type="int"/>
<pageOrientation Value="0" Type="enumAndFlags"/>
<pageSize Value="0" Type="enumAndFlags"/>
<gridStep Value="1" Type="int"/>
<fullPage Value="0" Type="bool"/>
<oldPrintMode Value="0" Type="bool"/>
<resetPageNumber Value="0" Type="bool"/>
<isExtendedInDesignMode Value="0" Type="bool"/>
<extendedHeight Value="1000" Type="int"/>
<pageIsTOC Value="0" Type="bool"/>
<setPageSizeToPrinter Value="0" Type="bool"/>
<endlessHeight Value="0" Type="bool"/>
<printable Value="1" Type="bool"/>
<printerName Type="QString"></printerName>
<units Value="0" Type="enumAndFlags"/>
<printBehavior Value="1" Type="enumAndFlags"/>
<dropPrinterMargins Value="0" Type="bool"/>
<notPrintIfEmpty Value="0" Type="bool"/>
<mixWithPriorPage Value="0" Type="bool"/>
</pageItem>
</item>
<item Type="Object" ClassName="LimeReport::PageDesignIntf">
<objectName Type="QString">page5</objectName>
<itemIndexMethod Value="0" Type="enumAndFlags"/>
<sceneRect y="-50" height="3075" Type="QRect" x="-50" width="2200"/>
<bspTreeDepth Value="5" Type="int"/>
<font italic="0" family="SimSun" pointSize="9" underline="0" Type="QFont" weight="50"/>
<sortCacheEnabled Value="0" Type="bool"/>
<stickyFocus Value="0" Type="bool"/>
<minimumRenderSize Value="0" Type="qreal"/>
<focusOnTouch Value="1" Type="bool"/>
<pageItem Type="Object" ClassName="PageItem">
<objectName Type="QString">Reportpage5</objectName>
<geometry y="0" height="2970" Type="QRect" x="0" width="2100"/>
<children Type="Collection">
<item Type="Object" ClassName="TextItem">
<objectName Type="QString">TextItem1</objectName>
<geometry y="838" height="494" Type="QRect" x="440" width="908"/>
<children Type="Collection"/>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">Reportpage5</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<itemLocation Value="1" Type="enumAndFlags"/>
<stretchToMaxHeight Value="0" Type="bool"/>
<itemAlign Value="4" Type="enumAndFlags"/>
<content Type="QString">test5</content>
<margin Value="4" Type="int"/>
<alignment Value="33" Type="enumAndFlags"/>
<autoWidth Value="0" Type="enumAndFlags"/>
<autoHeight Value="0" Type="bool"/>
<font italic="0" family="Arial" pointSize="10" underline="0" Type="QFont" weight="50"/>
<backgroundOpacity Value="100" Type="int"/>
<backgroundMode Value="1" Type="enumAndFlags"/>
<backgroundColor Value="#ffffff" Type="QColor"/>
<fontColor Value="#000000" Type="QColor"/>
<angle Value="0" Type="enumAndFlags"/>
<foregroundOpacity Value="100" Type="int"/>
<underlines Value="0" Type="bool"/>
<adaptFontToSize Value="0" Type="bool"/>
<trimValue Value="1" Type="bool"/>
<lineSpacing Value="1" Type="int"/>
<underlineLineSize Value="1" Type="int"/>
<allowHTML Value="0" Type="bool"/>
<allowHTMLInFields Value="0" Type="bool"/>
<format Type="QString"></format>
<valueType Value="0" Type="enumAndFlags"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<textIndent Value="0" Type="qreal"/>
<textLayoutDirection Value="2" Type="enumAndFlags"/>
<fillInSecondPass Value="0" Type="bool"/>
<watermark Value="0" Type="bool"/>
<replaceCRwithBR Value="0" Type="bool"/>
<hideIfEmpty Value="0" Type="bool"/>
<fontLetterSpacing Value="0" Type="int"/>
</item>
</children>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString"></parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<topMargin Value="5" Type="int"/>
<bottomMargin Value="5" Type="int"/>
<rightMargin Value="5" Type="int"/>
<leftMargin Value="5" Type="int"/>
<pageOrientation Value="0" Type="enumAndFlags"/>
<pageSize Value="0" Type="enumAndFlags"/>
<gridStep Value="1" Type="int"/>
<fullPage Value="0" Type="bool"/>
<oldPrintMode Value="0" Type="bool"/>
<resetPageNumber Value="0" Type="bool"/>
<isExtendedInDesignMode Value="0" Type="bool"/>
<extendedHeight Value="1000" Type="int"/>
<pageIsTOC Value="0" Type="bool"/>
<setPageSizeToPrinter Value="0" Type="bool"/>
<endlessHeight Value="0" Type="bool"/>
<printable Value="0" Type="bool"/>
<printerName Type="QString"></printerName>
<units Value="0" Type="enumAndFlags"/>
<printBehavior Value="1" Type="enumAndFlags"/>
<dropPrinterMargins Value="0" Type="bool"/>
<notPrintIfEmpty Value="0" Type="bool"/>
<mixWithPriorPage Value="0" Type="bool"/>
</pageItem>
</item>
<item Type="Object" ClassName="LimeReport::PageDesignIntf">
<objectName Type="QString">page6</objectName>
<itemIndexMethod Value="0" Type="enumAndFlags"/>
<sceneRect y="-50" height="3075" Type="QRect" x="-50" width="2200"/>
<bspTreeDepth Value="5" Type="int"/>
<font italic="0" family="SimSun" pointSize="9" underline="0" Type="QFont" weight="50"/>
<sortCacheEnabled Value="0" Type="bool"/>
<stickyFocus Value="0" Type="bool"/>
<minimumRenderSize Value="0" Type="qreal"/>
<focusOnTouch Value="1" Type="bool"/>
<pageItem Type="Object" ClassName="PageItem">
<objectName Type="QString">Reportpage6</objectName>
<geometry y="0" height="2970" Type="QRect" x="0" width="2100"/>
<children Type="Collection">
<item Type="Object" ClassName="TextItem">
<objectName Type="QString">TextItem1</objectName>
<geometry y="774" height="746" Type="QRect" x="226" width="1116"/>
<children Type="Collection"/>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">Reportpage6</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<itemLocation Value="1" Type="enumAndFlags"/>
<stretchToMaxHeight Value="0" Type="bool"/>
<itemAlign Value="4" Type="enumAndFlags"/>
<content Type="QString">test6</content>
<margin Value="4" Type="int"/>
<alignment Value="33" Type="enumAndFlags"/>
<autoWidth Value="0" Type="enumAndFlags"/>
<autoHeight Value="0" Type="bool"/>
<font italic="0" family="Arial" pointSize="10" underline="0" Type="QFont" weight="50"/>
<backgroundOpacity Value="100" Type="int"/>
<backgroundMode Value="1" Type="enumAndFlags"/>
<backgroundColor Value="#ffffff" Type="QColor"/>
<fontColor Value="#000000" Type="QColor"/>
<angle Value="0" Type="enumAndFlags"/>
<foregroundOpacity Value="100" Type="int"/>
<underlines Value="0" Type="bool"/>
<adaptFontToSize Value="0" Type="bool"/>
<trimValue Value="1" Type="bool"/>
<lineSpacing Value="1" Type="int"/>
<underlineLineSize Value="1" Type="int"/>
<allowHTML Value="0" Type="bool"/>
<allowHTMLInFields Value="0" Type="bool"/>
<format Type="QString"></format>
<valueType Value="0" Type="enumAndFlags"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<textIndent Value="0" Type="qreal"/>
<textLayoutDirection Value="2" Type="enumAndFlags"/>
<fillInSecondPass Value="0" Type="bool"/>
<watermark Value="0" Type="bool"/>
<replaceCRwithBR Value="0" Type="bool"/>
<hideIfEmpty Value="0" Type="bool"/>
<fontLetterSpacing Value="0" Type="int"/>
</item>
</children>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString"></parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<topMargin Value="5" Type="int"/>
<bottomMargin Value="5" Type="int"/>
<rightMargin Value="5" Type="int"/>
<leftMargin Value="5" Type="int"/>
<pageOrientation Value="0" Type="enumAndFlags"/>
<pageSize Value="0" Type="enumAndFlags"/>
<gridStep Value="1" Type="int"/>
<fullPage Value="0" Type="bool"/>
<oldPrintMode Value="0" Type="bool"/>
<resetPageNumber Value="0" Type="bool"/>
<isExtendedInDesignMode Value="0" Type="bool"/>
<extendedHeight Value="1000" Type="int"/>
<pageIsTOC Value="0" Type="bool"/>
<setPageSizeToPrinter Value="0" Type="bool"/>
<endlessHeight Value="0" Type="bool"/>
<printable Value="1" Type="bool"/>
<printerName Type="QString"></printerName>
<units Value="0" Type="enumAndFlags"/>
<printBehavior Value="1" Type="enumAndFlags"/>
<dropPrinterMargins Value="0" Type="bool"/>
<notPrintIfEmpty Value="0" Type="bool"/>
<mixWithPriorPage Value="0" Type="bool"/>
</pageItem>
</item>
<item Type="Object" ClassName="LimeReport::PageDesignIntf">
<objectName Type="QString">page7</objectName>
<itemIndexMethod Value="0" Type="enumAndFlags"/>
<sceneRect y="-50" height="3075" Type="QRect" x="-50" width="2200"/>
<bspTreeDepth Value="5" Type="int"/>
<font italic="0" family="SimSun" pointSize="9" underline="0" Type="QFont" weight="50"/>
<sortCacheEnabled Value="0" Type="bool"/>
<stickyFocus Value="0" Type="bool"/>
<minimumRenderSize Value="0" Type="qreal"/>
<focusOnTouch Value="1" Type="bool"/>
<pageItem Type="Object" ClassName="PageItem">
<objectName Type="QString">Reportpage7</objectName>
<geometry y="0" height="2970" Type="QRect" x="0" width="2100"/>
<children Type="Collection">
<item Type="Object" ClassName="TextItem">
<objectName Type="QString">TextItem1</objectName>
<geometry y="594" height="694" Type="QRect" x="222" width="824"/>
<children Type="Collection"/>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">Reportpage7</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<itemLocation Value="1" Type="enumAndFlags"/>
<stretchToMaxHeight Value="0" Type="bool"/>
<itemAlign Value="4" Type="enumAndFlags"/>
<content Type="QString">test7</content>
<margin Value="4" Type="int"/>
<alignment Value="33" Type="enumAndFlags"/>
<autoWidth Value="0" Type="enumAndFlags"/>
<autoHeight Value="0" Type="bool"/>
<font italic="0" family="Arial" pointSize="10" underline="0" Type="QFont" weight="50"/>
<backgroundOpacity Value="100" Type="int"/>
<backgroundMode Value="1" Type="enumAndFlags"/>
<backgroundColor Value="#ffffff" Type="QColor"/>
<fontColor Value="#000000" Type="QColor"/>
<angle Value="0" Type="enumAndFlags"/>
<foregroundOpacity Value="100" Type="int"/>
<underlines Value="0" Type="bool"/>
<adaptFontToSize Value="0" Type="bool"/>
<trimValue Value="1" Type="bool"/>
<lineSpacing Value="1" Type="int"/>
<underlineLineSize Value="1" Type="int"/>
<allowHTML Value="0" Type="bool"/>
<allowHTMLInFields Value="0" Type="bool"/>
<format Type="QString"></format>
<valueType Value="0" Type="enumAndFlags"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<textIndent Value="0" Type="qreal"/>
<textLayoutDirection Value="2" Type="enumAndFlags"/>
<fillInSecondPass Value="0" Type="bool"/>
<watermark Value="0" Type="bool"/>
<replaceCRwithBR Value="0" Type="bool"/>
<hideIfEmpty Value="0" Type="bool"/>
<fontLetterSpacing Value="0" Type="int"/>
</item>
</children>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString"></parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<topMargin Value="5" Type="int"/>
<bottomMargin Value="5" Type="int"/>
<rightMargin Value="5" Type="int"/>
<leftMargin Value="5" Type="int"/>
<pageOrientation Value="0" Type="enumAndFlags"/>
<pageSize Value="0" Type="enumAndFlags"/>
<gridStep Value="1" Type="int"/>
<fullPage Value="0" Type="bool"/>
<oldPrintMode Value="0" Type="bool"/>
<resetPageNumber Value="0" Type="bool"/>
<isExtendedInDesignMode Value="0" Type="bool"/>
<extendedHeight Value="1000" Type="int"/>
<pageIsTOC Value="0" Type="bool"/>
<setPageSizeToPrinter Value="0" Type="bool"/>
<endlessHeight Value="0" Type="bool"/>
<printable Value="1" Type="bool"/>
<printerName Type="QString"></printerName>
<units Value="0" Type="enumAndFlags"/>
<printBehavior Value="1" Type="enumAndFlags"/>
<dropPrinterMargins Value="0" Type="bool"/>
<notPrintIfEmpty Value="0" Type="bool"/>
<mixWithPriorPage Value="0" Type="bool"/>
</pageItem>
</item>
<item Type="Object" ClassName="LimeReport::PageDesignIntf">
<objectName Type="QString">page8</objectName>
<itemIndexMethod Value="0" Type="enumAndFlags"/>
<sceneRect y="-50" height="3075" Type="QRect" x="-50" width="2200"/>
<bspTreeDepth Value="5" Type="int"/>
<font italic="0" family="SimSun" pointSize="9" underline="0" Type="QFont" weight="50"/>
<sortCacheEnabled Value="0" Type="bool"/>
<stickyFocus Value="0" Type="bool"/>
<minimumRenderSize Value="0" Type="qreal"/>
<focusOnTouch Value="1" Type="bool"/>
<pageItem Type="Object" ClassName="PageItem">
<objectName Type="QString">Reportpage8</objectName>
<geometry y="0" height="2970" Type="QRect" x="0" width="2100"/>
<children Type="Collection">
<item Type="Object" ClassName="TextItem">
<objectName Type="QString">TextItem1</objectName>
<geometry y="506" height="556" Type="QRect" x="336" width="1172"/>
<children Type="Collection"/>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">Reportpage8</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<itemLocation Value="1" Type="enumAndFlags"/>
<stretchToMaxHeight Value="0" Type="bool"/>
<itemAlign Value="4" Type="enumAndFlags"/>
<content Type="QString">test8</content>
<margin Value="4" Type="int"/>
<alignment Value="33" Type="enumAndFlags"/>
<autoWidth Value="0" Type="enumAndFlags"/>
<autoHeight Value="0" Type="bool"/>
<font italic="0" family="Arial" pointSize="10" underline="0" Type="QFont" weight="50"/>
<backgroundOpacity Value="100" Type="int"/>
<backgroundMode Value="1" Type="enumAndFlags"/>
<backgroundColor Value="#ffffff" Type="QColor"/>
<fontColor Value="#000000" Type="QColor"/>
<angle Value="0" Type="enumAndFlags"/>
<foregroundOpacity Value="100" Type="int"/>
<underlines Value="0" Type="bool"/>
<adaptFontToSize Value="0" Type="bool"/>
<trimValue Value="1" Type="bool"/>
<lineSpacing Value="1" Type="int"/>
<underlineLineSize Value="1" Type="int"/>
<allowHTML Value="0" Type="bool"/>
<allowHTMLInFields Value="0" Type="bool"/>
<format Type="QString"></format>
<valueType Value="0" Type="enumAndFlags"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<textIndent Value="0" Type="qreal"/>
<textLayoutDirection Value="2" Type="enumAndFlags"/>
<fillInSecondPass Value="0" Type="bool"/>
<watermark Value="0" Type="bool"/>
<replaceCRwithBR Value="0" Type="bool"/>
<hideIfEmpty Value="0" Type="bool"/>
<fontLetterSpacing Value="0" Type="int"/>
</item>
</children>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString"></parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<topMargin Value="5" Type="int"/>
<bottomMargin Value="5" Type="int"/>
<rightMargin Value="5" Type="int"/>
<leftMargin Value="5" Type="int"/>
<pageOrientation Value="0" Type="enumAndFlags"/>
<pageSize Value="0" Type="enumAndFlags"/>
<gridStep Value="1" Type="int"/>
<fullPage Value="0" Type="bool"/>
<oldPrintMode Value="0" Type="bool"/>
<resetPageNumber Value="0" Type="bool"/>
<isExtendedInDesignMode Value="0" Type="bool"/>
<extendedHeight Value="1000" Type="int"/>
<pageIsTOC Value="0" Type="bool"/>
<setPageSizeToPrinter Value="0" Type="bool"/>
<endlessHeight Value="0" Type="bool"/>
<printable Value="1" Type="bool"/>
<printerName Type="QString"></printerName>
<units Value="0" Type="enumAndFlags"/>
<printBehavior Value="1" Type="enumAndFlags"/>
<dropPrinterMargins Value="0" Type="bool"/>
<notPrintIfEmpty Value="0" Type="bool"/>
<mixWithPriorPage Value="0" Type="bool"/>
</pageItem>
</item>
<item Type="Object" ClassName="LimeReport::PageDesignIntf">
<objectName Type="QString">page9</objectName>
<itemIndexMethod Value="0" Type="enumAndFlags"/>
<sceneRect y="-50" height="3075" Type="QRect" x="-50" width="2200"/>
<bspTreeDepth Value="5" Type="int"/>
<font italic="0" family="SimSun" pointSize="9" underline="0" Type="QFont" weight="50"/>
<sortCacheEnabled Value="0" Type="bool"/>
<stickyFocus Value="0" Type="bool"/>
<minimumRenderSize Value="0" Type="qreal"/>
<focusOnTouch Value="1" Type="bool"/>
<pageItem Type="Object" ClassName="PageItem">
<objectName Type="QString">Reportpage9</objectName>
<geometry y="0" height="2970" Type="QRect" x="0" width="2100"/>
<children Type="Collection">
<item Type="Object" ClassName="TextItem">
<objectName Type="QString">TextItem1</objectName>
<geometry y="424" height="592" Type="QRect" x="268" width="902"/>
<children Type="Collection"/>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString">Reportpage9</parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<itemLocation Value="1" Type="enumAndFlags"/>
<stretchToMaxHeight Value="0" Type="bool"/>
<itemAlign Value="4" Type="enumAndFlags"/>
<content Type="QString">test1</content>
<margin Value="4" Type="int"/>
<alignment Value="33" Type="enumAndFlags"/>
<autoWidth Value="0" Type="enumAndFlags"/>
<autoHeight Value="0" Type="bool"/>
<font italic="0" family="Arial" pointSize="10" underline="0" Type="QFont" weight="50"/>
<backgroundOpacity Value="100" Type="int"/>
<backgroundMode Value="1" Type="enumAndFlags"/>
<backgroundColor Value="#ffffff" Type="QColor"/>
<fontColor Value="#000000" Type="QColor"/>
<angle Value="0" Type="enumAndFlags"/>
<foregroundOpacity Value="100" Type="int"/>
<underlines Value="0" Type="bool"/>
<adaptFontToSize Value="0" Type="bool"/>
<trimValue Value="1" Type="bool"/>
<lineSpacing Value="1" Type="int"/>
<underlineLineSize Value="1" Type="int"/>
<allowHTML Value="0" Type="bool"/>
<allowHTMLInFields Value="0" Type="bool"/>
<format Type="QString"></format>
<valueType Value="0" Type="enumAndFlags"/>
<followTo Type="QString"></followTo>
<backgroundBrushStyle Value="1" Type="enumAndFlags"/>
<textIndent Value="0" Type="qreal"/>
<textLayoutDirection Value="2" Type="enumAndFlags"/>
<fillInSecondPass Value="0" Type="bool"/>
<watermark Value="0" Type="bool"/>
<replaceCRwithBR Value="0" Type="bool"/>
<hideIfEmpty Value="0" Type="bool"/>
<fontLetterSpacing Value="0" Type="int"/>
</item>
</children>
<zOrder Value="0" Type="qreal"/>
<borders Value="0" Type="enumAndFlags"/>
<parentName Type="QString"></parentName>
<borderLineSize Value="1" Type="int"/>
<isVisible Value="1" Type="bool"/>
<borderColor Value="#000000" Type="QColor"/>
<geometryLocked Value="0" Type="bool"/>
<topMargin Value="5" Type="int"/>
<bottomMargin Value="5" Type="int"/>
<rightMargin Value="5" Type="int"/>
<leftMargin Value="5" Type="int"/>
<pageOrientation Value="0" Type="enumAndFlags"/>
<pageSize Value="0" Type="enumAndFlags"/>
<gridStep Value="1" Type="int"/>
<fullPage Value="0" Type="bool"/>
<oldPrintMode Value="0" Type="bool"/>
<resetPageNumber Value="0" Type="bool"/>
<isExtendedInDesignMode Value="0" Type="bool"/>
<extendedHeight Value="1000" Type="int"/>
<pageIsTOC Value="0" Type="bool"/>
<setPageSizeToPrinter Value="0" Type="bool"/>
<endlessHeight Value="0" Type="bool"/>
<printable Value="1" Type="bool"/>
<printerName Type="QString"></printerName>
<units Value="0" Type="enumAndFlags"/>
<printBehavior Value="1" Type="enumAndFlags"/>
<dropPrinterMargins Value="0" Type="bool"/>
<notPrintIfEmpty Value="0" Type="bool"/>
<mixWithPriorPage Value="0" Type="bool"/>
</pageItem>
</item>
</pages>
<datasourcesManager Type="Object" ClassName="LimeReport::DataSourceManager">
<objectName Type="QString">datasources</objectName>
<connections Type="Collection"/>
<queries Type="Collection"/>
<subqueries Type="Collection"/>
<subproxies Type="Collection"/>
<variables Type="Collection"/>
<csvs Type="Collection"/>
</datasourcesManager>
<scriptContext Type="Object" ClassName="LimeReport::ScriptEngineContext">
<objectName Type="QString"></objectName>
<dialogs Type="Collection"/>
<initScript Type="QString"></initScript>
</scriptContext>
<suppressFieldAndVarError Value="0" Type="bool"/>
<translation Type="Translation"/>
</object>
</Report>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -1,3 +1,5 @@
project(LRDesigner)
set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOMOC ON)
set(LRDESIGNER_FILES set(LRDESIGNER_FILES
@ -7,12 +9,12 @@ set(LRDESIGNER_FILES
mainicon.rc mainicon.rc
) )
add_executable(LRDesigner ${LRDESIGNER_FILES}) add_executable(${PROJECT_NAME} ${LRDESIGNER_FILES})
target_include_directories(LRDesigner PUBLIC ${PROJECT_SOURCE_DIR}/include) target_link_libraries(${PROJECT_NAME} PUBLIC
target_link_libraries(LRDesigner PUBLIC
Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Widgets
${PROJECT_NAME} Qt${QT_VERSION_MAJOR}::PrintSupport
Qt${QT_VERSION_MAJOR}::Qml
limereport-qt${QT_VERSION_MAJOR}
) )

View File

@ -104,7 +104,7 @@ 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 >= QT_VERSION_CHECK(5, 12, 3) #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 1)
QVector<QString> normalizeCaptures(const QRegularExpressionMatch &reg); QVector<QString> normalizeCaptures(const QRegularExpressionMatch &reg);
#else #else
QVector<QString> normalizeCaptures(const QRegExp &reg); QVector<QString> normalizeCaptures(const QRegExp &reg);
@ -125,12 +125,12 @@ namespace Const{
Q_DECLARE_FLAGS(PreviewHints, PreviewHint) Q_DECLARE_FLAGS(PreviewHints, PreviewHint)
Q_FLAGS(PreviewHints) Q_FLAGS(PreviewHints)
class ReportError : public std::runtime_error{ class LIMEREPORT_EXPORT ReportError : public std::runtime_error{
public: public:
ReportError(const QString& message); ReportError(const QString& message);
}; };
class ReportSettings{ class LIMEREPORT_EXPORT ReportSettings{
public: public:
ReportSettings():m_suppressAbsentFieldsAndVarsWarnings(false){} ReportSettings():m_suppressAbsentFieldsAndVarsWarnings(false){}
void setDefaultValues(){m_suppressAbsentFieldsAndVarsWarnings = false;} void setDefaultValues(){m_suppressAbsentFieldsAndVarsWarnings = false;}
@ -140,13 +140,13 @@ namespace Const{
bool m_suppressAbsentFieldsAndVarsWarnings; bool m_suppressAbsentFieldsAndVarsWarnings;
}; };
class IExternalPainter{ class LIMEREPORT_EXPORT IExternalPainter{
public: public:
virtual void paintByExternalPainter(const QString& objectName, QPainter* painter, const QStyleOptionGraphicsItem* options) = 0; virtual void paintByExternalPainter(const QString& objectName, QPainter* painter, const QStyleOptionGraphicsItem* options) = 0;
virtual ~IExternalPainter(); virtual ~IExternalPainter();
}; };
class IPainterProxy{ class LIMEREPORT_EXPORT IPainterProxy{
public: public:
virtual void setExternalPainter(IExternalPainter* externalPainter) = 0; virtual void setExternalPainter(IExternalPainter* externalPainter) = 0;
virtual ~IPainterProxy(); virtual ~IPainterProxy();
@ -157,8 +157,18 @@ namespace Const{
#else #else
typedef QStyleOptionViewItem StyleOptionViewItem; typedef QStyleOptionViewItem StyleOptionViewItem;
#endif #endif
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 1)
QRegularExpression getRegEx(QString expression);
QRegularExpression getVariableRegEx();
QRegularExpression getFieldRegEx();
QRegularExpression getScriptRegEx();
QRegularExpression getGroupFunctionRegEx(QString functionName);
QRegularExpression getGroupFunctionNameRegEx(QString functionName);
QRegularExpression getNamedVariableRegEx(QString variableName);
#endif
class Enums
class LIMEREPORT_EXPORT Enums
{ {
public: public:
enum VariableDataType {Undefined, String, Bool, Int, Real, Date, Time, DateTime}; enum VariableDataType {Undefined, String, Bool, Int, Real, Date, Time, DateTime};

View File

@ -36,7 +36,11 @@ namespace LimeReport {
DataBrowserTree::DataBrowserTree(QWidget *parent) : DataBrowserTree::DataBrowserTree(QWidget *parent) :
QTreeWidget(parent){} QTreeWidget(parent){}
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
QMimeData *DataBrowserTree::mimeData(const QList<QTreeWidgetItem *> &items) const
#else
QMimeData *DataBrowserTree::mimeData(const QList<QTreeWidgetItem *> items) const QMimeData *DataBrowserTree::mimeData(const QList<QTreeWidgetItem *> items) const
#endif
{ {
QMimeData* result = QTreeWidget::mimeData(items); QMimeData* result = QTreeWidget::mimeData(items);
if (items.at(0)->type()==Row){ if (items.at(0)->type()==Row){

View File

@ -42,7 +42,11 @@ public:
enum NodeType{Connection, Table, Row, Category, Variable, ExternalVariable}; enum NodeType{Connection, Table, Row, Category, Variable, ExternalVariable};
explicit DataBrowserTree(QWidget *parent = 0); explicit DataBrowserTree(QWidget *parent = 0);
protected: protected:
QMimeData* mimeData(const QList<QTreeWidgetItem *> items) const; #if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
virtual QMimeData *mimeData(const QList<QTreeWidgetItem *> &items) const;
#else
virtual QMimeData *mimeData(const QList<QTreeWidgetItem*> items) const;
#endif
public slots: public slots:

View File

@ -28,20 +28,18 @@
* GNU General Public License for more details. * * GNU General Public License for more details. *
****************************************************************************/ ****************************************************************************/
#include "lrsqleditdialog.h" #include "lrsqleditdialog.h"
#include "ui_lrsqleditdialog.h"
#include "lrreportengine_p.h" #include "lrreportengine_p.h"
#include "ui_lrsqleditdialog.h"
#include <QDebug> #include <QDebug>
#include <QSqlDatabase>
#include <QMessageBox> #include <QMessageBox>
#include <QSqlDatabase>
namespace LimeReport{ namespace LimeReport {
SQLEditDialog::SQLEditDialog(QWidget *parent, LimeReport::DataSourceManager *dataSources, SQLDialogMode dialogMode) : SQLEditDialog::SQLEditDialog(QWidget *parent, LimeReport::DataSourceManager *dataSources, SQLDialogMode dialogMode)
QDialog(parent), : QDialog(parent), ui(new Ui::SQLEditDialog), m_datasources(dataSources), m_dialogMode(dialogMode),
ui(new Ui::SQLEditDialog),m_datasources(dataSources),m_dialogMode(dialogMode), m_oldDatasourceName(""), m_oldDatasourceName(""), m_settings(0), m_ownedSettings(false) {
m_settings(0), m_ownedSettings(false)
{
ui->setupUi(this); ui->setupUi(this);
m_masterDatasources = new QCompleter(this); m_masterDatasources = new QCompleter(this);
ui->leMaster->setCompleter(m_masterDatasources); ui->leMaster->setCompleter(m_masterDatasources);
@ -54,72 +52,72 @@ SQLEditDialog::SQLEditDialog(QWidget *parent, LimeReport::DataSourceManager *dat
ui->rbSubQuery->setVisible(false); ui->rbSubQuery->setVisible(false);
ui->leMaster->setVisible(false); ui->leMaster->setVisible(false);
ui->lbMaster->setVisible(false); ui->lbMaster->setVisible(false);
ui->fieldsMap->setHorizontalHeaderItem(0,new QTableWidgetItem("master")); ui->fieldsMap->setHorizontalHeaderItem(0, new QTableWidgetItem("master"));
ui->fieldsMap->setHorizontalHeaderItem(1,new QTableWidgetItem("detail")); ui->fieldsMap->setHorizontalHeaderItem(1, new QTableWidgetItem("detail"));
#ifdef HAVE_QT5
ui->fieldsMap->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); ui->fieldsMap->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
#else
ui->fieldsMap->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
#endif
ui->pnlChildDatasource->setVisible(false); ui->pnlChildDatasource->setVisible(false);
connect(ui->pbPreview, SIGNAL(pressed()), this, SLOT(slotPreviewData())); connect(ui->pbPreview, SIGNAL(pressed()), this, SLOT(slotPreviewData()));
connect(ui->pbHidePreview, SIGNAL(pressed()), this, SLOT(slotHidePreview())); connect(ui->pbHidePreview, SIGNAL(pressed()), this, SLOT(slotHidePreview()));
} }
SQLEditDialog::~SQLEditDialog() SQLEditDialog::~SQLEditDialog() {
{
delete ui; delete ui;
if (m_settings && m_ownedSettings) if (m_settings && m_ownedSettings)
delete m_settings; delete m_settings;
} }
QSettings *SQLEditDialog::settings(){ QSettings *SQLEditDialog::settings() {
if (m_settings){ if (m_settings) {
return m_settings; return m_settings;
} else { } else {
m_settings = new QSettings("LimeReport",QCoreApplication::applicationName()); m_settings = new QSettings("LimeReport", QCoreApplication::applicationName());
m_ownedSettings = true; m_ownedSettings = true;
return m_settings; return m_settings;
} }
} }
void SQLEditDialog::setSettings(QSettings *value, bool owned){ void SQLEditDialog::setSettings(QSettings *value, bool owned) {
if (m_settings && m_ownedSettings) delete m_settings; if (m_settings && m_ownedSettings)
delete m_settings;
m_settings = value; m_settings = value;
m_ownedSettings = owned; m_ownedSettings = owned;
} }
void SQLEditDialog::accept() void SQLEditDialog::accept() {
{
SQLEditResult result; SQLEditResult result;
if (ui->tabWidget->currentIndex() == 1){ if (ui->tabWidget->currentIndex() == 1) {
result.resultMode = SQLEditResult::CSVText; result.resultMode = SQLEditResult::CSVText;
} else if (!ui->cbSubdetail->isChecked()){ } else if (!ui->cbSubdetail->isChecked()) {
result.resultMode=SQLEditResult::Query; result.resultMode = SQLEditResult::Query;
} else { } else {
if (ui->rbSubQuery->isChecked()) result.resultMode = SQLEditResult::SubQuery; if (ui->rbSubQuery->isChecked())
else result.resultMode=SQLEditResult::SubProxy; result.resultMode = SQLEditResult::SubQuery;
else
result.resultMode = SQLEditResult::SubProxy;
} }
result.connectionName = ConnectionDesc::connectionNameForReport(ui->cbbConnection->currentText()); result.connectionName = ConnectionDesc::connectionNameForReport(ui->cbbConnection->currentText());
result.datasourceName=ui->leDatasourceName->text(); result.datasourceName = ui->leDatasourceName->text();
result.sql = ui->sqlText->toPlainText(); result.sql = ui->sqlText->toPlainText();
result.csv = ui->csvText->toPlainText(); result.csv = ui->csvText->toPlainText();
result.dialogMode = m_dialogMode; result.dialogMode = m_dialogMode;
result.oldDatasourceName = m_oldDatasourceName; result.oldDatasourceName = m_oldDatasourceName;
result.subdetail = ui->cbSubdetail->isChecked(); result.subdetail = ui->cbSubdetail->isChecked();
result.masterDatasource=ui->leMaster->text(); result.masterDatasource = ui->leMaster->text();
result.childDataSource=ui->leChild->text(); result.childDataSource = ui->leChild->text();
result.separator = ui->leSeparator->text(); result.separator = ui->leSeparator->text();
result.firstRowIsHeader = ui->cbUseFirstRowAsHeader->isChecked(); result.firstRowIsHeader = ui->cbUseFirstRowAsHeader->isChecked();
if (ui->fieldsMap->rowCount() > 0){ if (ui->fieldsMap->rowCount() > 0) {
for(int i=0; i< ui->fieldsMap->rowCount(); ++i){ for (int i = 0; i < ui->fieldsMap->rowCount(); ++i) {
LimeReport::FieldsCorrelation fieldsCorrelation; LimeReport::FieldsCorrelation fieldsCorrelation;
fieldsCorrelation.master = ui->fieldsMap->item(i,0) ? ui->fieldsMap->item(i,0)->data(Qt::DisplayRole).toString() : ""; fieldsCorrelation.master =
fieldsCorrelation.detail = ui->fieldsMap->item(i,1) ? ui->fieldsMap->item(i,1)->data(Qt::DisplayRole).toString() : ""; ui->fieldsMap->item(i, 0) ? ui->fieldsMap->item(i, 0)->data(Qt::DisplayRole).toString() : "";
fieldsCorrelation.detail =
ui->fieldsMap->item(i, 1) ? ui->fieldsMap->item(i, 1)->data(Qt::DisplayRole).toString() : "";
result.fieldMap.append(fieldsCorrelation); result.fieldMap.append(fieldsCorrelation);
} }
} }
@ -128,87 +126,83 @@ void SQLEditDialog::accept()
check(); check();
emit signalSqlEditingFinished(result); emit signalSqlEditingFinished(result);
QDialog::accept(); QDialog::accept();
}catch(LimeReport::ReportError &exception){ } catch (LimeReport::ReportError &exception) {
QMessageBox::critical(this,tr("Error"),exception.what()); QMessageBox::critical(this, tr("Error"), exception.what());
} }
} }
void SQLEditDialog::showEvent(QShowEvent *) void SQLEditDialog::showEvent(QShowEvent *) {
{
ui->lblInfo->setVisible(false); ui->lblInfo->setVisible(false);
initConnections(); initConnections();
readSettings(); readSettings();
} }
void SQLEditDialog::closeEvent(QCloseEvent *) void SQLEditDialog::closeEvent(QCloseEvent *) { writeSetting(); }
{
writeSetting();
}
void SQLEditDialog::hideEvent(QHideEvent *) void SQLEditDialog::hideEvent(QHideEvent *) { writeSetting(); }
{
writeSetting();
}
void SQLEditDialog::check() void SQLEditDialog::check() {
{ if (ui->leDatasourceName->text().isEmpty())
if (ui->leDatasourceName->text().isEmpty()) throw LimeReport::ReportError(tr("Datasource Name is empty!")); throw LimeReport::ReportError(tr("Datasource Name is empty!"));
if (ui->sqlText->toPlainText().isEmpty() && (!ui->rbProxy) ) throw LimeReport::ReportError(tr("SQL is empty!")); if (ui->sqlText->toPlainText().isEmpty() && (!ui->rbProxy))
if (m_dialogMode==AddMode){ throw LimeReport::ReportError(tr("SQL is empty!"));
if (m_datasources->containsDatasource(ui->leDatasourceName->text())){ if (m_dialogMode == AddMode) {
throw LimeReport::ReportError(QString(tr("Datasource with name: \"%1\" already exists!")).arg(ui->leDatasourceName->text())); if (m_datasources->containsDatasource(ui->leDatasourceName->text())) {
throw LimeReport::ReportError(
QString(tr("Datasource with name: \"%1\" already exists!")).arg(ui->leDatasourceName->text()));
} }
} }
} }
void SQLEditDialog::initConnections() void SQLEditDialog::initConnections() {
{ foreach (QString connectionName, QSqlDatabase::connectionNames()) {
foreach(QString connectionName, QSqlDatabase::connectionNames()){ ui->cbbConnection->addItem(QIcon(":/databrowser/images/plug-connect.png"),
ui->cbbConnection->addItem(QIcon(":/databrowser/images/plug-connect.png"),ConnectionDesc::connectionNameForUser(connectionName)); ConnectionDesc::connectionNameForUser(connectionName));
} }
foreach(QString connectionName, m_datasources->connectionNames()){ foreach (QString connectionName, m_datasources->connectionNames()) {
connectionName = (connectionName.compare(QSqlDatabase::defaultConnection)==0) ? connectionName =
tr("defaultConnection") : connectionName; (connectionName.compare(QSqlDatabase::defaultConnection) == 0) ? tr("defaultConnection") : connectionName;
if (ui->cbbConnection->findText(connectionName,Qt::MatchExactly )==-1) if (ui->cbbConnection->findText(connectionName, Qt::MatchExactly) == -1)
ui->cbbConnection->addItem(QIcon(":/databrowser/images/plug-disconnect.png"),ConnectionDesc::connectionNameForUser(connectionName)); ui->cbbConnection->addItem(QIcon(":/databrowser/images/plug-disconnect.png"),
ConnectionDesc::connectionNameForUser(connectionName));
} }
ui->cbbConnection->setCurrentIndex(ui->cbbConnection->findText(m_defaultConnection)); ui->cbbConnection->setCurrentIndex(ui->cbbConnection->findText(m_defaultConnection));
if (!m_oldDatasourceName.isEmpty()){ if (!m_oldDatasourceName.isEmpty()) {
ui->cbbConnection->setCurrentIndex(ui->cbbConnection->findText(ConnectionDesc::connectionNameForUser(m_datasources->connectionName(m_oldDatasourceName)))); ui->cbbConnection->setCurrentIndex(ui->cbbConnection->findText(
ConnectionDesc::connectionNameForUser(m_datasources->connectionName(m_oldDatasourceName))));
} }
} }
void SQLEditDialog::setDataSources(LimeReport::DataSourceManager *dataSources, QString datasourceName) void SQLEditDialog::setDataSources(LimeReport::DataSourceManager *dataSources, QString datasourceName) {
{ m_datasources = dataSources;
m_datasources=dataSources; if (!datasourceName.isEmpty()) {
if (!datasourceName.isEmpty()){
ui->cbSubdetail->setEnabled(true); ui->cbSubdetail->setEnabled(true);
m_oldDatasourceName=datasourceName; m_oldDatasourceName = datasourceName;
ui->leDatasourceName->setText(datasourceName); ui->leDatasourceName->setText(datasourceName);
ui->sqlText->setText(dataSources->queryText(datasourceName)); ui->sqlText->setText(dataSources->queryText(datasourceName));
if (dataSources->isQuery(datasourceName)){ if (dataSources->isQuery(datasourceName)) {
initQueryMode(); initQueryMode();
} }
if (dataSources->isSubQuery(datasourceName)){ if (dataSources->isSubQuery(datasourceName)) {
initSubQueryMode(); initSubQueryMode();
ui->leMaster->setText(dataSources->subQueryByName(datasourceName)->master()); ui->leMaster->setText(dataSources->subQueryByName(datasourceName)->master());
} }
if (dataSources->isProxy(datasourceName)){ if (dataSources->isProxy(datasourceName)) {
initProxyMode(); initProxyMode();
LimeReport::ProxyDesc* proxyDesc = dataSources->proxyByName(datasourceName); LimeReport::ProxyDesc *proxyDesc = dataSources->proxyByName(datasourceName);
ui->leChild->setText(proxyDesc->child()); ui->leChild->setText(proxyDesc->child());
ui->leMaster->setText(proxyDesc->master()); ui->leMaster->setText(proxyDesc->master());
int curIndex=0; int curIndex = 0;
foreach(LimeReport::FieldMapDesc* fields, *proxyDesc->fieldsMap()){ foreach (LimeReport::FieldMapDesc *fields, *proxyDesc->fieldsMap()) {
ui->fieldsMap->setRowCount(curIndex+1); ui->fieldsMap->setRowCount(curIndex + 1);
ui->fieldsMap->setItem(curIndex,0,new QTableWidgetItem(fields->master())); ui->fieldsMap->setItem(curIndex, 0, new QTableWidgetItem(fields->master()));
ui->fieldsMap->setItem(curIndex,1,new QTableWidgetItem(fields->detail())); ui->fieldsMap->setItem(curIndex, 1, new QTableWidgetItem(fields->detail()));
curIndex++; curIndex++;
} }
} }
if (dataSources->isCSV(datasourceName)){ if (dataSources->isCSV(datasourceName)) {
ui->csvText->setPlainText(dataSources->csvByName(datasourceName)->csvText()); ui->csvText->setPlainText(dataSources->csvByName(datasourceName)->csvText());
ui->leSeparator->setText(dataSources->csvByName(datasourceName)->separator()); ui->leSeparator->setText(dataSources->csvByName(datasourceName)->separator());
ui->cbUseFirstRowAsHeader->setChecked(dataSources->csvByName(datasourceName)->firstRowIsHeader()); ui->cbUseFirstRowAsHeader->setChecked(dataSources->csvByName(datasourceName)->firstRowIsHeader());
@ -217,59 +211,55 @@ void SQLEditDialog::setDataSources(LimeReport::DataSourceManager *dataSources, Q
} }
} }
void SQLEditDialog::setDefaultConnection(QString defaultConnection) void SQLEditDialog::setDefaultConnection(QString defaultConnection) {
{
m_defaultConnection = ConnectionDesc::connectionNameForUser(defaultConnection); m_defaultConnection = ConnectionDesc::connectionNameForUser(defaultConnection);
} }
void SQLEditDialog::slotDataSourceNameEditing() void SQLEditDialog::slotDataSourceNameEditing() {
{ if (m_dialogMode == AddMode) {
if (m_dialogMode==AddMode){ QPalette palette = ui->leDatasourceName->palette();
QPalette palette=ui->leDatasourceName->palette(); if (m_datasources->containsDatasource(ui->leDatasourceName->text())) {
if (m_datasources->containsDatasource(ui->leDatasourceName->text())){ palette.setColor(QPalette::Text, Qt::red);
palette.setColor(QPalette::Text,Qt::red);
ui->leDatasourceName->setPalette(palette); ui->leDatasourceName->setPalette(palette);
ui->lblInfo->setText(QString(tr("Datasource with name %1 already exist")).arg(ui->leDatasourceName->text())); ui->lblInfo->setText(
QString(tr("Datasource with name %1 already exist")).arg(ui->leDatasourceName->text()));
ui->lblInfo->setVisible(true); ui->lblInfo->setVisible(true);
} else { } else {
palette.setColor(QPalette::Text,QApplication::palette().text().color()); palette.setColor(QPalette::Text, QApplication::palette().text().color());
ui->leDatasourceName->setPalette(palette); ui->leDatasourceName->setPalette(palette);
ui->lblInfo->setVisible(false); ui->lblInfo->setVisible(false);
} }
} }
} }
void SQLEditDialog::on_cbSubdetail_clicked(bool checked) void SQLEditDialog::on_cbSubdetail_clicked(bool checked) {
{ if (checked) {
if (checked){ m_masterDatasources->setModel(new QStringListModel(m_datasources->dataSourceNames(), m_datasources));
m_masterDatasources->setModel(new QStringListModel(m_datasources->dataSourceNames(),m_datasources));
} }
ui->leMaster->setEnabled(checked); ui->leMaster->setEnabled(checked);
ui->rbProxy->setEnabled(checked); ui->rbProxy->setEnabled(checked);
ui->rbSubQuery->setEnabled(checked); ui->rbSubQuery->setEnabled(checked);
if ((checked)&&(ui->rbProxy->isChecked())) initProxyMode(); if ((checked) && (ui->rbProxy->isChecked()))
if ((checked)&&(ui->rbSubQuery->isChecked())) initSubQueryMode(); initProxyMode();
if (!checked) initQueryMode(); if ((checked) && (ui->rbSubQuery->isChecked()))
initSubQueryMode();
if (!checked)
initQueryMode();
} }
void SQLEditDialog::on_rbProxy_clicked(bool checked) void SQLEditDialog::on_rbProxy_clicked(bool checked) {
{ if (checked)
if (checked) initProxyMode(); initProxyMode();
} }
void SQLEditDialog::on_rbSubQuery_clicked(bool checked) void SQLEditDialog::on_rbSubQuery_clicked(bool checked) {
{ if (checked)
if (checked) initSubQueryMode(); initSubQueryMode();
} }
void SQLEditDialog::on_pbAddField_clicked() void SQLEditDialog::on_pbAddField_clicked() { ui->fieldsMap->setRowCount(ui->fieldsMap->rowCount() + 1); }
{
ui->fieldsMap->setRowCount(ui->fieldsMap->rowCount()+1);
}
void SQLEditDialog::initQueryMode() {
void SQLEditDialog::initQueryMode()
{
ui->gbSQL->setVisible(true); ui->gbSQL->setVisible(true);
ui->gbFieldsMap->setVisible(false); ui->gbFieldsMap->setVisible(false);
ui->pnlChildDatasource->setVisible(false); ui->pnlChildDatasource->setVisible(false);
@ -278,12 +268,11 @@ void SQLEditDialog::initQueryMode()
ui->cbSubdetail->setChecked(false); ui->cbSubdetail->setChecked(false);
ui->leMaster->setVisible(false); ui->leMaster->setVisible(false);
ui->lbMaster->setVisible(false); ui->lbMaster->setVisible(false);
//ui->tabWidget->removeTab(1); // ui->tabWidget->removeTab(1);
ui->tabWidget->addTab(ui->csvTab, tr("CSV")); ui->tabWidget->addTab(ui->csvTab, tr("CSV"));
} }
void SQLEditDialog::initSubQueryMode() void SQLEditDialog::initSubQueryMode() {
{
ui->gbSQL->setVisible(true); ui->gbSQL->setVisible(true);
ui->gbFieldsMap->setVisible(false); ui->gbFieldsMap->setVisible(false);
ui->pnlChildDatasource->setVisible(false); ui->pnlChildDatasource->setVisible(false);
@ -297,8 +286,7 @@ void SQLEditDialog::initSubQueryMode()
ui->tabWidget->removeTab(1); ui->tabWidget->removeTab(1);
} }
void SQLEditDialog::initProxyMode() void SQLEditDialog::initProxyMode() {
{
ui->gbSQL->setVisible(false); ui->gbSQL->setVisible(false);
ui->gbFieldsMap->setVisible(true); ui->gbFieldsMap->setVisible(true);
ui->pnlChildDatasource->setVisible(true); ui->pnlChildDatasource->setVisible(true);
@ -313,23 +301,17 @@ void SQLEditDialog::initProxyMode()
ui->tabWidget->removeTab(1); ui->tabWidget->removeTab(1);
} }
void SQLEditDialog::initCSVMode() void SQLEditDialog::initCSVMode() { ui->tabWidget->setCurrentWidget(ui->csvTab); }
{
ui->tabWidget->setCurrentWidget(ui->csvTab);
}
void SQLEditDialog::slotPreviewData() void SQLEditDialog::slotPreviewData() {
{ if (ui->cbbConnection->currentText().isEmpty()) {
if (ui->cbbConnection->currentText().isEmpty()){ QMessageBox::critical(this, tr("Attention"), tr("Connection is not specified"));
QMessageBox::critical(this,tr("Attention"),tr("Connection is not specified"));
return; return;
} }
m_previewModel = m_datasources->previewSQL( m_previewModel =
ConnectionDesc::connectionNameForReport(ui->cbbConnection->currentText()), m_datasources->previewSQL(ConnectionDesc::connectionNameForReport(ui->cbbConnection->currentText()),
ui->sqlText->toPlainText(), ui->sqlText->toPlainText(), ui->leMaster->text());
ui->leMaster->text() if (m_previewModel) {
);
if (m_previewModel){
ui->tvPreview->setModel(m_previewModel.data()); ui->tvPreview->setModel(m_previewModel.data());
ui->gbDataPreview->setVisible(true); ui->gbDataPreview->setVisible(true);
ui->pbPreview->setText(tr("Refresh")); ui->pbPreview->setText(tr("Refresh"));
@ -337,49 +319,37 @@ void SQLEditDialog::slotPreviewData()
} else { } else {
if (ui->gbDataPreview->isVisible()) if (ui->gbDataPreview->isVisible())
hidePreview(); hidePreview();
QMessageBox::critical(this,tr("Attention"),m_datasources->lastError()); QMessageBox::critical(this, tr("Attention"), m_datasources->lastError());
} }
} }
void SQLEditDialog::slotHidePreview() void SQLEditDialog::slotHidePreview() { hidePreview(); }
{
hidePreview();
}
void SQLEditDialog::writeSetting() void SQLEditDialog::writeSetting() {
{ if (settings() != 0) {
if (settings()!=0){
settings()->beginGroup("SQLEditor"); settings()->beginGroup("SQLEditor");
settings()->setValue("Geometry",saveGeometry()); settings()->setValue("Geometry", saveGeometry());
settings()->endGroup(); settings()->endGroup();
} }
} }
void SQLEditDialog::readSettings() void SQLEditDialog::readSettings() {
{ if (settings() == 0)
if (settings()==0) return; return;
settings()->beginGroup("SQLEditor"); settings()->beginGroup("SQLEditor");
QVariant v = settings()->value("Geometry"); QVariant v = settings()->value("Geometry");
if (v.isValid()){ if (v.isValid()) {
restoreGeometry(v.toByteArray()); restoreGeometry(v.toByteArray());
} }
settings()->endGroup(); settings()->endGroup();
} }
void SQLEditDialog::hidePreview() void SQLEditDialog::hidePreview() {
{
ui->gbDataPreview->setVisible(false); ui->gbDataPreview->setVisible(false);
ui->pbPreview->setText(tr("Preview")); ui->pbPreview->setText(tr("Preview"));
ui->pbHidePreview->setVisible(false); ui->pbHidePreview->setVisible(false);
} }
void SQLEditDialog::on_pbDelField_clicked() void SQLEditDialog::on_pbDelField_clicked() { ui->fieldsMap->removeRow(ui->fieldsMap->currentRow()); }
{
ui->fieldsMap->removeRow(ui->fieldsMap->currentRow());
}
} // namespace LimeReport } // namespace LimeReport

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@ -1,287 +0,0 @@
#include "borderframeeditor.h"
#include "ui_borderframeeditor.h"
#include <QPainter>
#include <QGraphicsLineItem>
#include <QDebug>
#include <QMouseEvent>
#include "lrbasedesignintf.h"
#include "lrbordereditor.h"
using namespace LimeReport;
BorderFrameEditor::BorderFrameEditor(QWidget *parent)
: QWidget(parent)
, ui(new Ui::BorderFrameEditor)
{
ui->setupUi(this);
scene = new QGraphicsScene(ui->graphicsView);
QRect vRect = rect();
//Draw corder lines
//topLeft
scene->addLine(10,5, 10,10,QPen(Qt::gray));
scene->addLine(5,10, 10,10,QPen(Qt::gray));
//bottomLeft
scene->addLine(10,vRect.bottom() -5, 10,vRect.bottom()-10,QPen(Qt::gray));
scene->addLine(5,vRect.bottom()-10,10,vRect.bottom()-10,QPen(Qt::gray));
//bottomRight
scene->addLine(vRect.right()-10,vRect.bottom() -5,vRect.right()- 10,vRect.bottom()-10,QPen(Qt::gray));
scene->addLine(vRect.right()-5,vRect.bottom()-10,vRect.right()-10,vRect.bottom()-10,QPen(Qt::gray));
//topRight
scene->addLine(vRect.width()-10,5,vRect.width()- 10,10,QPen(Qt::gray));
scene->addLine(vRect.width()-5,10, vRect.width()-10,10,QPen(Qt::gray));
scene->setSceneRect(vRect);
ui->graphicsView->setScene(scene);
QGraphicsSimpleTextItem * io = new QGraphicsSimpleTextItem();
io->setAcceptedMouseButtons(Qt::LeftButton);
io->setPos(scene->sceneRect().center());
io->setText(tr("Text"));
scene->addItem(io);
QRectF bR = io->sceneBoundingRect();
io->setPos( scene->sceneRect().center().x() - bR.width()/2, scene->sceneRect().center().y() - bR.height()/2 );
connect(this,SIGNAL(borderSideClicked(int, bool)),this,SLOT(SlotBorderSideClicked(int,bool)));
}
BorderFrameEditor::~BorderFrameEditor()
{
delete ui;
}
void BorderFrameEditor::setPen(QPen pen)
{
m_pen = pen;
updateBorders();
}
QPen BorderFrameEditor::pen()
{
return m_pen;
}
void BorderFrameEditor::setAllLines()
{
topLine = scene->addLine(QLineF(10,10,rect().width() - 10,10),m_pen);
leftLine = scene->addLine(QLineF(10,10,10,rect().height() - 10),m_pen);
bottomLine = scene->addLine(QLineF(10,rect().bottom() -10,rect().width() - 10
,rect().bottom() - 10),m_pen);
rightLine = scene->addLine(QLineF(rect().width() - 10,10
,rect().width() - 10,rect().height() - 10),m_pen);
}
void BorderFrameEditor::unSetAllLines()
{
if(topLine)
{
scene->removeItem(topLine);
}
if(leftLine)
{
scene->removeItem(leftLine);
}
if(bottomLine)
{
scene->removeItem(bottomLine);
}
if(rightLine)
{
scene->removeItem(rightLine);
}
}
void BorderFrameEditor::mousePressEvent(QMouseEvent *event)
{
if(event->x() >= 10 && event->y() <30)//Draw top border
{
if(!topLine)
{
emit borderSideClicked(1,true);
}
else
{
emit borderSideClicked(1,false);
}
}
if((event->x() >= 10 && event->x() < 30) && (event->y() > 10)) //Draw border left
{
if(!leftLine)
{
emit borderSideClicked(4,true);
}
else
{
emit borderSideClicked(4,false);
}
}
if(event->x() >= 10 && (event->y() >80 && event->y() < rect().bottom())) //Draw bottom border
{
if(!bottomLine)
{
emit borderSideClicked(2,true);
}
else
{
emit borderSideClicked(2,false);
}
}
if((event->x() >= 130 && event->x() < rect().width()) && event->y() > 10) //Draw border right
{
if(!rightLine)
{
emit borderSideClicked(8,true);
}
else
{
emit borderSideClicked(8,false);
}
}
}
void BorderFrameEditor::SlotBorderSideClicked(int side, bool show)
{
switch(side)
{
case BaseDesignIntf::BorderSide::TopLine:
{
if(show)
{
topLine = scene->addLine(QLineF(10,10,rect().width() - 10,10),m_pen);
}
else
{
scene->removeItem(topLine);
topLine = NULL;
}
}break;
case BaseDesignIntf::LeftLine:
{
if(show)
{
leftLine = scene->addLine(QLineF(10,10,10,rect().height() - 10),m_pen);
}
else
{
scene->removeItem(leftLine);
leftLine = NULL;
}
}break;
case BaseDesignIntf::BottomLine:
{
if(show)
{
bottomLine = scene->addLine(QLineF(10,rect().bottom() -10,rect().width() - 10
,rect().bottom() - 10),m_pen);
}
else
{
scene->removeItem(bottomLine);
bottomLine = NULL;
}
}break;
case BaseDesignIntf::RightLine:
{
if(show)
{
rightLine = scene->addLine(QLineF(rect().width() - 10,10
,rect().width() - 10,rect().height() - 10),m_pen);
}
else
{
scene->removeItem(rightLine);
rightLine = NULL;
}
}
}
updateBorders();
}
void BorderFrameEditor::updateBorders()
{
//if a line is set we redraw it
if(topLine)
{
scene->removeItem(topLine);
topLine = scene->addLine(QLineF(10,10,rect().width() - 10,10),m_pen);
}
if(leftLine)
{
scene->removeItem(leftLine);
leftLine = scene->addLine(QLineF(10,10,10,rect().height() - 10),m_pen);
}
if(bottomLine)
{
scene->removeItem(bottomLine);
bottomLine = scene->addLine(QLineF(10,rect().bottom() -10,rect().width() - 10
,rect().bottom() - 10),m_pen);
}
if(rightLine)
{
scene->removeItem(rightLine);
rightLine = scene->addLine(QLineF(rect().width() - 10,10
,rect().width() - 10,rect().height() - 10),m_pen);
}
}

View File

@ -44,7 +44,7 @@ void ItemsBordersEditorWidget::setItemEvent(BaseDesignIntf* item)
updateValues((BaseDesignIntf::BorderLines)borders.toInt()); updateValues((BaseDesignIntf::BorderLines)borders.toInt());
setEnabled(true); setEnabled(true);
} }
itm = item; m_item = item;
} }
void ItemsBordersEditorWidget::properyChangedEvent(const QString& property, const QVariant& oldValue, const QVariant& newValue) void ItemsBordersEditorWidget::properyChangedEvent(const QString& property, const QVariant& oldValue, const QVariant& newValue)
@ -72,21 +72,18 @@ void ItemsBordersEditorWidget::allBordesClicked()
updateValues((BaseDesignIntf::BorderLines)borders); updateValues((BaseDesignIntf::BorderLines)borders);
} }
void ItemsBordersEditorWidget::buttonClicked(bool) void ItemsBordersEditorWidget::buttonClicked(bool){}
{
}
void ItemsBordersEditorWidget::editBorderClicked() void ItemsBordersEditorWidget::editBorderClicked()
{ {
lrbordereditor be; BorderEditor be;
be.loadItem(itm); be.loadItem(m_item);
if(be.exec() == QDialog::Rejected)return; if ( be.exec() == QDialog::Rejected ) return;
updateValues(be.borderSides()); updateValues(be.borderSides());
itm->setBorderLinesFlags(be.borderSides()); m_item->setBorderLinesFlags(be.borderSides());
itm->setBorderLineSize(be.border_width()); m_item->setBorderLineSize(be.borderWidth());
itm->setBorderStyle((LimeReport::BaseDesignIntf::BorderStyle)be.border_style()); m_item->setBorderStyle((LimeReport::BaseDesignIntf::BorderStyle)be.borderStyle());
itm->setBorderColor(be.borderColor()); m_item->setBorderColor(be.borderColor());
} }
void ItemsBordersEditorWidget::initEditor() void ItemsBordersEditorWidget::initEditor()
@ -129,7 +126,7 @@ void ItemsBordersEditorWidget::initEditor()
addAction(m_allLines); addAction(m_allLines);
addSeparator(); addSeparator();
m_BorderEditor = new QAction(tr("Edit border"),this); m_BorderEditor = new QAction(tr("Edit border"),this);
m_BorderEditor->setIcon(QIcon(":/report/images/allLines")); m_BorderEditor->setIcon(QIcon(":/report/images/borderEditor"));
connect(m_BorderEditor,SIGNAL(triggered()),this,SLOT(editBorderClicked())); connect(m_BorderEditor,SIGNAL(triggered()),this,SLOT(editBorderClicked()));
addAction(m_BorderEditor); addAction(m_BorderEditor);
@ -140,20 +137,20 @@ void ItemsBordersEditorWidget::initEditor()
void ItemsBordersEditorWidget::updateValues(BaseDesignIntf::BorderLines borders) void ItemsBordersEditorWidget::updateValues(BaseDesignIntf::BorderLines borders)
{ {
m_changing = true; m_changing = true;
m_topLine->setChecked(borders&BaseDesignIntf::TopLine); m_topLine->setChecked(borders & BaseDesignIntf::TopLine);
m_bottomLine->setChecked(borders&BaseDesignIntf::BottomLine); m_bottomLine->setChecked(borders & BaseDesignIntf::BottomLine);
m_leftLine->setChecked(borders&BaseDesignIntf::LeftLine); m_leftLine->setChecked(borders & BaseDesignIntf::LeftLine);
m_rightLine->setChecked(borders&BaseDesignIntf::RightLine); m_rightLine->setChecked(borders & BaseDesignIntf::RightLine);
m_changing = false; m_changing = false;
} }
BaseDesignIntf::BorderLines ItemsBordersEditorWidget::createBorders() BaseDesignIntf::BorderLines ItemsBordersEditorWidget::createBorders()
{ {
int borders = 0; int borders = 0;
borders += (m_topLine->isChecked())?BaseDesignIntf::TopLine:0; borders += (m_topLine->isChecked()) ? BaseDesignIntf::TopLine:0;
borders += (m_bottomLine->isChecked())?BaseDesignIntf::BottomLine:0; borders += (m_bottomLine->isChecked()) ? BaseDesignIntf::BottomLine:0;
borders += (m_leftLine->isChecked())?BaseDesignIntf::LeftLine:0; borders += (m_leftLine->isChecked()) ? BaseDesignIntf::LeftLine:0;
borders += (m_rightLine->isChecked())?BaseDesignIntf::RightLine:0; borders += (m_rightLine->isChecked()) ? BaseDesignIntf::RightLine:0;
return (BaseDesignIntf::BorderLines)borders; return (BaseDesignIntf::BorderLines)borders;
} }
@ -180,6 +177,21 @@ void ItemsBordersEditorWidgetForDesigner::allBordesClicked()
ItemsBordersEditorWidget::allBordesClicked(); ItemsBordersEditorWidget::allBordesClicked();
m_reportEditor->setBorders(createBorders()); m_reportEditor->setBorders(createBorders());
} }
void ItemsBordersEditorWidgetForDesigner::editBorderClicked()
{
BorderEditor be;
be.loadItem(m_item);
if ( be.exec() == QDialog::Rejected ) return;
m_reportEditor->setBordersExt(
be.borderSides(),
be.borderWidth(),
(LimeReport::BaseDesignIntf::BorderStyle)be.borderStyle(),
be.borderColor()
);
}
#endif #endif
} //namespace LimeReport } //namespace LimeReport

View File

@ -49,11 +49,12 @@ protected slots:
virtual void noBordesClicked(); virtual void noBordesClicked();
virtual void allBordesClicked(); virtual void allBordesClicked();
virtual void buttonClicked(bool); virtual void buttonClicked(bool);
void editBorderClicked(); virtual void editBorderClicked();
protected: protected:
void setItemEvent(BaseDesignIntf *item); void setItemEvent(BaseDesignIntf *item);
void properyChangedEvent(const QString &property, const QVariant &oldValue, const QVariant &newValue); void properyChangedEvent(const QString &property, const QVariant &oldValue, const QVariant &newValue);
BaseDesignIntf::BorderLines createBorders(); BaseDesignIntf::BorderLines createBorders();
BaseDesignIntf *m_item;
private: private:
void initEditor(); void initEditor();
void updateValues(BaseDesignIntf::BorderLines borders); void updateValues(BaseDesignIntf::BorderLines borders);
@ -66,7 +67,7 @@ private:
QAction* m_BorderEditor; QAction* m_BorderEditor;
bool m_changing; bool m_changing;
int m_borders; int m_borders;
BaseDesignIntf *itm;
}; };
#ifdef HAVE_REPORT_DESIGNER #ifdef HAVE_REPORT_DESIGNER
@ -79,6 +80,7 @@ protected slots:
void buttonClicked(bool); void buttonClicked(bool);
void noBordesClicked(); void noBordesClicked();
void allBordesClicked(); void allBordesClicked();
void editBorderClicked();
private: private:
ReportDesignWidget* m_reportEditor; ReportDesignWidget* m_reportEditor;

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@ -2,181 +2,155 @@
#include "ui_lrbordereditor.h" #include "ui_lrbordereditor.h"
#include <QColorDialog> #include <QColorDialog>
#include "lrbasedesignintf.h" #include "lrbasedesignintf.h"
lrbordereditor::lrbordereditor(QWidget *parent) :
namespace LimeReport{
BorderEditor::BorderEditor(QWidget *parent) :
QDialog(parent), QDialog(parent),
ui(new Ui::lrbordereditor) ui(new Ui::BorderEditor),
m_borderStyle(1),
m_borderWidth(1)
{ {
ui->setupUi(this); ui->setupUi(this);
connect(
connect(ui->borderFrame,SIGNAL(borderSideClicked(int, bool)), this, SLOT(checkToolButtons(int, bool))); ui->borderFrame, SIGNAL(borderSideClicked(LimeReport::BaseDesignIntf::BorderSide, bool)),
this, SLOT(checkToolButtons(LimeReport::BaseDesignIntf::BorderSide, bool))
);
} }
void lrbordereditor::loadItem(LimeReport::BaseDesignIntf *i) void BorderEditor::loadItem(LimeReport::BaseDesignIntf *item)
{ {
item = i; m_item = item;
if(item->borderLines() & LimeReport::BaseDesignIntf::TopLine) emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::TopLine,
{ item->borderLines() & LimeReport::BaseDesignIntf::TopLine);
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::TopLine,true); emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::LeftLine,
item->borderLines() & LimeReport::BaseDesignIntf::LeftLine);
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::RightLine,
item->borderLines() & LimeReport::BaseDesignIntf::RightLine);
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::BottomLine,
item->borderLines() & LimeReport::BaseDesignIntf::BottomLine);
}
if(item->borderLines() & LimeReport::BaseDesignIntf::LeftLine)
{
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::LeftLine,true);
}
if(item->borderLines() & LimeReport::BaseDesignIntf::RightLine)
{
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::RightLine,true);
}
if(item->borderLines() & LimeReport::BaseDesignIntf::BottomLine)
{
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::BottomLine,true);
}
QPen pen; QPen pen;
pen.setWidthF(item->borderLineSize()); pen.setWidthF(item->borderLineSize());
pen.setColor(item->borderColor()); pen.setColor(item->borderColor());
pen.setStyle((Qt::PenStyle)item->borderStyle()); pen.setStyle((Qt::PenStyle)item->borderStyle());
ui->borderFrame->setPen(pen); ui->borderFrame->setPen(pen);
border_color = item->borderColor().name(); m_borderColor = item->borderColor().name();
ui->listWidget->setCurrentRow((Qt::PenStyle)item->borderStyle()); ui->listWidget->setCurrentRow((Qt::PenStyle)item->borderStyle());
ui->comboBox->setCurrentText(QString::number(item->borderLineSize())); ui->comboBox->setCurrentText(QString::number(item->borderLineSize()));
borderWidth = ui->comboBox->currentText().toDouble(); m_borderWidth = ui->comboBox->currentText().toDouble();
borderStyle =ui->listWidget->currentRow(); m_borderStyle =ui->listWidget->currentRow();
ui->pushButton->setStyleSheet(QString("#pushButton{background-color:%1;}").arg(border_color)); ui->colorIndicator->setStyleSheet(QString("background-color:%1;").arg(m_borderColor));
} }
LimeReport::BaseDesignIntf::BorderLines lrbordereditor::borderSides() LimeReport::BaseDesignIntf::BorderLines BorderEditor::borderSides()
{ {
int borders = 0; int borders = 0;
borders += (ui->topLine->isChecked())?LimeReport::BaseDesignIntf::TopLine:0; borders += (ui->topLine->isChecked()) ? LimeReport::BaseDesignIntf::TopLine : 0;
borders += (ui->bottomLine->isChecked())?LimeReport::BaseDesignIntf::BottomLine:0; borders += (ui->bottomLine->isChecked()) ? LimeReport::BaseDesignIntf::BottomLine : 0;
borders += (ui->leftLine->isChecked())?LimeReport::BaseDesignIntf::LeftLine:0; borders += (ui->leftLine->isChecked()) ? LimeReport::BaseDesignIntf::LeftLine : 0;
borders += (ui->rightLine->isChecked())?LimeReport::BaseDesignIntf::RightLine:0; borders += (ui->rightLine->isChecked()) ? LimeReport::BaseDesignIntf::RightLine : 0;
return (LimeReport::BaseDesignIntf::BorderLines)borders; return (LimeReport::BaseDesignIntf::BorderLines) borders;
} }
LimeReport::BaseDesignIntf::BorderStyle lrbordereditor::border_style() LimeReport::BaseDesignIntf::BorderStyle BorderEditor::borderStyle()
{ {
return (LimeReport::BaseDesignIntf::BorderStyle)borderStyle; return (LimeReport::BaseDesignIntf::BorderStyle) m_borderStyle;
} }
QString lrbordereditor::borderColor() QString BorderEditor::borderColor()
{ {
return border_color; return m_borderColor;
} }
double lrbordereditor::border_width() double BorderEditor::borderWidth()
{ {
return borderWidth; return m_borderWidth;
} }
lrbordereditor::~lrbordereditor() BorderEditor::~BorderEditor()
{ {
delete ui; delete ui;
} }
void lrbordereditor::on_listWidget_currentRowChanged(int currentRow) void BorderEditor::on_listWidget_currentRowChanged(int currentRow)
{ {
QPen pen = ui->borderFrame->pen(); QPen pen = ui->borderFrame->pen();
pen.setStyle((Qt::PenStyle)currentRow); pen.setStyle((Qt::PenStyle)currentRow);
borderStyle = currentRow; m_borderStyle = currentRow;
ui->borderFrame->setPen(pen); ui->borderFrame->setPen(pen);
} }
void BorderEditor::on_comboBox_currentTextChanged(const QString &arg1)
void lrbordereditor::on_comboBox_currentTextChanged(const QString &arg1)
{ {
QPen pen = ui->borderFrame->pen(); QPen pen = ui->borderFrame->pen();
pen.setWidthF(arg1.toDouble()); pen.setWidthF(arg1.toDouble());
ui->borderFrame->setPen(pen); ui->borderFrame->setPen(pen);
borderWidth = arg1.toDouble(); m_borderWidth = arg1.toDouble();
} }
void BorderEditor::checkToolButtons(LimeReport::BaseDesignIntf::BorderSide side, bool check)
void lrbordereditor::on_pushButton_clicked()
{ {
QColorDialog cd(this);
if(cd.exec() == QDialog::Rejected)return;
QPen pen = ui->borderFrame->pen();
pen.setColor(cd.selectedColor().name());
border_color = pen.color().name();
ui->pushButton->setStyleSheet(QString("#pushButton{background-color:%1;}").arg(border_color));
ui->borderFrame->setPen(pen);
}
void lrbordereditor::on_toolButton_4_clicked()
{
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::TopLine,true);
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::BottomLine,true);
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::LeftLine,true);
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::RightLine,true);
QPen pen = ui->borderFrame->pen();
ui->borderFrame->setPen(pen);
}
void lrbordereditor::on_noLines_clicked()
{
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::TopLine,false);
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::BottomLine,false);
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::LeftLine,false);
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::RightLine,false);
}
void lrbordereditor::on_topLine_clicked()
{
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::TopLine,ui->topLine->isChecked());
}
void lrbordereditor::checkToolButtons(int side, bool check)
{
switch(side) switch(side)
{ {
case LimeReport::BaseDesignIntf::BorderSide::TopLine: case BaseDesignIntf::BorderSide::TopLine:
{ ui->topLine->setChecked(check);
ui->topLine->setChecked(check); break;
}break; case BaseDesignIntf::BorderSide::BottomLine:
case LimeReport::BaseDesignIntf::BorderSide::BottomLine: ui->bottomLine->setChecked(check);
{ break;
ui->bottomLine->setChecked(check); case BaseDesignIntf::BorderSide::LeftLine:
}break; ui->leftLine->setChecked(check);
case LimeReport::BaseDesignIntf::BorderSide::LeftLine: break;
{ case BaseDesignIntf::BorderSide::RightLine:
ui->leftLine->setChecked(check); ui->rightLine->setChecked(check);
}break; break;
case LimeReport::BaseDesignIntf::BorderSide::RightLine:
{
ui->rightLine->setChecked(check);
}break;
} }
} }
void BorderEditor::on_topLine_clicked(bool checked){
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::TopLine, checked);
}
void lrbordereditor::on_bottomLine_clicked() void BorderEditor::on_bottomLine_clicked(bool checked){
{ emit ui->borderFrame->borderSideClicked(BaseDesignIntf::BorderSide::BottomLine, checked);
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::BottomLine,ui->bottomLine->isChecked()); }
void BorderEditor::on_leftLine_clicked(bool checked){
emit ui->borderFrame->borderSideClicked(BaseDesignIntf::BorderSide::LeftLine, checked);
}
void BorderEditor::on_rightLine_clicked(bool checked){
emit ui->borderFrame->borderSideClicked(BaseDesignIntf::BorderSide::RightLine, checked);
} }
void lrbordereditor::on_leftLine_clicked() void BorderEditor::on_allLines_clicked()
{ {
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::LeftLine,ui->leftLine->isChecked()); emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::TopLine, true);
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::BottomLine, true);
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::LeftLine, true);
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::RightLine, true);
}
void BorderEditor::on_noLines_clicked()
{
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::TopLine, false);
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::BottomLine, false);
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::LeftLine, false);
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::RightLine, false);
} }
void lrbordereditor::on_toolButton_3_clicked() void BorderEditor::on_selectColor_clicked()
{ {
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::RightLine,ui->rightLine->isChecked()); QColorDialog cd(this);
if(cd.exec() == QDialog::Rejected) return;
QPen pen = ui->borderFrame->pen();
pen.setColor(cd.selectedColor().name());
m_borderColor = pen.color().name();
ui->colorIndicator->setStyleSheet(QString("background-color:%1;").arg(m_borderColor));
ui->borderFrame->setPen(pen);
} }
} // namespace LimeReport

View File

@ -3,54 +3,47 @@
#include <QDialog> #include <QDialog>
#include "lrbasedesignintf.h" #include "lrbasedesignintf.h"
namespace LimeReport{
namespace Ui { namespace Ui {
class lrbordereditor; class BorderEditor;
} }
class lrbordereditor : public QDialog
class LIMEREPORT_EXPORT BorderEditor : public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit lrbordereditor(QWidget *parent = nullptr); explicit BorderEditor(QWidget *parent = nullptr);
void loadItem(LimeReport::BaseDesignIntf *i); void loadItem(LimeReport::BaseDesignIntf *item);
LimeReport::BaseDesignIntf::BorderLines borderSides(); LimeReport::BaseDesignIntf::BorderLines borderSides();
LimeReport::BaseDesignIntf::BorderStyle border_style(); LimeReport::BaseDesignIntf::BorderStyle borderStyle();
QString borderColor(); QString borderColor();
double border_width(); double borderWidth();
~BorderEditor();
~lrbordereditor();
private slots: private slots:
void on_listWidget_currentRowChanged(int currentRow); void on_listWidget_currentRowChanged(int currentRow);
void on_comboBox_currentTextChanged(const QString &arg1); void on_comboBox_currentTextChanged(const QString &arg1);
void on_pushButton_clicked();
void on_toolButton_4_clicked();
void on_noLines_clicked(); void on_noLines_clicked();
void on_topLine_clicked(bool checked);
void on_topLine_clicked(); void on_bottomLine_clicked(bool checked);
void checkToolButtons(int side, bool check); void on_leftLine_clicked(bool checked);
void on_rightLine_clicked(bool checked);
void on_bottomLine_clicked(); void on_allLines_clicked();
void checkToolButtons(LimeReport::BaseDesignIntf::BorderSide side, bool check);
void on_leftLine_clicked(); void on_selectColor_clicked();
void on_toolButton_3_clicked();
private: private:
Ui::lrbordereditor *ui; Ui::BorderEditor *ui;
LimeReport::BaseDesignIntf *item; LimeReport::BaseDesignIntf *m_item;
QString border_color; QString m_borderColor;
int borderStyle = 1; int m_borderStyle;
double borderWidth = 1; double m_borderWidth;
}; };
} // namespace LimeReport
#endif // LRBORDEREDITOR_H #endif // LRBORDEREDITOR_H

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>lrbordereditor</class> <class>LimeReport::BorderEditor</class>
<widget class="QDialog" name="lrbordereditor"> <widget class="QDialog" name="LimeReport::BorderEditor">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>381</width> <width>381</width>
<height>311</height> <height>352</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -31,7 +31,7 @@
<string>No lines</string> <string>No lines</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../report.qrc"> <iconset>
<normaloff>:/report/images/noLines</normaloff>:/report/images/noLines</iconset> <normaloff>:/report/images/noLines</normaloff>:/report/images/noLines</iconset>
</property> </property>
<property name="checkable"> <property name="checkable">
@ -46,12 +46,12 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QToolButton" name="toolButton_4"> <widget class="QToolButton" name="allLines">
<property name="text"> <property name="text">
<string>Outline</string> <string>Outline</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../report.qrc"> <iconset>
<normaloff>:/report/images/allLines</normaloff>:/report/images/allLines</iconset> <normaloff>:/report/images/allLines</normaloff>:/report/images/allLines</iconset>
</property> </property>
<property name="toolButtonStyle"> <property name="toolButtonStyle">
@ -81,7 +81,7 @@
<string>...</string> <string>...</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../report.qrc"> <iconset>
<normaloff>:/report/images/topLine</normaloff>:/report/images/topLine</iconset> <normaloff>:/report/images/topLine</normaloff>:/report/images/topLine</iconset>
</property> </property>
<property name="checkable"> <property name="checkable">
@ -108,7 +108,7 @@
<string>...</string> <string>...</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../report.qrc"> <iconset>
<normaloff>:/report/images/bottomLine</normaloff>:/report/images/bottomLine</iconset> <normaloff>:/report/images/bottomLine</normaloff>:/report/images/bottomLine</iconset>
</property> </property>
<property name="checkable"> <property name="checkable">
@ -119,7 +119,7 @@
</layout> </layout>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="BorderFrameEditor" name="borderFrame" native="true"/> <widget class="LimeReport::BorderFrameEditor" name="borderFrame" native="true"/>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
@ -129,7 +129,7 @@
<string>...</string> <string>...</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../report.qrc"> <iconset>
<normaloff>:/report/images/leftLine</normaloff>:/report/images/leftLine</iconset> <normaloff>:/report/images/leftLine</normaloff>:/report/images/leftLine</iconset>
</property> </property>
<property name="checkable"> <property name="checkable">
@ -156,7 +156,7 @@
<string>...</string> <string>...</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../report.qrc"> <iconset>
<normaloff>:/report/images/rightLine</normaloff>:/report/images/rightLine</iconset> <normaloff>:/report/images/rightLine</normaloff>:/report/images/rightLine</iconset>
</property> </property>
<property name="checkable"> <property name="checkable">
@ -319,14 +319,34 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="pushButton"> <layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="styleSheet"> <item>
<string notr="true">#pushButton{background-color: black;}</string> <widget class="QWidget" name="colorIndicator" native="true">
</property> <property name="minimumSize">
<property name="text"> <size>
<string>Select...</string> <width>20</width>
</property> <height>20</height>
</widget> </size>
</property>
<property name="baseSize">
<size>
<width>10</width>
<height>10</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(0, 0, 0);</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="selectColor">
<property name="text">
<string>Select</string>
</property>
</widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</widget> </widget>
@ -342,46 +362,43 @@
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>
<class>BorderFrameEditor</class> <class>LimeReport::BorderFrameEditor</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>borderframeeditor.h</header> <header>lrborderframeeditor.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<resources> <resources/>
<include location="../report.qrc"/>
<include location="../report.qrc"/>
</resources>
<connections> <connections>
<connection> <connection>
<sender>buttonBox</sender> <sender>buttonBox</sender>
<signal>accepted()</signal> <signal>accepted()</signal>
<receiver>lrbordereditor</receiver> <receiver>LimeReport::BorderEditor</receiver>
<slot>accept()</slot> <slot>accept()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>253</x> <x>119</x>
<y>255</y> <y>322</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>219</x> <x>377</x>
<y>275</y> <y>309</y>
</hint> </hint>
</hints> </hints>
</connection> </connection>
<connection> <connection>
<sender>buttonBox</sender> <sender>buttonBox</sender>
<signal>rejected()</signal> <signal>rejected()</signal>
<receiver>lrbordereditor</receiver> <receiver>LimeReport::BorderEditor</receiver>
<slot>reject()</slot> <slot>reject()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>316</x> <x>48</x>
<y>258</y> <y>334</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>345</x> <x>66</x>
<y>277</y> <y>348</y>
</hint> </hint>
</hints> </hints>
</connection> </connection>

View File

@ -0,0 +1,181 @@
#include "lrborderframeeditor.h"
#include "ui_lrborderframeeditor.h"
#include <QPainter>
#include <QGraphicsLineItem>
#include <QDebug>
#include <QMouseEvent>
#include "lrbasedesignintf.h"
#include "lrbordereditor.h"
namespace LimeReport{
BorderFrameEditor::BorderFrameEditor(QWidget *parent)
: QWidget(parent)
, ui(new Ui::BorderFrameEditor)
{
ui->setupUi(this);
scene = new QGraphicsScene(ui->graphicsView);
QRect vRect = rect();
//Draw corder lines
//topLeft
scene->addLine(10, 5, 10, 10, QPen(Qt::gray));
scene->addLine(5, 10, 10, 10, QPen(Qt::gray));
//bottomLeft
scene->addLine(10,vRect.bottom() -5, 10, vRect.bottom()-10, QPen(Qt::gray));
scene->addLine(5,vRect.bottom()-10, 10, vRect.bottom()-10, QPen(Qt::gray));
//bottomRight
scene->addLine(vRect.right() - 10, vRect.bottom() - 5, vRect.right()- 10, vRect.bottom() - 10, QPen(Qt::gray));
scene->addLine(vRect.right() - 5, vRect.bottom() - 10, vRect.right() - 10, vRect.bottom() - 10, QPen(Qt::gray));
//topRight
scene->addLine(vRect.width() - 10, 5, vRect.width() - 10, 10, QPen(Qt::gray));
scene->addLine(vRect.width() - 5, 10, vRect.width() - 10, 10, QPen(Qt::gray));
scene->setSceneRect(vRect);
ui->graphicsView->setScene(scene);
QGraphicsSimpleTextItem * io = new QGraphicsSimpleTextItem();
io->setAcceptedMouseButtons(Qt::LeftButton);
io->setPos(scene->sceneRect().center());
io->setText(tr("Text"));
scene->addItem(io);
QRectF bR = io->sceneBoundingRect();
io->setPos( scene->sceneRect().center().x() - bR.width()/2, scene->sceneRect().center().y() - bR.height()/2 );
connect(
this, SIGNAL(borderSideClicked(LimeReport::BaseDesignIntf::BorderSide, bool)),
this, SLOT(slotBorderSideClicked(LimeReport::BaseDesignIntf::BorderSide, bool))
);
}
BorderFrameEditor::~BorderFrameEditor()
{
delete ui;
}
void BorderFrameEditor::setPen(QPen pen)
{
m_pen = pen;
updateBorders();
}
QPen BorderFrameEditor::pen()
{
return m_pen;
}
void BorderFrameEditor::setAllLines()
{
if (!topLine)
topLine = createSideLine(LimeReport::BaseDesignIntf::BorderSide::TopLine);
if (!leftLine)
leftLine = createSideLine(LimeReport::BaseDesignIntf::BorderSide::LeftLine);
if (!bottomLine)
bottomLine = createSideLine(LimeReport::BaseDesignIntf::BorderSide::BottomLine);
if (!rightLine)
rightLine = createSideLine(LimeReport::BaseDesignIntf::BorderSide::RightLine);
}
void BorderFrameEditor::unSetAllLines()
{
if (topLine){
scene->removeItem(topLine);
topLine = NULL;
}
if (leftLine){
scene->removeItem(leftLine);
leftLine = NULL;
}
if (bottomLine){
scene->removeItem(bottomLine);
bottomLine = NULL;
}
if (rightLine){
scene->removeItem(rightLine);
rightLine = NULL;
}
}
void BorderFrameEditor::mousePressEvent(QMouseEvent *event)
{
if (event->x() >= 10 && event->y() <30)
emit borderSideClicked(BaseDesignIntf::BorderSide::TopLine, !topLine);
if ((event->x() >= 10 && event->x() < 30) && (event->y() > 10))
emit borderSideClicked(BaseDesignIntf::BorderSide::LeftLine, !leftLine);
if (event->x() >= 10 && (event->y() >80 && event->y() < rect().bottom()))
emit borderSideClicked(BaseDesignIntf::BorderSide::BottomLine, !bottomLine);
if ((event->x() >= 130 && event->x() < rect().width()) && event->y() > 10)
emit borderSideClicked(BaseDesignIntf::BorderSide::RightLine, !rightLine);
}
void BorderFrameEditor::slotBorderSideClicked(BaseDesignIntf::BorderSide side, bool show)
{
switch(side){
case BaseDesignIntf::BorderSide::TopLine:
if (show){
if (!topLine) topLine = createSideLine(side);
} else {
if (topLine) scene->removeItem(topLine);
topLine = NULL;
}
break;
case BaseDesignIntf::LeftLine:
if (show){
if (!leftLine) leftLine = createSideLine(side);
} else {
if (leftLine) scene->removeItem(leftLine);
leftLine = NULL;
}
break;
case BaseDesignIntf::BottomLine:
if (show){
if (!bottomLine) bottomLine = createSideLine(side);
} else {
if (bottomLine) scene->removeItem(bottomLine);
bottomLine = NULL;
}
break;
case BaseDesignIntf::RightLine:
if (show){
if (!rightLine) rightLine = createSideLine(side);
} else {
if(rightLine) scene->removeItem(rightLine);
rightLine = NULL;
}
}
updateBorders();
}
QGraphicsLineItem *BorderFrameEditor::createSideLine(LimeReport::BaseDesignIntf::BorderSide side)
{
switch(side){
case BaseDesignIntf::BorderSide::TopLine:
return scene->addLine(QLineF(10, 10, rect().width() - 10, 10), m_pen);
case BaseDesignIntf::BorderSide::LeftLine:
return scene->addLine(QLineF(10, 10, 10, rect().height() - 10), m_pen);
case BaseDesignIntf::BorderSide::RightLine:
return scene->addLine(QLineF(rect().width() - 10, 10 ,rect().width() - 10, rect().height() - 10), m_pen);
case BaseDesignIntf::BorderSide::BottomLine:
return scene->addLine(QLineF(10, rect().bottom() - 10, rect().width() - 10, rect().bottom() - 10), m_pen);
}
}
void BorderFrameEditor::updateBorders()
{
if (topLine) topLine->setPen(m_pen);
if (leftLine) leftLine->setPen(m_pen);
if (bottomLine) bottomLine->setPen(m_pen);
if (rightLine) rightLine->setPen(m_pen);
}
} //namespace LimeReport

View File

@ -5,9 +5,9 @@
#include <QGraphicsScene> #include <QGraphicsScene>
#include <QGraphicsLineItem> #include <QGraphicsLineItem>
#include "lrbasedesignintf.h" #include "lrbasedesignintf.h"
QT_BEGIN_NAMESPACE namespace LimeReport{
namespace Ui { class BorderFrameEditor; } namespace Ui { class BorderFrameEditor; }
QT_END_NAMESPACE
class BorderFrameEditor : public QWidget class BorderFrameEditor : public QWidget
{ {
@ -23,20 +23,24 @@ public:
protected: protected:
void mousePressEvent(QMouseEvent *event); void mousePressEvent(QMouseEvent *event);
signals: signals:
void borderSideClicked(int side,bool show); void borderSideClicked(LimeReport::BaseDesignIntf::BorderSide side, bool show);
private slots: private slots:
void SlotBorderSideClicked(int side, bool show); void slotBorderSideClicked(LimeReport::BaseDesignIntf::BorderSide side, bool show);
private:
QGraphicsLineItem *createSideLine(LimeReport::BaseDesignIntf::BorderSide side);
void updateBorders();
private: private:
Ui::BorderFrameEditor *ui; Ui::BorderFrameEditor *ui;
QGraphicsScene *scene; QGraphicsScene *scene;
QGraphicsLineItem *topLine = NULL QGraphicsLineItem *topLine = NULL
,*bottomLine = NULL ,*bottomLine = NULL
,*leftLine = NULL ,*leftLine = NULL
,*rightLine = NULL; ,*rightLine = NULL;
QPen m_pen; QPen m_pen;
void updateBorders();
}; };
} // namespace LimeReport
#endif // WIDGET #endif // WIDGET

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>BorderFrameEditor</class> <class>LimeReport::BorderFrameEditor</class>
<widget class="QWidget" name="BorderFrameEditor"> <widget class="QWidget" name="LimeReport::BorderFrameEditor">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>

View File

@ -61,8 +61,13 @@ BaseDesignIntf *ImageItem::createSameTypeItem(QObject *owner, QGraphicsItem *par
} }
void ImageItem::loadPictureFromVariant(QVariant& data){ void ImageItem::loadPictureFromVariant(QVariant& data){
//TODO: Migrate to QMetaType
if (data.isValid()){ if (data.isValid()){
if (data.type()==QVariant::Image){ #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
if (data.typeId() == QMetaType::QImage){
#else
if (data.type() == QVariant::Image){
#endif
m_picture = data.value<QImage>(); m_picture = data.value<QImage>();
} else { } else {
switch (m_format) { switch (m_format) {
@ -106,14 +111,14 @@ void ImageItem::processPopUpAction(QAction *action)
ItemDesignIntf::processPopUpAction(action); ItemDesignIntf::processPopUpAction(action);
} }
QImage getFileByResourcePath(QString resourcePath){ QImage getFileByResourcePath(QString resourcePath) {
QFileInfo resourceFile(resourcePath); QFileInfo resourceFile(resourcePath);
if (resourceFile.exists()) if (resourceFile.exists())
return QImage(resourcePath); return QImage(resourcePath);
return QImage(); return QImage();
} }
QImage ImageItem::drawImage() QImage ImageItem::drawImage() const
{ {
if (image().isNull()) if (image().isNull())
return getFileByResourcePath(m_resourcePath); return getFileByResourcePath(m_resourcePath);
@ -178,11 +183,22 @@ void ImageItem::updateItemSize(DataSourceManager* dataManager, RenderPass pass,
m_resourcePath = expandDataFields(m_resourcePath, NoEscapeSymbols, dataManager); m_resourcePath = expandDataFields(m_resourcePath, NoEscapeSymbols, dataManager);
m_picture = QImage(m_resourcePath); m_picture = QImage(m_resourcePath);
} else if (!m_variable.isEmpty()){ } else if (!m_variable.isEmpty()){
//TODO: Migrate to QMetaType
QVariant data = dataManager->variable(m_variable); QVariant data = dataManager->variable(m_variable);
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
if (data.typeId() == QMetaType::QString){
#else
if (data.type() == QVariant::String){ if (data.type() == QVariant::String){
#endif
m_picture = QImage(data.toString()); m_picture = QImage(data.toString());
} else if (data.type() == QVariant::Image){ } else {
loadPictureFromVariant(data); #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
if (data.typeId() == QMetaType::QImage){
#else
if (data.type() == QVariant::Image){
#endif
loadPictureFromVariant(data);
}
} }
} }
} }
@ -348,7 +364,7 @@ void ImageItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
} }
if (shiftHeight > 0){ if (shiftHeight > 0){
point.setY(point.x()+shiftHeight/2); point.setY(point.y()+shiftHeight/2);
} else { } else {
cutY = fabs(shiftHeight/2); cutY = fabs(shiftHeight/2);
cutHeigth += shiftHeight; cutHeigth += shiftHeight;
@ -394,7 +410,7 @@ void ImageItem::setImage(QImage value)
} }
} }
QImage ImageItem::image(){ QImage ImageItem::image() const{
return m_picture; return m_picture;
} }
@ -423,3 +439,8 @@ void ImageItem::setFormat(Format format)
} }
} }
bool LimeReport::ImageItem::isEmpty() const
{
return drawImage().isNull();
}

View File

@ -67,7 +67,7 @@ public:
ImageItem(QObject *owner, QGraphicsItem *parent); ImageItem(QObject *owner, QGraphicsItem *parent);
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
void setImage(QImage value); void setImage(QImage value);
QImage image(); QImage image() const;
void setResourcePath(const QString &value); void setResourcePath(const QString &value);
QString resourcePath() const; QString resourcePath() const;
QString datasource() const; QString datasource() const;
@ -108,7 +108,7 @@ protected:
void loadPictureFromVariant(QVariant& data); void loadPictureFromVariant(QVariant& data);
void preparePopUpMenu(QMenu &menu); void preparePopUpMenu(QMenu &menu);
void processPopUpAction(QAction *action); void processPopUpAction(QAction *action);
QImage drawImage(); QImage drawImage() const;
private: private:
QImage m_picture; QImage m_picture;
bool m_useExternalPainter; bool m_useExternalPainter;
@ -121,8 +121,12 @@ private:
bool m_keepAspectRatio; bool m_keepAspectRatio;
bool m_center; bool m_center;
Format m_format; Format m_format;
QString m_variable; QString m_variable;
// BaseDesignIntf interface
public:
bool isEmpty() const override;
}; };
} }

View File

@ -1,11 +1,15 @@
#include "lrpageeditor.h" #include "lrpageeditor.h"
#include "ui_lrpageeditor.h" #include "ui_lrpageeditor.h"
#include "lrpagedesignintf.h" #include "lrpagedesignintf.h"
#include "lrpageitemdesignintf.h"
#include <QPushButton> #include <QPushButton>
#include <QPageSize> #include <QPageSize>
lrpageeditor::lrpageeditor(QWidget *parent, LimeReport::PageItemDesignIntf *page) :
namespace LimeReport{
PageEditor::PageEditor(QWidget *parent, LimeReport::PageItemDesignIntf *page) :
QDialog(parent), QDialog(parent),
ui(new Ui::lrpageeditor) ui(new Ui::PageEditor)
{ {
ui->setupUi(this); ui->setupUi(this);
m_page = page; m_page = page;
@ -16,8 +20,8 @@ lrpageeditor::lrpageeditor(QWidget *parent, LimeReport::PageItemDesignIntf *page
ui->format->addItem(pageSizes.key(i)); ui->format->addItem(pageSizes.key(i));
} }
ui->format->setCurrentIndex(m_page->pageSize()); ui->format->setCurrentIndex(m_page->pageSize());
ui->width->setValue(m_page->width() / LimeReport::Const::mmFACTOR); ui->width->setValue(m_page->width() / m_page->unitFactor());
ui->height->setValue(m_page->height() / LimeReport::Const::mmFACTOR); ui->height->setValue(m_page->height() / m_page->unitFactor());
ui->portrait->setChecked(m_page->pageOrientation() == LimeReport::PageItemDesignIntf::Portrait); ui->portrait->setChecked(m_page->pageOrientation() == LimeReport::PageItemDesignIntf::Portrait);
ui->landscape->setChecked(m_page->pageOrientation() == LimeReport::PageItemDesignIntf::Landscape); ui->landscape->setChecked(m_page->pageOrientation() == LimeReport::PageItemDesignIntf::Landscape);
//Margins //Margins
@ -33,18 +37,17 @@ lrpageeditor::lrpageeditor(QWidget *parent, LimeReport::PageItemDesignIntf *page
ui->fullPage->setChecked(m_page->fullPage()); ui->fullPage->setChecked(m_page->fullPage());
} }
lrpageeditor::~lrpageeditor() PageEditor::~PageEditor()
{ {
delete ui; delete ui;
} }
void lrpageeditor::applyChanges() void PageEditor::applyChanges()
{ {
m_page->setPageSize(static_cast<LimeReport::PageItemDesignIntf::PageSize>(ui->format->currentIndex())); m_page->setPageSize(static_cast<LimeReport::PageItemDesignIntf::PageSize>(ui->format->currentIndex()));
m_page->setWidth(ui->width->value()* LimeReport::Const::mmFACTOR); m_page->setWidth(ui->width->value() * LimeReport::Const::mmFACTOR);
m_page->setHeight(ui->height->value()* LimeReport::Const::mmFACTOR); m_page->setHeight(ui->height->value() * LimeReport::Const::mmFACTOR);
m_page->setPageOrientation(ui->portrait->isChecked()?LimeReport::PageItemDesignIntf::Portrait : LimeReport::PageItemDesignIntf::Landscape); m_page->setPageOrientation(ui->portrait->isChecked()? LimeReport::PageItemDesignIntf::Portrait : LimeReport::PageItemDesignIntf::Landscape);
m_page->setTopMargin(ui->marginTop->value()); m_page->setTopMargin(ui->marginTop->value());
m_page->setBottomMargin(ui->marginBottom->value()); m_page->setBottomMargin(ui->marginBottom->value());
m_page->setRightMargin(ui->marginRight->value()); m_page->setRightMargin(ui->marginRight->value());
@ -52,53 +55,56 @@ void lrpageeditor::applyChanges()
m_page->setDropPrinterMargins(ui->dropPrinterMargins->isChecked()); m_page->setDropPrinterMargins(ui->dropPrinterMargins->isChecked());
ui->endlessHeight->setChecked(ui->endlessHeight->isChecked()); ui->endlessHeight->setChecked(ui->endlessHeight->isChecked());
m_page->setExtendedHeight(ui->extendedHeight->value()); m_page->setExtendedHeight(ui->extendedHeight->value());
ui->width->setValue(m_page->getItemWidth());
ui->height->setValue(m_page->getItemHeight());
} }
void lrpageeditor::on_buttonBox_accepted() QSizeF PageEditor::getRectByPageSize(const LimeReport::PageItemDesignIntf::PageSize& size)
{ {
applyChanges(); if (size != PageItemDesignIntf::Custom) {
accept();
}
QSizeF lrpageeditor::getRectByPageSize(const LimeReport::PageItemDesignIntf::PageSize& size)
{
if (size != LimeReport::PageItemDesignIntf::Custom) {
QPrinter printer; QPrinter printer;
printer.setOutputFormat(QPrinter::PdfFormat); printer.setOutputFormat(QPrinter::PdfFormat);
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1)) #if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1))
printer.setOrientation(ui->portrait->isChecked()?QPrinter::Portrait : QPrinter::Landscape); printer.setOrientation(ui->portrait->isChecked() ? QPrinter::Portrait : QPrinter::Landscape);
printer.setPaperSize((QPrinter::PageSize)size); printer.setPaperSize((QPrinter::PageSize)size);
return QSizeF(printer.paperSize(QPrinter::Millimeter).width() * 10, return QSizeF(printer.paperSize(QPrinter::Millimeter).width() * m_page->unitFactor(),
printer.paperSize(QPrinter::Millimeter).height() * 10); printer.paperSize(QPrinter::Millimeter).height() * m_page->unitFactor());
#else #else
QPageSize pageSize = QPageSize((QPageSize::PageSizeId)size); printer.setPageOrientation((QPageLayout::Orientation)m_page->pageOrientation());
qreal width = pageSize.size(QPageSize::Millimeter).width() * 10; printer.setPageSize(QPageSize((QPageSize::PageSizeId)size));
qreal height = pageSize.size(QPageSize::Millimeter).height() * 10; return QSizeF(printer.pageLayout().pageSize().size(QPageSize::Millimeter).width() * m_page->unitFactor(),
return QSizeF(pageOrientation() == Portrait ? width : height, printer.pageLayout().pageSize().size(QPageSize::Millimeter).height() * m_page->unitFactor());
pageOrientation() == Portrait ? height : width);
// printer.setPageOrientation((QPageLayout::Orientation)pageOrientation());
// printer.setPageSize(QPageSize((QPageSize::PageSizeId)size));
// return QSizeF(printer.pageLayout().pageSize().size(QPageSize::Millimeter).width() * 10,
// printer.pageLayout().pageSize().size(QPageSize::Millimeter).height() * 10);
#endif #endif
} } else {
return QSizeF(m_page->getItemWidth(), m_page->getItemHeight());
else {
return QSizeF(width(),height());
} }
} }
void lrpageeditor::on_format_currentIndexChanged(int index)
void PageEditor::on_format_currentIndexChanged(int index)
{ {
QPageSize ps = *new QPageSize(); QPageSize ps = *new QPageSize();
if(ui->format->currentText() != "Custom") if(ui->format->currentText() != "Custom")
{ {
QSizeF pageSize = getRectByPageSize(static_cast<LimeReport::PageItemDesignIntf::PageSize>(index)); QSizeF pageSize = getRectByPageSize(static_cast<LimeReport::PageItemDesignIntf::PageSize>(index));
ui->width->setValue(pageSize.width()/10); ui->width->setValue(pageSize.width() / m_page->unitFactor());
ui->height->setValue(pageSize.height()/10); ui->height->setValue(pageSize.height() / m_page->unitFactor());
} }
} }
void PageEditor::on_buttonBox_clicked(QAbstractButton *button)
{
switch(ui->buttonBox->buttonRole(button)){
case QDialogButtonBox::ApplyRole:
applyChanges();
break;
case QDialogButtonBox::AcceptRole:
applyChanges();
accept();
}
}
} // namespace

View File

@ -4,28 +4,33 @@
#include <QDialog> #include <QDialog>
#include "lrpageitemdesignintf.h" #include "lrpageitemdesignintf.h"
#include <QPushButton> #include <QPushButton>
namespace LimeReport{
namespace Ui { namespace Ui {
class lrpageeditor; class PageEditor;
} }
class lrpageeditor : public QDialog class LIMEREPORT_EXPORT PageEditor : public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit lrpageeditor(QWidget *parent = nullptr,LimeReport::PageItemDesignIntf *page = nullptr); explicit PageEditor(QWidget *parent = nullptr,LimeReport::PageItemDesignIntf *page = nullptr);
~lrpageeditor(); ~PageEditor();
private slots: private slots:
void on_buttonBox_accepted(); // void on_buttonBox_accepted();
void on_format_currentIndexChanged(int index); void on_format_currentIndexChanged(int index);
void on_buttonBox_clicked(QAbstractButton *button);
private: private:
Ui::lrpageeditor *ui; Ui::PageEditor *ui;
LimeReport::PageItemDesignIntf* m_page; LimeReport::PageItemDesignIntf* m_page;
void applyChanges(); void applyChanges();
QSizeF getRectByPageSize(const LimeReport::PageItemDesignIntf::PageSize& size); QSizeF getRectByPageSize(const LimeReport::PageItemDesignIntf::PageSize& size);
}; };
} // namespace LimeReport
#endif // LRPAGEEDITOR_H #endif // LRPAGEEDITOR_H

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>lrpageeditor</class> <class>LimeReport::PageEditor</class>
<widget class="QDialog" name="lrpageeditor"> <widget class="QDialog" name="LimeReport::PageEditor">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>306</width> <width>306</width>
<height>322</height> <height>356</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -131,6 +131,19 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tab_2"> <widget class="QWidget" name="tab_2">
@ -297,7 +310,7 @@
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="standardButtons"> <property name="standardButtons">
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> <set>QDialogButtonBox::Apply|QDialogButtonBox::Close|QDialogButtonBox::Ok</set>
</property> </property>
</widget> </widget>
</item> </item>
@ -305,22 +318,6 @@
</widget> </widget>
<resources/> <resources/>
<connections> <connections>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>lrpageeditor</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>325</x>
<y>312</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection> <connection>
<sender>endlessHeight</sender> <sender>endlessHeight</sender>
<signal>clicked(bool)</signal> <signal>clicked(bool)</signal>
@ -328,12 +325,12 @@
<slot>setEnabled(bool)</slot> <slot>setEnabled(bool)</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>60</x> <x>72</x>
<y>50</y> <y>81</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>130</x> <x>131</x>
<y>85</y> <y>134</y>
</hint> </hint>
</hints> </hints>
</connection> </connection>

View File

@ -107,11 +107,22 @@ void SVGItem::updateItemSize(DataSourceManager *dataManager, RenderPass pass, in
m_resourcePath = expandDataFields(m_resourcePath, NoEscapeSymbols, dataManager); m_resourcePath = expandDataFields(m_resourcePath, NoEscapeSymbols, dataManager);
m_image = imageFromResource(m_resourcePath); m_image = imageFromResource(m_resourcePath);
} else if (!m_variable.isEmpty()){ } else if (!m_variable.isEmpty()){
//TODO: Migrate to QMetaType
QVariant data = dataManager->variable(m_variable); QVariant data = dataManager->variable(m_variable);
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
if (data.typeId() == QMetaType::QString){
#else
if (data.type() == QVariant::String){ if (data.type() == QVariant::String){
#endif
m_image = imageFromResource(data.toString()); m_image = imageFromResource(data.toString());
} else if (data.type() == QVariant::ByteArray) { } else {
m_image = data.value<QByteArray>() ; #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
if (data.typeId() == QMetaType::QByteArray) {
#else
if (data.type() == QVariant::ByteArray) {
#endif
m_image = data.value<QByteArray>() ;
}
} }
} }
} }

View File

@ -276,10 +276,6 @@ void TextItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* style, Q
BaseDesignIntf::paint(painter, style, widget); BaseDesignIntf::paint(painter, style, widget);
} }
QString TextItem::content() const{
return m_strText;
}
void TextItem::Init() void TextItem::Init()
{ {
m_autoWidth = NoneAutoWidth; m_autoWidth = NoneAutoWidth;
@ -299,14 +295,8 @@ void TextItem::setContent(const QString &value)
{ {
if (m_strText.compare(value)!=0){ if (m_strText.compare(value)!=0){
QString oldValue = m_strText; QString oldValue = m_strText;
if (m_trimValue)
m_strText=value.trimmed();
else
m_strText=value;
// if (itemMode() == DesignMode && (autoHeight())){ m_strText = value;
// initTextSizes();
// }
if (!isLoading()){ if (!isLoading()){
if (autoHeight() || autoWidth() || hasFollower()) if (autoHeight() || autoWidth() || hasFollower())
@ -317,6 +307,10 @@ void TextItem::setContent(const QString &value)
} }
} }
QString TextItem::content() const{
return m_strText;
}
void TextItem::updateItemSize(DataSourceManager* dataManager, RenderPass pass, int maxHeight) void TextItem::updateItemSize(DataSourceManager* dataManager, RenderPass pass, int maxHeight)
{ {
@ -395,6 +389,7 @@ void TextItem::setTextFont(TextPtr text, const QFont& value) const {
void TextItem::adaptFontSize(TextPtr text) const{ void TextItem::adaptFontSize(TextPtr text) const{
QFont _font = transformToSceneFont(font()); QFont _font = transformToSceneFont(font());
do{ do{
// qApp->processEvents();
setTextFont(text,_font); setTextFont(text,_font);
if (_font.pixelSize()>2) if (_font.pixelSize()>2)
_font.setPixelSize(_font.pixelSize()-1); _font.setPixelSize(_font.pixelSize()-1);
@ -493,29 +488,43 @@ QString TextItem::formatFieldValue()
} }
} }
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
switch (value.type()) { switch (value.type()) {
case QVariant::Date: case QVariant::Date:
case QVariant::DateTime: case QVariant::DateTime:
return formatDateTime(value.toDateTime()); return formatDateTime(value.toDateTime());
case QVariant::Double: case QVariant::Double:
return formatNumber(value.toDouble()); return formatNumber(value.toDouble());
default: default:
return value.toString(); return value.toString();
} }
#else
switch (value.typeId()) {
case QMetaType::QDate:
case QMetaType::QDateTime:
return formatDateTime(value.toDateTime());
case QMetaType::Double:
return formatNumber(value.toDouble());
default:
return value.toString();
}
#endif
} }
TextItem::TextPtr TextItem::textDocument() const TextItem::TextPtr TextItem::textDocument() const
{ {
TextPtr text(new QTextDocument); TextPtr text(new QTextDocument);
QString content = m_trimValue ? m_strText.trimmed() : m_strText;
if (allowHTML()) if (allowHTML())
if (isReplaceCarriageReturns()){ if (isReplaceCarriageReturns()){
text->setHtml(replaceReturns(m_strText)); text->setHtml(replaceReturns(content));
} else { } else {
text->setHtml(m_strText); text->setHtml(content);
} }
else else
text->setPlainText(m_strText); text->setPlainText(content);
QTextOption to; QTextOption to;
to.setAlignment(m_alignment); to.setAlignment(m_alignment);
@ -785,6 +794,7 @@ void TextItem::setTrimValue(bool value)
{ {
bool oldValue = m_trimValue; bool oldValue = m_trimValue;
m_trimValue = value; m_trimValue = value;
update();
notify("trimValue",oldValue,value); notify("trimValue",oldValue,value);
} }
@ -827,7 +837,7 @@ void TextItem::expandContent(DataSourceManager* dataManager, RenderPass pass)
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1)) #if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1))
QRegExp rx(QString(Const::NAMED_VARIABLE_RX).arg(variableName)); QRegExp rx(QString(Const::NAMED_VARIABLE_RX).arg(variableName));
#else #else
QRegularExpression rx(QString(Const::NAMED_VARIABLE_RX).arg(variableName)); QRegularExpression rx = getNamedVariableRegEx(variableName);
#endif #endif
if (context.contains(rx) && pass == FirstPass){ if (context.contains(rx) && pass == FirstPass){
backupContent(); backupContent();

View File

@ -80,7 +80,7 @@ SOURCES += \
$$REPORT_PATH/lraxisdata.cpp \ $$REPORT_PATH/lraxisdata.cpp \
$$REPORT_PATH/lrpreparedpages.cpp \ $$REPORT_PATH/lrpreparedpages.cpp \
$$REPORT_PATH/items/lrpageeditor.cpp \ $$REPORT_PATH/items/lrpageeditor.cpp \
$$REPORT_PATH/items/borderframeeditor.cpp \ $$REPORT_PATH/items/lrborderframeeditor.cpp \
$$REPORT_PATH/items/lrbordereditor.cpp $$REPORT_PATH/items/lrbordereditor.cpp
CONFIG(staticlib) { CONFIG(staticlib) {
@ -181,7 +181,7 @@ HEADERS += \
$$REPORT_PATH/lraxisdata.h \ $$REPORT_PATH/lraxisdata.h \
$$REPORT_PATH/lrpreparedpagesintf.h \ $$REPORT_PATH/lrpreparedpagesintf.h \
$$REPORT_PATH/items/lrpageeditor.h \ $$REPORT_PATH/items/lrpageeditor.h \
$$REPORT_PATH/items/borderframeeditor.h \ $$REPORT_PATH/items/lrborderframeeditor.h \
$$REPORT_PATH/items/lrbordereditor.h $$REPORT_PATH/items/lrbordereditor.h
CONFIG(staticlib) { CONFIG(staticlib) {
@ -207,7 +207,7 @@ FORMS += \
$$REPORT_PATH/items/lrimageitemeditor.ui \ $$REPORT_PATH/items/lrimageitemeditor.ui \
$$REPORT_PATH/scripteditor/lrscripteditor.ui \ $$REPORT_PATH/scripteditor/lrscripteditor.ui \
$$REPORT_PATH/items/lrpageeditor.ui \ $$REPORT_PATH/items/lrpageeditor.ui \
$$REPORT_PATH/items/borderframeeditor.ui \ $$REPORT_PATH/items/lrborderframeeditor.ui \
$$REPORT_PATH/items/lrbordereditor.ui $$REPORT_PATH/items/lrbordereditor.ui
RESOURCES += \ RESOURCES += \

View File

@ -261,7 +261,6 @@ public:
void setAlternateBackgroundColor(const QColor &alternateBackgroundColor); void setAlternateBackgroundColor(const QColor &alternateBackgroundColor);
bool useAlternateBackgroundColor() const; bool useAlternateBackgroundColor() const;
void setUseAlternateBackgroundColor(bool useAlternateBackgroundColor); void setUseAlternateBackgroundColor(bool useAlternateBackgroundColor);
void replaceGroupsFunction(BandDesignIntf *band);
qreal bottomSpace() const; qreal bottomSpace() const;
void setBackgroundModeProperty(BGMode value); void setBackgroundModeProperty(BGMode value);
void setBackgroundOpacity(int value); void setBackgroundOpacity(int value);

View File

@ -431,7 +431,7 @@ void BaseDesignIntf::paint(QPainter *ppainter, const QStyleOptionGraphicsItem *o
setupPainter(ppainter); setupPainter(ppainter);
drawBorder(ppainter, rect()); drawBorder(ppainter, rect());
if(m_shadow) if(m_shadow)
drawShadow(ppainter, rect()); drawShadow(ppainter, rect(), 6);
// if (m_joinMarkerOn) { drawMarker(ppainter, Const::JOIN_COLOR);} // if (m_joinMarkerOn) { drawMarker(ppainter, Const::JOIN_COLOR);}
// if (isSelected() && !m_joinMarkerOn) {drawMarker(ppainter, Const::SELECTION_COLOR);} // if (isSelected() && !m_joinMarkerOn) {drawMarker(ppainter, Const::SELECTION_COLOR);}
drawResizeZone(ppainter); drawResizeZone(ppainter);
@ -1145,10 +1145,9 @@ void BaseDesignIntf::drawBorder(QPainter *painter, QRectF rect) const
painter->restore(); painter->restore();
} }
void BaseDesignIntf::drawShadow(QPainter *painter, QRectF rect) const void BaseDesignIntf::drawShadow(QPainter *painter, QRectF rect, qreal shadowSize) const
{ {
qreal shWidth = shadowSize;
qreal shWidth = rect.width()/100;
QRectF rshadow(rect.topRight() + QPointF(0, shWidth), QRectF rshadow(rect.topRight() + QPointF(0, shWidth),
rect.bottomRight() + QPointF(shWidth, 0)); rect.bottomRight() + QPointF(shWidth, 0));
QLinearGradient rgrad(rshadow.topLeft(), rshadow.topRight()); QLinearGradient rgrad(rshadow.topLeft(), rshadow.topRight());
@ -1167,8 +1166,6 @@ void BaseDesignIntf::drawShadow(QPainter *painter, QRectF rect) const
cgrad.setColorAt(0.0, QColor(0,0,0,255)); cgrad.setColorAt(0.0, QColor(0,0,0,255));
cgrad.setColorAt(1.0, QColor(0,0,0,0)); cgrad.setColorAt(1.0, QColor(0,0,0,0));
painter->fillRect(cshadow, QBrush(cgrad)); painter->fillRect(cshadow, QBrush(cgrad));
} }
void BaseDesignIntf::setGeometry(QRectF rect) void BaseDesignIntf::setGeometry(QRectF rect)
@ -1446,18 +1443,27 @@ void BaseDesignIntf::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
QAction* lockGeometryAction = menu.addAction(tr("Lock item geometry")); QAction* lockGeometryAction = menu.addAction(tr("Lock item geometry"));
lockGeometryAction->setCheckable(true); lockGeometryAction->setCheckable(true);
lockGeometryAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_L));
lockGeometryAction->setChecked(isGeometryLocked()); lockGeometryAction->setChecked(isGeometryLocked());
menu.addSeparator(); menu.addSeparator();
QAction* copyAction = menu.addAction(QIcon(":/report/images/copy"), tr("Copy")); QAction* copyAction = menu.addAction(QIcon(":/report/images/copy"), tr("Copy"));
copyAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_C)); QAction* cutAction = menu.addAction(QIcon(":/report/images/cut"), tr("Cut"));
QAction* cutAction = menu.addAction(QIcon(":/report/images/cut"), tr("Cut"));
cutAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_X));
QAction* pasteAction = menu.addAction(QIcon(":/report/images/paste"), tr("Paste")); QAction* pasteAction = menu.addAction(QIcon(":/report/images/paste"), tr("Paste"));
pasteAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_V));
pasteAction->setEnabled(false); pasteAction->setEnabled(false);
#if QT_VERSION >=QT_VERSION_CHECK(5,0,0)
lockGeometryAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_L));
copyAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_C));
cutAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_X));
pasteAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_V));
#else
lockGeometryAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_L));
copyAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_C));
cutAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_X));
pasteAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_V));
#endif
QClipboard *clipboard = QApplication::clipboard(); QClipboard *clipboard = QApplication::clipboard();
ItemsReaderIntf::Ptr reader = StringXMLreader::create(clipboard->text()); ItemsReaderIntf::Ptr reader = StringXMLreader::create(clipboard->text());
if (reader->first() && reader->itemType() == "Object"){ if (reader->first() && reader->itemType() == "Object"){
@ -1477,7 +1483,7 @@ void BaseDesignIntf::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
menu.addSeparator(); menu.addSeparator();
QAction* noBordersAction = menu.addAction(QIcon(":/report/images/noLines"), tr("No borders")); QAction* noBordersAction = menu.addAction(QIcon(":/report/images/noLines"), tr("No borders"));
QAction* allBordersAction = menu.addAction(QIcon(":/report/images/allLines"), tr("All borders")); QAction* allBordersAction = menu.addAction(QIcon(":/report/images/allLines"), tr("All borders"));
QAction* editBorderAction = menu.addAction(QIcon(":/report/images/allLines"), tr("Edit borders...")); QAction* editBorderAction = menu.addAction(QIcon(":/report/images/borderEditor"), tr("Edit borders..."));
preparePopUpMenu(menu); preparePopUpMenu(menu);
QAction* a = menu.exec(event->screenPos()); QAction* a = menu.exec(event->screenPos());
if (a){ if (a){
@ -1498,15 +1504,12 @@ void BaseDesignIntf::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
page->setBorders(BaseDesignIntf::NoLine); page->setBorders(BaseDesignIntf::NoLine);
if (a == allBordersAction) if (a == allBordersAction)
page->setBorders(BaseDesignIntf::AllLines); page->setBorders(BaseDesignIntf::AllLines);
if(a == editBorderAction) if (a == editBorderAction)
{ {
lrbordereditor be; BorderEditor be;
be.loadItem(this); be.loadItem(this);
if(be.exec() == QDialog::Rejected)return; if (be.exec() == QDialog::Rejected) return;
setBorderLinesFlags(be.borderSides()); page->setBordersExt(be.borderSides(), be.borderWidth(), (LimeReport::BaseDesignIntf::BorderStyle)be.borderStyle(), be.borderColor());
setBorderLineSize(be.border_width());
setBorderStyle((LimeReport::BaseDesignIntf::BorderStyle)be.border_style());
setBorderColor(be.borderColor());
} }
if (a == createHLayout) if (a == createHLayout)
page->addHLayout(); page->addHLayout();

View File

@ -49,7 +49,7 @@ class ReportEnginePrivate;
class PageDesignIntf; class PageDesignIntf;
class BaseDesignIntf; class BaseDesignIntf;
class Marker : public QGraphicsItem{ class LIMEREPORT_EXPORT Marker : public QGraphicsItem{
public: public:
Marker(QGraphicsItem* parent = 0, BaseDesignIntf* owner = 0): QGraphicsItem(parent), m_owner(owner){} Marker(QGraphicsItem* parent = 0, BaseDesignIntf* owner = 0): QGraphicsItem(parent), m_owner(owner){}
QRectF boundingRect() const; QRectF boundingRect() const;
@ -65,7 +65,7 @@ private:
BaseDesignIntf* m_owner; BaseDesignIntf* m_owner;
}; };
class SelectionMarker : public Marker{ class LIMEREPORT_EXPORT SelectionMarker : public Marker{
public: public:
SelectionMarker(QGraphicsItem* parent=0, BaseDesignIntf* owner = 0); SelectionMarker(QGraphicsItem* parent=0, BaseDesignIntf* owner = 0);
QColor color() const; QColor color() const;
@ -80,7 +80,7 @@ protected:
class DataSourceManager; class DataSourceManager;
class ReportRender; class ReportRender;
class BaseDesignIntf : class LIMEREPORT_EXPORT BaseDesignIntf :
public QObject, public QGraphicsItem, public ICollectionContainer, public ObjectLoadingStateIntf { public QObject, public QGraphicsItem, public ICollectionContainer, public ObjectLoadingStateIntf {
Q_OBJECT Q_OBJECT
Q_INTERFACES(QGraphicsItem) Q_INTERFACES(QGraphicsItem)
@ -389,7 +389,7 @@ protected:
void drawBorder(QPainter* painter, QRectF rect) const; void drawBorder(QPainter* painter, QRectF rect) const;
void drawShadow(QPainter* painter, QRectF rect) const; void drawShadow(QPainter* painter, QRectF rect, qreal shadowSize) const;
void drawDesignModeBorder(QPainter* painter, QRectF rect) const; void drawDesignModeBorder(QPainter* painter, QRectF rect) const;
void drawRenderModeBorder(QPainter *painter, QRectF rect) const; void drawRenderModeBorder(QPainter *painter, QRectF rect) const;
void drawResizeZone(QPainter*); void drawResizeZone(QPainter*);
@ -515,7 +515,7 @@ signals:
void afterRender(); void afterRender();
}; };
class BookmarkContainerDesignIntf: public BaseDesignIntf{ class LIMEREPORT_EXPORT BookmarkContainerDesignIntf: public BaseDesignIntf{
Q_OBJECT Q_OBJECT
public: public:
BookmarkContainerDesignIntf(const QString& storageTypeName, QObject* owner = 0, QGraphicsItem* parent = 0) BookmarkContainerDesignIntf(const QString& storageTypeName, QObject* owner = 0, QGraphicsItem* parent = 0)

View File

@ -35,7 +35,7 @@
#include "lrglobal.h" #include "lrglobal.h"
class ACollectionProperty{ class LIMEREPORT_EXPORT ACollectionProperty{
public: public:
ACollectionProperty(){} ACollectionProperty(){}
ACollectionProperty(const ACollectionProperty& ){} ACollectionProperty(const ACollectionProperty& ){}
@ -45,8 +45,8 @@ Q_DECLARE_METATYPE(ACollectionProperty)
namespace LimeReport{ namespace LimeReport{
const int COLLECTION_TYPE_ID = qMetaTypeId<ACollectionProperty>(); const int inline COLLECTION_TYPE_ID = qMetaTypeId<ACollectionProperty>();
class ICollectionContainer{ class LIMEREPORT_EXPORT ICollectionContainer{
public: public:
virtual QObject* createElement(const QString& collectionName,const QString& elementType)=0; virtual QObject* createElement(const QString& collectionName,const QString& elementType)=0;
virtual int elementsCount(const QString& collectionName)=0; virtual int elementsCount(const QString& collectionName)=0;

View File

@ -85,7 +85,12 @@ bool QueryHolder::runQuery(IDataSource::DatasourceMode mode)
query.exec(); query.exec();
QSqlQueryModel *model = new QSqlQueryModel; QSqlQueryModel *model = new QSqlQueryModel;
#if QT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
model->setQuery(std::move(query));
#else
model->setQuery(query); model->setQuery(query);
#endif
while (model->canFetchMore()) while (model->canFetchMore())
model->fetchMore(); model->fetchMore();

View File

@ -392,7 +392,13 @@ QSharedPointer<QAbstractItemModel>DataSourceManager::previewSQL(const QString &c
} }
query.exec(); query.exec();
#if QT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
model->setQuery(std::move(query));
#else
model->setQuery(query); model->setQuery(query);
#endif
m_lastError = model->lastError().text(); m_lastError = model->lastError().text();
putError(m_lastError); putError(m_lastError);
if (model->query().isActive()) if (model->query().isActive())
@ -423,8 +429,8 @@ QString DataSourceManager::extractField(QString source)
} }
QString DataSourceManager::replaceVariables(QString value){ QString DataSourceManager::replaceVariables(QString value){
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 3) #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 1)
QRegularExpression rx(Const::VARIABLE_RX); QRegularExpression rx = getVariableRegEx();
QRegularExpressionMatchIterator iter = rx.globalMatch(value); QRegularExpressionMatchIterator iter = rx.globalMatch(value);
qsizetype pos = 0; qsizetype pos = 0;
QString result; QString result;
@ -443,7 +449,6 @@ QString DataSourceManager::replaceVariables(QString value){
} }
result += value.mid(pos); result += value.mid(pos);
return result; return result;
// TODO: Qt6 port - done
#else #else
QRegExp rx(Const::VARIABLE_RX); QRegExp rx(Const::VARIABLE_RX);
@ -468,8 +473,8 @@ QString DataSourceManager::replaceVariables(QString value){
QString DataSourceManager::replaceVariables(QString query, QMap<QString,QString> &aliasesToParam) QString DataSourceManager::replaceVariables(QString query, QMap<QString,QString> &aliasesToParam)
{ {
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 3) #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 1)
QRegularExpression rx(Const::VARIABLE_RX); QRegularExpression rx = getVariableRegEx();
int curentAliasIndex = 0; int curentAliasIndex = 0;
if (query.contains(rx)){ if (query.contains(rx)){
int pos = -1; int pos = -1;
@ -508,7 +513,6 @@ QString DataSourceManager::replaceVariables(QString query, QMap<QString,QString>
match = rx.match(query); match = rx.match(query);
} }
} }
// TODO: Qt6 port - done
#else #else
QRegExp rx(Const::VARIABLE_RX); QRegExp rx(Const::VARIABLE_RX);
int curentAliasIndex = 0; int curentAliasIndex = 0;
@ -553,9 +557,8 @@ QString DataSourceManager::replaceVariables(QString query, QMap<QString,QString>
QString DataSourceManager::replaceFields(QString query, QMap<QString,QString> &aliasesToParam, QString masterDatasource) QString DataSourceManager::replaceFields(QString query, QMap<QString,QString> &aliasesToParam, QString masterDatasource)
{ {
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 3) #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 1)
QRegularExpression rx = getFieldRegEx();
QRegularExpression rx(Const::FIELD_RX);
int curentAliasIndex = 0; int curentAliasIndex = 0;
if (query.contains(rx)){ if (query.contains(rx)){
int pos = -1; int pos = -1;
@ -583,7 +586,6 @@ QString DataSourceManager::replaceFields(QString query, QMap<QString,QString> &a
match = rx.match(query); match = rx.match(query);
} }
} }
// TODO: Qt6 port - done
#else #else
QRegExp rx(Const::FIELD_RX); QRegExp rx(Const::FIELD_RX);
if (query.contains(rx)){ if (query.contains(rx)){
@ -1498,7 +1500,7 @@ void DataSourceManager::invalidateQueriesContainsVariable(const QString& variabl
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1)) #if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1))
QRegExp rx(QString(Const::NAMED_VARIABLE_RX).arg(variableName)); QRegExp rx(QString(Const::NAMED_VARIABLE_RX).arg(variableName));
#else #else
QRegularExpression rx(QString(Const::NAMED_VARIABLE_RX).arg(variableName)); QRegularExpression rx = getNamedVariableRegEx(variableName);
#endif #endif
if (holder->queryText().contains(rx)){ if (holder->queryText().contains(rx)){
holder->invalidate(designTime() ? IDataSource::DESIGN_MODE : IDataSource::RENDER_MODE); holder->invalidate(designTime() ? IDataSource::DESIGN_MODE : IDataSource::RENDER_MODE);

View File

@ -165,7 +165,7 @@ void initReportItems(){
#ifdef HAVE_SVG #ifdef HAVE_SVG
DesignElementsFactory::instance().registerCreator( DesignElementsFactory::instance().registerCreator(
"BarcodeItem", "SVGItem",
LimeReport::ItemAttribs(QObject::tr("SVG Item"),"Item"), LimeReport::ItemAttribs(QObject::tr("SVG Item"),"Item"),
createSVGItem createSVGItem
); );

View File

@ -67,7 +67,7 @@ QString replaceHTMLSymbols(const QString &value)
return result; return result;
} }
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 3) #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 1)
QVector<QString> normalizeCaptures(const QRegularExpressionMatch& reg){ QVector<QString> normalizeCaptures(const QRegularExpressionMatch& reg){
#else #else
QVector<QString> normalizeCaptures(const QRegExp& reg){ QVector<QString> normalizeCaptures(const QRegExp& reg){
@ -93,4 +93,53 @@ ReportError::ReportError(const QString& message):std::runtime_error(message.toSt
IExternalPainter::~IExternalPainter(){} IExternalPainter::~IExternalPainter(){}
IPainterProxy::~IPainterProxy(){} IPainterProxy::~IPainterProxy(){}
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 1)
QRegularExpression getRegEx(QString expression){
return QRegularExpression(expression, QRegularExpression::DotMatchesEverythingOption);
}
QRegularExpression getVariableRegEx(){
return QRegularExpression(
Const::VARIABLE_RX,
QRegularExpression::DotMatchesEverythingOption |
QRegularExpression::CaseInsensitiveOption
);
}
QRegularExpression getFieldRegEx(){
return QRegularExpression(
Const::FIELD_RX,
QRegularExpression::DotMatchesEverythingOption |
QRegularExpression::CaseInsensitiveOption
);
}
QRegularExpression getScriptRegEx(){
return QRegularExpression(
Const::SCRIPT_RX,
QRegularExpression::DotMatchesEverythingOption |
QRegularExpression::CaseInsensitiveOption
);
}
QRegularExpression getGroupFunctionRegEx(QString functionName){
return QRegularExpression(
QString(Const::GROUP_FUNCTION_RX).arg(functionName),
QRegularExpression::DotMatchesEverythingOption |
QRegularExpression::InvertedGreedinessOption
);
}
QRegularExpression getGroupFunctionNameRegEx(QString functionName){
return QRegularExpression(
QString(Const::GROUP_FUNCTION_NAME_RX).arg(functionName),
QRegularExpression::DotMatchesEverythingOption |
QRegularExpression::InvertedGreedinessOption
);
}
QRegularExpression getNamedVariableRegEx(QString variableName){
return QRegularExpression(
QString(Const::NAMED_VARIABLE_RX).arg(variableName),
QRegularExpression::DotMatchesEverythingOption
);
}
#endif
} //namespace LimeReport } //namespace LimeReport

View File

@ -104,7 +104,7 @@ 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 >= QT_VERSION_CHECK(5, 12, 3) #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 1)
QVector<QString> normalizeCaptures(const QRegularExpressionMatch &reg); QVector<QString> normalizeCaptures(const QRegularExpressionMatch &reg);
#else #else
QVector<QString> normalizeCaptures(const QRegExp &reg); QVector<QString> normalizeCaptures(const QRegExp &reg);
@ -125,12 +125,12 @@ namespace Const{
Q_DECLARE_FLAGS(PreviewHints, PreviewHint) Q_DECLARE_FLAGS(PreviewHints, PreviewHint)
Q_FLAGS(PreviewHints) Q_FLAGS(PreviewHints)
class ReportError : public std::runtime_error{ class LIMEREPORT_EXPORT ReportError : public std::runtime_error{
public: public:
ReportError(const QString& message); ReportError(const QString& message);
}; };
class ReportSettings{ class LIMEREPORT_EXPORT ReportSettings{
public: public:
ReportSettings():m_suppressAbsentFieldsAndVarsWarnings(false){} ReportSettings():m_suppressAbsentFieldsAndVarsWarnings(false){}
void setDefaultValues(){m_suppressAbsentFieldsAndVarsWarnings = false;} void setDefaultValues(){m_suppressAbsentFieldsAndVarsWarnings = false;}
@ -140,13 +140,13 @@ namespace Const{
bool m_suppressAbsentFieldsAndVarsWarnings; bool m_suppressAbsentFieldsAndVarsWarnings;
}; };
class IExternalPainter{ class LIMEREPORT_EXPORT IExternalPainter{
public: public:
virtual void paintByExternalPainter(const QString& objectName, QPainter* painter, const QStyleOptionGraphicsItem* options) = 0; virtual void paintByExternalPainter(const QString& objectName, QPainter* painter, const QStyleOptionGraphicsItem* options) = 0;
virtual ~IExternalPainter(); virtual ~IExternalPainter();
}; };
class IPainterProxy{ class LIMEREPORT_EXPORT IPainterProxy{
public: public:
virtual void setExternalPainter(IExternalPainter* externalPainter) = 0; virtual void setExternalPainter(IExternalPainter* externalPainter) = 0;
virtual ~IPainterProxy(); virtual ~IPainterProxy();
@ -157,8 +157,18 @@ namespace Const{
#else #else
typedef QStyleOptionViewItem StyleOptionViewItem; typedef QStyleOptionViewItem StyleOptionViewItem;
#endif #endif
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 1)
QRegularExpression getRegEx(QString expression);
QRegularExpression getVariableRegEx();
QRegularExpression getFieldRegEx();
QRegularExpression getScriptRegEx();
QRegularExpression getGroupFunctionRegEx(QString functionName);
QRegularExpression getGroupFunctionNameRegEx(QString functionName);
QRegularExpression getNamedVariableRegEx(QString variableName);
#endif
class Enums
class LIMEREPORT_EXPORT Enums
{ {
public: public:
enum VariableDataType {Undefined, String, Bool, Int, Real, Date, Time, DateTime}; enum VariableDataType {Undefined, String, Bool, Int, Real, Date, Time, DateTime};

View File

@ -48,8 +48,8 @@ void GroupFunction::slotBandRendered(BandDesignIntf *band)
QRegExp rxField(Const::FIELD_RX); QRegExp rxField(Const::FIELD_RX);
QRegExp rxVar(Const::VARIABLE_RX); QRegExp rxVar(Const::VARIABLE_RX);
#else #else
QRegularExpression rxField(Const::FIELD_RX); QRegularExpression rxField = getFieldRegEx();
QRegularExpression rxVar(Const::VARIABLE_RX); QRegularExpression rxVar = getVariableRegEx();
#endif #endif
switch (m_dataType){ switch (m_dataType){
@ -154,9 +154,9 @@ GroupFunction::GroupFunction(const QString &expression, const QString &dataBandN
QRegExp rxVariable(Const::VARIABLE_RX,Qt::CaseInsensitive); QRegExp rxVariable(Const::VARIABLE_RX,Qt::CaseInsensitive);
QRegExp rxScript(Const::SCRIPT_RX,Qt::CaseInsensitive); QRegExp rxScript(Const::SCRIPT_RX,Qt::CaseInsensitive);
#else #else
QRegularExpression rxField(Const::FIELD_RX, QRegularExpression::CaseInsensitiveOption); QRegularExpression rxField = getFieldRegEx();
QRegularExpression rxVariable(Const::VARIABLE_RX, QRegularExpression::CaseInsensitiveOption); QRegularExpression rxVariable = getVariableRegEx();
QRegularExpression rxScript(Const::SCRIPT_RX, QRegularExpression::CaseInsensitiveOption); QRegularExpression rxScript = getScriptRegEx();
#endif #endif
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1)) #if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1))
if (rxScript.indexIn(expression) != -1){ if (rxScript.indexIn(expression) != -1){

View File

@ -5,7 +5,7 @@
namespace LimeReport{ namespace LimeReport{
class Segment{ class LIMEREPORT_EXPORT Segment{
public: public:
Segment(qreal segmentStart,qreal segmentEnd):m_begin(segmentStart),m_end(segmentEnd){} Segment(qreal segmentStart,qreal segmentEnd):m_begin(segmentStart),m_end(segmentEnd){}
bool intersect(Segment value); bool intersect(Segment value);
@ -15,17 +15,17 @@ private:
qreal m_end; qreal m_end;
}; };
class VSegment : public Segment{ class LIMEREPORT_EXPORT VSegment : public Segment{
public: public:
VSegment(QRectF rect):Segment(rect.top(),rect.bottom()){} VSegment(QRectF rect):Segment(rect.top(),rect.bottom()){}
}; };
struct HSegment :public Segment{ struct LIMEREPORT_EXPORT HSegment :public Segment{
public: public:
HSegment(QRectF rect):Segment(rect.left(),rect.right()){} HSegment(QRectF rect):Segment(rect.left(),rect.right()){}
}; };
struct ItemSortContainer { struct LIMEREPORT_EXPORT ItemSortContainer {
QRectF m_rect; QRectF m_rect;
BaseDesignIntf * m_item; BaseDesignIntf * m_item;
ItemSortContainer(BaseDesignIntf *item){ ItemSortContainer(BaseDesignIntf *item){
@ -35,9 +35,9 @@ struct ItemSortContainer {
}; };
typedef QSharedPointer< ItemSortContainer > PItemSortContainer; typedef QSharedPointer< ItemSortContainer > PItemSortContainer;
bool itemSortContainerLessThen(const PItemSortContainer c1, const PItemSortContainer c2); bool LIMEREPORT_EXPORT itemSortContainerLessThen(const PItemSortContainer c1, const PItemSortContainer c2);
class ItemsContainerDesignInft : public BookmarkContainerDesignIntf{ class LIMEREPORT_EXPORT ItemsContainerDesignInft : public BookmarkContainerDesignIntf{
Q_OBJECT Q_OBJECT
public: public:
ItemsContainerDesignInft(const QString& xmlTypeName, QObject* owner = 0, QGraphicsItem* parent=0): ItemsContainerDesignInft(const QString& xmlTypeName, QObject* owner = 0, QGraphicsItem* parent=0):

View File

@ -753,7 +753,6 @@ ReportEnginePrivate *PageDesignIntf::reportEditor()
void PageDesignIntf::dragEnterEvent(QGraphicsSceneDragDropEvent *event) void PageDesignIntf::dragEnterEvent(QGraphicsSceneDragDropEvent *event)
{ {
if (!event->mimeData()->text().isEmpty()){ if (!event->mimeData()->text().isEmpty()){
event->setDropAction(Qt::CopyAction); event->setDropAction(Qt::CopyAction);
event->accept(); event->accept();
@ -782,7 +781,7 @@ void PageDesignIntf::dropEvent(QGraphicsSceneDragDropEvent* event)
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1)) #if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1))
if (isVar) data = data.remove(QRegExp(" \\[.*\\]")); if (isVar) data = data.remove(QRegExp(" \\[.*\\]"));
#else #else
if (isVar) data = data.remove(QRegularExpression(" \\[.*\\]")); if (isVar) data = data.remove(QRegularExpression(" \\[.*\\]", QRegularExpression::DotMatchesEverythingOption));
#endif #endif
ti->setContent(data); ti->setContent(data);
if (!isVar){ if (!isVar){
@ -794,7 +793,7 @@ void PageDesignIntf::dropEvent(QGraphicsSceneDragDropEvent* event)
parentBand->setProperty("datasource",dataSource.cap(1)); parentBand->setProperty("datasource",dataSource.cap(1));
} }
#else #else
QRegularExpression dataSource("(?:\\$D\\{\\s*(.*)\\..*\\})"); QRegularExpression dataSource("(?:\\$D\\{\\s*(.*)\\..*\\})", QRegularExpression::DotMatchesEverythingOption);
QRegularExpressionMatch match = dataSource.match(data); QRegularExpressionMatch match = dataSource.match(data);
if(match.hasMatch()){ if(match.hasMatch()){
parentBand->setProperty("datasource", match.captured(1)); parentBand->setProperty("datasource", match.captured(1));
@ -1853,6 +1852,20 @@ void PageDesignIntf::setBorders(const BaseDesignIntf::BorderLines& border)
changeSelectedGroupProperty("borders", (int)border); changeSelectedGroupProperty("borders", (int)border);
} }
void PageDesignIntf::setBordersExt(
const BaseDesignIntf::BorderLines& border,
const double borderWidth,
const LimeReport::BaseDesignIntf::BorderStyle style,
const QString color
)
{
changeSelectedGroupProperty("borders", (int)border);
changeSelectedGroupProperty("borderLineSize", borderWidth);
changeSelectedGroupProperty("borderStyle", style);
changeSelectedGroupProperty("borderColor", color);
}
void PageDesignIntf::lockSelectedItems() void PageDesignIntf::lockSelectedItems()
{ {
foreach(QGraphicsItem* graphicItem, selectedItems()){ foreach(QGraphicsItem* graphicItem, selectedItems()){

View File

@ -254,6 +254,11 @@ namespace LimeReport {
void setFont(const QFont &font); void setFont(const QFont &font);
void setTextAlign(const Qt::Alignment& alignment); void setTextAlign(const Qt::Alignment& alignment);
void setBorders(const BaseDesignIntf::BorderLines& border); void setBorders(const BaseDesignIntf::BorderLines& border);
void setBordersExt(const BaseDesignIntf::BorderLines &border,
const double borderWidth,
const BaseDesignIntf::BorderStyle style,
const QString color
);
void lockSelectedItems(); void lockSelectedItems();
void unlockSelectedItems(); void unlockSelectedItems();
void selectOneLevelItems(); void selectOneLevelItems();

View File

@ -98,38 +98,10 @@ void PageItemDesignIntf::paint(QPainter *ppainter, const QStyleOptionGraphicsIte
paintGrid(ppainter, rect); paintGrid(ppainter, rect);
ppainter->setPen(gridColor()); ppainter->setPen(gridColor());
ppainter->drawRect(boundingRect()); ppainter->drawRect(boundingRect());
//Draw shadow drawShadow(ppainter, boundingRect(), 10);
qreal shWidth = boundingRect().width()/100;
QRectF rshadow(boundingRect().topRight() + QPointF(0, shWidth),
boundingRect().bottomRight() + QPointF(shWidth, 0));
QLinearGradient rgrad(rshadow.topLeft(), rshadow.topRight());
rgrad.setColorAt(0.0, QColor(0,0,0,255));
rgrad.setColorAt(1.0, QColor(0,0,0,0));
ppainter->fillRect(rshadow, QBrush(rgrad));
QRectF bshadow(boundingRect().bottomLeft() + QPointF(shWidth, 0),
boundingRect().bottomRight() + QPointF(0, shWidth));
QLinearGradient bgrad(bshadow.topLeft(), bshadow.bottomLeft());
bgrad.setColorAt(0.0, QColor(0,0,0,255));
bgrad.setColorAt(1.0, QColor(0,0,0,0));
ppainter->fillRect(bshadow, QBrush(bgrad));
QRectF cshadow(boundingRect().bottomRight(),
boundingRect().bottomRight() + QPointF(shWidth, shWidth));
QRadialGradient cgrad(cshadow.topLeft(), shWidth, cshadow.topLeft());
cgrad.setColorAt(0.0, QColor(0,0,0,255));
cgrad.setColorAt(1.0, QColor(0,0,0,0));
ppainter->fillRect(cshadow, QBrush(cgrad));
if (m_isExtendedInDesignMode){
QPen pen;
pen.setColor(Qt::red);
pen.setStyle(Qt::DashLine);
pen.setWidth(2);
ppainter->setPen(pen);
ppainter->drawLine(pageRect().bottomLeft(),pageRect().bottomRight());
}
ppainter->restore(); ppainter->restore();
} }
if (itemMode() & PreviewMode) { if (itemMode() & PreviewMode) {
ppainter->save(); ppainter->save();
ppainter->fillRect(rect(), Qt::white); ppainter->fillRect(rect(), Qt::white);
@ -145,8 +117,6 @@ void PageItemDesignIntf::paint(QPainter *ppainter, const QStyleOptionGraphicsIte
BaseDesignIntf::paint(ppainter,option,widget); BaseDesignIntf::paint(ppainter,option,widget);
} }
} }
BaseDesignIntf *PageItemDesignIntf::createSameTypeItem(QObject *owner, QGraphicsItem *parent) BaseDesignIntf *PageItemDesignIntf::createSameTypeItem(QObject *owner, QGraphicsItem *parent)
@ -828,7 +798,7 @@ void PageItemDesignIntf::processPopUpAction(QAction *action)
} }
if(action->text() == tr("Edit")) if(action->text() == tr("Edit"))
{ {
lrpageeditor pageEdit(NULL,this); PageEditor pageEdit(NULL,this);
pageEdit.exec(); pageEdit.exec();
} }

View File

@ -39,7 +39,7 @@
namespace LimeReport{ namespace LimeReport{
class ReportRender; class ReportRender;
class PageItemDesignIntf : public ItemsContainerDesignInft class LIMEREPORT_EXPORT PageItemDesignIntf : public ItemsContainerDesignInft
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(int topMargin READ topMargin WRITE setTopMargin) Q_PROPERTY(int topMargin READ topMargin WRITE setTopMargin)

View File

@ -704,6 +704,16 @@ void ReportDesignWidget::setBorders(const BaseDesignIntf::BorderLines& borders)
activePage()->setBorders(borders); activePage()->setBorders(borders);
} }
void ReportDesignWidget::setBordersExt(
const BaseDesignIntf::BorderLines& border,
const double borderWidth,
const LimeReport::BaseDesignIntf::BorderStyle style,
const QString color
){
if (activePage())
activePage()->setBordersExt(border, borderWidth, style, color);
}
void ReportDesignWidget::prepareReport() void ReportDesignWidget::prepareReport()
{ {
m_report->scriptContext()->setInitScript(m_scriptEditor->toPlainText()); m_report->scriptContext()->setInitScript(m_scriptEditor->toPlainText());

View File

@ -194,6 +194,8 @@ public slots:
void setFont(const QFont &font); void setFont(const QFont &font);
void setTextAlign(const bool &horizontalAlign, const Qt::AlignmentFlag &alignment); void setTextAlign(const bool &horizontalAlign, const Qt::AlignmentFlag &alignment);
void setBorders(const BaseDesignIntf::BorderLines& borders); void setBorders(const BaseDesignIntf::BorderLines& borders);
void setBordersExt(const BaseDesignIntf::BorderLines &border, const double borderWidth,
const LimeReport::BaseDesignIntf::BorderStyle style, const QString color);
void editSetting(); void editSetting();
void setUseGrid(bool value); void setUseGrid(bool value);
void previewReport(); void previewReport();

View File

@ -196,13 +196,11 @@ void ReportRender::analizeItem(ContentItemDesignIntf* contentItem, BandDesignInt
QString content = contentItem->content(); QString content = contentItem->content();
QVector<QString> functions; QVector<QString> functions;
foreach(const QString &functionName, m_datasources->groupFunctionNames()){ foreach(const QString &functionName, m_datasources->groupFunctionNames()){
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 3) #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 1)
QRegularExpression rx(QString(Const::GROUP_FUNCTION_RX).arg(functionName)); QRegularExpression rx = getGroupFunctionRegEx(functionName);
rx.setPatternOptions(rx.InvertedGreedinessOption);
if(content.indexOf(rx)>=0){ if(content.indexOf(rx)>=0){
functions.append(functionName); functions.append(functionName);
} }
// TODO: Qt6 port - done
#else #else
QRegExp rx(QString(Const::GROUP_FUNCTION_RX).arg(functionName)); QRegExp rx(QString(Const::GROUP_FUNCTION_RX).arg(functionName));
rx.setMinimal(true); rx.setMinimal(true);
@ -368,13 +366,11 @@ void ReportRender::clearPageMap()
bool checkContentItem(ContentItemDesignIntf* item, DataSourceManager* datasources){ bool checkContentItem(ContentItemDesignIntf* item, DataSourceManager* datasources){
QString content = item->content(); QString content = item->content();
foreach(QString functionName, datasources->groupFunctionNames()){ foreach(QString functionName, datasources->groupFunctionNames()){
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 3) #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 1)
QRegularExpression rx(QString(Const::GROUP_FUNCTION_RX).arg(functionName)); QRegularExpression rx = getGroupFunctionRegEx(functionName);
rx.setPatternOptions(rx.InvertedGreedinessOption);
if(content.indexOf(rx)>=0){ if(content.indexOf(rx)>=0){
return true; return true;
} }
// TODO: Qt6 port - done
#else #else
QRegExp rx(QString(Const::GROUP_FUNCTION_RX).arg(functionName)); QRegExp rx(QString(Const::GROUP_FUNCTION_RX).arg(functionName));
if (rx.indexIn(content)>=0){ if (rx.indexIn(content)>=0){
@ -400,16 +396,14 @@ bool ReportRender::containsGroupFunctions(BaseDesignIntf *container){
} }
void ReportRender::extractGroupFuntionsFromItem(ContentItemDesignIntf* contentItem, BandDesignIntf* band){ void ReportRender::extractGroupFuntionsFromItem(ContentItemDesignIntf* contentItem, BandDesignIntf* band){
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 3) #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 1)
if ( contentItem && contentItem->content().contains(getScriptRegEx())){
if ( contentItem && contentItem->content().contains(QRegularExpression("\\$S\\s*\\{.*\\}"))){
foreach(const QString &functionName, m_datasources->groupFunctionNames()){ foreach(const QString &functionName, m_datasources->groupFunctionNames()){
QRegularExpression rx(QString(Const::GROUP_FUNCTION_RX).arg(functionName));
rx.setPatternOptions(rx.InvertedGreedinessOption);
QRegularExpression rxName(QString(Const::GROUP_FUNCTION_NAME_RX).arg(functionName));
rxName.setPatternOptions(rx.InvertedGreedinessOption);
QRegularExpression rx = getGroupFunctionRegEx(functionName);
QRegularExpression rxName = getGroupFunctionNameRegEx(functionName);
QRegularExpressionMatch match = rx.match(contentItem->content()); QRegularExpressionMatch match = rx.match(contentItem->content());
if (match.hasMatch()){ if (match.hasMatch()){
QRegularExpressionMatchIterator iter = rx.globalMatch(contentItem->content()); QRegularExpressionMatchIterator iter = rx.globalMatch(contentItem->content());
@ -437,31 +431,7 @@ void ReportRender::extractGroupFuntionsFromItem(ContentItemDesignIntf* contentIt
} }
} }
} }
// int pos = 0;
// while ( (pos = match.capturedStart()) != -1){
// QVector<QString> captures = normalizeCaptures(match);
// if (captures.size() >= 3){
// int dsIndex = captures.size() == 3 ? Const::DATASOURCE_INDEX - 1 : Const::DATASOURCE_INDEX;
// BandDesignIntf* dataBand = m_patternPageItem->bandByName(captures.at(dsIndex));
// if (dataBand){
// GroupFunction* gf = datasources()->addGroupFunction(
// functionName, captures.at(Const::VALUE_INDEX), band->objectName(), dataBand->objectName()
// );
// if (gf){
// connect(dataBand, SIGNAL(bandRendered(BandDesignIntf*)),
// gf, SLOT(slotBandRendered(BandDesignIntf*)));
// connect(dataBand, SIGNAL(bandReRendered(BandDesignIntf*, BandDesignIntf*)),
// gf, SLOT(slotBandReRendered(BandDesignIntf*, BandDesignIntf*)));
// }
// } else {
// GroupFunction* gf = datasources()->addGroupFunction(
// functionName, captures.at(Const::VALUE_INDEX), band->objectName(), captures.at(dsIndex)
// );
// gf->setInvalid(tr("Databand \"%1\" not found").arg(captures.at(dsIndex)));
// }
// }
// match = rx.match(contentItem->content(), pos + match.capturedLength());
// }
} else if (contentItem->content().indexOf(rxName)>=0){ } else if (contentItem->content().indexOf(rxName)>=0){
match = rxName.match(contentItem->content()); match = rxName.match(contentItem->content());
GroupFunction* gf = datasources()->addGroupFunction(functionName, match.captured(1), band->objectName(), ""); GroupFunction* gf = datasources()->addGroupFunction(functionName, match.captured(1), band->objectName(), "");
@ -470,7 +440,6 @@ void ReportRender::extractGroupFuntionsFromItem(ContentItemDesignIntf* contentIt
} }
} }
// TODO: Qt6 port - done
#else #else
if ( contentItem && contentItem->content().contains(QRegExp("\\$S\\s*\\{.*\\}"))){ if ( contentItem && contentItem->content().contains(QRegExp("\\$S\\s*\\{.*\\}"))){
foreach(const QString &functionName, m_datasources->groupFunctionNames()){ foreach(const QString &functionName, m_datasources->groupFunctionNames()){
@ -529,10 +498,8 @@ void ReportRender::replaceGroupFunctionsInItem(ContentItemDesignIntf* contentIte
if (m_groupfunctionItems.contains(contentItem->patternName())){ if (m_groupfunctionItems.contains(contentItem->patternName())){
QString content = contentItem->content(); QString content = contentItem->content();
foreach(QString functionName, m_groupfunctionItems.value(contentItem->patternName())){ foreach(QString functionName, m_groupfunctionItems.value(contentItem->patternName())){
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 3) #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 1)
QRegularExpression rx = getGroupFunctionRegEx(functionName);
QRegularExpression rx(QString(Const::GROUP_FUNCTION_RX).arg(functionName));
rx.setPatternOptions(rx.InvertedGreedinessOption);
QRegularExpressionMatch match = rx.match(content); QRegularExpressionMatch match = rx.match(content);
if (match.capturedStart() != -1){ if (match.capturedStart() != -1){
@ -556,7 +523,6 @@ void ReportRender::replaceGroupFunctionsInItem(ContentItemDesignIntf* contentIte
match = rx.match(content, pos + match.capturedLength()); match = rx.match(content, pos + match.capturedLength());
} }
} }
// TODO: Qt6 port - done
#else #else
QRegExp rx(QString(Const::GROUP_FUNCTION_RX).arg(functionName)); QRegExp rx(QString(Const::GROUP_FUNCTION_RX).arg(functionName));
rx.setMinimal(true); rx.setMinimal(true);

View File

@ -398,7 +398,7 @@ QString ScriptEngineManager::expandUserVariables(QString context, RenderPass /*
} }
return context; return context;
#else #else
QRegularExpression rx(Const::VARIABLE_RX); QRegularExpression rx = getVariableRegEx();
if (context.contains(rx)){ if (context.contains(rx)){
int pos = 0; int pos = 0;
QRegularExpressionMatch match = rx.match(context, pos); QRegularExpressionMatch match = rx.match(context, pos);
@ -504,8 +504,7 @@ QString ScriptEngineManager::expandDataFields(QString context, ExpandType expand
return context; return context;
#else #else
QRegularExpression rx(Const::FIELD_RX); QRegularExpression rx = getFieldRegEx();
if (context.contains(rx)){ if (context.contains(rx)){
QRegularExpressionMatch match = rx.match(context); QRegularExpressionMatch match = rx.match(context);
while (match.hasMatch()){ while (match.hasMatch()){
@ -520,17 +519,32 @@ QString ScriptEngineManager::expandDataFields(QString context, ExpandType expand
fieldValue="\"\""; fieldValue="\"\"";
} else { } else {
fieldValue = escapeSimbols(varValue.toString()); fieldValue = escapeSimbols(varValue.toString());
switch (dataManager()->fieldData(field).type()) { //TODO: Migrate to QMetaType
case QVariant::Char: #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
case QVariant::String: switch (dataManager()->fieldData(field).typeId()) {
case QVariant::StringList: case QMetaType::QChar:
case QVariant::Date: case QMetaType::QString:
case QVariant::DateTime: case QMetaType::QStringList:
fieldValue = "\""+fieldValue+"\""; case QMetaType::QDate:
break; case QMetaType::QDateTime:
default: fieldValue = "\""+fieldValue+"\"";
break; break;
default:
break;
} }
#else
switch (dataManager()->fieldData(field).type()) {
case QVariant::Char:
case QVariant::String:
case QVariant::StringList:
case QVariant::Date:
case QVariant::DateTime:
fieldValue = "\""+fieldValue+"\"";
break;
default:
break;
}
#endif
} }
} else { } else {
if (expandType == ReplaceHTMLSymbols) if (expandType == ReplaceHTMLSymbols)
@ -567,8 +581,7 @@ QString ScriptEngineManager::expandScripts(QString context, QVariant& varValue,
if (context.contains(rx)){ if (context.contains(rx)){
#else #else
QRegularExpression rx(Const::SCRIPT_RX, QRegularExpression::DotMatchesEverythingOption); QRegularExpression rx = getScriptRegEx();
if(context.contains(rx)){ if(context.contains(rx)){
#endif #endif
@ -636,8 +649,8 @@ QVariant ScriptEngineManager::evaluateScript(const QString& script){
QVariant varValue; QVariant varValue;
if (script.contains(rx)){ if (script.contains(rx)){
#else #else
QRegularExpression rx(Const::SCRIPT_RX); QRegularExpression rx = getScriptRegEx();
QVariant varValue; QVariant varValue;
if (script.contains(rx)){ if (script.contains(rx)){
@ -694,7 +707,6 @@ int ScriptEngineManager::getPageFreeSpace(PageItemDesignIntf* page){
if (page){ if (page){
int height = 0; int height = 0;
foreach(BandDesignIntf* band, page->bands()){ foreach(BandDesignIntf* band, page->bands()){
if(band->type() == BandDesignIntf::Data) if(band->type() == BandDesignIntf::Data)
{ {
height += band->geometry().height() * m_dataManager->dataSource(band->datasourceName())->model()->rowCount(); height += band->geometry().height() * m_dataManager->dataSource(band->datasourceName())->model()->rowCount();
@ -1115,7 +1127,7 @@ bool ScriptExtractor::parse()
bool ScriptExtractor::parse(int &curPos, const State& state, ScriptNode::Ptr scriptNode) bool ScriptExtractor::parse(int &curPos, const State& state, ScriptNode::Ptr scriptNode)
{ {
while (curPos<m_context.length()){ while (curPos < m_context.length()){
switch (state) { switch (state) {
case OpenBracketFound: case OpenBracketFound:
if (m_context[curPos]=='}'){ if (m_context[curPos]=='}'){
@ -1431,6 +1443,8 @@ DialogDescriber* ScriptEngineContext::findDialogContainer(const QString& dialogN
return 0; return 0;
} }
#endif
TableOfContents* ScriptEngineContext::tableOfContents() const TableOfContents* ScriptEngineContext::tableOfContents() const
{ {
return m_tableOfContents; return m_tableOfContents;
@ -1462,6 +1476,8 @@ void ScriptEngineContext::setCurrentBand(BandDesignIntf* currentBand)
m_currentBand = currentBand; m_currentBand = currentBand;
} }
#ifdef HAVE_UI_LOADER
QDialog* ScriptEngineContext::getDialog(const QString& dialogName) QDialog* ScriptEngineContext::getDialog(const QString& dialogName)
{ {
QDialog* dialog = findDialog(dialogName); QDialog* dialog = findDialog(dialogName);
@ -1685,11 +1701,10 @@ QVariant ScriptFunctionsManager::calcGroupFunction(const QString &name, const QS
if (gf){ if (gf){
if (gf->isValid()){ if (gf->isValid()){
return gf->calculate(pageItem); return gf->calculate(pageItem);
}else{ } else{
return gf->error(); return gf->error();
} }
} } else {
else {
return QString(QObject::tr("Function %1 not found or have wrong arguments").arg(name)); return QString(QObject::tr("Function %1 not found or have wrong arguments").arg(name));
} }
} else { } else {

View File

@ -402,7 +402,11 @@ private:
class ScriptNode{ class ScriptNode{
public: public:
typedef QSharedPointer<ScriptNode> Ptr; typedef QSharedPointer<ScriptNode> Ptr;
QString body(){return m_body;} QString body(){
if (m_body.isEmpty() && m_children.count() > 0)
return m_children.at(0)->body();
return m_body;
}
void setBody(const QString& body){ m_body = body;} void setBody(const QString& body){ m_body = body;}
void setStartLex(const QString startLex){ m_startLex = startLex;} void setStartLex(const QString startLex){ m_startLex = startLex;}
QString script(){return m_startLex + m_body + '}';} QString script(){return m_startLex + m_body + '}';}

View File

@ -56,7 +56,12 @@ ComboBoxEditor::ComboBoxEditor(QWidget *parent, bool clearable) :
connect(m_buttonClear,SIGNAL(clicked()),this,SLOT(slotClearButtonClicked())); connect(m_buttonClear,SIGNAL(clicked()),this,SLOT(slotClearButtonClicked()));
} }
connect(m_comboBox,SIGNAL(currentIndexChanged(QString)),this,SLOT(slotCurrentIndexChanged(QString))); #if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
connect(m_comboBox, SIGNAL(currentTextChanged(QString)), this, SLOT(slotCurrentIndexChanged(QString)));
#else
connect(m_comboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(slotCurrentIndexChanged(QString)));
#endif
m_comboBox->installEventFilter(this); m_comboBox->installEventFilter(this);
QHBoxLayout *layout = new QHBoxLayout(this); QHBoxLayout *layout = new QHBoxLayout(this);
layout->addWidget(m_comboBox); layout->addWidget(m_comboBox);

View File

@ -85,6 +85,17 @@ LimeReport::RectPropItem::RectPropItem(QObject *object, ObjectsList* objects, co
QString LimeReport::RectPropItem::displayValue() const QString LimeReport::RectPropItem::displayValue() const
{ {
//TODO: Migrate to QMetaType
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
switch(propertyValue().typeId()){
case QMetaType::QRect:
return rectToString(propertyValue().toRect());
case QMetaType::QRectF:
return rectToString(propertyValue().toRect());
default :
return ObjectPropItem::displayValue();
}
#else
switch(propertyValue().type()){ switch(propertyValue().type()){
case QVariant::Rect: case QVariant::Rect:
return rectToString(propertyValue().toRect()); return rectToString(propertyValue().toRect());
@ -93,6 +104,7 @@ QString LimeReport::RectPropItem::displayValue() const
default : default :
return ObjectPropItem::displayValue(); return ObjectPropItem::displayValue();
} }
#endif
} }
LimeReport::RectUnitPropItem::RectUnitPropItem(QObject *object, ObjectsList* objects, const QString &name, const QString &displayName, const QVariant &value, ObjectPropItem *parent, bool /*readonly*/): LimeReport::RectUnitPropItem::RectUnitPropItem(QObject *object, ObjectsList* objects, const QString &name, const QString &displayName, const QVariant &value, ObjectPropItem *parent, bool /*readonly*/):

View File

@ -186,5 +186,6 @@
<file alias="/images/logo32">images/designer.png</file> <file alias="/images/logo32">images/designer.png</file>
<file alias="/images/lock">images/lock.png</file> <file alias="/images/lock">images/lock.png</file>
<file>images/unlock.png</file> <file>images/unlock.png</file>
<file alias="/images/borderEditor">images/border_settings.png</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@ -30,6 +30,7 @@
#ifndef LRSTORAGEINTF_H #ifndef LRSTORAGEINTF_H
#define LRSTORAGEINTF_H #define LRSTORAGEINTF_H
#include "lrglobal.h"
#include <QSharedPointer> #include <QSharedPointer>
class QString; class QString;
@ -37,14 +38,14 @@ class QObject;
namespace LimeReport{ namespace LimeReport{
class ObjectLoadingStateIntf{ class LIMEREPORT_EXPORT ObjectLoadingStateIntf{
public: public:
virtual bool isLoading() = 0; virtual bool isLoading() = 0;
virtual void objectLoadStarted() = 0; virtual void objectLoadStarted() = 0;
virtual void objectLoadFinished() = 0; virtual void objectLoadFinished() = 0;
}; };
class ItemsWriterIntf class LIMEREPORT_EXPORT ItemsWriterIntf
{ {
public: public:
virtual void putItem(QObject* item) = 0; virtual void putItem(QObject* item) = 0;
@ -55,7 +56,7 @@ public:
virtual ~ItemsWriterIntf(){} virtual ~ItemsWriterIntf(){}
}; };
class ItemsReaderIntf class LIMEREPORT_EXPORT ItemsReaderIntf
{ {
public: public:
typedef QSharedPointer<ItemsReaderIntf> Ptr; typedef QSharedPointer<ItemsReaderIntf> Ptr;

View File

@ -193,13 +193,23 @@ bool XMLWriter::enumOrFlag(QString name, QObject *item)
bool XMLWriter::isCollection(QString propertyName, QObject* item) bool XMLWriter::isCollection(QString propertyName, QObject* item)
{ {
QMetaProperty prop=item->metaObject()->property(item->metaObject()->indexOfProperty(propertyName.toLatin1())); QMetaProperty prop=item->metaObject()->property(item->metaObject()->indexOfProperty(propertyName.toLatin1()));
return QMetaType::type(prop.typeName())==COLLECTION_TYPE_ID; //TODO: Migrate to QMetaType
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
return QMetaType::fromName(prop.typeName()).id() == COLLECTION_TYPE_ID;
#else
return QMetaType::type(prop.typeName()) == COLLECTION_TYPE_ID;
#endif
} }
bool XMLWriter::isTranslation(QString propertyName, QObject* item) bool XMLWriter::isTranslation(QString propertyName, QObject* item)
{ {
QMetaProperty prop=item->metaObject()->property(item->metaObject()->indexOfProperty(propertyName.toLatin1())); QMetaProperty prop=item->metaObject()->property(item->metaObject()->indexOfProperty(propertyName.toLatin1()));
return QMetaType::type(prop.typeName())==TRANSLATION_TYPE_ID; //TODO: Migrate to QMetaType
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
return QMetaType::fromName(prop.typeName()).id() == TRANSLATION_TYPE_ID;
#else
return QMetaType::type(prop.typeName()) == TRANSLATION_TYPE_ID;
#endif
} }
void XMLWriter::saveCollection(QString propertyName, QObject *item, QDomElement *node) void XMLWriter::saveCollection(QString propertyName, QObject *item, QDomElement *node)
@ -254,7 +264,13 @@ void XMLWriter::saveTranslation(QString propertyName, QObject* item, QDomElement
bool XMLWriter::isQObject(QString propertyName, QObject *item) bool XMLWriter::isQObject(QString propertyName, QObject *item)
{ {
QMetaProperty prop=item->metaObject()->property(item->metaObject()->indexOfProperty(propertyName.toLatin1())); QMetaProperty prop=item->metaObject()->property(item->metaObject()->indexOfProperty(propertyName.toLatin1()));
return QMetaType::type(prop.typeName())==QMetaType::QObjectStar; //TODO: Migrate to QMetaType
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
return QMetaType::fromName(prop.typeName()).id() == QMetaType::QObjectStar;
#else
return QMetaType::type(prop.typeName()) == QMetaType::QObjectStar;
#endif
} }
bool XMLWriter::replaceNode(QDomElement node, QObject* item) bool XMLWriter::replaceNode(QDomElement node, QObject* item)

View File

@ -8,18 +8,20 @@ namespace Ui {
class LanguageSelectDialog; class LanguageSelectDialog;
} }
class LanguageSelectDialog : public QDialog class LanguageSelectDialog : public QDialog {
{
Q_OBJECT Q_OBJECT
public: public:
explicit LanguageSelectDialog(QWidget *parent = 0); explicit LanguageSelectDialog(QWidget *parent = 0);
~LanguageSelectDialog(); ~LanguageSelectDialog();
QLocale::Language getSelectedLanguage(); QLocale::Language getSelectedLanguage();
private:
private:
Ui::LanguageSelectDialog *ui; Ui::LanguageSelectDialog *ui;
}; };
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
Q_DECLARE_METATYPE(QLocale::Language) Q_DECLARE_METATYPE(QLocale::Language)
#endif
#endif // LANGUAGESELECTDIALOG_H #endif // LANGUAGESELECTDIALOG_H

View File

@ -29,7 +29,11 @@ TranslationEditor::TranslationEditor(QWidget *parent) :
ui->tbStrings->setHorizontalHeaderItem(1,new QTableWidgetItem(tr("Report Item"))); ui->tbStrings->setHorizontalHeaderItem(1,new QTableWidgetItem(tr("Report Item")));
ui->tbStrings->setHorizontalHeaderItem(2,new QTableWidgetItem(tr("Property"))); ui->tbStrings->setHorizontalHeaderItem(2,new QTableWidgetItem(tr("Property")));
ui->tbStrings->setHorizontalHeaderItem(3,new QTableWidgetItem(tr("Source text"))); ui->tbStrings->setHorizontalHeaderItem(3,new QTableWidgetItem(tr("Source text")));
new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Return), this, SLOT(slotItemChecked())); #if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
m_clrReturn = new QShortcut(QKeySequence(Qt::CTRL | Qt::Key_Return), this, SLOT(slotItemChecked()));
#else
m_clrReturn = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Return), this, SLOT(slotItemChecked()));
#endif
//ui->tbStrings->setSortingEnabled(true); //ui->tbStrings->setSortingEnabled(true);
} }
@ -50,6 +54,7 @@ void TranslationEditor::setReportEngine(ITranslationContainer* translationContai
TranslationEditor::~TranslationEditor() TranslationEditor::~TranslationEditor()
{ {
delete ui; delete ui;
delete m_clrReturn;
} }
QLocale::Language TranslationEditor::getLanguageByName(const QString& languageName){ QLocale::Language TranslationEditor::getLanguageByName(const QString& languageName){

View File

@ -4,6 +4,7 @@
#include <QWidget> #include <QWidget>
#include <QLocale> #include <QLocale>
#include <QTreeWidgetItem> #include <QTreeWidgetItem>
#include <QShortcut>
#include "lrreporttranslation.h" #include "lrreporttranslation.h"
namespace LimeReport { namespace LimeReport {
@ -46,6 +47,7 @@ private:
PageTranslation* m_currentPageTranslation; PageTranslation* m_currentPageTranslation;
PropertyTranslation* m_currentPropertyTranslation; PropertyTranslation* m_currentPropertyTranslation;
bool m_translationChanging; bool m_translationChanging;
QShortcut* m_clrReturn;
}; };
} //namespace LimeReport } //namespace LimeReport

View File

@ -8,17 +8,6 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>BorderFrameEditor</name>
<message>
<source>BorderFrameEditor</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Text</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>ChartAxisEditor</name> <name>ChartAxisEditor</name>
<message> <message>
@ -1366,6 +1355,93 @@ p, li { white-space: pre-wrap; }
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>LimeReport::PageEditor</name>
<message>
<source>Page setup</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Paper</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Format</source>
<translation type="unfinished">الصيغة</translation>
</message>
<message>
<source>Dimension</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Width:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source> mm</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Orientation</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Portrait</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Landscape</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Margins</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Bottom:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Top:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Right:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Left:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Drop printer margins</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Other</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height options</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Endless Height</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Extended Height:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Full page</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>LimeReport::PageFooter</name> <name>LimeReport::PageFooter</name>
<message> <message>
@ -3408,194 +3484,4 @@ This preview is no longer valid.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>lrbordereditor</name>
<message>
<source>Style</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>No style</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Solid</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Presets</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>No lines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Outline</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Border</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit border</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Width:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>0.25</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>0.5</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>1.5</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>2</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>3</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>4</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>5</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>6</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Color:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Dash</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Dot</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Dash dot</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Dash dot dot</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>lrpageeditor</name>
<message>
<source>Paper</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Format</source>
<translation type="unfinished">الصيغة</translation>
</message>
<message>
<source>Dimension</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Width:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source> mm</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Orientation</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Portrait</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Landscape</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Margins</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Bottom:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Top:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Right:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Left:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Drop printer margins</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Other</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height options</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Endless Height</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Extended Height:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Full page</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Page setup</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS> </TS>

View File

@ -8,17 +8,6 @@
<translation></translation> <translation></translation>
</message> </message>
</context> </context>
<context>
<name>BorderFrameEditor</name>
<message>
<source>BorderFrameEditor</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Text</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>ChartAxisEditor</name> <name>ChartAxisEditor</name>
<message> <message>
@ -649,6 +638,7 @@ p, li { white-space: pre-wrap; }
</message> </message>
</context> </context>
<context> <context>
<name>LimeReport::BorderFrameEditor</name> <name>LimeReport::BorderFrameEditor</name>
<message> <message>
<source>BorderFrameEditor</source> <source>BorderFrameEditor</source>
@ -1494,6 +1484,93 @@ p, li { white-space: pre-wrap; }
<translation>Exportar a PDF</translation> <translation>Exportar a PDF</translation>
</message> </message>
</context> </context>
<context>
<name>LimeReport::PageEditor</name>
<message>
<source>Page setup</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Paper</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Format</source>
<translation type="unfinished">Formato</translation>
</message>
<message>
<source>Dimension</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Width:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source> mm</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Orientation</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Portrait</source>
<translation type="unfinished">Retrato</translation>
</message>
<message>
<source>Landscape</source>
<translation type="unfinished">Apaisado (Horizontal)</translation>
</message>
<message>
<source>Margins</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Bottom:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Top:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Right:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Left:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Drop printer margins</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Other</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height options</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Endless Height</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Extended Height:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Full page</source>
<translation type="unfinished">Página completa</translation>
</message>
</context>
<context> <context>
<name>LimeReport::PageFooter</name> <name>LimeReport::PageFooter</name>
<message> <message>
@ -3538,194 +3615,4 @@ Esta vista previa ya no es válida.</translation>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>lrbordereditor</name>
<message>
<source>Style</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>No style</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Solid</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Presets</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>No lines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Outline</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Border</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit border</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Width:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>0.25</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>0.5</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>1.5</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>2</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>3</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>4</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>5</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>6</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Color:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Dash</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Dot</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Dash dot</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Dash dot dot</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>lrpageeditor</name>
<message>
<source>Paper</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Format</source>
<translation type="unfinished">Formato</translation>
</message>
<message>
<source>Dimension</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Width:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source> mm</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Orientation</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Portrait</source>
<translation type="unfinished">Retrato</translation>
</message>
<message>
<source>Landscape</source>
<translation type="unfinished">Apaisado (Horizontal)</translation>
</message>
<message>
<source>Margins</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Bottom:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Top:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Right:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Left:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Drop printer margins</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Other</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Height options</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Endless Height</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Extended Height:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Full page</source>
<translation type="unfinished">Página completa</translation>
</message>
<message>
<source>Page setup</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS> </TS>

File diff suppressed because it is too large Load Diff

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