0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-04-02 15:33:46 +03:00

added border for page and lrgroupbands has a sorting property

This commit is contained in:
yanis60 2024-05-25 21:10:14 +01:00
parent 9d10ad6227
commit 7b7d4add4e
78 changed files with 31670 additions and 1093 deletions

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

Binary file not shown.

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>

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

@ -18,9 +18,12 @@ public:
virtual bool eof() = 0; virtual bool eof() = 0;
virtual QVariant data(const QString& columnName) = 0; virtual QVariant data(const QString& columnName) = 0;
virtual QVariant dataByRowIndex(const QString& columnName, int rowIndex) = 0; virtual QVariant dataByRowIndex(const QString& columnName, int rowIndex) = 0;
virtual QVariant dataByRowIndex(const QString &columnName, int rowIndex, int roleName) = 0;
virtual QVariant dataByRowIndex(const QString &columnName, int rowIndex, const QString &roleName) = 0;
virtual QVariant dataByKeyField(const QString& columnName, const QString& keyColumnName, QVariant keyData) = 0; virtual QVariant dataByKeyField(const QString& columnName, const QString& keyColumnName, QVariant keyData) = 0;
virtual int columnCount() = 0; virtual int columnCount() = 0;
virtual QString columnNameByIndex(int columnIndex) = 0; virtual QString columnNameByIndex(int columnIndex) = 0;
virtual QVariant headerData(const QString &columnName, const QString &roleName) = 0;
virtual int columnIndexByName(QString name) = 0; virtual int columnIndexByName(QString name) = 0;
virtual bool isInvalid() const = 0; virtual bool isInvalid() const = 0;
virtual QString lastError() = 0; virtual QString lastError() = 0;

View File

@ -55,6 +55,7 @@ public:
virtual bool containsVariable(const QString& variableName) = 0; virtual bool containsVariable(const QString& variableName) = 0;
virtual QVariant variable(const QString& variableName) = 0; virtual QVariant variable(const QString& variableName) = 0;
virtual bool addModel(const QString& name, QAbstractItemModel *model, bool owned) = 0; virtual bool addModel(const QString& name, QAbstractItemModel *model, bool owned) = 0;
virtual void addCSV(const QString& name, const QString& csvText, const QString& separator, bool firstRowIsHeader) = 0;
virtual void removeModel(const QString& name) = 0; virtual void removeModel(const QString& name) = 0;
virtual bool containsDatasource(const QString& dataSourceName) = 0; virtual bool containsDatasource(const QString& dataSourceName) = 0;
virtual void clearUserVariables()=0; virtual void clearUserVariables()=0;

View File

@ -10,7 +10,7 @@
#include "lrscriptenginemanagerintf.h" #include "lrscriptenginemanagerintf.h"
#include "lrpreviewreportwidget.h" #include "lrpreviewreportwidget.h"
namespace LimeReport{ namespace LimeReport;{
class PrintRange{ class PrintRange{
public: public:

View File

@ -62,7 +62,7 @@ namespace LimeReport{
GroupBandHeader::GroupBandHeader(QObject *owner, QGraphicsItem *parent) GroupBandHeader::GroupBandHeader(QObject *owner, QGraphicsItem *parent)
: BandDesignIntf(BandDesignIntf::GroupHeader, xmlTagHeader, owner,parent), : BandDesignIntf(BandDesignIntf::GroupHeader, xmlTagHeader, owner,parent),
m_groupFiledName(""), m_groupStarted(false), m_resetPageNumber(false) m_groupFiledName(""), m_groupStarted(false), m_resetPageNumber(false),m_sortFieldNameBy(Qt::AscendingOrder)
{ {
setBandTypeText(tr("GroupHeader")); setBandTypeText(tr("GroupHeader"));
setFixedPos(false); setFixedPos(false);
@ -95,7 +95,10 @@ void GroupBandHeader::startGroup(DataSourceManager* dataManager)
if (dataManager->containsDatasource(datasourceName)){ if (dataManager->containsDatasource(datasourceName)){
IDataSource* ds = dataManager->dataSource(datasourceName); IDataSource* ds = dataManager->dataSource(datasourceName);
if (ds && ds->columnIndexByName(m_groupFiledName)!=-1) if (ds && ds->columnIndexByName(m_groupFiledName)!=-1)
{
m_groupFieldValue=ds->data(m_groupFiledName); m_groupFieldValue=ds->data(m_groupFiledName);
}
} }
if (!m_condition.isEmpty()) m_conditionValue = calcCondition(dataManager); if (!m_condition.isEmpty()) m_conditionValue = calcCondition(dataManager);
@ -149,6 +152,7 @@ bool GroupBandHeader::isNeedToClose(DataSourceManager* dataManager)
QString datasourceName = findDataSourceName(parentBand()); QString datasourceName = findDataSourceName(parentBand());
if (dataManager->containsDatasource(datasourceName)){ if (dataManager->containsDatasource(datasourceName)){
IDataSource* ds = dataManager->dataSource(datasourceName); IDataSource* ds = dataManager->dataSource(datasourceName);
if (ds){ if (ds){
if (ds->data(m_groupFiledName).isNull() && m_groupFieldValue.isNull()) return false; if (ds->data(m_groupFiledName).isNull() && m_groupFieldValue.isNull()) return false;
if (!ds->data(m_groupFiledName).isValid()) return false; if (!ds->data(m_groupFiledName).isValid()) return false;

View File

@ -32,12 +32,14 @@
#include "lrbanddesignintf.h" #include "lrbanddesignintf.h"
#include "lrdesignelementsfactory.h" #include "lrdesignelementsfactory.h"
#include "qnamespace.h"
namespace LimeReport{ namespace LimeReport{
class GroupBandHeader : public BandDesignIntf, public IGroupBand{ class GroupBandHeader : public BandDesignIntf, public IGroupBand{
Q_OBJECT Q_OBJECT
Q_PROPERTY(QString groupFieldName READ groupFieldName WRITE setGroupFieldName) Q_PROPERTY(QString groupFieldName READ groupFieldName WRITE setGroupFieldName)
Q_PROPERTY(Qt::SortOrder SortFieldNameBy READ SortFieldNameBy WRITE setSortFieldNameBy)
Q_PROPERTY(bool splittable READ isSplittable WRITE setSplittable ) Q_PROPERTY(bool splittable READ isSplittable WRITE setSplittable )
Q_PROPERTY(bool keepGroupTogether READ tryToKeepTogether WRITE setTryToKeepTogether) Q_PROPERTY(bool keepGroupTogether READ tryToKeepTogether WRITE setTryToKeepTogether)
Q_PROPERTY(bool startNewPage READ startNewPage WRITE setStartNewPage) Q_PROPERTY(bool startNewPage READ startNewPage WRITE setStartNewPage)
@ -60,6 +62,8 @@ public:
bool isGroupHeader() const {return true;} bool isGroupHeader() const {return true;}
QString condition() const; QString condition() const;
void setCondition(const QString &condition); void setCondition(const QString &condition);
Qt::SortOrder SortFieldNameBy(){return m_sortFieldNameBy;};
void setSortFieldNameBy(Qt::SortOrder sortOrder){m_sortFieldNameBy = sortOrder;}
private: private:
virtual BaseDesignIntf* createSameTypeItem(QObject* owner=0, QGraphicsItem* parent=0); virtual BaseDesignIntf* createSameTypeItem(QObject* owner=0, QGraphicsItem* parent=0);
void startGroup(DataSourceManager* dataManager); void startGroup(DataSourceManager* dataManager);
@ -77,6 +81,7 @@ private:
bool m_resetPageNumber; bool m_resetPageNumber;
QString m_condition; QString m_condition;
QString m_conditionValue; QString m_conditionValue;
Qt::SortOrder m_sortFieldNameBy;
}; };
class GroupBandFooter : public BandDesignIntf{ class GroupBandFooter : public BandDesignIntf{

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@ -15,12 +15,13 @@ BorderEditor::BorderEditor(QWidget *parent) :
connect( connect(
ui->borderFrame, SIGNAL(borderSideClicked(LimeReport::BaseDesignIntf::BorderSide, bool)), ui->borderFrame, SIGNAL(borderSideClicked(LimeReport::BaseDesignIntf::BorderSide, bool)),
this, SLOT(checkToolButtons(LimeReport::BaseDesignIntf::BorderSide, bool)) this, SLOT(checkToolButtons(LimeReport::BaseDesignIntf::BorderSide, bool))
); );
} }
void BorderEditor::loadItem(LimeReport::BaseDesignIntf *item) void BorderEditor::loadItem(LimeReport::BaseDesignIntf *item)
{ {
m_item = item; m_item = item;
qDebug()<<item->metaObject()->className();
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::TopLine, emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::TopLine,
item->borderLines() & LimeReport::BaseDesignIntf::TopLine); item->borderLines() & LimeReport::BaseDesignIntf::TopLine);
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::LeftLine, emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::LeftLine,
@ -68,6 +69,11 @@ double BorderEditor::borderWidth()
return m_borderWidth; return m_borderWidth;
} }
bool BorderEditor::isPage()
{
return QString(m_item->metaObject()->className()) == "LimeReport::PageItemDesignIntf";
}
BorderEditor::~BorderEditor() BorderEditor::~BorderEditor()
{ {
delete ui; delete ui;
@ -93,18 +99,18 @@ void BorderEditor::checkToolButtons(LimeReport::BaseDesignIntf::BorderSide side,
{ {
switch(side) switch(side)
{ {
case BaseDesignIntf::BorderSide::TopLine: case BaseDesignIntf::BorderSide::TopLine:
ui->topLine->setChecked(check); ui->topLine->setChecked(check);
break; break;
case BaseDesignIntf::BorderSide::BottomLine: case BaseDesignIntf::BorderSide::BottomLine:
ui->bottomLine->setChecked(check); ui->bottomLine->setChecked(check);
break; break;
case BaseDesignIntf::BorderSide::LeftLine: case BaseDesignIntf::BorderSide::LeftLine:
ui->leftLine->setChecked(check); ui->leftLine->setChecked(check);
break; break;
case BaseDesignIntf::BorderSide::RightLine: case BaseDesignIntf::BorderSide::RightLine:
ui->rightLine->setChecked(check); ui->rightLine->setChecked(check);
break; break;
} }
} }

View File

@ -22,6 +22,7 @@ public:
LimeReport::BaseDesignIntf::BorderStyle borderStyle(); LimeReport::BaseDesignIntf::BorderStyle borderStyle();
QString borderColor(); QString borderColor();
double borderWidth(); double borderWidth();
bool isPage();
~BorderEditor(); ~BorderEditor();
private slots: private slots:

View File

@ -58,8 +58,8 @@ namespace LimeReport{
TextItem::TextItem(QObject *owner, QGraphicsItem *parent) TextItem::TextItem(QObject *owner, QGraphicsItem *parent)
: ContentItemDesignIntf(xmlTag,owner,parent), m_angle(Angle0), m_trimValue(true), m_allowHTML(false), : ContentItemDesignIntf(xmlTag,owner,parent), m_angle(Angle0), m_trimValue(true), m_allowHTML(false),
m_allowHTMLInFields(false), m_replaceCarriageReturns(false), m_followTo(""), m_follower(0), m_textIndent(0), m_allowHTMLInFields(false), m_replaceCarriageReturns(false), m_followTo(""), m_follower(0), m_textIndent(0),
m_textLayoutDirection(Qt::LayoutDirectionAuto), m_hideIfEmpty(false), m_fontLetterSpacing(0) m_textLayoutDirection(Qt::LayoutDirectionAuto), m_hideIfEmpty(false), m_fontLetterSpacing(0)
{ {
PageItemDesignIntf* pageItem = dynamic_cast<PageItemDesignIntf*>(parent); PageItemDesignIntf* pageItem = dynamic_cast<PageItemDesignIntf*>(parent);
BaseDesignIntf* parentItem = dynamic_cast<BaseDesignIntf*>(parent); BaseDesignIntf* parentItem = dynamic_cast<BaseDesignIntf*>(parent);
@ -77,10 +77,6 @@ TextItem::TextItem(QObject *owner, QGraphicsItem *parent)
TextItem::~TextItem(){} TextItem::~TextItem(){}
int TextItem::fakeMarginSize() const{
return marginSize()+5;
}
void TextItem::preparePopUpMenu(QMenu &menu) void TextItem::preparePopUpMenu(QMenu &menu)
{ {
QAction* editAction = menu.addAction(QIcon(":/report/images/edit_pecil2.png"),tr("Edit")); QAction* editAction = menu.addAction(QIcon(":/report/images/edit_pecil2.png"),tr("Edit"));
@ -179,62 +175,62 @@ void TextItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* style, Q
qreal hOffset = 0, vOffset = 0; qreal hOffset = 0, vOffset = 0;
switch (m_angle){ switch (m_angle){
case Angle0: case Angle0:
hOffset = fakeMarginSize(); hOffset = marginSize();
if ((tmpSize.height() > 0) && (m_alignment & Qt::AlignVCenter)){ if ((tmpSize.height() > 0) && (m_alignment & Qt::AlignVCenter)){
vOffset = tmpSize.height() / 2; vOffset = tmpSize.height() / 2;
} }
if ((tmpSize.height() > 0) && (m_alignment & Qt::AlignBottom)) // allow html if ((tmpSize.height() > 0) && (m_alignment & Qt::AlignBottom)) // allow html
vOffset = tmpSize.height(); vOffset = tmpSize.height();
painter->translate(hOffset,vOffset); painter->translate(hOffset,vOffset);
break; break;
case Angle90: case Angle90:
hOffset = width() - fakeMarginSize(); hOffset = width() - marginSize();
vOffset = fakeMarginSize(); vOffset = marginSize();
if (m_alignment & Qt::AlignVCenter){ if (m_alignment & Qt::AlignVCenter){
hOffset = (width() - text->size().height()) / 2 + text->size().height(); hOffset = (width() - text->size().height()) / 2 + text->size().height();
} }
if (m_alignment & Qt::AlignBottom){ if (m_alignment & Qt::AlignBottom){
hOffset = (text->size().height()); hOffset = (text->size().height());
} }
painter->translate(hOffset,vOffset); painter->translate(hOffset,vOffset);
painter->rotate(90); painter->rotate(90);
break; break;
case Angle180: case Angle180:
hOffset = width() - fakeMarginSize(); hOffset = width() - marginSize();
vOffset = height() - fakeMarginSize(); vOffset = height() - marginSize();
if ((tmpSize.width()>0) && (m_alignment & Qt::AlignVCenter)){ if ((tmpSize.width()>0) && (m_alignment & Qt::AlignVCenter)){
vOffset = tmpSize.height() / 2+ text->size().height(); vOffset = tmpSize.height() / 2+ text->size().height();
} }
if ((tmpSize.height()>0) && (m_alignment & Qt::AlignBottom)){ if ((tmpSize.height()>0) && (m_alignment & Qt::AlignBottom)){
vOffset = (text->size().height()); vOffset = (text->size().height());
} }
painter->translate(hOffset,vOffset); painter->translate(hOffset,vOffset);
painter->rotate(180); painter->rotate(180);
break; break;
case Angle270: case Angle270:
hOffset = fakeMarginSize(); hOffset = marginSize();
vOffset = height()-fakeMarginSize(); vOffset = height()-marginSize();
if (m_alignment & Qt::AlignVCenter){ if (m_alignment & Qt::AlignVCenter){
hOffset = (width() - text->size().height())/2; hOffset = (width() - text->size().height())/2;
} }
if (m_alignment & Qt::AlignBottom){ if (m_alignment & Qt::AlignBottom){
hOffset = (width() - text->size().height()); hOffset = (width() - text->size().height());
} }
painter->translate(hOffset,vOffset); painter->translate(hOffset,vOffset);
painter->rotate(270); painter->rotate(270);
break; break;
case Angle45: case Angle45:
painter->translate(width()/2,0); painter->translate(width()/2,0);
painter->rotate(45); painter->rotate(45);
text->setTextWidth(sqrt(2*(pow(width()/2,2)))); text->setTextWidth(sqrt(2*(pow(width()/2,2))));
break; break;
case Angle315: case Angle315:
painter->translate(0,height()/2); painter->translate(0,height()/2);
painter->rotate(315); painter->rotate(315);
text->setTextWidth(sqrt(2*(pow(height()/2,2)))); text->setTextWidth(sqrt(2*(pow(height()/2,2))));
break; break;
} }
@ -321,7 +317,7 @@ void TextItem::updateItemSize(DataSourceManager* dataManager, RenderPass pass, i
initTextSizes(); initTextSizes();
if (m_textSize.width()>width() && ((m_autoWidth==MaxWordLength)||(m_autoWidth==MaxStringLength))){ if (m_textSize.width()>width() && ((m_autoWidth==MaxWordLength)||(m_autoWidth==MaxStringLength))){
setWidth(m_textSize.width() + fakeMarginSize()*2); setWidth(m_textSize.width() + marginSize()*2);
} }
if (m_textSize.height()>height()) { if (m_textSize.height()>height()) {
@ -338,22 +334,22 @@ void TextItem::updateItemSize(DataSourceManager* dataManager, RenderPass pass, i
void TextItem::updateLayout() void TextItem::updateLayout()
{ {
// m_layout.setFont(transformToSceneFont(font())); // m_layout.setFont(transformToSceneFont(font()));
// m_layout.setText(content()); // m_layout.setText(content());
// qreal linePos = 0; // qreal linePos = 0;
// m_layout.beginLayout(); // m_layout.beginLayout();
// while(true){ // while(true){
// QTextLine line = m_layout.createLine(); // QTextLine line = m_layout.createLine();
// if (!line.isValid()) break; // if (!line.isValid()) break;
// line.setLineWidth(width()-marginSize()*2); // line.setLineWidth(width()-marginSize()*2);
// line.setPosition(QPoint(marginSize(),linePos)); // line.setPosition(QPoint(marginSize(),linePos));
// linePos+=line.height(); // linePos+=line.height();
// } // }
// m_layout.endLayout(); // m_layout.endLayout();
} }
bool TextItem::isNeedExpandContent() const bool TextItem::isNeedExpandContent() const
{ {
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1)) #if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1))
QRegExp rx("$*\\{[^{]*\\}"); QRegExp rx("$*\\{[^{]*\\}");
#else #else
@ -380,21 +376,21 @@ QString TextItem::replaceReturns(QString text) const
void TextItem::setTextFont(TextPtr text, const QFont& value) const { void TextItem::setTextFont(TextPtr text, const QFont& value) const {
text->setDefaultFont(value); text->setDefaultFont(value);
if ((m_angle==Angle0)||(m_angle==Angle180)){ if ((m_angle==Angle0)||(m_angle==Angle180)){
text->setTextWidth(rect().width()-fakeMarginSize()*2); text->setTextWidth(rect().width()-marginSize()*2);
} else { } else {
text->setTextWidth(rect().height()-fakeMarginSize()*2); text->setTextWidth(rect().height()-marginSize()*2);
} }
} }
void TextItem::adaptFontSize(TextPtr text) const{ void TextItem::adaptFontSize(TextPtr text) const{
QFont _font = transformToSceneFont(font()); QFont _font = transformToSceneFont(font());
do{ do{
// qApp->processEvents(); // 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);
else break; else break;
} while(text->size().height()>this->height() || text->size().width()>(this->width()) - fakeMarginSize() * 2); } while(text->size().height()>this->height() || text->size().width()>(this->width()) - marginSize() * 2);
} }
int TextItem::underlineLineSize() const int TextItem::underlineLineSize() const
@ -419,8 +415,8 @@ void TextItem::setLineSpacing(int value)
{ {
int oldValue = m_lineSpacing; int oldValue = m_lineSpacing;
m_lineSpacing = value; m_lineSpacing = value;
// if (autoHeight()) // if (autoHeight())
// initTextSizes(); // initTextSizes();
update(); update();
notify("lineSpacing",oldValue,value); notify("lineSpacing",oldValue,value);
} }
@ -473,40 +469,40 @@ QString TextItem::formatFieldValue()
if (m_valueType != Default) { if (m_valueType != Default) {
switch (m_valueType) { switch (m_valueType) {
case DateTime: case DateTime:
{ {
QDateTime dt = QDateTime::fromString(value.toString(), Qt::ISODate); QDateTime dt = QDateTime::fromString(value.toString(), Qt::ISODate);
value = (dt.isValid() ? QVariant(dt) : m_varValue); value = (dt.isValid() ? QVariant(dt) : m_varValue);
break; break;
} }
case Double: case Double:
{ {
bool bOk = false; bool bOk = false;
double dbl = value.toDouble(&bOk); double dbl = value.toDouble(&bOk);
value = (bOk ? QVariant(dbl) : m_varValue); value = (bOk ? QVariant(dbl) : m_varValue);
} }
default: break; default: break;
} }
} }
#if QT_VERSION < QT_VERSION_CHECK(6,0,0) #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 #else
switch (value.typeId()) { switch (value.typeId()) {
case QMetaType::QDate: case QMetaType::QDate:
case QMetaType::QDateTime: case QMetaType::QDateTime:
return formatDateTime(value.toDateTime()); return formatDateTime(value.toDateTime());
case QMetaType::Double: case QMetaType::Double:
return formatNumber(value.toDouble()); return formatNumber(value.toDouble());
default: default:
return value.toString(); return value.toString();
} }
#endif #endif
@ -679,7 +675,7 @@ void TextItem::setFollowTo(const QString &followTo)
tr("TextItem \" %1 \" already has folower \" %2 \" ") tr("TextItem \" %1 \" already has folower \" %2 \" ")
.arg(fi->objectName()) .arg(fi->objectName())
.arg(fi->follower()->objectName()) .arg(fi->follower()->objectName())
); );
notify("followTo",followTo,""); notify("followTo",followTo,"");
} }
} else if (m_followTo != ""){ } else if (m_followTo != ""){
@ -688,7 +684,7 @@ void TextItem::setFollowTo(const QString &followTo)
tr("Error"), tr("Error"),
tr("TextItem \" %1 \" not found!") tr("TextItem \" %1 \" not found!")
.arg(m_followTo) .arg(m_followTo)
); );
notify("followTo",followTo,""); notify("followTo",followTo,"");
} }
} }
@ -774,13 +770,13 @@ void TextItem::setAllowHTML(bool allowHTML)
{ {
if (m_allowHTML!=allowHTML){ if (m_allowHTML!=allowHTML){
m_allowHTML = allowHTML; m_allowHTML = allowHTML;
// if (m_text){ // if (m_text){
// if (allowHTML) // if (allowHTML)
// m_text->setHtml(m_strText); // m_text->setHtml(m_strText);
// else // else
// m_text->setPlainText(m_strText); // m_text->setPlainText(m_strText);
// update(); // update();
// } // }
update(); update();
notify("allowHTML",!m_allowHTML,allowHTML); notify("allowHTML",!m_allowHTML,allowHTML);
} }
@ -811,9 +807,9 @@ bool TextItem::isNeedUpdateSize(RenderPass pass) const
} }
bool res = (m_textSize.height()>geometry().height()&&autoHeight()) || bool res = (m_textSize.height()>geometry().height()&&autoHeight()) ||
(m_textSize.width()>geometry().width()&&autoWidth()) || (m_textSize.width()>geometry().width()&&autoWidth()) ||
m_follower || m_follower ||
isNeedExpandContent(); isNeedExpandContent();
return res; return res;
} }
@ -896,7 +892,7 @@ void TextItem::setAdaptFontToSize(bool value)
if (m_adaptFontToSize!=value){ if (m_adaptFontToSize!=value){
bool oldValue = m_adaptFontToSize; bool oldValue = m_adaptFontToSize;
m_adaptFontToSize=value; m_adaptFontToSize=value;
// initText(); // initText();
invalidateRect(rect()); invalidateRect(rect());
notify("updateFontToSize",oldValue,value); notify("updateFontToSize",oldValue,value);
} }
@ -918,10 +914,10 @@ QString TextItem::extractText(QTextBlock& curBlock, int height){
linesHeight += curBlock.layout()->lineAt(curLine).height() + lineSpacing(); linesHeight += curBlock.layout()->lineAt(curLine).height() + lineSpacing();
if (height > 0 && linesHeight > (height-borderLineSize() * 2)) {goto loop_exit;} if (height > 0 && linesHeight > (height-borderLineSize() * 2)) {goto loop_exit;}
resultText += curBlock.text().mid(curBlock.layout()->lineAt(curLine).textStart(), resultText += curBlock.text().mid(curBlock.layout()->lineAt(curLine).textStart(),
curBlock.layout()->lineAt(curLine).textLength()); curBlock.layout()->lineAt(curLine).textLength());
} }
} }
loop_exit: return resultText; loop_exit: return resultText;
} }
QString TextItem::getTextPart(int height, int skipHeight){ QString TextItem::getTextPart(int height, int skipHeight){
@ -1003,10 +999,10 @@ BaseDesignIntf *TextItem::cloneEmpty(int height, QObject *owner, QGraphicsItem *
void TextItem::objectLoadFinished() void TextItem::objectLoadFinished()
{ {
ItemDesignIntf::objectLoadFinished(); ItemDesignIntf::objectLoadFinished();
// if (itemMode() == DesignMode || !isNeedExpandContent()){ // if (itemMode() == DesignMode || !isNeedExpandContent()){
// if (autoHeight() && autoWidth()) // if (autoHeight() && autoWidth())
// initTextSizes(); // initTextSizes();
// } // }
} }
void TextItem::setTextItemFont(QFont value) void TextItem::setTextItemFont(QFont value)
@ -1023,8 +1019,8 @@ void TextItem::setTextItemFont(QFont value)
QWidget *TextItem::defaultEditor() QWidget *TextItem::defaultEditor()
{ {
QSettings* l_settings = (page()->settings() != 0) ? QSettings* l_settings = (page()->settings() != 0) ?
page()->settings() : page()->settings() :
(page()->reportEditor()!=0) ? page()->reportEditor()->settings() : 0; (page()->reportEditor()!=0) ? page()->reportEditor()->settings() : 0;
QWidget* editor = new TextItemEditor(this,page(),l_settings); QWidget* editor = new TextItemEditor(this,page(),l_settings);
editor->setAttribute(Qt::WA_DeleteOnClose); editor->setAttribute(Qt::WA_DeleteOnClose);
return editor; return editor;

View File

@ -177,7 +177,7 @@ public:
void setTextLayoutDirection(const Qt::LayoutDirection &textLayoutDirection); void setTextLayoutDirection(const Qt::LayoutDirection &textLayoutDirection);
void setWatermark(bool watermark); void setWatermark(bool watermark);
bool isReplaceCarriageReturns() const; bool isReplaceCarriageReturns() const;
void setReplaceCarriageReturns(bool isReplaceCarriageReturns); void setReplaceCarriageReturns(bool isReplaceCarriageReturns);
@ -192,7 +192,6 @@ protected:
bool isNeedExpandContent() const; bool isNeedExpandContent() const;
QString replaceBR(QString text) const; QString replaceBR(QString text) const;
QString replaceReturns(QString text) const; QString replaceReturns(QString text) const;
int fakeMarginSize() const;
QString getTextPart(int height, int skipHeight); QString getTextPart(int height, int skipHeight);
void restoreLinksEvent(); void restoreLinksEvent();
void preparePopUpMenu(QMenu &menu); void preparePopUpMenu(QMenu &menu);

View File

@ -60,7 +60,6 @@ void BandMarker::paint(QPainter *painter, const QStyleOptionGraphicsItem* /**opt
boundingRect().bottomLeft().y()-4, boundingRect().bottomLeft().y()-4,
boundingRect().width(),4), Qt::lightGray boundingRect().width(),4), Qt::lightGray
); );
qDebug()<<boundingRect().width();
painter->setRenderHint(QPainter::Antialiasing); painter->setRenderHint(QPainter::Antialiasing);
qreal size = (boundingRect().width()<boundingRect().height()) ? boundingRect().width() : boundingRect().height(); qreal size = (boundingRect().width()<boundingRect().height()) ? boundingRect().width() : boundingRect().height();
QRectF r = QRectF(0,0,size,size); QRectF r = QRectF(0,0,size,size);
@ -199,12 +198,6 @@ BandDesignIntf::BandDesignIntf(BandsType bandType, const QString &xmlTypeName, Q
BandDesignIntf::~BandDesignIntf() BandDesignIntf::~BandDesignIntf()
{ {
// if (itemMode()&DesignMode){
// foreach(BandDesignIntf* band,childBands()) {
// removeChildBand(band);
// delete band;
// }
// }
delete m_bandMarker; delete m_bandMarker;
delete m_bandNameLabel; delete m_bandNameLabel;
} }
@ -643,19 +636,6 @@ void BandDesignIntf::processPopUpAction(QAction *action)
ItemsContainerDesignInft::processPopUpAction(action); ItemsContainerDesignInft::processPopUpAction(action);
} }
//void BandDesignIntf::recalcItems(DataSourceManager* dataManager)
//{
// foreach(BaseDesignIntf* bi, childBaseItems()){
// ContentItemDesignIntf* ci = dynamic_cast<ContentItemDesignIntf*>(bi);
// if (bi){
// ContentItemDesignIntf* pci = dynamic_cast<ContentItemDesignIntf*>(bi->patternItem());
// ci->setContent(pci->content());
// }
// }
// updateItemSize(dataManager,FirstPass,height());
//}
BaseDesignIntf* BandDesignIntf::cloneUpperPart(int height, QObject *owner, QGraphicsItem *parent) BaseDesignIntf* BandDesignIntf::cloneUpperPart(int height, QObject *owner, QGraphicsItem *parent)
{ {
int maxBottom = 0; int maxBottom = 0;
@ -922,9 +902,9 @@ void BandDesignIntf::setAlternateBackgroundColor(const QColor &alternateBackgrou
} }
} }
qreal BandDesignIntf::bottomSpace() const qreal BandDesignIntf::bottomSpace()
{ {
return height()-findMaxBottom(); return m_bottomSpace;
} }
void BandDesignIntf::slotPropertyObjectNameChanged(const QString &, const QString& newName) void BandDesignIntf::slotPropertyObjectNameChanged(const QString &, const QString& newName)
@ -958,14 +938,9 @@ void BandDesignIntf::setKeepTopSpace(bool value)
} }
} }
int BandDesignIntf::bootomSpace() const void BandDesignIntf::setBottomSpace(qreal bottomSpace)
{ {
return m_bottomSpace; m_bottomSpace = bottomSpace;
}
void BandDesignIntf::setBootomSpace(int bootomSpace)
{
m_bottomSpace = bootomSpace;
} }
bool BandDesignIntf::repeatOnEachRow() const bool BandDesignIntf::repeatOnEachRow() const
@ -1138,7 +1113,6 @@ void BandDesignIntf::updateItemSize(DataSourceManager* dataManager, RenderPass p
spaceBorder += borderLineSize() + 2; spaceBorder += borderLineSize() + 2;
} }
spaceBorder += m_bottomSpace;
restoreLinks(); restoreLinks();
snapshotItemsLayout(); snapshotItemsLayout();
@ -1150,6 +1124,7 @@ void BandDesignIntf::updateItemSize(DataSourceManager* dataManager, RenderPass p
item->setY(item->y() - minTop); item->setY(item->y() - minTop);
} }
} }
setHeight(findMaxBottom() + spaceBorder); setHeight(findMaxBottom() + spaceBorder);
} }
if ((maxHeight > 0) && (height() > maxHeight)){ if ((maxHeight > 0) && (height() > maxHeight)){
@ -1164,6 +1139,15 @@ void BandDesignIntf::updateBandNameLabel()
if (m_bandNameLabel) m_bandNameLabel->updateLabel(bandTitle()); if (m_bandNameLabel) m_bandNameLabel->updateLabel(bandTitle());
} }
void BandDesignIntf::initFromItem(BaseDesignIntf *source)
{
ItemsContainerDesignInft::initFromItem(source);
BandDesignIntf* source_band = dynamic_cast<BandDesignIntf*>(source);
if (source_band){
this->setBottomSpace(source_band->bottomSpace());
}
}
QColor BandDesignIntf::selectionColor() const QColor BandDesignIntf::selectionColor() const
{ {
return Qt::yellow; return Qt::yellow;

View File

@ -156,8 +156,8 @@ public:
virtual bool isUnique() const; virtual bool isUnique() const;
void setItemMode(BaseDesignIntf::ItemMode mode); void setItemMode(BaseDesignIntf::ItemMode mode);
void updateItemSize(DataSourceManager *dataManager, RenderPass pass=FirstPass, int maxHeight=0); void updateItemSize(DataSourceManager *dataManager, RenderPass pass=FirstPass, int maxHeight=0);
// void recalcItems(DataSourceManager* dataManager);
void updateBandNameLabel(); void updateBandNameLabel();
void initFromItem(BaseDesignIntf* source);
virtual QColor selectionColor() const; virtual QColor selectionColor() const;
int bandIndex() const; int bandIndex() const;
@ -261,11 +261,10 @@ 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);
qreal bottomSpace() const; qreal bottomSpace();
void setBottomSpace(qreal bottomSpace);
void setBackgroundModeProperty(BGMode value); void setBackgroundModeProperty(BGMode value);
void setBackgroundOpacity(int value); void setBackgroundOpacity(int value);
int bootomSpace() const;
void setBootomSpace(int bootomSpace);
void updateBandMarkerGeometry(); void updateBandMarkerGeometry();
int shiftItems() const; int shiftItems() const;
void setShiftItems(int shiftItems); void setShiftItems(int shiftItems);

View File

@ -413,6 +413,7 @@ void BaseDesignIntf::mousePressEvent(QGraphicsSceneMouseEvent *event)
void BaseDesignIntf::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) void BaseDesignIntf::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{ {
removeGuideLines();
QRectF newGeometry = geometry(); QRectF newGeometry = geometry();
m_isChangingPos = false; m_isChangingPos = false;
if (newGeometry != m_oldGeometry) { if (newGeometry != m_oldGeometry) {
@ -429,7 +430,10 @@ void BaseDesignIntf::paint(QPainter *ppainter, const QStyleOptionGraphicsItem *o
ppainter->save(); ppainter->save();
setupPainter(ppainter); setupPainter(ppainter);
if(!isPageItem())
drawBorder(ppainter, rect()); drawBorder(ppainter, rect());
else
drawBorder(ppainter, page()->pageItem()->pageRect());
if(m_shadow) if(m_shadow)
drawShadow(ppainter, rect(), 6); drawShadow(ppainter, rect(), 6);
// if (m_joinMarkerOn) { drawMarker(ppainter, Const::JOIN_COLOR);} // if (m_joinMarkerOn) { drawMarker(ppainter, Const::JOIN_COLOR);}
@ -544,13 +548,14 @@ void BaseDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
return; return;
} }
int hStep = dynamic_cast<PageDesignIntf*>(scene())->horizontalGridStep(); int hStep = dynamic_cast<PageDesignIntf*>(scene())->horizontalGridStep();
int vStep = dynamic_cast<PageDesignIntf*>(scene())->verticalGridStep(); int vStep = dynamic_cast<PageDesignIntf*>(scene())->verticalGridStep();
if (m_resizeDirectionFlags & ResizeLeft) { if (m_resizeDirectionFlags & ResizeLeft) {
if ((event->scenePos().x()) <= (mapToScene(0, 0).x() + (width() - Const::MINIMUM_ITEM_WIDTH)) && if ((event->scenePos().x()) <= (mapToScene(0, 0).x() + (width() - Const::MINIMUM_ITEM_WIDTH)) &&
(width() + (event->lastScenePos().x() - event->scenePos().x()) > Const::MINIMUM_ITEM_WIDTH) (width() + (event->lastScenePos().x() - event->scenePos().x()) > Const::MINIMUM_ITEM_WIDTH)
) { ) {
qreal posRightCorner = mapToScene(0, 0).x() + width(); qreal posRightCorner = mapToScene(0, 0).x() + width();
qreal posLeftCorner = div(mapToParent(event->pos()).x(), hStep).quot * hStep; qreal posLeftCorner = div(mapToParent(event->pos()).x(), hStep).quot * hStep;
if (posLeftCorner < 0 ) if (posLeftCorner < 0 )
@ -562,15 +567,15 @@ void BaseDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
if (m_resizeDirectionFlags & ResizeRight) { if (m_resizeDirectionFlags & ResizeRight) {
if ((event->scenePos().x() >= (mapToScene(0, 0).x() + Const::MINIMUM_ITEM_WIDTH)) || if ((event->scenePos().x() >= (mapToScene(0, 0).x() + Const::MINIMUM_ITEM_WIDTH)) ||
(event->scenePos().x() >= (mapToScene(0, 0).x() + width()))) { (event->scenePos().x() >= (mapToScene(0, 0).x() + width()))) {
setWidth(div(event->scenePos().x() - mapToScene(0, 0).x(), hStep).quot * hStep); setWidth(div(event->scenePos().x() - mapToScene(0, 0).x(), hStep).quot * hStep);
} }
} }
if (m_resizeDirectionFlags & ResizeTop) { if (m_resizeDirectionFlags & ResizeTop) {
if ((event->scenePos().y()) <= (mapToScene(0, 0).y() + (height() - Const::MINIMUM_ITEM_HEIGHT)) && if ((event->scenePos().y()) <= (mapToScene(0, 0).y() + (height() - Const::MINIMUM_ITEM_HEIGHT)) &&
(height() + (event->lastScenePos().y() - event->scenePos().y()) > Const::MINIMUM_ITEM_HEIGHT) (height() + (event->lastScenePos().y() - event->scenePos().y()) > Const::MINIMUM_ITEM_HEIGHT)
) { ) {
qreal posBottomCorner = mapToScene(0, 0).y() + height(); qreal posBottomCorner = mapToScene(0, 0).y() + height();
qreal posTopCorner = div(mapToParent(event->pos()).y(), vStep).quot * vStep; qreal posTopCorner = div(mapToParent(event->pos()).y(), vStep).quot * vStep;
if (posTopCorner < 0 ) if (posTopCorner < 0 )
@ -582,8 +587,8 @@ void BaseDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
if (m_resizeDirectionFlags & ResizeBottom) { if (m_resizeDirectionFlags & ResizeBottom) {
if ((event->scenePos().y() > (mapToScene(0, 0).y() + height())) || if ((event->scenePos().y() > (mapToScene(0, 0).y() + height())) ||
(event->scenePos().y() > (mapToScene(0, 0).y() + Const::MINIMUM_ITEM_HEIGHT)) (event->scenePos().y() > (mapToScene(0, 0).y() + Const::MINIMUM_ITEM_HEIGHT))
) { ) {
setHeight(div(event->scenePos().y() - mapToScene(0, 0).y(), vStep).quot * vStep); setHeight(div(event->scenePos().y() - mapToScene(0, 0).y(), vStep).quot * vStep);
} }
} }
@ -618,6 +623,32 @@ void BaseDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
} }
} }
if (scene() && !scene()->selectedItems().isEmpty()) {
QGraphicsItem *movingItem = scene()->selectedItems().first();
removeGuideLines();
for (QGraphicsItem *item : scene()->items()) {
if (item != movingItem) {
qreal topDiff = qAbs(item->sceneBoundingRect().bottom() - movingItem->sceneBoundingRect().bottom());
qreal bottomDiff = qAbs(item->sceneBoundingRect().top() - movingItem->sceneBoundingRect().top());
qreal leftDiff = qAbs(item->sceneBoundingRect().left() - movingItem->sceneBoundingRect().left());
qreal rightDiff = qAbs(item->sceneBoundingRect().right() - movingItem->sceneBoundingRect().right());
if (topDiff == 0)
addGuideLine(item->sceneBoundingRect().left(), item->sceneBoundingRect().top(),
movingItem->sceneBoundingRect().left(), movingItem->sceneBoundingRect().top());
if (bottomDiff == 0)
addGuideLine(item->sceneBoundingRect().left(), item->sceneBoundingRect().bottom(),
movingItem->sceneBoundingRect().left(), movingItem->sceneBoundingRect().bottom());
if (leftDiff == 0)
addGuideLine(item->sceneBoundingRect().left(), item->sceneBoundingRect().top(),
movingItem->sceneBoundingRect().left(), movingItem->sceneBoundingRect().top());
if (rightDiff == 0)
addGuideLine(item->sceneBoundingRect().right(), item->sceneBoundingRect().top(),
movingItem->sceneBoundingRect().right(), movingItem->sceneBoundingRect().top());
}
}
}
} }
int BaseDesignIntf::possibleResizeDirectionFlags() const int BaseDesignIntf::possibleResizeDirectionFlags() const
@ -659,11 +690,11 @@ Qt::CursorShape BaseDesignIntf::getPossibleCursor(int cursorFlags)
if ((cursorFlags == Fixed) || (scene()->selectedItems().count() > 1)) return Qt::ArrowCursor; if ((cursorFlags == Fixed) || (scene()->selectedItems().count() > 1)) return Qt::ArrowCursor;
if (((cursorFlags & ResizeRight) && (cursorFlags & ResizeTop)) || if (((cursorFlags & ResizeRight) && (cursorFlags & ResizeTop)) ||
((cursorFlags & ResizeLeft) && (cursorFlags & ResizeBottom))) { ((cursorFlags & ResizeLeft) && (cursorFlags & ResizeBottom))) {
return Qt::SizeBDiagCursor; return Qt::SizeBDiagCursor;
} }
if (((cursorFlags & ResizeLeft) && (cursorFlags & ResizeTop)) || if (((cursorFlags & ResizeLeft) && (cursorFlags & ResizeTop)) ||
((cursorFlags & ResizeRight) && (cursorFlags & ResizeBottom))) { ((cursorFlags & ResizeRight) && (cursorFlags & ResizeBottom))) {
return Qt::SizeFDiagCursor; return Qt::SizeFDiagCursor;
} }
if ((cursorFlags & ResizeLeft) || (cursorFlags & ResizeRight)) { return Qt::SizeHorCursor; } if ((cursorFlags & ResizeLeft) || (cursorFlags & ResizeRight)) { return Qt::SizeHorCursor; }
@ -760,6 +791,23 @@ void BaseDesignIntf::updatePossibleDirectionFlags(){
} }
} }
void BaseDesignIntf::addGuideLine(qreal x1, qreal y1, qreal x2, qreal y2)
{
QGraphicsLineItem *line = new QGraphicsLineItem(x1, y1, x2, y2);
line->setPen(QPen(Qt::red,2,Qt::DashLine));
if(scene())scene()->addItem(line);
guideLines.append(line);
}
void BaseDesignIntf::removeGuideLines()
{
for (QGraphicsLineItem *line : guideLines) {
if(scene())scene()->removeItem(line);
delete line;
}
guideLines.clear();
}
bool BaseDesignIntf::isChangingPos() const bool BaseDesignIntf::isChangingPos() const
{ {
return m_isChangingPos; return m_isChangingPos;
@ -775,6 +823,11 @@ bool BaseDesignIntf::isShapeItem() const
return QString(metaObject()->className()) == "LimeReport::ShapeItem"; return QString(metaObject()->className()) == "LimeReport::ShapeItem";
} }
bool BaseDesignIntf::isPageItem() const
{
return QString(metaObject()->className()) == "LimeReport::PageItemDesignIntf";
}
bool BaseDesignIntf::hasShadow() bool BaseDesignIntf::hasShadow()
{ {
return m_shadow; return m_shadow;
@ -1014,7 +1067,7 @@ void BaseDesignIntf::moveUp()
void BaseDesignIntf::sizeRight() void BaseDesignIntf::sizeRight()
{ {
if ((m_possibleResizeDirectionFlags & ResizeLeft) || if ((m_possibleResizeDirectionFlags & ResizeLeft) ||
(m_possibleResizeDirectionFlags & ResizeRight)) { (m_possibleResizeDirectionFlags & ResizeRight)) {
if (page()) setWidth(width() + page()->horizontalGridStep()); if (page()) setWidth(width() + page()->horizontalGridStep());
} }
} }
@ -1022,7 +1075,7 @@ void BaseDesignIntf::sizeRight()
void BaseDesignIntf::sizeLeft() void BaseDesignIntf::sizeLeft()
{ {
if ((m_possibleResizeDirectionFlags & ResizeLeft) || if ((m_possibleResizeDirectionFlags & ResizeLeft) ||
(m_possibleResizeDirectionFlags & ResizeRight)) { (m_possibleResizeDirectionFlags & ResizeRight)) {
if(page()) setWidth(width() - page()->horizontalGridStep()); if(page()) setWidth(width() - page()->horizontalGridStep());
} }
} }
@ -1030,7 +1083,7 @@ void BaseDesignIntf::sizeLeft()
void BaseDesignIntf::sizeUp() void BaseDesignIntf::sizeUp()
{ {
if ((m_possibleResizeDirectionFlags & ResizeTop) || if ((m_possibleResizeDirectionFlags & ResizeTop) ||
(m_possibleResizeDirectionFlags & ResizeBottom)) { (m_possibleResizeDirectionFlags & ResizeBottom)) {
if (page()) setHeight(height() - page()->verticalGridStep()); if (page()) setHeight(height() - page()->verticalGridStep());
} }
} }
@ -1038,7 +1091,7 @@ void BaseDesignIntf::sizeUp()
void BaseDesignIntf::sizeDown() void BaseDesignIntf::sizeDown()
{ {
if ((m_possibleResizeDirectionFlags & ResizeTop) || if ((m_possibleResizeDirectionFlags & ResizeTop) ||
(m_possibleResizeDirectionFlags & ResizeBottom)) { (m_possibleResizeDirectionFlags & ResizeBottom)) {
if (page()) setHeight(height() + page()->verticalGridStep()); if (page()) setHeight(height() + page()->verticalGridStep());
} }
} }
@ -1066,12 +1119,32 @@ void BaseDesignIntf::drawTopLine(QPainter *painter, QRectF rect) const
if(isShapeItem()) if(isShapeItem())
return; return;
painter->setPen(borderPen(TopLine)); painter->setPen(borderPen(TopLine));
painter->drawLine(rect.x(), rect.y(), rect.width(), rect.y()); if(!isPageItem())
if(borderStyle() == BorderStyle::Doubled) {
painter->drawLine(rect.x()+3+m_borderLineSize, if(borderStyle() == BorderStyle::Doubled)
rect.y()+3+m_borderLineSize, painter->drawLine(rect.x()+3+m_borderLineSize,
rect.width()-3-m_borderLineSize, rect.y()+3+m_borderLineSize,
rect.y()+3+m_borderLineSize); rect.width()-3-m_borderLineSize,
rect.y()+3+m_borderLineSize);
painter->drawLine(rect.x(), rect.y(), rect.width(), rect.y());
}
else
{
painter->drawLine(page()->pageItem()->pageRect().x(),
page()->pageItem()->pageRect().y(),
page()->pageItem()->pageRect().width() + (page()->pageItem()->leftMargin()*10),
page()->pageItem()->pageRect().y());
if(borderStyle() == BorderStyle::Doubled)
painter->drawLine(page()->pageItem()->pageRect().x()+3+m_borderLineSize,
page()->pageItem()->pageRect().y()+3+m_borderLineSize,
page()->pageItem()->pageRect().width()-3-m_borderLineSize + (page()->pageItem()->leftMargin()*10),
page()->pageItem()->pageRect().y()+3+m_borderLineSize);
}
} }
void BaseDesignIntf::drawBootomLine(QPainter *painter, QRectF rect) const void BaseDesignIntf::drawBootomLine(QPainter *painter, QRectF rect) const
@ -1080,12 +1153,29 @@ void BaseDesignIntf::drawBootomLine(QPainter *painter, QRectF rect) const
return; return;
painter->setPen(borderPen(BottomLine)); painter->setPen(borderPen(BottomLine));
if(!isPageItem())
{
painter->drawLine(rect.x(), rect.height(), rect.width(), rect.height()); painter->drawLine(rect.x(), rect.height(), rect.width(), rect.height());
if(borderStyle() == BorderStyle::Doubled) if(borderStyle() == BorderStyle::Doubled)
painter->drawLine(rect.x()+3+m_borderLineSize, painter->drawLine(rect.x()+3+m_borderLineSize,
rect.height()-3-m_borderLineSize, rect.height()-3-m_borderLineSize,
rect.width()-3-m_borderLineSize, rect.width()-3-m_borderLineSize,
rect.height()-3-m_borderLineSize); rect.height()-3-m_borderLineSize);
}
else
{
painter->drawLine(page()->pageItem()->pageRect().x(),
page()->pageItem()->pageRect().height() + (page()->pageItem()->topMargin()*10)
, page()->pageItem()->pageRect().width() + (page()->pageItem()->leftMargin()*10),
page()->pageItem()->pageRect().height() + (page()->pageItem()->topMargin()*10));
if(borderStyle() == BorderStyle::Doubled)
painter->drawLine(page()->pageItem()->pageRect().x()+3+m_borderLineSize,
page()->pageItem()->pageRect().height()-3-m_borderLineSize + (page()->pageItem()->topMargin()*10),
page()->pageItem()->pageRect().width()-3-m_borderLineSize + (page()->pageItem()->leftMargin()*10),
page()->pageItem()->pageRect().height()-3-m_borderLineSize + (page()->pageItem()->topMargin()*10));
}
} }
void BaseDesignIntf::drawRightLine(QPainter *painter, QRectF rect) const void BaseDesignIntf::drawRightLine(QPainter *painter, QRectF rect) const
@ -1093,13 +1183,28 @@ void BaseDesignIntf::drawRightLine(QPainter *painter, QRectF rect) const
if(isShapeItem()) if(isShapeItem())
return; return;
painter->setPen(borderPen(RightLine)); painter->setPen(borderPen(RightLine));
if(!isPageItem())
{
painter->drawLine(rect.width(), rect.y(), rect.width(), rect.height()); painter->drawLine(rect.width(), rect.y(), rect.width(), rect.height());
if(borderStyle() == BorderStyle::Doubled) if(borderStyle() == BorderStyle::Doubled)
painter->drawLine(rect.width()-3 - m_borderLineSize, painter->drawLine(rect.width()-3 - m_borderLineSize,
rect.y()+3+m_borderLineSize, rect.y()+3+m_borderLineSize,
rect.width()-3-m_borderLineSize, rect.width()-3-m_borderLineSize,
rect.height()-3-m_borderLineSize); rect.height()-3-m_borderLineSize);
}
else
{
painter->drawLine(page()->pageItem()->pageRect().width() + (page()->pageItem()->leftMargin()*10), page()->pageItem()->pageRect().y(),
page()->pageItem()->pageRect().width() + (page()->pageItem()->leftMargin()*10),
page()->pageItem()->pageRect().height() + (page()->pageItem()->topMargin()*10));
if(borderStyle() == BorderStyle::Doubled)
painter->drawLine(page()->pageItem()->pageRect().width()-3 - m_borderLineSize + (page()->pageItem()->leftMargin()*10),
page()->pageItem()->pageRect().y()+3+m_borderLineSize,
page()->pageItem()->pageRect().width()-3-m_borderLineSize + (page()->pageItem()->leftMargin()*10),
page()->pageItem()->pageRect().height()-3-m_borderLineSize + (page()->pageItem()->topMargin()*10));
}
} }
void BaseDesignIntf::drawLeftLine(QPainter *painter, QRectF rect) const void BaseDesignIntf::drawLeftLine(QPainter *painter, QRectF rect) const
@ -1107,12 +1212,29 @@ void BaseDesignIntf::drawLeftLine(QPainter *painter, QRectF rect) const
if(isShapeItem()) if(isShapeItem())
return; return;
painter->setPen(borderPen(LeftLine)); painter->setPen(borderPen(LeftLine));
if(!isPageItem())
{
painter->drawLine(rect.x(), rect.y(), rect.x(), rect.height()); painter->drawLine(rect.x(), rect.y(), rect.x(), rect.height());
if(borderStyle() == BorderStyle::Doubled) if(borderStyle() == BorderStyle::Doubled)
painter->drawLine(rect.x()+3+m_borderLineSize, painter->drawLine(page()->pageItem()->pageRect().x()+3+m_borderLineSize,
rect.y()+3+m_borderLineSize, page()->pageItem()->pageRect().y()+3+m_borderLineSize,
rect.x()+3+m_borderLineSize, page()->pageItem()->pageRect().x()+3+m_borderLineSize,
rect.height()-3-m_borderLineSize); page()->pageItem()->pageRect().height()-3-m_borderLineSize);
}
else
{
painter->drawLine(page()->pageItem()->pageRect().x(),
page()->pageItem()->pageRect().y(),
page()->pageItem()->pageRect().x(),
page()->pageItem()->pageRect().height() + (page()->pageItem()->topMargin()*10));
if(borderStyle() == BorderStyle::Doubled)
painter->drawLine(page()->pageItem()->pageRect().x()+3+m_borderLineSize,
page()->pageItem()->pageRect().y()+3+m_borderLineSize,
page()->pageItem()->pageRect().x()+3+m_borderLineSize,
page()->pageItem()->pageRect().height()-3-m_borderLineSize + (page()->pageItem()->topMargin()*10));
}
} }
void BaseDesignIntf::drawDesignModeBorder(QPainter *painter, QRectF rect) const void BaseDesignIntf::drawDesignModeBorder(QPainter *painter, QRectF rect) const
@ -1214,7 +1336,7 @@ void BaseDesignIntf::setGeometryProperty(QRect rect)
} }
} }
PageDesignIntf *BaseDesignIntf::page() PageDesignIntf *BaseDesignIntf::page() const
{ {
return dynamic_cast<PageDesignIntf*>(scene()); return dynamic_cast<PageDesignIntf*>(scene());
} }
@ -1230,7 +1352,7 @@ QPen BaseDesignIntf::borderPen(BorderSide side/*, bool selected*/) const
if (m_borderLinesFlags & side) { if (m_borderLinesFlags & side) {
pen.setColor(m_borderColor); pen.setColor(m_borderColor);
if(borderStyle() != BorderStyle::Doubled) if(borderStyle() != BorderStyle::Doubled)
pen.setStyle(static_cast<Qt::PenStyle>(m_borderStyle)); pen.setStyle(static_cast<Qt::PenStyle>(m_borderStyle));
//pen.setCosmetic(true); //pen.setCosmetic(true);
pen.setWidthF(m_borderLineSize+1); //To draw with point precision (By default: 2px = 1 pt) pen.setWidthF(m_borderLineSize+1); //To draw with point precision (By default: 2px = 1 pt)
@ -1424,8 +1546,8 @@ void BaseDesignIntf::showEditorDialog()
void BaseDesignIntf::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) void BaseDesignIntf::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
{ {
if (event->button() == Qt::LeftButton && if (event->button() == Qt::LeftButton &&
((itemMode()&EditMode)||(itemMode()&DesignMode)) ((itemMode()&EditMode)||(itemMode()&DesignMode))
) { ) {
showEditorDialog(); showEditorDialog();
} }
QGraphicsItem::mouseDoubleClickEvent(event); QGraphicsItem::mouseDoubleClickEvent(event);
@ -1448,7 +1570,7 @@ void BaseDesignIntf::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
menu.addSeparator(); menu.addSeparator();
QAction* copyAction = menu.addAction(QIcon(":/report/images/copy"), tr("Copy")); QAction* copyAction = menu.addAction(QIcon(":/report/images/copy"), tr("Copy"));
QAction* cutAction = menu.addAction(QIcon(":/report/images/cut"), tr("Cut")); QAction* cutAction = menu.addAction(QIcon(":/report/images/cut"), tr("Cut"));
QAction* pasteAction = menu.addAction(QIcon(":/report/images/paste"), tr("Paste")); QAction* pasteAction = menu.addAction(QIcon(":/report/images/paste"), tr("Paste"));
pasteAction->setEnabled(false); pasteAction->setEnabled(false);
@ -1484,6 +1606,54 @@ void BaseDesignIntf::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
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/borderEditor"), tr("Edit borders...")); QAction* editBorderAction = menu.addAction(QIcon(":/report/images/borderEditor"), tr("Edit borders..."));
QMenu *alignement = menu.addMenu(tr("Align items"));
QAction* alignLeft = new QAction(QIcon(":/report/images/alignToLeft"),tr("Align to left"));
QAction* alignRight = new QAction(QIcon(":/report/images/alignToRight"),tr("Align to right"));
QAction* alignTop = new QAction(QIcon(":/report/images/alignToTop"),tr("Align to top"));
QAction* alignBottom = new QAction(QIcon(":/report/images/alignToBottom"),tr("Align to bottom"));
QAction* alignHCenter = new QAction(QIcon(":/report/images/alignToHCenter"),tr("Align to horizontal center"));
QAction* alignVCenter = new QAction(QIcon(":/report/images/alignToHCenter"),tr("Align to vertical center"));
QMenu *resize = menu.addMenu(tr("Resize items"));
QAction* toSameWidth = new QAction(QIcon(":/report/images/sameWidth"),tr("Same width"));
QAction* toSameHeight = new QAction(QIcon(":/report/images/sameHeight"),tr("Same height"));
QMenu *itemAlign = menu.addMenu(tr("Align items to page"));
QAction* itemAlignToLeft = new QAction(tr("Align to left"));
QAction* itemAlignToRight = new QAction(tr("Align to right"));
QAction* itemAlignToCenter = new QAction(tr("Align to center"));
QAction* cancelItemAlign = new QAction(tr("cancel alignement"));
QAction* itemAlignParent = new QAction(tr("Align to page width"));
menu.addMenu(itemAlign);
itemAlign->addAction(itemAlignToLeft);
itemAlignToLeft->setChecked(m_itemAlign == LeftItemAlign);
itemAlignToRight->setChecked(m_itemAlign == RightItemAlign);
itemAlignToCenter->setChecked(m_itemAlign == CenterItemAlign);
itemAlignParent->setChecked(m_itemAlign == ParentWidthItemAlign);
cancelItemAlign->setChecked(m_itemAlign == DesignedItemAlign);
itemAlign->addAction(itemAlignToRight);
itemAlign->addAction(itemAlignToCenter);
itemAlign->addAction(itemAlignParent);
itemAlign->addAction(cancelItemAlign);
resize->addAction(toSameWidth);
resize->addAction(toSameHeight);
alignement->addAction(alignLeft);
alignement->addAction(alignRight);
alignement->addAction(alignTop);
alignement->addAction(alignBottom);
connect(alignLeft,&QAction::triggered,this,[=](){page->alignToLeft();});
connect(alignRight,&QAction::triggered,this,[=](){page->alignToRigth();});
connect(alignTop,&QAction::triggered,this,[=](){page->alignToTop();});
connect(alignBottom,&QAction::triggered,this,[=](){page->alignToBottom();});
connect(alignHCenter,&QAction::triggered,this,[=](){page->alignToHCenter();});
connect(alignVCenter,&QAction::triggered,this,[=](){page->alignToVCenter();});
connect(toSameWidth,&QAction::triggered,this,[=](){page->sameWidth();});
connect(toSameHeight,&QAction::triggered,this,[=](){page->sameHeight();});
connect(itemAlignToLeft,&QAction::triggered,this,[=](){page->setItemAlign(BaseDesignIntf::LeftItemAlign);});
connect(itemAlignToRight,&QAction::triggered,this,[=](){page->setItemAlign(BaseDesignIntf::RightItemAlign);});
connect(itemAlignToCenter,&QAction::triggered,this,[=](){page->setItemAlign(BaseDesignIntf::CenterItemAlign);});
connect(itemAlignParent,&QAction::triggered,this,[=](){page->setItemAlign(BaseDesignIntf::ParentWidthItemAlign);});
connect(cancelItemAlign,&QAction::triggered,this,[=](){page->setItemAlign(BaseDesignIntf::DesignedItemAlign);});
preparePopUpMenu(menu); preparePopUpMenu(menu);
QAction* a = menu.exec(event->screenPos()); QAction* a = menu.exec(event->screenPos());
if (a){ if (a){
@ -1515,8 +1685,12 @@ void BaseDesignIntf::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
page->addHLayout(); page->addHLayout();
if (a == createVLayout) if (a == createVLayout)
page->addVLayout(); page->addVLayout();
processPopUpAction(a); processPopUpAction(a);
} }
} }
int BaseDesignIntf::possibleMoveDirectionFlags() const int BaseDesignIntf::possibleMoveDirectionFlags() const

View File

@ -253,7 +253,7 @@ public:
virtual void setBorderLinesFlags(LimeReport::BaseDesignIntf::BorderLines flags); virtual void setBorderLinesFlags(LimeReport::BaseDesignIntf::BorderLines flags);
void setGeometryProperty(QRect rect); void setGeometryProperty(QRect rect);
PageDesignIntf* page(); PageDesignIntf* page() const;
BorderLines borderLines() const; BorderLines borderLines() const;
@ -265,7 +265,7 @@ public:
virtual BaseDesignIntf* cloneItem(LimeReport::BaseDesignIntf::ItemMode mode, QObject* owner=0, QGraphicsItem* parent=0); virtual BaseDesignIntf* cloneItem(LimeReport::BaseDesignIntf::ItemMode mode, QObject* owner=0, QGraphicsItem* parent=0);
virtual BaseDesignIntf* cloneItemWOChild(LimeReport::BaseDesignIntf::ItemMode mode, QObject* owner=0, QGraphicsItem* parent=0); virtual BaseDesignIntf* cloneItemWOChild(LimeReport::BaseDesignIntf::ItemMode mode, QObject* owner=0, QGraphicsItem* parent=0);
virtual BaseDesignIntf* createSameTypeItem(QObject* owner=0, QGraphicsItem* parent=0) = 0; virtual BaseDesignIntf* createSameTypeItem(QObject* owner=0, QGraphicsItem* parent=0) = 0;
void initFromItem(BaseDesignIntf* source); virtual void initFromItem(BaseDesignIntf* source);
virtual bool canBeSplitted(int height) const; virtual bool canBeSplitted(int height) const;
virtual qreal minHeight() const {return 0;} virtual qreal minHeight() const {return 0;}
@ -339,6 +339,7 @@ public:
bool isChangingPos() const; bool isChangingPos() const;
void setIsChangingPos(bool isChangingPos); void setIsChangingPos(bool isChangingPos);
bool isShapeItem() const; bool isShapeItem() const;
bool isPageItem() const;
bool hasShadow(); bool hasShadow();
void setShadow(bool sh); void setShadow(bool sh);
Q_INVOKABLE QString setItemWidth(qreal width); Q_INVOKABLE QString setItemWidth(qreal width);
@ -427,7 +428,8 @@ private:
void moveSelectedItems(QPointF delta); void moveSelectedItems(QPointF delta);
Qt::CursorShape getPossibleCursor(int cursorFlags); Qt::CursorShape getPossibleCursor(int cursorFlags);
void updatePossibleDirectionFlags(); void updatePossibleDirectionFlags();
void addGuideLine(qreal x1, qreal y1, qreal x2, qreal y2);
void removeGuideLines();
private slots: private slots:
void onChangeGeometryTimeOut(); void onChangeGeometryTimeOut();
@ -495,6 +497,7 @@ private:
bool m_isChangingPos; bool m_isChangingPos;
bool m_isMoveable; bool m_isMoveable;
bool m_shadow; bool m_shadow;
QList<QGraphicsLineItem*> guideLines;
signals: signals:
void geometryChanged(QObject* object, QRectF newGeometry, QRectF oldGeometry); void geometryChanged(QObject* object, QRectF newGeometry, QRectF oldGeometry);

View File

@ -44,8 +44,11 @@ public:
Q_DECLARE_METATYPE(ACollectionProperty) Q_DECLARE_METATYPE(ACollectionProperty)
namespace LimeReport{ namespace LimeReport{
#if __cplusplus >= 201703L
const int inline COLLECTION_TYPE_ID = qMetaTypeId<ACollectionProperty>(); const int inline COLLECTION_TYPE_ID = qMetaTypeId<ACollectionProperty>();
#else
const int COLLECTION_TYPE_ID = qMetaTypeId<ACollectionProperty>();
#endif
class LIMEREPORT_EXPORT 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;

View File

@ -272,6 +272,24 @@ QVariant ModelToDataSource::dataByRowIndex(const QString &columnName, int rowInd
return QVariant(); return QVariant();
} }
QVariant ModelToDataSource::dataByRowIndex(const QString &columnName, int rowIndex, int roleName)
{
if(m_model->rowCount() > rowIndex)
return m_model->data(m_model->index(rowIndex, columnIndexByName(columnName)));
return QVariant();
}
QVariant ModelToDataSource::dataByRowIndex(const QString &columnName, int rowIndex, const QString &roleName)
{
if(m_model->rowCount() > rowIndex) {
int roleCode{roleName.isEmpty() ? Qt::DisplayRole
: m_model->roleNames().key(roleName.toUtf8(), Qt::DisplayRole)};
return m_model->data(m_model->index(rowIndex, columnIndexByName(columnName)), roleCode);
}
return QVariant();
}
QVariant ModelToDataSource::dataByKeyField(const QString& columnName, const QString& keyColumnName, QVariant keyData) QVariant ModelToDataSource::dataByKeyField(const QString& columnName, const QString& keyColumnName, QVariant keyData)
{ {
for( int i=0; i < m_model->rowCount(); ++i ){ for( int i=0; i < m_model->rowCount(); ++i ){
@ -310,6 +328,13 @@ int ModelToDataSource::columnIndexByName(QString name)
return -1; return -1;
} }
QVariant ModelToDataSource::headerData(const QString &columnName, const QString &roleName)
{
int roleCode{roleName.isEmpty() ? Qt::DisplayRole
: m_model->roleNames().key(roleName.toUtf8(), Qt::DisplayRole)};
return m_model->headerData(columnIndexByName(columnName), Qt::Horizontal, roleCode);
}
QString ModelToDataSource::lastError() QString ModelToDataSource::lastError()
{ {
return m_lastError; return m_lastError;
@ -722,6 +747,18 @@ QVariant CallbackDatasource::dataByRowIndex(const QString &columnName, int rowIn
return result; return result;
} }
QVariant CallbackDatasource::dataByRowIndex(const QString &columnName, int rowIndex, int roleName)
{
Q_UNUSED(roleName)
return dataByRowIndex(columnName, rowIndex);
}
QVariant CallbackDatasource::dataByRowIndex(const QString &columnName, int rowIndex, const QString &roleName)
{
Q_UNUSED(roleName)
return dataByRowIndex(columnName, rowIndex);
}
QVariant CallbackDatasource::dataByKeyField(const QString& columnName, const QString& keyColumnName, QVariant keyData) QVariant CallbackDatasource::dataByKeyField(const QString& columnName, const QString& keyColumnName, QVariant keyData)
{ {
int backupCurrentRow = m_currentRow; int backupCurrentRow = m_currentRow;
@ -816,6 +853,12 @@ int CallbackDatasource::columnIndexByName(QString name)
return -1; return -1;
} }
QVariant CallbackDatasource::headerData(const QString &columnName, const QString &roleName)
{
Q_UNUSED(roleName)
return columnName; // STUB
}
bool CallbackDatasource::checkNextRecord(int recordNum){ bool CallbackDatasource::checkNextRecord(int recordNum){
if (bof()) checkIfEmpty(); if (bof()) checkIfEmpty();
if (m_rowCount > 0) { if (m_rowCount > 0) {

View File

@ -388,10 +388,13 @@ public:
bool bof(); bool bof();
QVariant data(const QString& columnName); QVariant data(const QString& columnName);
QVariant dataByRowIndex(const QString &columnName, int rowIndex); QVariant dataByRowIndex(const QString &columnName, int rowIndex);
QVariant dataByRowIndex(const QString &columnName, int rowIndex, int roleName);
QVariant dataByRowIndex(const QString &columnName, int rowIndex, const QString &roleName);
QVariant dataByKeyField(const QString& columnName, const QString& keyColumnName, QVariant keyData); QVariant dataByKeyField(const QString& columnName, const QString& keyColumnName, QVariant keyData);
int columnCount(); int columnCount();
QString columnNameByIndex(int columnIndex); QString columnNameByIndex(int columnIndex);
int columnIndexByName(QString name); int columnIndexByName(QString name);
QVariant headerData(const QString &columnName, const QString &roleName);
QString lastError(); QString lastError();
virtual QAbstractItemModel* model(); virtual QAbstractItemModel* model();
int currentRow(); int currentRow();
@ -421,6 +424,8 @@ public:
bool eof(){return m_eof;} bool eof(){return m_eof;}
QVariant data(const QString &columnName); QVariant data(const QString &columnName);
QVariant dataByRowIndex(const QString& columnName, int rowIndex); QVariant dataByRowIndex(const QString& columnName, int rowIndex);
QVariant dataByRowIndex(const QString &columnName, int rowIndex, int roleName);
QVariant dataByRowIndex(const QString &columnName, int rowIndex, const QString &roleName);
QVariant dataByKeyField(const QString& columnName, const QString& keyColumnName, QVariant keyData); QVariant dataByKeyField(const QString& columnName, const QString& keyColumnName, QVariant keyData);
int columnCount(); int columnCount();
QString columnNameByIndex(int columnIndex); QString columnNameByIndex(int columnIndex);
@ -428,6 +433,7 @@ public:
bool isInvalid() const{ return false;} bool isInvalid() const{ return false;}
QString lastError(){ return "";} QString lastError(){ return "";}
QAbstractItemModel *model(){return 0;} QAbstractItemModel *model(){return 0;}
QVariant headerData(const QString &columnName, const QString &roleName);
private: private:
bool checkNextRecord(int recordNum); bool checkNextRecord(int recordNum);
bool checkIfEmpty(); bool checkIfEmpty();
@ -441,6 +447,7 @@ private:
QHash<QString, QVariant> m_valuesCache; QHash<QString, QVariant> m_valuesCache;
bool m_getDataFromCache; bool m_getDataFromCache;
int m_lastKeyRow; int m_lastKeyRow;
}; };
class CallbackDatasourceHolder :public QObject, public IDataSourceHolder{ class CallbackDatasourceHolder :public QObject, public IDataSourceHolder{

View File

@ -18,9 +18,12 @@ public:
virtual bool eof() = 0; virtual bool eof() = 0;
virtual QVariant data(const QString& columnName) = 0; virtual QVariant data(const QString& columnName) = 0;
virtual QVariant dataByRowIndex(const QString& columnName, int rowIndex) = 0; virtual QVariant dataByRowIndex(const QString& columnName, int rowIndex) = 0;
virtual QVariant dataByRowIndex(const QString &columnName, int rowIndex, int roleName) = 0;
virtual QVariant dataByRowIndex(const QString &columnName, int rowIndex, const QString &roleName) = 0;
virtual QVariant dataByKeyField(const QString& columnName, const QString& keyColumnName, QVariant keyData) = 0; virtual QVariant dataByKeyField(const QString& columnName, const QString& keyColumnName, QVariant keyData) = 0;
virtual int columnCount() = 0; virtual int columnCount() = 0;
virtual QString columnNameByIndex(int columnIndex) = 0; virtual QString columnNameByIndex(int columnIndex) = 0;
virtual QVariant headerData(const QString &columnName, const QString &roleName) = 0;
virtual int columnIndexByName(QString name) = 0; virtual int columnIndexByName(QString name) = 0;
virtual bool isInvalid() const = 0; virtual bool isInvalid() const = 0;
virtual QString lastError() = 0; virtual QString lastError() = 0;

View File

@ -466,7 +466,7 @@ QString DataSourceManager::replaceVariables(QString value){
} }
} }
} }
return value; return value;
#endif #endif
return QString(); return QString();
} }
@ -612,13 +612,13 @@ QString DataSourceManager::replaceFields(QString query, QMap<QString,QString> &a
query.replace(pos,rx.cap(0).length(),":"+extractField(field)); query.replace(pos,rx.cap(0).length(),":"+extractField(field));
} }
} }
return query; return query;
#endif #endif
return query; return query;
} }
void DataSourceManager::setReportVariable(const QString &name, const QVariant &value) void DataSourceManager::setReportVariable(const QString &name, const QVariant &value)
{ {
if (!containsVariable(name)){ if (!containsVariable(name)){
addVariable(name,value); addVariable(name,value);
} else changeVariable(name,value); } else changeVariable(name,value);
@ -1689,6 +1689,28 @@ QVariant DataSourceManager::fieldDataByRowIndex(const QString &fieldName, int ro
return QVariant(); return QVariant();
} }
QVariant DataSourceManager::fieldDataByRowIndex(const QString &fieldName, int rowIndex, int role)
{
if(containsField(fieldName)) {
IDataSource *ds = dataSource(extractDataSource(fieldName));
if(ds) {
return ds->dataByRowIndex(extractFieldName(fieldName), rowIndex, role);
}
}
return QVariant();
}
QVariant DataSourceManager::fieldDataByRowIndex(const QString &fieldName, int rowIndex, const QString &roleName)
{
if(containsField(fieldName)) {
IDataSource *ds = dataSource(extractDataSource(fieldName));
if(ds) {
return ds->dataByRowIndex(extractFieldName(fieldName), rowIndex, roleName);
}
}
return QVariant();
}
QVariant DataSourceManager::fieldDataByKey(const QString& datasourceName, const QString& valueFieldName, const QString& keyFieldName, QVariant keyValue) QVariant DataSourceManager::fieldDataByKey(const QString& datasourceName, const QString& valueFieldName, const QString& keyFieldName, QVariant keyValue)
{ {
IDataSource* ds = dataSource(datasourceName); IDataSource* ds = dataSource(datasourceName);
@ -1698,6 +1720,44 @@ QVariant DataSourceManager::fieldDataByKey(const QString& datasourceName, const
return QVariant(); return QVariant();
} }
QVariant DataSourceManager::headerData(const QString &fieldName, const QString &roleName)
{
if(containsField(fieldName)) {
IDataSource *ds = dataSource(extractDataSource(fieldName));
if(ds) {
return ds->headerData(extractFieldName(fieldName), roleName);
}
}
return QVariant();
}
QString DataSourceManager::columnName(const QString &datasourceName, int index)
{
IDataSource *ds = dataSource(datasourceName);
if(ds && !ds->isInvalid() && ds->columnCount() > index) {
return ds->columnNameByIndex(index);
}
return QString("unknown");
}
int DataSourceManager::columnCount(const QString &datasourceName)
{
IDataSource *ds = dataSource(datasourceName);
if(ds && !ds->isInvalid()) {
return ds->columnCount();
}
return -1;
}
int DataSourceManager::columnIndex(const QString &datasourceName, const QString &columnName)
{
IDataSource *ds = dataSource(datasourceName);
if(ds && !ds->isInvalid()) {
return ds->columnIndexByName(columnName);
}
}
void DataSourceManager::reopenDatasource(const QString& datasourceName) void DataSourceManager::reopenDatasource(const QString& datasourceName)
{ {
QueryHolder* qh = dynamic_cast<QueryHolder*>(dataSourceHolder(datasourceName)); QueryHolder* qh = dynamic_cast<QueryHolder*>(dataSourceHolder(datasourceName));

View File

@ -173,12 +173,18 @@ public:
bool containsField(const QString& fieldName); bool containsField(const QString& fieldName);
QVariant fieldData(const QString& fieldName); QVariant fieldData(const QString& fieldName);
QVariant fieldDataByRowIndex(const QString& fieldName, int rowIndex); QVariant fieldDataByRowIndex(const QString& fieldName, int rowIndex);
QVariant fieldDataByRowIndex(const QString &fieldName, int rowIndex, int role);
QVariant fieldDataByRowIndex(const QString &fieldName, int rowIndex, const QString &roleName);
QVariant fieldDataByKey( QVariant fieldDataByKey(
const QString& datasourceName, const QString& datasourceName,
const QString& valueFieldName, const QString& valueFieldName,
const QString& keyFieldName, const QString& keyFieldName,
QVariant keyValue QVariant keyValue
); );
QVariant headerData(const QString &fieldName, const QString &roleName);
QString columnName(const QString &datasourceName, int index);
int columnCount(const QString &datasourceName);
int columnIndex(const QString &datasourceName,const QString& columnName);
void reopenDatasource(const QString& datasourceName); void reopenDatasource(const QString& datasourceName);
QString extractDataSource(const QString& fieldName); QString extractDataSource(const QString& fieldName);

View File

@ -55,6 +55,7 @@ public:
virtual bool containsVariable(const QString& variableName) = 0; virtual bool containsVariable(const QString& variableName) = 0;
virtual QVariant variable(const QString& variableName) = 0; virtual QVariant variable(const QString& variableName) = 0;
virtual bool addModel(const QString& name, QAbstractItemModel *model, bool owned) = 0; virtual bool addModel(const QString& name, QAbstractItemModel *model, bool owned) = 0;
virtual void addCSV(const QString& name, const QString& csvText, const QString& separator, bool firstRowIsHeader) = 0;
virtual void removeModel(const QString& name) = 0; virtual void removeModel(const QString& name) = 0;
virtual bool containsDatasource(const QString& dataSourceName) = 0; virtual bool containsDatasource(const QString& dataSourceName) = 0;
virtual void clearUserVariables()=0; virtual void clearUserVariables()=0;

View File

@ -102,6 +102,8 @@ qreal ItemsContainerDesignInft::findMaxBottom() const
if(subItem) if(subItem)
if ( subItem->isVisible() && (subItem->geometry().bottom()>maxBottom) ) if ( subItem->isVisible() && (subItem->geometry().bottom()>maxBottom) )
maxBottom = subItem->geometry().bottom(); maxBottom = subItem->geometry().bottom();
if(subItem->objectName() == "VerticalLayout22")
qDebug()<<subItem->height();
} }
return maxBottom; return maxBottom;
} }

View File

@ -73,7 +73,7 @@ PageDesignIntf::PageDesignIntf(QObject *parent):
m_itemInsertRect(0), m_itemInsertRect(0),
m_itemMode(DesignMode), m_itemMode(DesignMode),
m_cutterBorder(0), m_cutterBorder(0),
m_infoPosRect(0), // m_infoPosRect(0),
m_currentCommand(-1), m_currentCommand(-1),
m_changeSizeMode(false), m_changeSizeMode(false),
m_changePosMode(false), m_changePosMode(false),
@ -120,10 +120,10 @@ void PageDesignIntf::updatePageRect()
if (m_pageItem.isNull()) { if (m_pageItem.isNull()) {
m_pageItem = PageItemDesignIntf::create(this); m_pageItem = PageItemDesignIntf::create(this);
addItem(m_pageItem.data()); addItem(m_pageItem.data());
m_pageItem->setTopMargin(5); m_pageItem->setTopMargin(10);
m_pageItem->setBottomMargin(5); m_pageItem->setBottomMargin(10);
m_pageItem->setLeftMargin(5); m_pageItem->setLeftMargin(10);
m_pageItem->setRightMargin(5); m_pageItem->setRightMargin(10);
m_pageItem->setObjectName("ReportPage1"); m_pageItem->setObjectName("ReportPage1");
connect(m_pageItem.data(), SIGNAL(itemSelected(LimeReport::BaseDesignIntf *)), this, SIGNAL(itemSelected(LimeReport::BaseDesignIntf *))); connect(m_pageItem.data(), SIGNAL(itemSelected(LimeReport::BaseDesignIntf *)), this, SIGNAL(itemSelected(LimeReport::BaseDesignIntf *)));
connect(m_pageItem.data(), SIGNAL(geometryChanged(QObject *, QRectF, QRectF)), this, SLOT(slotPageGeometryChanged(QObject *, QRectF, QRectF))); connect(m_pageItem.data(), SIGNAL(geometryChanged(QObject *, QRectF, QRectF)), this, SLOT(slotPageGeometryChanged(QObject *, QRectF, QRectF)));
@ -324,24 +324,23 @@ void PageDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
saveSelectedItemsGeometry(); saveSelectedItemsGeometry();
m_changePosOrSizeMode = true; m_changePosOrSizeMode = true;
} }
qreal posY = div(page->mapFromScene(event->scenePos()).y(), verticalGridStep()).quot * verticalGridStep(); // qreal posY = div(page->mapFromScene(event->scenePos()).y(), verticalGridStep()).quot * verticalGridStep();
qreal posX = div(page->mapFromScene(event->scenePos()).x(), verticalGridStep()).quot * horizontalGridStep(); // qreal posX = div(page->mapFromScene(event->scenePos()).x(), verticalGridStep()).quot * horizontalGridStep();
if(!m_infoPosRect)
{
// if(!m_infoPosRect)
// {
// m_infoPosRect = new QGraphicsTextItem();
// m_infoPosRect->setDefaultTextColor(QColor(100,150,50));
m_infoPosRect = new QGraphicsTextItem(); // QFont font("Arial");
m_infoPosRect->setDefaultTextColor(QColor(100,150,50)); // font.setPointSize(16);
// font.setBold(true);
// m_infoPosRect->setFont(font);
// addItem(m_infoPosRect);
// }
QFont font("Arial"); // m_infoPosRect->setPlainText("(x: "+QString::number(posX/100)+", y: "+QString::number(posY/100)+") cm");
font.setPointSize(16); // m_infoPosRect->setPos(posX,posY+30);
font.setBold(true);
m_infoPosRect->setFont(font);
addItem(m_infoPosRect);
}
m_infoPosRect->setPlainText("(x: "+QString::number(posX/100)+", y: "+QString::number(posY/100)+") cm");
m_infoPosRect->setPos(posX,posY+30);
} }
@ -423,11 +422,11 @@ void PageDesignIntf::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
m_selectionRect = 0; m_selectionRect = 0;
m_multiSelectStarted = false; m_multiSelectStarted = false;
} }
if(m_infoPosRect) // if(m_infoPosRect)
{ // {
delete m_infoPosRect; // delete m_infoPosRect;
m_infoPosRect = 0; // m_infoPosRect = 0;
} // }
QGraphicsScene::mouseReleaseEvent(event); QGraphicsScene::mouseReleaseEvent(event);
} }
@ -1749,6 +1748,11 @@ void PageDesignIntf::addVLayout()
} }
} }
void PageDesignIntf::setItemAlign(BaseDesignIntf::ItemAlign itemAlign)
{
changeSelectedGroupProperty("itemAlign",QVariant(itemAlign));
}
bool hLayoutLessThen(QGraphicsItem *c1, QGraphicsItem *c2) bool hLayoutLessThen(QGraphicsItem *c1, QGraphicsItem *c2)
{ {
return c1->pos().x() < c2->pos().x(); return c1->pos().x() < c2->pos().x();
@ -2158,10 +2162,9 @@ bool PasteCommand::insertItem(ItemsReaderIntf::Ptr reader)
reader->readItem(item); reader->readItem(item);
item->setParent(parentItem); item->setParent(parentItem);
item->setParentItem(parentItem); item->setParentItem(parentItem);
if (page()->reportItemsByName(item->objectName()).size() > 0){ if (page()->reportItemsByName(item->objectName()).size()>1){
item->setObjectName(objectName); item->setObjectName(objectName);
} }
else
foreach (BaseDesignIntf* child, item->childBaseItems()){ foreach (BaseDesignIntf* child, item->childBaseItems()){
changeName(page(), child); changeName(page(), child);
}; };

View File

@ -251,6 +251,7 @@ namespace LimeReport {
void sameHeight(); void sameHeight();
void addHLayout(); void addHLayout();
void addVLayout(); void addVLayout();
void setItemAlign(BaseDesignIntf::ItemAlign itemAlign);
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);
@ -271,7 +272,7 @@ namespace LimeReport {
void bandDeleted(QObject* band); void bandDeleted(QObject* band);
void slotPageItemLoaded(QObject *); void slotPageItemLoaded(QObject *);
void slotSelectionChanged(); void slotSelectionChanged();
void slotAnimationStoped(QObject *animation); void slotAnimationStoped(QObject *animation);
private: private:
template <typename T> template <typename T>
BaseDesignIntf* internalAddBand(T bandType); BaseDesignIntf* internalAddBand(T bandType);
@ -300,7 +301,7 @@ namespace LimeReport {
BaseDesignIntf::ItemMode m_itemMode; BaseDesignIntf::ItemMode m_itemMode;
QGraphicsRectItem* m_cutterBorder; QGraphicsRectItem* m_cutterBorder;
QGraphicsRectItem* m_pageRect; QGraphicsRectItem* m_pageRect;
QGraphicsTextItem* m_infoPosRect; // QGraphicsTextItem* m_infoPosRect;
QVector<CommandIf::Ptr> m_commandsList; QVector<CommandIf::Ptr> m_commandsList;
QVector<ReportItemPos> m_positionStamp; QVector<ReportItemPos> m_positionStamp;
QVector<ReportItemSize> m_geometryStamp; QVector<ReportItemSize> m_geometryStamp;

View File

@ -91,13 +91,14 @@ void PageItemDesignIntf::paint(QPainter *ppainter, const QStyleOptionGraphicsIte
QRectF rect = pageRect(); QRectF rect = pageRect();
if (isExtendedInDesignMode()) rect.adjust(0,0,0,m_extendedHeight); if (isExtendedInDesignMode()) rect.adjust(0,0,0,m_extendedHeight);
ppainter->save(); ppainter->save();
ppainter->setOpacity(0.8); ppainter->setOpacity(1);
ppainter->fillRect(boundingRect(), pageBorderColor()); ppainter->fillRect(boundingRect(), pageBorderColor());
ppainter->setOpacity(1); ppainter->setOpacity(1);
ppainter->fillRect(rect, Qt::white); ppainter->fillRect(rect, Qt::white);
paintGrid(ppainter, rect); paintGrid(ppainter, rect);
ppainter->setPen(gridColor()); ppainter->setPen(gridColor());
ppainter->drawRect(boundingRect()); ppainter->drawRect(boundingRect());
drawBorder(ppainter,pageRect());
drawShadow(ppainter, boundingRect(), 10); drawShadow(ppainter, boundingRect(), 10);
ppainter->restore(); ppainter->restore();
} }
@ -113,6 +114,8 @@ void PageItemDesignIntf::paint(QPainter *ppainter, const QStyleOptionGraphicsIte
QRectF tmpRect = rect(); QRectF tmpRect = rect();
tmpRect.adjust(-4,-4,4,4); tmpRect.adjust(-4,-4,4,4);
ppainter->drawRect(tmpRect); ppainter->drawRect(tmpRect);
//drawShadow(ppainter, tmpRect, 10);
drawBorder(ppainter,pageRect());
ppainter->restore(); ppainter->restore();
BaseDesignIntf::paint(ppainter,option,widget); BaseDesignIntf::paint(ppainter,option,widget);
} }
@ -142,7 +145,7 @@ QColor PageItemDesignIntf::selectionColor() const
QColor PageItemDesignIntf::pageBorderColor() const QColor PageItemDesignIntf::pageBorderColor() const
{ {
return QColor(100,150,50); return QColor(255,255,255);
} }
QColor PageItemDesignIntf::gridColor() const QColor PageItemDesignIntf::gridColor() const

View File

@ -169,12 +169,12 @@ public:
bool canAcceptPaste() const{ return true;} bool canAcceptPaste() const{ return true;}
bool resetPageNumber() const; bool resetPageNumber() const;
void setResetPageNumber(bool resetPageNumber); void setResetPageNumber(bool resetPageNumber);
void updateSubItemsSize(RenderPass pass, DataSourceManager *dataManager); void updateSubItemsSize(RenderPass pass, DataSourceManager *dataManager);
void swapBands(BandDesignIntf *band, BandDesignIntf *bandToSwap); void swapBands(BandDesignIntf *band, BandDesignIntf *bandToSwap);
void moveBandFromTo(int from, int to); void moveBandFromTo(int from, int to);
QList<BandDesignIntf *> createBandGroup(int beginIndex, int endIndex); QList<BandDesignIntf *> createBandGroup(int beginIndex, int endIndex);
bool isExtendedInDesignMode() const; bool isExtendedInDesignMode() const;
void setExtendedInDesignMode(bool isExtendedInDesignMode); void setExtendedInDesignMode(bool isExtendedInDesignMode);
int extendedHeight() const; int extendedHeight() const;
@ -197,7 +197,7 @@ public:
void placeTearOffBand(); void placeTearOffBand();
BandDesignIntf *pageFooter() const; BandDesignIntf *pageFooter() const;
void setPageFooter(BandDesignIntf *pageFooter); void setPageFooter(BandDesignIntf *pageFooter);
PrintBehavior printBehavior() const; PrintBehavior printBehavior() const;
void setPrintBehavior(const PrintBehavior &printBehavior); void setPrintBehavior(const PrintBehavior &printBehavior);
@ -211,6 +211,8 @@ public:
bool mixWithPriorPage() const; bool mixWithPriorPage() const;
void setMixWithPriorPage(bool value); void setMixWithPriorPage(bool value);
QRectF& pageRect(){return m_pageRect;}
signals: signals:
void beforeFirstPageRendered(); void beforeFirstPageRendered();
@ -222,7 +224,6 @@ protected slots:
void setUnitTypeProperty(BaseDesignIntf::UnitType value); void setUnitTypeProperty(BaseDesignIntf::UnitType value);
protected: protected:
void collectionLoadFinished(const QString& collectionName); void collectionLoadFinished(const QString& collectionName);
QRectF& pageRect(){return m_pageRect;}
void updateMarginRect(); void updateMarginRect();
QSizeF getRectByPageSize(const PageSize &size); QSizeF getRectByPageSize(const PageSize &size);
void initPageSize(const PageSize &size); void initPageSize(const PageSize &size);

View File

@ -215,7 +215,7 @@ void ReportDesignWindow::createActions()
m_useMagnetAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_M)); m_useMagnetAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_M));
connect(m_useMagnetAction,SIGNAL(toggled(bool)),this,SLOT(slotUseMagnet(bool))); connect(m_useMagnetAction,SIGNAL(toggled(bool)),this,SLOT(slotUseMagnet(bool)));
m_newTextItemAction = new QAction(tr("Text Item"),this); m_newTextItemAction = new QAction(tr("Text Item"),this);
m_newTextItemAction->setIcon(QIcon(":/items/TextItem")); m_newTextItemAction->setIcon(QIcon(":/items/TextItem"));
m_actionMap.insert("TextItem",m_newTextItemAction); m_actionMap.insert("TextItem",m_newTextItemAction);
@ -253,7 +253,10 @@ void ReportDesignWindow::createActions()
m_previewReportAction->setIcon(QIcon(":/report/images/render")); m_previewReportAction->setIcon(QIcon(":/report/images/render"));
m_previewReportAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_P)); m_previewReportAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_P));
connect(m_previewReportAction,SIGNAL(triggered()),this,SLOT(slotPreviewReport())); connect(m_previewReportAction,SIGNAL(triggered()),this,SLOT(slotPreviewReport()));
m_printReportAction = new QAction(tr("Print Report"),this);
m_printReportAction->setIcon(QIcon(":/report/images/print"));
m_printReportAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_P));
connect(m_printReportAction,SIGNAL(triggered()),this,SLOT(slotPrintReport()));
m_testAction = new QAction("test",this); m_testAction = new QAction("test",this);
m_testAction->setIcon(QIcon(":/report/images/pin")); m_testAction->setIcon(QIcon(":/report/images/pin"));
connect(m_testAction,SIGNAL(triggered()),this,SLOT(slotTest())); connect(m_testAction,SIGNAL(triggered()),this,SLOT(slotTest()));
@ -372,13 +375,13 @@ void ReportDesignWindow::createToolBars()
m_mainToolBar->addSeparator(); m_mainToolBar->addSeparator();
m_mainToolBar->addAction(m_zoomInReportAction); m_mainToolBar->addAction(m_zoomInReportAction);
m_mainToolBar->addAction(m_zoomOutReportAction); m_mainToolBar->addAction(m_zoomOutReportAction);
m_mainToolBar->addSeparator(); m_mainToolBar->addSeparator();
m_mainToolBar->addAction(m_previewReportAction); m_mainToolBar->addAction(m_previewReportAction);
//m_mainToolBar->addSeparator(); //m_mainToolBar->addSeparator();
//m_mainToolBar->addAction(m_useGridAction); //m_mainToolBar->addAction(m_useGridAction);
//m_mainToolBar->addAction(m_printReportAction); m_mainToolBar->addAction(m_printReportAction);
m_fontEditorBar = new FontEditorWidgetForDesigner(m_reportDesignWidget,tr("Font"),this); m_fontEditorBar = new FontEditorWidgetForDesigner(m_reportDesignWidget,tr("Font"),this);
m_fontEditorBar->setIconSize(m_mainToolBar->iconSize()); m_fontEditorBar->setIconSize(m_mainToolBar->iconSize());
@ -517,7 +520,7 @@ void ReportDesignWindow::createMainMenu()
m_fileMenu->addAction(m_saveReportAction); m_fileMenu->addAction(m_saveReportAction);
m_fileMenu->addAction(m_saveReportAsAction); m_fileMenu->addAction(m_saveReportAsAction);
m_fileMenu->addAction(m_previewReportAction); m_fileMenu->addAction(m_previewReportAction);
//m_fileMenu->addAction(m_printReportAction); m_fileMenu->addAction(m_printReportAction);
m_editMenu = menuBar()->addMenu(tr("Edit")); m_editMenu = menuBar()->addMenu(tr("Edit"));
m_editMenu->addAction(m_redoAction); m_editMenu->addAction(m_redoAction);
m_editMenu->addAction(m_undoAction); m_editMenu->addAction(m_undoAction);
@ -858,7 +861,7 @@ void ReportDesignWindow::restoreSetting()
QDesktopWidget *desktop = QApplication::desktop(); QDesktopWidget *desktop = QApplication::desktop();
int screenWidth = desktop->screenGeometry().width(); int screenWidth = desktop->screenGeometry().width();
int screenHeight = desktop->screenGeometry().height(); int screenHeight = desktop->screenGeometry().height();
#endif #endif
int x = screenWidth * 0.1; int x = screenWidth * 0.1;
int y = screenHeight * 0.1; int y = screenHeight * 0.1;
@ -973,7 +976,7 @@ QSettings*ReportDesignWindow::settings()
} }
void ReportDesignWindow::slotNewReport() void ReportDesignWindow::slotNewReport()
{ {
if (checkNeedToSave()) { if (checkNeedToSave()) {
m_lblReportName->setText(""); m_lblReportName->setText("");
startNewReport(); startNewReport();
@ -1601,7 +1604,7 @@ void ReportDesignWindow::closeEvent(QCloseEvent * event)
event->ignore(); event->ignore();
return; return;
} }
if (checkNeedToSave()){ if (checkNeedToSave()){
m_dataBrowser->closeAllDataWindows(); m_dataBrowser->closeAllDataWindows();
writeState(); writeState();
#ifdef Q_OS_WIN #ifdef Q_OS_WIN

View File

@ -277,9 +277,9 @@ bool ReportEnginePrivate::printPages(ReportPages pages, QPrinter *printer)
QPrinterInfo pi; QPrinterInfo pi;
if (!pi.defaultPrinter().isNull()) if (!pi.defaultPrinter().isNull())
#if QT_VERSION >= 0x050300 #if QT_VERSION >= 0x050300
m_printer.data()->setPrinterName(pi.defaultPrinterName()); m_printer.data()->setPrinterName(pi.defaultPrinterName());
#else #else
m_printer.data()->setPrinterName(pi.defaultPrinter().printerName()); m_printer.data()->setPrinterName(pi.defaultPrinter().printerName());
#endif #endif
QPrintDialog dialog(m_printer.data(),QApplication::activeWindow()); QPrintDialog dialog(m_printer.data(),QApplication::activeWindow());
m_printerSelected = dialog.exec()!=QDialog::Rejected; m_printerSelected = dialog.exec()!=QDialog::Rejected;
@ -310,22 +310,22 @@ void ReportEnginePrivate::internalPrintPages(ReportPages pages, QPrinter &printe
printProcessors.insert("default",QSharedPointer<PrintProcessor>(new PrintProcessor(&printer))); printProcessors.insert("default",QSharedPointer<PrintProcessor>(new PrintProcessor(&printer)));
int pageCount = (printer.printRange() == QPrinter::AllPages) ? int pageCount = (printer.printRange() == QPrinter::AllPages) ?
pages.size() : pages.size() :
printer.toPage() - printer.fromPage(); printer.toPage() - printer.fromPage();
emit printingStarted(pageCount); emit printingStarted(pageCount);
foreach(PageItemDesignIntf::Ptr page, pages){ foreach(PageItemDesignIntf::Ptr page, pages){
if ( !m_cancelPrinting && if ( !m_cancelPrinting &&
((printer.printRange() == QPrinter::AllPages) || ((printer.printRange() == QPrinter::AllPages) ||
( (printer.printRange()==QPrinter::PageRange) && ( (printer.printRange()==QPrinter::PageRange) &&
(currenPage >= printer.fromPage()) && (currenPage >= printer.fromPage()) &&
(currenPage <= printer.toPage()) (currenPage <= printer.toPage())
)) ))
) )
{ {
printProcessors["default"]->printPage(page); printProcessors["default"]->printPage(page);
emit pagePrintingFinished(currenPage); emit pagePrintingFinished(currenPage);
QApplication::processEvents(); QApplication::processEvents();
} }
currenPage++; currenPage++;
@ -382,9 +382,9 @@ QStringList ReportEnginePrivate::aviableReportTranslations()
void ReportEnginePrivate::setReportTranslation(const QString &languageName) void ReportEnginePrivate::setReportTranslation(const QString &languageName)
{ {
foreach(QLocale::Language language, aviableLanguages()){ foreach(QLocale::Language language, aviableLanguages()){
if (QLocale::languageToString(language).compare(languageName) == 0){ if (QLocale::languageToString(language).compare(languageName) == 0){
setReportLanguage(language); setReportLanguage(language);
} }
} }
} }
@ -504,7 +504,7 @@ bool ReportEnginePrivate::showPreviewWindow(ReportPages pages, PreviewHints hint
w->setPages(pages); w->setPages(pages);
w->setLayoutDirection(m_previewLayoutDirection); w->setLayoutDirection(m_previewLayoutDirection);
w->setStyleSheet(styleSheet()); w->setStyleSheet(styleSheet());
// w->setDefaultPrinter() // w->setDefaultPrinter()
if (!dataManager()->errorsList().isEmpty()){ if (!dataManager()->errorsList().isEmpty()){
w->setErrorMessages(dataManager()->errorsList()); w->setErrorMessages(dataManager()->errorsList());
@ -542,15 +542,15 @@ void ReportEnginePrivate::previewReport(PreviewHints hints)
void ReportEnginePrivate::previewReport(QPrinter* printer, PreviewHints hints) void ReportEnginePrivate::previewReport(QPrinter* printer, PreviewHints hints)
{ {
try{ try{
dataManager()->setDesignTime(false); dataManager()->setDesignTime(false);
ReportPages pages = renderToPages(); ReportPages pages = renderToPages();
dataManager()->setDesignTime(true); dataManager()->setDesignTime(true);
showPreviewWindow(pages, hints, printer); showPreviewWindow(pages, hints, printer);
} catch (ReportError &exception){ } catch (ReportError &exception){
saveError(exception.what()); saveError(exception.what());
showError(exception.what()); showError(exception.what());
} }
} }
ReportDesignWindowInterface*ReportEnginePrivate::getDesignerWindow() ReportDesignWindowInterface*ReportEnginePrivate::getDesignerWindow()
@ -569,7 +569,7 @@ ReportDesignWindowInterface*ReportEnginePrivate::getDesignerWindow()
m_designerWindow->setShowProgressDialog(m_showProgressDialog); m_designerWindow->setShowProgressDialog(m_showProgressDialog);
#endif #endif
} }
} }
if (m_designerWindow){ if (m_designerWindow){
m_datasources->updateDatasourceModel(); m_datasources->updateDatasourceModel();
} }
@ -664,19 +664,19 @@ bool ReportEnginePrivate::slotLoadFromFile(const QString &fileName)
if (!QFile::exists(fileName)) if (!QFile::exists(fileName))
{ {
if ( hasActivePreview() ) if ( hasActivePreview() )
{ {
QMessageBox::information( NULL, QMessageBox::information( NULL,
tr( "Report File Change" ), tr( "Report File Change" ),
tr( "The report file \"%1\" has changed names or been deleted.\n\nThis preview is no longer valid." ).arg( fileName ) tr( "The report file \"%1\" has changed names or been deleted.\n\nThis preview is no longer valid." ).arg( fileName )
); );
clearReport(); clearReport();
currentPreview->close(); currentPreview->close();
} }
return false; return false;
} }
clearReport(); clearReport();
@ -708,7 +708,7 @@ bool ReportEnginePrivate::slotLoadFromFile(const QString &fileName)
if ( hasActivePreview() ) if ( hasActivePreview() )
{ {
currentPreview->reloadPreview(); currentPreview->reloadPreview();
} }
EASY_END_BLOCK; EASY_END_BLOCK;
return true; return true;
@ -778,23 +778,23 @@ QSettings*ReportEnginePrivate::settings()
bool ReportEnginePrivate::loadFromFile(const QString &fileName, bool autoLoadPreviewOnChange) bool ReportEnginePrivate::loadFromFile(const QString &fileName, bool autoLoadPreviewOnChange)
{ {
// only watch one file at a time // only watch one file at a time
if ( !m_fileWatcher->files().isEmpty() ) if ( !m_fileWatcher->files().isEmpty() )
{ {
m_fileWatcher->removePaths( m_fileWatcher->files() ); m_fileWatcher->removePaths( m_fileWatcher->files() );
} }
if ( autoLoadPreviewOnChange ) if ( autoLoadPreviewOnChange )
{ {
m_fileWatcher->addPath( fileName ); m_fileWatcher->addPath( fileName );
} }
bool result = slotLoadFromFile( fileName ); bool result = slotLoadFromFile( fileName );
if (result) { if (result) {
emit loadFinished(); emit loadFinished();
} }
return result; return result;
} }
bool ReportEnginePrivate::loadFromByteArray(QByteArray* data, const QString &name){ bool ReportEnginePrivate::loadFromByteArray(QByteArray* data, const QString &name){
@ -1302,7 +1302,7 @@ ReportPages ReportEnginePrivate::renderToPages()
scriptContext()->qobjectToScript("engine",this); scriptContext()->qobjectToScript("engine",this);
#ifdef USE_QTSCRIPTENGINE #ifdef USE_QTSCRIPTENGINE
ScriptEngineManager::instance().scriptEngine()->pushContext(); ScriptEngineManager::instance().scriptEngine()->pushContext();
#endif #endif
if (m_scriptEngineContext->runInitScript()){ if (m_scriptEngineContext->runInitScript()){
@ -1320,10 +1320,10 @@ ReportPages ReportEnginePrivate::renderToPages()
if (!page->isTOC() && page->isPrintable()){ if (!page->isTOC() && page->isPrintable()){
page->setReportSettings(&m_reportSettings); page->setReportSettings(&m_reportSettings);
result = appendPages( result = appendPages(
result, result,
m_reportRender->renderPageToPages(page), m_reportRender->renderPageToPages(page),
page->mixWithPriorPage() ? MixPages : AppendPages page->mixWithPriorPage() ? MixPages : AppendPages
); );
} else if (page->isTOC()){ } else if (page->isTOC()){
startTOCPage = result.count(); startTOCPage = result.count();
pageAfterTOCIndex = i+1; pageAfterTOCIndex = i+1;
@ -1340,20 +1340,20 @@ ReportPages ReportEnginePrivate::renderToPages()
if ( m_renderingPages.count() > (pageAfterTOCIndex)) if ( m_renderingPages.count() > (pageAfterTOCIndex))
secondPage = m_renderingPages.at(pageAfterTOCIndex); secondPage = m_renderingPages.at(pageAfterTOCIndex);
ReportPages pages = m_reportRender->renderTOC( ReportPages pages = m_reportRender->renderTOC(
page, page,
true, true,
secondPage && secondPage->resetPageNumber() secondPage && secondPage->resetPageNumber()
); );
for (int j=0; j<pages.count(); ++j){ for (int j=0; j<pages.count(); ++j){
result.insert(startTOCPage+j,pages.at(j)); result.insert(startTOCPage+j,pages.at(j));
} }
} else { } else {
result = appendPages( result = appendPages(
result, result,
m_reportRender->renderPageToPages(page), m_reportRender->renderPageToPages(page),
page->mixWithPriorPage() ? MixPages : AppendPages page->mixWithPriorPage() ? MixPages : AppendPages
); );
} }
} }
} }
@ -1367,7 +1367,7 @@ ReportPages ReportEnginePrivate::renderToPages()
m_reportRendering = false; m_reportRendering = false;
#ifdef USE_QTSCRIPTENGINE #ifdef USE_QTSCRIPTENGINE
ScriptEngineManager::instance().scriptEngine()->popContext(); ScriptEngineManager::instance().scriptEngine()->popContext();
#endif #endif
return result; return result;
} else { } else {
@ -1818,7 +1818,7 @@ PrintProcessor::PrintProcessor(QPrinter* printer)
bool PrintProcessor::printPage(PageItemDesignIntf::Ptr page) bool PrintProcessor::printPage(PageItemDesignIntf::Ptr page)
{ {
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1))
if (!m_firstPage && !m_painter->isActive()) return false; if (!m_firstPage && !m_painter->isActive()) return false;
PageDesignIntf* backupPage = dynamic_cast<PageDesignIntf*>(page->scene()); PageDesignIntf* backupPage = dynamic_cast<PageDesignIntf*>(page->scene());
@ -1836,91 +1836,47 @@ bool PrintProcessor::printPage(PageItemDesignIntf::Ptr page)
m_firstPage = false; m_firstPage = false;
} }
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1))
qreal leftMargin, topMargin, rightMargin, bottomMargin; qreal leftMargin, topMargin, rightMargin, bottomMargin;
m_printer->getPageMargins(&leftMargin, &topMargin, &rightMargin, &bottomMargin, QPrinter::Millimeter); m_printer->getPageMargins(&leftMargin, &topMargin, &rightMargin, &bottomMargin, QPrinter::Millimeter);
QRectF printerPageRect = m_printer->pageRect(QPrinter::Millimeter);
printerPageRect = QRectF(0,0,(printerPageRect.size().width() + rightMargin + leftMargin) * page->unitFactor(),
(printerPageRect.size().height() + bottomMargin +topMargin) * page->unitFactor());
if (page->printBehavior() == PageItemDesignIntf::Split && m_printer->pageSize() != static_cast<QPrinter::PageSize>(page->pageSize()) &&
printerPageRect.width() < page->geometry().width())
{
qreal pageWidth = page->geometry().width();
qreal pageHeight = page->geometry().height();
QRectF currentPrintingRect = printerPageRect;
qreal curHeight = 0;
qreal curWidth = 0;
bool first = true;
while (pageHeight > 0){
while (curWidth < pageWidth){
if (!first) m_printer->newPage(); else first = false;
m_renderPage.render(m_painter, m_printer->pageRect(), currentPrintingRect);
currentPrintingRect.adjust(printerPageRect.size().width(), 0, printerPageRect.size().width(), 0);
curWidth += printerPageRect.size().width();
}
pageHeight -= printerPageRect.size().height();
curHeight += printerPageRect.size().height();
currentPrintingRect = printerPageRect;
currentPrintingRect.adjust(0, curHeight, 0, curHeight);
curWidth = 0;
}
} else {
if (page->getSetPageSizeToPrinter()){
QRectF source = page->geometry();
QSizeF inchSize = source.size() / (100 * 2.54);
QRectF target = QRectF(QPoint(0,0), inchSize * m_printer->resolution());
m_renderPage.render(m_painter, target, source);
} else {
m_renderPage.render(m_painter);
}
}
page->setPos(backupPagePos);
m_renderPage.removePageItem(page);
if (backupPage) backupPage->reactivatePageItem(page);
#else #else
if (!m_firstPage && !m_painter->isActive()) return false;
PageDesignIntf* backupPage = dynamic_cast<PageDesignIntf*>(page->scene());
QPointF backupPagePos = page->pos();
page->setPos(0,0);
m_renderPage.setPageItem(page);
m_renderPage.setSceneRect(m_renderPage.pageItem()->mapToScene(m_renderPage.pageItem()->rect()).boundingRect());
initPrinter(m_renderPage.pageItem());
if (!m_firstPage){
m_printer->newPage();
} else {
m_painter = new QPainter(m_printer);
if (!m_painter->isActive()) return false;
m_firstPage = false;
}
qreal leftMargin = m_printer->pageLayout().margins().left(); qreal leftMargin = m_printer->pageLayout().margins().left();
qreal topMargin = m_printer->pageLayout().margins().top(); qreal topMargin = m_printer->pageLayout().margins().top();
qreal rightMargin = m_printer->pageLayout().margins().right(); qreal rightMargin = m_printer->pageLayout().margins().right();
qreal bottomMargin = m_printer->pageLayout().margins().bottom(); qreal bottomMargin = m_printer->pageLayout().margins().bottom();
#endif
QRectF printerPageRect = m_printer->pageRect(QPrinter::Millimeter); QRectF printerPageRect = m_printer->pageRect(QPrinter::Millimeter);
printerPageRect = QRectF(0,0,(printerPageRect.size().width() + rightMargin + leftMargin) * page->unitFactor(), printerPageRect = QRectF(0,0,(printerPageRect.size().width() + rightMargin + leftMargin) * page->unitFactor(),
(printerPageRect.size().height() + bottomMargin + topMargin) * page->unitFactor()); (printerPageRect.size().height() + bottomMargin + topMargin) * page->unitFactor());
if (page->printBehavior() == PageItemDesignIntf::Split && m_printer->pageLayout().pageSize() != QPageSize((QPageSize::PageSizeId)page->pageSize()) && #if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1))
if (page->printBehavior() == PageItemDesignIntf::Split &&
m_printer->pageSize() != static_cast<QPrinter::PageSize>(page->pageSize()) &&
printerPageRect.width() < page->geometry().width()) printerPageRect.width() < page->geometry().width())
{ {
#else
if (
page->printBehavior() == PageItemDesignIntf::Split &&
m_printer->pageLayout().pageSize() != QPageSize((QPageSize::PageSizeId)page->pageSize()) &&
printerPageRect.width() < page->geometry().width()
){
#endif
qreal pageWidth = page->geometry().width(); qreal pageWidth = page->geometry().width();
qreal pageHeight = page->geometry().height(); qreal pageHeight = page->geometry().height();
QRectF currentPrintingRect = printerPageRect;
qreal curHeight = 0; qreal curHeight = 0;
qreal curWidth = 0; qreal curWidth = 0;
QRectF currentPrintingRect = printerPageRect;
bool first = true; bool first = true;
while (pageHeight > 0){ while (pageHeight > 0){
while (curWidth < pageWidth){ while (curWidth < pageWidth){
if (!first) m_printer->newPage(); else first = false; if (!first) m_printer->newPage(); else first = false;
m_renderPage.render(m_painter, m_printer->pageRect(QPrinter::Millimeter), currentPrintingRect); m_renderPage.render(m_painter, QRectF(), currentPrintingRect);
currentPrintingRect.adjust(printerPageRect.size().width(), 0, printerPageRect.size().width(), 0);
curWidth += printerPageRect.size().width(); curWidth += printerPageRect.size().width();
currentPrintingRect = QRectF(
curWidth, 0,
printerPageRect.size().width() > (pageWidth - curWidth) ? (pageWidth - curWidth) : printerPageRect.size().width(), pageHeight
);
} }
pageHeight -= printerPageRect.size().height(); pageHeight -= printerPageRect.size().height();
@ -1943,7 +1899,6 @@ bool PrintProcessor::printPage(PageItemDesignIntf::Ptr page)
page->setPos(backupPagePos); page->setPos(backupPagePos);
m_renderPage.removePageItem(page); m_renderPage.removePageItem(page);
if (backupPage) backupPage->reactivatePageItem(page); if (backupPage) backupPage->reactivatePageItem(page);
#endif
return true; return true;
} }
@ -1952,14 +1907,14 @@ void PrintProcessor::initPrinter(PageItemDesignIntf* page)
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1)) #if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1))
if (page->oldPrintMode()){ if (page->oldPrintMode()){
m_printer->setPageMargins(page->leftMargin(), m_printer->setPageMargins(page->leftMargin(),
page->topMargin(), page->topMargin(),
page->rightMargin(), page->rightMargin(),
page->bottomMargin(), page->bottomMargin(),
QPrinter::Millimeter); QPrinter::Millimeter);
m_printer->setOrientation(static_cast<QPrinter::Orientation>(page->pageOrientation())); m_printer->setOrientation(static_cast<QPrinter::Orientation>(page->pageOrientation()));
QSizeF pageSize = (page->pageOrientation()==PageItemDesignIntf::Landscape)? QSizeF pageSize = (page->pageOrientation()==PageItemDesignIntf::Landscape)?
QSizeF(page->sizeMM().height(),page->sizeMM().width()): QSizeF(page->sizeMM().height(),page->sizeMM().width()):
page->sizeMM(); page->sizeMM();
m_printer->setPaperSize(pageSize,QPrinter::Millimeter); m_printer->setPaperSize(pageSize,QPrinter::Millimeter);
} else { } else {
m_printer->setFullPage(page->fullPage()); m_printer->setFullPage(page->fullPage());
@ -1968,13 +1923,13 @@ void PrintProcessor::initPrinter(PageItemDesignIntf* page)
m_printer->setOrientation(static_cast<QPrinter::Orientation>(page->pageOrientation())); m_printer->setOrientation(static_cast<QPrinter::Orientation>(page->pageOrientation()));
if (page->pageSize()==PageItemDesignIntf::Custom){ if (page->pageSize()==PageItemDesignIntf::Custom){
QSizeF pageSize = (page->pageOrientation()==PageItemDesignIntf::Landscape)? QSizeF pageSize = (page->pageOrientation()==PageItemDesignIntf::Landscape)?
QSizeF(page->sizeMM().height(),page->sizeMM().width()): QSizeF(page->sizeMM().height(),page->sizeMM().width()):
page->sizeMM(); page->sizeMM();
if (page->getSetPageSizeToPrinter() || m_printer->outputFormat() == QPrinter::PdfFormat) if (page->getSetPageSizeToPrinter() || m_printer->outputFormat() == QPrinter::PdfFormat)
m_printer->setPaperSize(pageSize, QPrinter::Millimeter); m_printer->setPaperSize(pageSize, QPrinter::Millimeter);
} else { } else {
if (page->getSetPageSizeToPrinter() || m_printer->outputFormat() == QPrinter::PdfFormat) if (page->getSetPageSizeToPrinter() || m_printer->outputFormat() == QPrinter::PdfFormat)
m_printer->setPaperSize(static_cast<QPrinter::PageSize>(page->pageSize())); m_printer->setPaperSize(static_cast<QPrinter::PageSize>(page->pageSize()));
} }
} }
#else #else
@ -1982,23 +1937,23 @@ void PrintProcessor::initPrinter(PageItemDesignIntf* page)
m_printer->setPageMargins(QMarginsF(page->leftMargin(), page->topMargin(), page->rightMargin(), page->bottomMargin()),QPageLayout::Millimeter); m_printer->setPageMargins(QMarginsF(page->leftMargin(), page->topMargin(), page->rightMargin(), page->bottomMargin()),QPageLayout::Millimeter);
m_printer->setPageOrientation((QPageLayout::Orientation)page->pageOrientation()); m_printer->setPageOrientation((QPageLayout::Orientation)page->pageOrientation());
QSizeF pageSize = (page->pageOrientation()==PageItemDesignIntf::Landscape)? QSizeF pageSize = (page->pageOrientation()==PageItemDesignIntf::Landscape)?
QSizeF(page->sizeMM().height(),page->sizeMM().width()): QSizeF(page->sizeMM().height(),page->sizeMM().width()):
page->sizeMM(); page->sizeMM();
m_printer->setPageSize(QPageSize(pageSize, QPageSize::Millimeter)); m_printer->setPageSize(QPageSize(pageSize, QPageSize::Millimeter));
} else { } else {
m_printer->setFullPage(page->fullPage()); m_printer->setFullPage(page->fullPage());
if (page->dropPrinterMargins()) if (page->dropPrinterMargins())
m_printer->setPageMargins(QMarginsF(0, 0, 0, 0), QPageLayout::Point); m_printer->setPageMargins(QMarginsF(0, 0, 0, 0), QPageLayout::Point);
m_printer->setPageOrientation((QPageLayout::Orientation)page->pageOrientation()); m_printer->setPageOrientation((QPageLayout::Orientation)page->pageOrientation());
if (page->pageSize()==PageItemDesignIntf::Custom){ if (page->pageSize()==PageItemDesignIntf::Custom){
QSizeF pageSize = (page->pageOrientation()==PageItemDesignIntf::Landscape)? QSizeF pageSize = (page->pageOrientation()==PageItemDesignIntf::Landscape)?
QSizeF(page->sizeMM().height(),page->sizeMM().width()): QSizeF(page->sizeMM().height(),page->sizeMM().width()):
page->sizeMM(); page->sizeMM();
if (page->getSetPageSizeToPrinter() || m_printer->outputFormat() == QPrinter::PdfFormat) if (page->getSetPageSizeToPrinter() || m_printer->outputFormat() == QPrinter::PdfFormat)
m_printer->setPageSize(QPageSize(pageSize, QPageSize::Millimeter)); m_printer->setPageSize(QPageSize(pageSize, QPageSize::Millimeter));
} else { } else {
if (page->getSetPageSizeToPrinter() || m_printer->outputFormat() == QPrinter::PdfFormat) if (page->getSetPageSizeToPrinter() || m_printer->outputFormat() == QPrinter::PdfFormat)
m_printer->setPageSize(QPageSize((QPageSize::PageSizeId)page->pageSize())); m_printer->setPageSize(QPageSize((QPageSize::PageSizeId)page->pageSize()));
} }
} }
#endif #endif
@ -2181,4 +2136,3 @@ qreal WatermarkHelper::valueToPixels(qreal value)
}// namespace LimeReport }// namespace LimeReport

View File

@ -32,6 +32,7 @@
#include "lrglobal.h" #include "lrglobal.h"
#include "lrreportrender.h" #include "lrreportrender.h"
#include "lrgroupbands.h"
#include "lrpagedesignintf.h" #include "lrpagedesignintf.h"
#include "lrbanddesignintf.h" #include "lrbanddesignintf.h"
#include "lritemdesignintf.h" #include "lritemdesignintf.h"
@ -66,9 +67,9 @@ bool ReportRender::isNeedToRearrangeColumnsItems()
maxHeightColumn = i; maxHeightColumn = i;
} }
if (maxHeightColumn>0 && columnItemsCount(maxHeightColumn)<avg && if (maxHeightColumn>0 && columnItemsCount(maxHeightColumn)<avg &&
maxHeight> lastColumnItem(maxHeightColumn-1)->height() maxHeight> lastColumnItem(maxHeightColumn-1)->height()
){ ){
return true; return true;
} }
} }
return false; return false;
@ -78,8 +79,8 @@ BandDesignIntf *ReportRender::lastColumnItem(int columnIndex)
{ {
if (columnIndex<0) return 0; if (columnIndex<0) return 0;
for(int i=0;i<m_columnedBandItems.size();++i){ for(int i=0;i<m_columnedBandItems.size();++i){
if (m_columnedBandItems[i]->columnIndex()>columnIndex) if (m_columnedBandItems[i]->columnIndex()>columnIndex)
return m_columnedBandItems[i-1]; return m_columnedBandItems[i-1];
} }
return m_columnedBandItems.last(); return m_columnedBandItems.last();
} }
@ -90,15 +91,15 @@ void ReportRender::rearrangeColumnsItems()
qreal startHeight = columnHeigth(0); qreal startHeight = columnHeigth(0);
int avg = m_columnedBandItems.size() / m_columnedBandItems[0]->columnsCount(); int avg = m_columnedBandItems.size() / m_columnedBandItems[0]->columnsCount();
for (int i = 1; i < m_columnedBandItems[0]->columnsCount(); ++i){ for (int i = 1; i < m_columnedBandItems[0]->columnsCount(); ++i){
if (columnItemsCount(i) < avg){ if (columnItemsCount(i) < avg){
int getCount = avg * (m_columnedBandItems[0]->columnsCount()-i) - columnItemsCount(i); int getCount = avg * (m_columnedBandItems[0]->columnsCount()-i) - columnItemsCount(i);
for (int j = 0; j < getCount; ++j){ for (int j = 0; j < getCount; ++j){
BandDesignIntf* band = lastColumnItem(i-1); BandDesignIntf* band = lastColumnItem(i-1);
band->setPos(band->pos().x()+band->width(),m_columnedBandItems[0]->pos().y()); band->setPos(band->pos().x()-30,m_columnedBandItems[0]->pos().y());
band->setColumnIndex(i); band->setColumnIndex(i);
} }
} }
} }
m_renderPageItem->relocateBands(); m_renderPageItem->relocateBands();
m_maxHeightByColumn[0]+=startHeight-maxColumnHeight(); m_maxHeightByColumn[0]+=startHeight-maxColumnHeight();
@ -122,9 +123,9 @@ qreal ReportRender::columnHeigth(int columnIndex)
{ {
qreal result = 0; qreal result = 0;
for(int i=0;i<m_columnedBandItems.size();++i){ for(int i=0;i<m_columnedBandItems.size();++i){
if (m_columnedBandItems[i]->columnIndex()==columnIndex) if (m_columnedBandItems[i]->columnIndex()==columnIndex)
result += m_columnedBandItems[i]->height(); result += m_columnedBandItems[i]->height();
if (m_columnedBandItems[i]->columnIndex()>columnIndex) break; if (m_columnedBandItems[i]->columnIndex()>columnIndex) break;
} }
return result; return result;
} }
@ -206,7 +207,7 @@ void ReportRender::analizeItem(ContentItemDesignIntf* contentItem, BandDesignInt
rx.setMinimal(true); rx.setMinimal(true);
if (rx.indexIn(content)>=0){ if (rx.indexIn(content)>=0){
functions.append(functionName); functions.append(functionName);
} }
#endif #endif
} }
if (functions.size()>0) if (functions.size()>0)
@ -270,7 +271,7 @@ void ReportRender::renderPage(PageItemDesignIntf* patternPage, bool isTOC, bool
startNewPage(true); startNewPage(true);
renderReportHeader(m_patternPageItem, AfterPageHeader); renderReportHeader(m_patternPageItem, AfterPageHeader);
m_dataSourceSorted = false;
BandDesignIntf* lastRenderedBand = 0; BandDesignIntf* lastRenderedBand = 0;
for (int i=0;i<m_patternPageItem->dataBandCount() && !m_renderCanceled; i++){ for (int i=0;i<m_patternPageItem->dataBandCount() && !m_renderCanceled; i++){
lastRenderedBand = m_patternPageItem->dataBandAt(i); lastRenderedBand = m_patternPageItem->dataBandAt(i);
@ -416,7 +417,7 @@ void ReportRender::extractGroupFuntionsFromItem(ContentItemDesignIntf* contentIt
if (dataBand){ if (dataBand){
GroupFunction* gf = datasources()->addGroupFunction( GroupFunction* gf = datasources()->addGroupFunction(
functionName, captures.at(Const::VALUE_INDEX), band->objectName(), dataBand->objectName() functionName, captures.at(Const::VALUE_INDEX), band->objectName(), dataBand->objectName()
); );
if (gf){ if (gf){
connect(dataBand, SIGNAL(bandRendered(BandDesignIntf*)), connect(dataBand, SIGNAL(bandRendered(BandDesignIntf*)),
gf, SLOT(slotBandRendered(BandDesignIntf*))); gf, SLOT(slotBandRendered(BandDesignIntf*)));
@ -426,7 +427,7 @@ void ReportRender::extractGroupFuntionsFromItem(ContentItemDesignIntf* contentIt
} else { } else {
GroupFunction* gf = datasources()->addGroupFunction( GroupFunction* gf = datasources()->addGroupFunction(
functionName, captures.at(Const::VALUE_INDEX), band->objectName(), captures.at(dsIndex) functionName, captures.at(Const::VALUE_INDEX), band->objectName(), captures.at(dsIndex)
); );
gf->setInvalid(tr("Databand \"%1\" not found").arg(captures.at(dsIndex))); gf->setInvalid(tr("Databand \"%1\" not found").arg(captures.at(dsIndex)));
} }
} }
@ -474,7 +475,7 @@ void ReportRender::extractGroupFuntionsFromItem(ContentItemDesignIntf* contentIt
gf->setInvalid(tr("Wrong using function %1").arg(functionName)); gf->setInvalid(tr("Wrong using function %1").arg(functionName));
} }
} }
} }
#endif #endif
} }
@ -510,14 +511,14 @@ void ReportRender::replaceGroupFunctionsInItem(ContentItemDesignIntf* contentIte
QString expressionIndex = datasources()->putGroupFunctionsExpressions(captures.at(Const::VALUE_INDEX)); QString expressionIndex = datasources()->putGroupFunctionsExpressions(captures.at(Const::VALUE_INDEX));
if (captures.size()<5){ if (captures.size()<5){
content.replace(captures.at(0), QString("%1(%2,%3)") content.replace(captures.at(0), QString("%1(%2,%3)")
.arg(functionName).arg('"'+expressionIndex+'"').arg('"'+band->objectName()+'"')); .arg(functionName).arg('"'+expressionIndex+'"').arg('"'+band->objectName()+'"'));
} else { } else {
content.replace(captures.at(0), QString("%1(%2,%3,%4)").arg( content.replace(captures.at(0), QString("%1(%2,%3,%4)").arg(
functionName, functionName,
'"'+expressionIndex+'"', '"'+expressionIndex+'"',
'"'+band->objectName()+'"', '"'+band->objectName()+'"',
captures.at(4) captures.at(4)
)); ));
} }
} }
match = rx.match(content, pos + match.capturedLength()); match = rx.match(content, pos + match.capturedLength());
@ -536,11 +537,11 @@ void ReportRender::replaceGroupFunctionsInItem(ContentItemDesignIntf* contentIte
content.replace(captures.at(0),QString("%1(%2,%3)").arg(functionName).arg('"'+expressionIndex+'"').arg('"'+band->objectName()+'"')); content.replace(captures.at(0),QString("%1(%2,%3)").arg(functionName).arg('"'+expressionIndex+'"').arg('"'+band->objectName()+'"'));
} else { } else {
content.replace(captures.at(0),QString("%1(%2,%3,%4)").arg( content.replace(captures.at(0),QString("%1(%2,%3,%4)").arg(
functionName, functionName,
'"'+expressionIndex+'"', '"'+expressionIndex+'"',
'"'+band->objectName()+'"', '"'+band->objectName()+'"',
captures.at(4) captures.at(4)
)); ));
} }
} }
pos += rx.matchedLength(); pos += rx.matchedLength();
@ -573,8 +574,8 @@ void ReportRender::replaceGroupsFunction(BandDesignIntf *band)
QColor ReportRender::makeBackgroundColor(BandDesignIntf* band){ QColor ReportRender::makeBackgroundColor(BandDesignIntf* band){
if (band->useAlternateBackgroundColor()){ if (band->useAlternateBackgroundColor()){
return datasources()->variable(QLatin1String("line_") + band->objectName().toLower()).toInt() %2 == 0 ? return datasources()->variable(QLatin1String("line_") + band->objectName().toLower()).toInt() %2 == 0 ?
band->backgroundColor() : band->backgroundColor() :
band->alternateBackgroundColor(); band->alternateBackgroundColor();
} }
return band->backgroundColor(); return band->backgroundColor();
} }
@ -591,12 +592,12 @@ BandDesignIntf* ReportRender::renderBand(BandDesignIntf *patternBand, BandDesign
BandDesignIntf* bandClone = 0; BandDesignIntf* bandClone = 0;
if (bandData){ if (bandData){
bandClone = bandData; bandClone = bandData;
} else { } else {
bandClone = renderData(patternBand); bandClone = renderData(patternBand);
} }
if (isLast) bandClone->setBootomSpace(1); if (isLast) bandClone->setBottomSpace(1);
if (mode == ForcedStartPage){ if (mode == ForcedStartPage){
savePage(); savePage();
@ -613,7 +614,7 @@ BandDesignIntf* ReportRender::renderBand(BandDesignIntf *patternBand, BandDesign
if ( isLast && bandClone->keepFooterTogether() && bandClone->sliceLastRow() ){ if ( isLast && bandClone->keepFooterTogether() && bandClone->sliceLastRow() ){
if (m_maxHeightByColumn[m_currentColumn] < (bandClone->height()+m_reportFooterHeight)) if (m_maxHeightByColumn[m_currentColumn] < (bandClone->height()+m_reportFooterHeight))
m_maxHeightByColumn[m_currentColumn] -= ((m_maxHeightByColumn[m_currentColumn]-bandClone->height())+(bandClone->height()*calcSlicePercent(bandClone->height()))); m_maxHeightByColumn[m_currentColumn] -= ((m_maxHeightByColumn[m_currentColumn]-bandClone->height())+(bandClone->height()*calcSlicePercent(bandClone->height())));
} }
if (!bandClone->isEmpty() || patternBand->printIfEmpty()){ if (!bandClone->isEmpty() || patternBand->printIfEmpty()){
if (!registerBand(bandClone)){ if (!registerBand(bandClone)){
@ -645,7 +646,7 @@ BandDesignIntf* ReportRender::renderBand(BandDesignIntf *patternBand, BandDesign
patternBand->bandHeader()->columnsCount()>1 && patternBand->bandHeader()->columnsCount()>1 &&
!m_lostHeadersMoved && !m_lostHeadersMoved &&
patternBand->bandNestingLevel() == 0 patternBand->bandNestingLevel() == 0
){ ){
renderBand(patternBand->bandHeader(), 0, mode); renderBand(patternBand->bandHeader(), 0, mode);
} }
} else { } else {
@ -697,7 +698,7 @@ void ReportRender::renderDataBand(BandDesignIntf *dataBand)
m_lastRenderedFooter = 0; m_lastRenderedFooter = 0;
if (!dataBand->datasourceName().isEmpty()) if (!dataBand->datasourceName().isEmpty())
bandDatasource = datasources()->dataSource(dataBand->datasourceName()); bandDatasource = datasources()->dataSource(dataBand->datasourceName());
BandDesignIntf* header = dataBand->bandHeader(); BandDesignIntf* header = dataBand->bandHeader();
BandDesignIntf* footer = dataBand->bandFooter(); BandDesignIntf* footer = dataBand->bandFooter();
@ -778,7 +779,7 @@ void ReportRender::renderDataBand(BandDesignIntf *dataBand)
} }
if (!dataBand->keepFooterTogether()) if (!dataBand->keepFooterTogether())
m_reprintableBands.removeOne(header); m_reprintableBands.removeOne(header);
if (header) recalcIfNeeded(header); if (header) recalcIfNeeded(header);
bool didGoBack = !bandDatasource->eof() && bandDatasource->prior(); bool didGoBack = !bandDatasource->eof() && bandDatasource->prior();
@ -812,7 +813,7 @@ void ReportRender::renderPageHeader(PageItemDesignIntf *patternPage)
if (band){ if (band){
if (m_datasources->variable("#PAGE").toInt()!=1 || if (m_datasources->variable("#PAGE").toInt()!=1 ||
band->property("printOnFirstPage").toBool() band->property("printOnFirstPage").toBool()
) )
renderBand(band, 0); renderBand(band, 0);
} }
} }
@ -964,6 +965,14 @@ void ReportRender::renderDataHeader(BandDesignIntf *header)
void ReportRender::renderGroupHeader(BandDesignIntf *parentBand, IDataSource* dataSource, bool firstTime) void ReportRender::renderGroupHeader(BandDesignIntf *parentBand, IDataSource* dataSource, bool firstTime)
{ {
GroupBandHeader *group = dynamic_cast<GroupBandHeader*>(parentBand);
if(dataSource->model() && group && !group->groupFieldName().isEmpty() && !m_dataSourceSorted)
{
dataSource->model()->sort(dataSource->columnIndexByName(group->groupFieldName()),group->SortFieldNameBy());
qDebug()<<"sorted;";
m_dataSourceSorted = true;
}
foreach(BandDesignIntf* band,parentBand->childrenByType(BandDesignIntf::GroupHeader)){ foreach(BandDesignIntf* band,parentBand->childrenByType(BandDesignIntf::GroupHeader)){
IGroupBand* gb = dynamic_cast<IGroupBand*>(band); IGroupBand* gb = dynamic_cast<IGroupBand*>(band);
if (gb&&gb->isNeedToClose(datasources())){ if (gb&&gb->isNeedToClose(datasources())){
@ -1153,7 +1162,7 @@ void ReportRender::placeBandOnPage(BandDesignIntf* band, int columnIndex){
bool isMultiColumnHeader(BandDesignIntf* band){ bool isMultiColumnHeader(BandDesignIntf* band){
return ( (band->columnsCount() > 1 ) && return ( (band->columnsCount() > 1 ) &&
(band->isHeader() && (band->isHeader() &&
((band->bandNestingLevel() == 0) || (band->columnsFillDirection() == BandDesignIntf::Horizontal)))); ((band->bandNestingLevel() == 0) || (band->columnsFillDirection() == BandDesignIntf::Horizontal))));
} }
@ -1182,7 +1191,7 @@ bool ReportRender::registerBand(BandDesignIntf *band, bool registerInChildren)
} }
if ( (band->columnsCount() > 1) && if ( (band->columnsCount() > 1) &&
(!band->isHeader() || (band->bandNestingLevel() > 0 && band->columnsFillDirection() != BandDesignIntf::Horizontal ))){ (!band->isHeader() || (band->bandNestingLevel() > 0 && band->columnsFillDirection() != BandDesignIntf::Horizontal ))){
if (band->columnsFillDirection() == BandDesignIntf::Horizontal){ if (band->columnsFillDirection() == BandDesignIntf::Horizontal){
if (m_currentColumn < band->columnsCount()-1) if (m_currentColumn < band->columnsCount()-1)
@ -1194,7 +1203,7 @@ bool ReportRender::registerBand(BandDesignIntf *band, bool registerInChildren)
if ((m_currentColumn !=0) && if ((m_currentColumn !=0) &&
(m_maxHeightByColumn[0] == m_maxHeightByColumn[m_currentColumn]) && (m_maxHeightByColumn[0] == m_maxHeightByColumn[m_currentColumn]) &&
(m_maxHeightByColumn[0] >= band->height()) (m_maxHeightByColumn[0] >= band->height())
){ ){
m_currentColumn = 0; m_currentColumn = 0;
} }
} }
@ -1203,13 +1212,13 @@ bool ReportRender::registerBand(BandDesignIntf *band, bool registerInChildren)
m_currentColumn = m_currentColumn == -1 ? 0: m_currentColumn; m_currentColumn = m_currentColumn == -1 ? 0: m_currentColumn;
if ( (band->height() <= m_maxHeightByColumn[m_currentColumn]) || if ( (band->height() <= m_maxHeightByColumn[m_currentColumn]) ||
m_patternPageItem->endlessHeight() || m_patternPageItem->endlessHeight() ||
(isMultiColumnHeader(band) && (band->height() <= m_maxHeightByColumn[0])) (isMultiColumnHeader(band) && (band->height() <= m_maxHeightByColumn[0]))
){ ){
if ( (band->bandType() == BandDesignIntf::PageFooter) ){ if ( (band->bandType() == BandDesignIntf::PageFooter) ){
for (int i=0; i < m_maxHeightByColumn.size(); ++i) for (int i=0; i < m_maxHeightByColumn.size(); ++i)
m_maxHeightByColumn[i]+=band->height(); m_maxHeightByColumn[i]+=band->height();
} }
if ( isMultiColumnHeader(band)){ if ( isMultiColumnHeader(band)){
@ -1245,7 +1254,7 @@ bool ReportRender::registerBand(BandDesignIntf *band, bool registerInChildren)
band->bandType()!=BandDesignIntf::ReportFooter && band->bandType()!=BandDesignIntf::ReportFooter &&
!list->contains(band) && !list->contains(band) &&
!band->reprintOnEachPage() !band->reprintOnEachPage()
) )
list->append(band); list->append(band);
} }
@ -1283,7 +1292,7 @@ BandDesignIntf* ReportRender::sliceBand(BandDesignIntf *band, BandDesignIntf* pa
DataBandDesignIntf* data = dynamic_cast<DataBandDesignIntf*>(band); DataBandDesignIntf* data = dynamic_cast<DataBandDesignIntf*>(band);
if (isLast && data && data->keepFooterTogether() && if (isLast && data && data->keepFooterTogether() &&
band->height()<m_maxHeightByColumn[m_currentColumn] && band->sliceLastRow() band->height()<m_maxHeightByColumn[m_currentColumn] && band->sliceLastRow()
){ ){
if (band->height()>(m_maxHeightByColumn[m_currentColumn]-m_reportFooterHeight)){ if (band->height()>(m_maxHeightByColumn[m_currentColumn]-m_reportFooterHeight)){
m_maxHeightByColumn[m_currentColumn] -= ((m_maxHeightByColumn[m_currentColumn]-band->height())+(band->height()*calcSlicePercent(band->height()))); m_maxHeightByColumn[m_currentColumn] -= ((m_maxHeightByColumn[m_currentColumn]-band->height())+(band->height()*calcSlicePercent(band->height())));
} }
@ -1341,9 +1350,9 @@ void ReportRender::createTOCMarker(bool startNewRange)
BandDesignIntf *ReportRender::saveUppperPartReturnBottom(BandDesignIntf *band, int height, BandDesignIntf* patternBand) BandDesignIntf *ReportRender::saveUppperPartReturnBottom(BandDesignIntf *band, int height, BandDesignIntf* patternBand)
{ {
int sliceHeight = height; //int sliceHeight = height;
BandDesignIntf* upperBandPart = dynamic_cast<BandDesignIntf*>(band->cloneUpperPart(sliceHeight)); BandDesignIntf* upperBandPart = dynamic_cast<BandDesignIntf*>(band->cloneUpperPart(height));
BandDesignIntf* bottomBandPart = dynamic_cast<BandDesignIntf*>(band->cloneBottomPart(sliceHeight)); BandDesignIntf* bottomBandPart = dynamic_cast<BandDesignIntf*>(band->cloneBottomPart(height));
if (!bottomBandPart->isEmpty()){ if (!bottomBandPart->isEmpty()){
if (patternBand->keepFooterTogether()) if (patternBand->keepFooterTogether())
closeFooterGroup(patternBand); closeFooterGroup(patternBand);
@ -1351,6 +1360,7 @@ BandDesignIntf *ReportRender::saveUppperPartReturnBottom(BandDesignIntf *band, i
bottomBandPart->copyBookmarks(band); bottomBandPart->copyBookmarks(band);
} }
if (!upperBandPart->isEmpty()){ if (!upperBandPart->isEmpty()){
upperBandPart->setBottomSpace(0);
upperBandPart->updateItemSize(m_datasources, FirstPass, height); upperBandPart->updateItemSize(m_datasources, FirstPass, height);
registerBand(upperBandPart); registerBand(upperBandPart);
upperBandPart->copyBookmarks(band); upperBandPart->copyBookmarks(band);
@ -1366,7 +1376,7 @@ BandDesignIntf *ReportRender::saveUppperPartReturnBottom(BandDesignIntf *band, i
patternBand->bandHeader()->columnsCount()>1 && patternBand->bandHeader()->columnsCount()>1 &&
!m_lostHeadersMoved && !m_lostHeadersMoved &&
patternBand->bandNestingLevel() == 0 patternBand->bandNestingLevel() == 0
){ ){
renderBand(patternBand->bandHeader(), 0, StartNewPageAsNeeded); renderBand(patternBand->bandHeader(), 0, StartNewPageAsNeeded);
} }
@ -1398,6 +1408,7 @@ BandDesignIntf *ReportRender::renderData(BandDesignIntf *patternBand, bool emitB
emit(patternBand->preparedForRender()); emit(patternBand->preparedForRender());
bandClone->updateItemSize(m_datasources); bandClone->updateItemSize(m_datasources);
bandClone->setBottomSpace(patternBand->height() - patternBand->findMaxBottom());
//m_scriptEngineContext->baseDesignIntfToScript(bandClone); //m_scriptEngineContext->baseDesignIntfToScript(bandClone);
emit(patternBand->afterData()); emit(patternBand->afterData());
@ -1484,7 +1495,7 @@ void ReportRender::checkFooterGroup(BandDesignIntf *groupBand)
foreach(BandDesignIntf* band, *holder){ foreach(BandDesignIntf* band, *holder){
qreal percent = band->height()*100 / m_dataAreaSize; qreal percent = band->height()*100 / m_dataAreaSize;
if (m_renderedDataBandCount<=1 || percent>20 ){ if (m_renderedDataBandCount<=1 || percent>20 ){
holder->removeAll(band); holder->removeAll(band);
} }
} }
} }
@ -1523,8 +1534,8 @@ void ReportRender::checkLostHeadersOnPrevPage()
it.toBack(); it.toBack();
if (it.hasPrevious()){ if (it.hasPrevious()){
if (it.previous()->isFooter()){ if (it.previous()->isFooter()){
if (it.hasPrevious()) it.previous(); if (it.hasPrevious()) it.previous();
else return; else return;
} }
} }
@ -1561,8 +1572,8 @@ void ReportRender::checkLostHeadersInPrevColumn()
it.toBack(); it.toBack();
if (it.hasPrevious()){ if (it.hasPrevious()){
if (it.previous()->isFooter()){ if (it.previous()->isFooter()){
if (it.hasPrevious()) it.previous(); if (it.hasPrevious()) it.previous();
else return; else return;
} }
} }
@ -1578,7 +1589,7 @@ void ReportRender::checkLostHeadersInPrevColumn()
if (lostHeaders.size() > 0){ if (lostHeaders.size() > 0){
m_lostHeadersMoved = true; m_lostHeadersMoved = true;
// std::sort(lostHeaders.begin(), lostHeaders.end(), bandLessThen); // std::sort(lostHeaders.begin(), lostHeaders.end(), bandLessThen);
std::sort(lostHeaders.begin(), lostHeaders.end(), bandLessThen); std::sort(lostHeaders.begin(), lostHeaders.end(), bandLessThen);
foreach(BandDesignIntf* header, lostHeaders){ foreach(BandDesignIntf* header, lostHeaders){
registerBand(header); registerBand(header);
@ -1596,7 +1607,7 @@ BandDesignIntf* ReportRender::findEnclosingGroup()
foreach(BandDesignIntf* gb, m_childBands.keys()){ foreach(BandDesignIntf* gb, m_childBands.keys()){
if (m_childBands.value(gb)->tryToKeepTogether()&& if (m_childBands.value(gb)->tryToKeepTogether()&&
((gb->bandIndex()<groupIndex)||(groupIndex==-1)) ((gb->bandIndex()<groupIndex)||(groupIndex==-1))
){ ){
result=gb; result=gb;
groupIndex=result->bandIndex(); groupIndex=result->bandIndex();
} }
@ -1671,7 +1682,7 @@ void ReportRender::savePage(bool isLast)
pageHeight += band->height(); pageHeight += band->height();
} }
m_renderPageItem->setHeight(pageHeight + 10 + m_renderPageItem->setHeight(pageHeight + 10 +
(m_patternPageItem->topMargin() + m_patternPageItem->bottomMargin()) * Const::mmFACTOR); (m_patternPageItem->topMargin() + m_patternPageItem->bottomMargin()) * Const::mmFACTOR);
} }
} }

View File

@ -92,7 +92,7 @@ public:
enum BandPrintMode {PrintAlwaysPrintable, PrintNotAlwaysPrintable }; enum BandPrintMode {PrintAlwaysPrintable, PrintNotAlwaysPrintable };
enum ResetPageNuberType{BandReset, PageReset}; enum ResetPageNuberType{BandReset, PageReset};
enum PageRenderStage{BeforePageHeader, AfterPageHeader}; enum PageRenderStage{BeforePageHeader, AfterPageHeader};
typedef QSharedPointer<ReportRender> Ptr; typedef QSharedPointer<ReportRender> Ptr;
~ReportRender(); ~ReportRender();
ReportRender(QObject *parent = 0); ReportRender(QObject *parent = 0);
void setDatasources(DataSourceManager* value); void setDatasources(DataSourceManager* value);
@ -220,6 +220,7 @@ private:
unsigned long long m_currentNameIndex; unsigned long long m_currentNameIndex;
bool m_newPageStarted; bool m_newPageStarted;
bool m_lostHeadersMoved; bool m_lostHeadersMoved;
bool m_dataSourceSorted = false;
}; };
} // namespace LimeReport } // namespace LimeReport

View File

@ -649,7 +649,7 @@ QVariant ScriptEngineManager::evaluateScript(const QString& script){
QVariant varValue; QVariant varValue;
if (script.contains(rx)){ if (script.contains(rx)){
#else #else
QRegularExpression rx = getScriptRegEx(); QRegularExpression rx = getScriptRegEx();
QVariant varValue; QVariant varValue;
@ -712,9 +712,12 @@ int ScriptEngineManager::getPageFreeSpace(PageItemDesignIntf* page){
height += band->geometry().height() * m_dataManager->dataSource(band->datasourceName())->model()->rowCount(); height += band->geometry().height() * m_dataManager->dataSource(band->datasourceName())->model()->rowCount();
} }
else height += band->height(); else height += band->height();
} }
height += (page->topMargin() + page->bottomMargin()) * Const::mmFACTOR;
return page->height() - height - (page->pageFooter()?page->pageFooter()->height() : 0); return page->height() - height - (page->pageFooter()?page->pageFooter()->height() : 0);
} else return -1; } else return 0;
} }
void ScriptEngineManager::addTableOfContentsItem(const QString& uniqKey, const QString& content, int indent) void ScriptEngineManager::addTableOfContentsItem(const QString& uniqKey, const QString& content, int indent)
@ -1073,6 +1076,79 @@ bool ScriptEngineManager::createReopenDatasourceFunction()
return addFunction(fd); return addFunction(fd);
} }
bool ScriptEngineManager::createGetFieldByRowIndexEx()
{
JSFunctionDesc fd;
fd.setManager(m_functionManager);
fd.setManagerName(LimeReport::Const::FUNCTION_MANAGER_NAME);
fd.setCategory(tr("GENERAL"));
fd.setName("getFieldByRowIndexEx");
fd.setDescription("getFieldByRowIndexEx(\"" + tr("FieldName") + "\", \"" + tr("RowIndex")
+ "\", \"" + tr("RoleIndex") + "\")");
fd.setScriptWrapper(QString("function getFieldByRowIndexEx(fieldName, rowIndex, role){"
"return %1.getFieldByRowIndexEx(fieldName, rowIndex, role);}")
.arg(LimeReport::Const::FUNCTION_MANAGER_NAME));
return addFunction(fd);
}
bool ScriptEngineManager::createGetFieldByRowIndexEx2()
{
JSFunctionDesc fd;
fd.setManager(m_functionManager);
fd.setManagerName(LimeReport::Const::FUNCTION_MANAGER_NAME);
fd.setCategory(tr("GENERAL"));
fd.setName("getFieldByRowIndexEx2");
fd.setDescription("getFieldByRowIndexEx2(\"" + tr("FieldName") + "\", \"" + tr("RowIndex")
+ "\", \"" + tr("RoleName") + "\")");
fd.setScriptWrapper(QString("function getFieldByRowIndexEx2(fieldName, rowIndex, role){"
"return %1.getFieldByRowIndexEx2(fieldName, rowIndex, role);}")
.arg(LimeReport::Const::FUNCTION_MANAGER_NAME));
return addFunction(fd);
}
bool ScriptEngineManager::createHeaderData()
{
JSFunctionDesc fd;
fd.setManager(m_functionManager);
fd.setManagerName(LimeReport::Const::FUNCTION_MANAGER_NAME);
fd.setCategory(tr("GENERAL"));
fd.setName("getHeaderData");
fd.setDescription("getHeaderData(\"" + tr("FieldName") + "\", \"" + tr("RoleName") + "\")");
fd.setScriptWrapper(QString("function getHeaderData(fieldName, role){"
"return %1.getHeaderData(fieldName, role);}")
.arg(LimeReport::Const::FUNCTION_MANAGER_NAME));
return addFunction(fd);
}
bool ScriptEngineManager::createHeaderColumnNameByIndex()
{
JSFunctionDesc fd;
fd.setManager(m_functionManager);
fd.setManagerName(LimeReport::Const::FUNCTION_MANAGER_NAME);
fd.setCategory(tr("GENERAL"));
fd.setName("getHeaderColumnNameByIndex");
fd.setDescription("getHeaderColumnNameByIndex(\"" + tr("datasourceName") + "\", \""
+ tr("columnIndex") + "\")");
fd.setScriptWrapper(QString("function getHeaderColumnNameByIndex(datasourceName, columnIndex){"
"return %1.getHeaderColumnNameByIndex(datasourceName, columnIndex);}")
.arg(LimeReport::Const::FUNCTION_MANAGER_NAME));
return addFunction(fd);
}
bool ScriptEngineManager::createColumnCount()
{
JSFunctionDesc fd;
fd.setManager(m_functionManager);
fd.setManagerName(LimeReport::Const::FUNCTION_MANAGER_NAME);
fd.setCategory(tr("GENERAL"));
fd.setName("getColumnCount");
fd.setDescription("getColumnCount(\"" + tr("datasourceName") + "\")");
fd.setScriptWrapper(QString("function getColumnCount(datasourceName){"
"return %1.getColumnCount(datasourceName);}")
.arg(LimeReport::Const::FUNCTION_MANAGER_NAME));
return addFunction(fd);
}
ScriptEngineManager::ScriptEngineManager() ScriptEngineManager::ScriptEngineManager()
:m_model(0), m_context(0), m_dataManager(0) :m_model(0), m_context(0), m_dataManager(0)
{ {
@ -1114,6 +1190,11 @@ ScriptEngineManager::ScriptEngineManager()
createAddTableOfContentsItemFunction(); createAddTableOfContentsItemFunction();
createClearTableOfContentsFunction(); createClearTableOfContentsFunction();
createReopenDatasourceFunction(); createReopenDatasourceFunction();
createGetFieldByRowIndexEx();
createGetFieldByRowIndexEx2();
createHeaderData();
createHeaderColumnNameByIndex();
createColumnCount();
m_model = new ScriptEngineModel(this); m_model = new ScriptEngineModel(this);
} }
@ -1866,6 +1947,42 @@ QFont ScriptFunctionsManager::font(const QString &family, int pointSize, bool it
return result; return result;
} }
QVariant ScriptFunctionsManager::getFieldByRowIndexEx(const QString &fieldName, int rowIndex, const int role)
{
DataSourceManager *dm = scriptEngineManager()->dataManager();
return dm->fieldDataByRowIndex(fieldName, rowIndex, role);
}
QVariant ScriptFunctionsManager::getFieldByRowIndexEx2(const QString &fieldName, int rowIndex, const QString &roleName)
{
DataSourceManager *dm = scriptEngineManager()->dataManager();
return dm->fieldDataByRowIndex(fieldName, rowIndex, roleName);
}
QVariant ScriptFunctionsManager::getHeaderData(const QString &fieldName, const QString &roleName)
{
DataSourceManager *dm = scriptEngineManager()->dataManager();
return dm->headerData(fieldName, roleName);
}
QVariant ScriptFunctionsManager::getHeaderColumnNameByIndex(const QString &datasourceName, const int columnIndex)
{
DataSourceManager *dm = scriptEngineManager()->dataManager();
return dm->columnName(datasourceName, columnIndex);
}
int ScriptFunctionsManager::getColumnCount(const QString &datasourceName)
{
DataSourceManager *dm = scriptEngineManager()->dataManager();
return dm->columnCount(datasourceName);
}
int ScriptFunctionsManager::columnIndexByName(const QString &datasourceName, const QString &columnName)
{
DataSourceManager *dm = scriptEngineManager()->dataManager();
return dm->columnIndex(datasourceName,columnName);
}
#ifdef USE_QJSENGINE #ifdef USE_QJSENGINE
void ScriptFunctionsManager::addItemsToComboBox(QJSValue object, const QStringList &values) void ScriptFunctionsManager::addItemsToComboBox(QJSValue object, const QStringList &values)

View File

@ -378,6 +378,44 @@ public:
Q_INVOKABLE void addTableOfContentsItem(const QString& uniqKey, const QString& content, int indent = 0); Q_INVOKABLE void addTableOfContentsItem(const QString& uniqKey, const QString& content, int indent = 0);
Q_INVOKABLE void clearTableOfContents(); Q_INVOKABLE void clearTableOfContents();
Q_INVOKABLE QFont font(const QString& family, int pointSize = -1, bool bold = false, bool italic = false, bool underLine = false); Q_INVOKABLE QFont font(const QString& family, int pointSize = -1, bool bold = false, bool italic = false, bool underLine = false);
/*!
* \brief getFieldByRowIndexEx Выдает для поля значение заданной роли
* \param fieldName имя источника данных + имя поля
* \param rowIndex индекс строки
* \param role код роли
* \return
*/
Q_INVOKABLE QVariant getFieldByRowIndexEx(const QString &fieldName, int rowIndex, const int role);
/*!
* \brief getFieldByRowIndexEx2 Выдает для поля значение заданной роли
* \param fieldName имя источника данных + имя поля
* \param rowIndex индекс строки
* \param roleName имя роли из roleNames()
* \return
*/
Q_INVOKABLE QVariant getFieldByRowIndexEx2(const QString &fieldName, int rowIndex, const QString &roleName);
/*!
* \brief getHeaderData Выдает для поля заголовка значение заданной роли
* \param fieldName имя источника данных + имя поля
* \param role имя роли из roleNames()
* \return
*/
Q_INVOKABLE QVariant getHeaderData(const QString &fieldName, const QString &roleName);
/*!
* \brief getHeaderColumnNameByIndex Выдает имя колонки по ее индексу (имя используемое LR)
* \param datasourceName имя источника данных
* \param columnIndex индекс колонки
* \return
*/
Q_INVOKABLE QVariant getHeaderColumnNameByIndex(const QString &datasourceName, const int columnIndex);
/*!
* \brief getColumnCount Выдает число столбцов в источнике данных
* \param datasourceName имя источника данных
* \return возможно -1 при ошибке
*/
Q_INVOKABLE int getColumnCount(const QString &datasourceName);
Q_INVOKABLE int columnIndexByName(const QString &datasourceName, const QString &columnName);
#ifdef USE_QJSENGINE #ifdef USE_QJSENGINE
Q_INVOKABLE void addItemsToComboBox(QJSValue object, const QStringList& values); Q_INVOKABLE void addItemsToComboBox(QJSValue object, const QStringList& values);
Q_INVOKABLE void addItemToComboBox(QJSValue object, const QString& value); Q_INVOKABLE void addItemToComboBox(QJSValue object, const QString& value);
@ -506,6 +544,12 @@ private:
bool createAddTableOfContentsItemFunction(); bool createAddTableOfContentsItemFunction();
bool createClearTableOfContentsFunction(); bool createClearTableOfContentsFunction();
bool createReopenDatasourceFunction(); bool createReopenDatasourceFunction();
bool createGetFieldByRowIndexEx();
bool createGetFieldByRowIndexEx2();
bool createHeaderData();
bool createHeaderColumnNameByIndex();
bool createColumnCount();
private: private:
ScriptEngineManager(); ScriptEngineManager();
ScriptEngineType* m_scriptEngine; ScriptEngineType* m_scriptEngine;

View File

@ -174,6 +174,8 @@ void QObjectPropertyModel::translatePropertyName()
tr("gridChartLines"); tr("gridChartLines");
tr("horizontalAxisOnTop"); tr("horizontalAxisOnTop");
tr("mixWithPriorPage"); tr("mixWithPriorPage");
tr("shadow");
tr("borderStyle");
} }
void QObjectPropertyModel::clearObjectsList() void QObjectPropertyModel::clearObjectsList()

View File

@ -135,9 +135,6 @@ void EnumPropItem::translateEnumItemName()
tr("Pie"); tr("Pie");
tr("VerticalBar"); tr("VerticalBar");
tr("HorizontalBar"); tr("HorizontalBar");
tr("LegendAlignTop");
tr("LegendAlignCenter");
tr("LegendAlignBottom");
tr("TitleAlignLeft"); tr("TitleAlignLeft");
tr("TitleAlignRight"); tr("TitleAlignRight");
tr("TitleAlignCenter"); tr("TitleAlignCenter");
@ -147,6 +144,31 @@ void EnumPropItem::translateEnumItemName()
tr("Inches"); tr("Inches");
tr("Scale"); tr("Scale");
tr("Split"); tr("Split");
tr("GridLines");
tr("Lines");
tr("Solid");
tr("NoStyle");
tr("Dashed");
tr("Dot");
tr("DashDot");
tr("DashDotDot");
tr("Doubled");
tr("LegendPoints");
tr("LegendLines");
tr("LegendAlignRightCenter");
tr("LegendAlignRightTop");
tr("LegendAlignRightBottom");
tr("LegendAlignBottomRight");
tr("LegendAlignBottomCenter");
tr("LegendAlignBottomLeft");
tr("SolidLine");
tr("NoPen");
tr("DashLine");
tr("DotLine");
tr("DashDotLine");
tr("DashDotDotLine");
tr("CustomDashLine");
} }
void EnumPropItem::setPropertyEditorData(QWidget *propertyEditor, const QModelIndex &) const void EnumPropItem::setPropertyEditorData(QWidget *propertyEditor, const QModelIndex &) const

View File

@ -22,16 +22,17 @@ QModelIndex CompleterModel::index(int row, int column, const QModelIndex &parent
return createIndex(row, column, parentItem->child(row)); return createIndex(row, column, parentItem->child(row));
} }
QModelIndex CompleterModel::parent(const QModelIndex &child) const QModelIndex CompleterModel::parent(const QModelIndex &child) const {
{ if(child.isValid()) {
if (child.isValid()){ if(CompleterItem *childItem = static_cast<CompleterItem *>(child.internalPointer());
CompleterItem *childItem = static_cast<CompleterItem*>(child.internalPointer()); childItem) {
CompleterItem *parentItem = childItem->parent(); CompleterItem *parentItem = childItem->parent();
if (parentItem != &m_root) { if(parentItem != &m_root) {
return indexFromItem(parentItem); return indexFromItem(parentItem);
} }
} }
return QModelIndex(); }
return QModelIndex();
} }
int CompleterModel::rowCount(const QModelIndex &parent) const int CompleterModel::rowCount(const QModelIndex &parent) const

View File

@ -12,7 +12,9 @@ public:
CompleterItem(QString text, QIcon icon):m_parent(0), m_text(text), m_icon(icon), m_model(0){} CompleterItem(QString text, QIcon icon):m_parent(0), m_text(text), m_icon(icon), m_model(0){}
~CompleterItem(); ~CompleterItem();
int rowCount() const {return m_children.count();} int rowCount() const {return m_children.count();}
CompleterItem* child(int row) const {return m_children.at(row).data();} CompleterItem *child(int row) const {
return m_children.count() > row ? m_children.at(row).data() : nullptr;
}
CompleterItem* parent() const {return m_parent;} CompleterItem* parent() const {return m_parent;}
int row() const{ int row() const{
if (m_parent){ if (m_parent){
@ -33,7 +35,7 @@ public:
void appendRow(CompleterItem* child); void appendRow(CompleterItem* child);
void appendRows(const QList<CompleterItem *> &children); void appendRows(const QList<CompleterItem *> &children);
private: private:
CompleterItem* m_parent; CompleterItem* m_parent{nullptr};
QVector<QSharedPointer<CompleterItem> > m_children; QVector<QSharedPointer<CompleterItem> > m_children;
QString m_text; QString m_text;
QIcon m_icon; QIcon m_icon;

View File

@ -80,7 +80,8 @@ bool XMLWriter::setContent(QString fileName)
{ {
QFile xmlFile(fileName); QFile xmlFile(fileName);
if (xmlFile.open(QFile::ReadOnly)){ if (xmlFile.open(QFile::ReadOnly)){
return m_doc->setContent(&xmlFile); m_doc->setContent(&xmlFile);
return true;
} }
return false; return false;
} }

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>
@ -519,6 +508,62 @@ p, li { white-space: pre-wrap; }
<source>Edit borders...</source> <source>Edit borders...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Align items</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Align to left</source>
<translation type="unfinished">محاذاة يسار</translation>
</message>
<message>
<source>Align to right</source>
<translation type="unfinished">محاذاة يمين</translation>
</message>
<message>
<source>Align to top</source>
<translation type="unfinished">محاذاة لأعلى</translation>
</message>
<message>
<source>Align to bottom</source>
<translation type="unfinished">محاذاة لأسفل</translation>
</message>
<message>
<source>Align to horizontal center</source>
<translation type="unfinished">محاذاة وسط (أفقي)</translation>
</message>
<message>
<source>Align to vertical center</source>
<translation type="unfinished">محاذاة وسط(عمودي)</translation>
</message>
<message>
<source>Resize items</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Same width</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Same height</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Align items to page</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Align to center</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>cancel alignement</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Align to page width</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>LimeReport::BorderEditor</name> <name>LimeReport::BorderEditor</name>
@ -1159,18 +1204,6 @@ p, li { white-space: pre-wrap; }
<source>HorizontalBar</source> <source>HorizontalBar</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>LegendAlignTop</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignCenter</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignBottom</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>TitleAlignLeft</source> <source>TitleAlignLeft</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -1207,6 +1240,102 @@ p, li { white-space: pre-wrap; }
<source>Split</source> <source>Split</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>GridLines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Lines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Solid</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>NoStyle</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Dashed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Dot</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>DashDot</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>DashDotDot</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Doubled</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendPoints</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendLines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignRightCenter</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignRightTop</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignRightBottom</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignBottomRight</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignBottomCenter</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignBottomLeft</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>SolidLine</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>NoPen</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>DashLine</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>DotLine</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>DashDotLine</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>DashDotDotLine</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>CustomDashLine</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>LimeReport::FlagsPropItem</name> <name>LimeReport::FlagsPropItem</name>
@ -2336,6 +2465,14 @@ p, li { white-space: pre-wrap; }
<source>mixWithPriorPage</source> <source>mixWithPriorPage</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>shadow</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>borderStyle</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>LimeReport::RectPropItem</name> <name>LimeReport::RectPropItem</name>
@ -2676,6 +2813,10 @@ p, li { white-space: pre-wrap; }
<source>The rendering is in process</source> <source>The rendering is in process</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Print Report</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>LimeReport::ReportEnginePrivate</name> <name>LimeReport::ReportEnginePrivate</name>
@ -3056,6 +3197,18 @@ This preview is no longer valid.</source>
<source>RowIndex</source> <source>RowIndex</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>RoleIndex</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>RoleName</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>columnIndex</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>LimeReport::SettingDialog</name> <name>LimeReport::SettingDialog</name>

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>
@ -647,6 +636,62 @@ p, li { white-space: pre-wrap; }
<source>Edit borders...</source> <source>Edit borders...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Align items</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Align to left</source>
<translation type="unfinished">Alinear a la izquierda</translation>
</message>
<message>
<source>Align to right</source>
<translation type="unfinished">Alinear a la derecha</translation>
</message>
<message>
<source>Align to top</source>
<translation type="unfinished">Alinear arriba</translation>
</message>
<message>
<source>Align to bottom</source>
<translation type="unfinished">Alinear abajo</translation>
</message>
<message>
<source>Align to horizontal center</source>
<translation type="unfinished">Centrar horizontalmente</translation>
</message>
<message>
<source>Align to vertical center</source>
<translation type="unfinished">Centrar verticalmente</translation>
</message>
<message>
<source>Resize items</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Same width</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Same height</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Align items to page</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Align to center</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>cancel alignement</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Align to page width</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>LimeReport::BorderEditor</name> <name>LimeReport::BorderEditor</name>
@ -1287,18 +1332,6 @@ p, li { white-space: pre-wrap; }
<source>HorizontalBar</source> <source>HorizontalBar</source>
<translation>Barra horizontal</translation> <translation>Barra horizontal</translation>
</message> </message>
<message>
<source>LegendAlignTop</source>
<translation>Alinear Leyenda Arriba</translation>
</message>
<message>
<source>LegendAlignCenter</source>
<translation>Centrar leyenda</translation>
</message>
<message>
<source>LegendAlignBottom</source>
<translation>Alinear Leyenda Abajo</translation>
</message>
<message> <message>
<source>TitleAlignLeft</source> <source>TitleAlignLeft</source>
<translation>Alinear titulo a la izquierda</translation> <translation>Alinear titulo a la izquierda</translation>
@ -1335,6 +1368,102 @@ p, li { white-space: pre-wrap; }
<source>Split</source> <source>Split</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>GridLines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Lines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Solid</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>NoStyle</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Dashed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Dot</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>DashDot</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>DashDotDot</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Doubled</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendPoints</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendLines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignRightCenter</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignRightTop</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignRightBottom</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignBottomRight</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignBottomCenter</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignBottomLeft</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>SolidLine</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>NoPen</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>DashLine</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>DotLine</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>DashDotLine</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>DashDotDotLine</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>CustomDashLine</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>LimeReport::FlagsPropItem</name> <name>LimeReport::FlagsPropItem</name>
@ -2464,6 +2593,14 @@ p, li { white-space: pre-wrap; }
<source>mixWithPriorPage</source> <source>mixWithPriorPage</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>shadow</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>borderStyle</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>LimeReport::RectPropItem</name> <name>LimeReport::RectPropItem</name>
@ -2804,6 +2941,10 @@ p, li { white-space: pre-wrap; }
<source>The rendering is in process</source> <source>The rendering is in process</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Print Report</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>LimeReport::ReportEnginePrivate</name> <name>LimeReport::ReportEnginePrivate</name>
@ -3186,6 +3327,18 @@ Esta vista previa ya no es válida.</translation>
<source>RowIndex</source> <source>RowIndex</source>
<translation>Índice de fila</translation> <translation>Índice de fila</translation>
</message> </message>
<message>
<source>RoleIndex</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>RoleName</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>columnIndex</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>LimeReport::SettingDialog</name> <name>LimeReport::SettingDialog</name>

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

@ -8,17 +8,6 @@
<translation>$ClassName$</translation> <translation>$ClassName$</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>
@ -524,6 +513,62 @@ p, li { white-space: pre-wrap; }
<source>Edit borders...</source> <source>Edit borders...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Align items</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Align to left</source>
<translation type="unfinished">Выровнять по левому краю</translation>
</message>
<message>
<source>Align to right</source>
<translation type="unfinished">Выровнять по правому краю</translation>
</message>
<message>
<source>Align to top</source>
<translation type="unfinished">Выровнять по верхнему краю</translation>
</message>
<message>
<source>Align to bottom</source>
<translation type="unfinished">Выровнять по нижнему краю</translation>
</message>
<message>
<source>Align to horizontal center</source>
<translation type="unfinished">Центрировать горизонтально</translation>
</message>
<message>
<source>Align to vertical center</source>
<translation type="unfinished">Центрировать вертикально</translation>
</message>
<message>
<source>Resize items</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Same width</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Same height</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Align items to page</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Align to center</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>cancel alignement</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Align to page width</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>LimeReport::BorderEditor</name> <name>LimeReport::BorderEditor</name>
@ -1172,18 +1217,6 @@ p, li { white-space: pre-wrap; }
<source>HorizontalBar</source> <source>HorizontalBar</source>
<translation>Горизонтальная панель</translation> <translation>Горизонтальная панель</translation>
</message> </message>
<message>
<source>LegendAlignTop</source>
<translation>Легенда сверху</translation>
</message>
<message>
<source>LegendAlignCenter</source>
<translation>Легенда по центру</translation>
</message>
<message>
<source>LegendAlignBottom</source>
<translation>Легенда снизу</translation>
</message>
<message> <message>
<source>TitleAlignLeft</source> <source>TitleAlignLeft</source>
<translation>Название слева</translation> <translation>Название слева</translation>
@ -1212,6 +1245,102 @@ p, li { white-space: pre-wrap; }
<source>Split</source> <source>Split</source>
<translation>Разделить</translation> <translation>Разделить</translation>
</message> </message>
<message>
<source>GridLines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Lines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Solid</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>NoStyle</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Dashed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Dot</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>DashDot</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>DashDotDot</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Doubled</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendPoints</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendLines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignRightCenter</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignRightTop</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignRightBottom</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignBottomRight</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignBottomCenter</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignBottomLeft</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>SolidLine</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>NoPen</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>DashLine</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>DotLine</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>DashDotLine</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>DashDotDotLine</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>CustomDashLine</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>LimeReport::FlagsPropItem</name> <name>LimeReport::FlagsPropItem</name>
@ -2341,6 +2470,14 @@ p, li { white-space: pre-wrap; }
<source>horizontalAxisOnTop</source> <source>horizontalAxisOnTop</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>shadow</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>borderStyle</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>LimeReport::RectPropItem</name> <name>LimeReport::RectPropItem</name>
@ -2681,6 +2818,10 @@ p, li { white-space: pre-wrap; }
<source>The rendering is in process</source> <source>The rendering is in process</source>
<translation>Отчет находится в процессе создания</translation> <translation>Отчет находится в процессе создания</translation>
</message> </message>
<message>
<source>Print Report</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>LimeReport::ReportEnginePrivate</name> <name>LimeReport::ReportEnginePrivate</name>
@ -3061,6 +3202,18 @@ This preview is no longer valid.</source>
<source>RowIndex</source> <source>RowIndex</source>
<translation>Индекс строки</translation> <translation>Индекс строки</translation>
</message> </message>
<message>
<source>RoleIndex</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>RoleName</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>columnIndex</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>LimeReport::SettingDialog</name> <name>LimeReport::SettingDialog</name>

View File

@ -8,17 +8,6 @@
<translation>$ClassName$</translation> <translation>$ClassName$</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>
@ -531,6 +520,62 @@ p, li { white-space: pre-wrap; }
<source>Edit borders...</source> <source>Edit borders...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Align items</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Align to left</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Align to right</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Align to top</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Align to bottom</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Align to horizontal center</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Align to vertical center</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Resize items</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Same width</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Same height</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Align items to page</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Align to center</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>cancel alignement</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Align to page width</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>LimeReport::BorderEditor</name> <name>LimeReport::BorderEditor</name>
@ -1171,18 +1216,6 @@ p, li { white-space: pre-wrap; }
<source>HorizontalBar</source> <source>HorizontalBar</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>LegendAlignTop</source>
<translation></translation>
</message>
<message>
<source>LegendAlignCenter</source>
<translation></translation>
</message>
<message>
<source>LegendAlignBottom</source>
<translation></translation>
</message>
<message> <message>
<source>TitleAlignLeft</source> <source>TitleAlignLeft</source>
<translation></translation> <translation></translation>
@ -1219,6 +1252,102 @@ p, li { white-space: pre-wrap; }
<source>Split</source> <source>Split</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>GridLines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Lines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Solid</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>NoStyle</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Dashed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Dot</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>DashDot</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>DashDotDot</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Doubled</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendPoints</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendLines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignRightCenter</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignRightTop</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignRightBottom</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignBottomRight</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignBottomCenter</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LegendAlignBottomLeft</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>SolidLine</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>NoPen</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>DashLine</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>DotLine</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>DashDotLine</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>DashDotDotLine</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>CustomDashLine</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>LimeReport::FlagsPropItem</name> <name>LimeReport::FlagsPropItem</name>
@ -2348,6 +2477,14 @@ p, li { white-space: pre-wrap; }
<source>mixWithPriorPage</source> <source>mixWithPriorPage</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>shadow</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>borderStyle</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>LimeReport::RectPropItem</name> <name>LimeReport::RectPropItem</name>
@ -2688,6 +2825,10 @@ p, li { white-space: pre-wrap; }
<source>The rendering is in process</source> <source>The rendering is in process</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>Print Report</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>LimeReport::ReportEnginePrivate</name> <name>LimeReport::ReportEnginePrivate</name>
@ -3070,6 +3211,18 @@ This preview is no longer valid.</source>
<source>RowIndex</source> <source>RowIndex</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>RoleIndex</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>RoleName</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>columnIndex</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>LimeReport::SettingDialog</name> <name>LimeReport::SettingDialog</name>