diff --git a/3rdparty/zint-2.10.0-src.tar.gz b/3rdparty/zint-2.10.0-src.tar.gz
new file mode 100644
index 0000000..a2eb21a
Binary files /dev/null and b/3rdparty/zint-2.10.0-src.tar.gz differ
diff --git a/demo_r1/.idea/.gitignore b/demo_r1/.idea/.gitignore
new file mode 100644
index 0000000..13566b8
--- /dev/null
+++ b/demo_r1/.idea/.gitignore
@@ -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
diff --git a/demo_r1/.idea/demo_r1.iml b/demo_r1/.idea/demo_r1.iml
new file mode 100644
index 0000000..f08604b
--- /dev/null
+++ b/demo_r1/.idea/demo_r1.iml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/demo_r1/.idea/misc.xml b/demo_r1/.idea/misc.xml
new file mode 100644
index 0000000..79b3c94
--- /dev/null
+++ b/demo_r1/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/demo_r1/.idea/modules.xml b/demo_r1/.idea/modules.xml
new file mode 100644
index 0000000..7423bf7
--- /dev/null
+++ b/demo_r1/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/demo_r1/.idea/vcs.xml b/demo_r1/.idea/vcs.xml
new file mode 100644
index 0000000..6c0b863
--- /dev/null
+++ b/demo_r1/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/demo_r1/demo_reports/1.4/test.zip b/demo_r1/demo_reports/1.4/test.zip
new file mode 100644
index 0000000..ffc9c6b
Binary files /dev/null and b/demo_r1/demo_reports/1.4/test.zip differ
diff --git a/demo_r1/demo_reports/BL détaillé.lrxml b/demo_r1/demo_reports/BL détaillé.lrxml
new file mode 100644
index 0000000..e677ec8
--- /dev/null
+++ b/demo_r1/demo_reports/BL détaillé.lrxml
@@ -0,0 +1,3020 @@
+
+
+
+
diff --git a/demo_r1/demo_reports/BL détaillé_upd.lrxml b/demo_r1/demo_reports/BL détaillé_upd.lrxml
new file mode 100644
index 0000000..e677ec8
--- /dev/null
+++ b/demo_r1/demo_reports/BL détaillé_upd.lrxml
@@ -0,0 +1,3020 @@
+
+
+
+
diff --git a/demo_r1/demo_reports/BL détaillé_upd.zip b/demo_r1/demo_reports/BL détaillé_upd.zip
new file mode 100644
index 0000000..82f8f56
Binary files /dev/null and b/demo_r1/demo_reports/BL détaillé_upd.zip differ
diff --git a/demo_r1/demo_reports/BL.detaille.zip b/demo_r1/demo_reports/BL.detaille.zip
new file mode 100644
index 0000000..da43894
Binary files /dev/null and b/demo_r1/demo_reports/BL.detaille.zip differ
diff --git a/demo_r1/demo_reports/DataSource_to_Column.lrxml b/demo_r1/demo_reports/DataSource_to_Column.lrxml
new file mode 100644
index 0000000..76a2236
--- /dev/null
+++ b/demo_r1/demo_reports/DataSource_to_Column.lrxml
@@ -0,0 +1,492 @@
+
+
+
+
diff --git a/demo_r1/demo_reports/Facture.lrxml b/demo_r1/demo_reports/Facture.lrxml
new file mode 100644
index 0000000..9cf6c0a
--- /dev/null
+++ b/demo_r1/demo_reports/Facture.lrxml
@@ -0,0 +1,2893 @@
+
+
+
+
diff --git a/demo_r1/demo_reports/db.sqlite3 b/demo_r1/demo_reports/db.sqlite3
new file mode 100644
index 0000000..df18669
Binary files /dev/null and b/demo_r1/demo_reports/db.sqlite3 differ
diff --git a/demo_r1/demo_reports/form.lrd b/demo_r1/demo_reports/form.lrd
new file mode 100644
index 0000000..5af8712
Binary files /dev/null and b/demo_r1/demo_reports/form.lrd differ
diff --git a/demo_r1/demo_reports/ladder.lrxml b/demo_r1/demo_reports/ladder.lrxml
new file mode 100644
index 0000000..6bb2692
--- /dev/null
+++ b/demo_r1/demo_reports/ladder.lrxml
@@ -0,0 +1,1554 @@
+
+
+
+
diff --git a/demo_r1/demo_reports/lr_git_test.lrxml b/demo_r1/demo_reports/lr_git_test.lrxml
new file mode 100644
index 0000000..381e7e4
--- /dev/null
+++ b/demo_r1/demo_reports/lr_git_test.lrxml
@@ -0,0 +1,2891 @@
+
+
+
+
diff --git a/demo_r1/demo_reports/multimote/db.sqlite3 b/demo_r1/demo_reports/multimote/db.sqlite3
new file mode 100644
index 0000000..ffb9aa7
Binary files /dev/null and b/demo_r1/demo_reports/multimote/db.sqlite3 differ
diff --git a/demo_r1/demo_reports/multimote/test.lrxml b/demo_r1/demo_reports/multimote/test.lrxml
new file mode 100644
index 0000000..cb254c3
--- /dev/null
+++ b/demo_r1/demo_reports/multimote/test.lrxml
@@ -0,0 +1,617 @@
+
+
+
+
diff --git a/demo_r1/demo_reports/template.lrxml b/demo_r1/demo_reports/template.lrxml
new file mode 100644
index 0000000..0491676
--- /dev/null
+++ b/demo_r1/demo_reports/template.lrxml
@@ -0,0 +1,3524 @@
+
+
+
+
diff --git a/demo_r1/demo_reports/test.zip b/demo_r1/demo_reports/test.zip
new file mode 100644
index 0000000..0ba84e3
Binary files /dev/null and b/demo_r1/demo_reports/test.zip differ
diff --git a/demo_r1/demo_reports/test/test.db b/demo_r1/demo_reports/test/test.db
new file mode 100644
index 0000000..0bbab6a
Binary files /dev/null and b/demo_r1/demo_reports/test/test.db differ
diff --git a/demo_r1/demo_reports/test/test.lrxml b/demo_r1/demo_reports/test/test.lrxml
new file mode 100644
index 0000000..4ae8ead
--- /dev/null
+++ b/demo_r1/demo_reports/test/test.lrxml
@@ -0,0 +1,432 @@
+
+
+
+
diff --git a/demo_r1/demo_reports/test/test1.lrxml b/demo_r1/demo_reports/test/test1.lrxml
new file mode 100644
index 0000000..cab68b0
--- /dev/null
+++ b/demo_r1/demo_reports/test/test1.lrxml
@@ -0,0 +1,843 @@
+
+
+
+
diff --git a/demo_r1/demo_reports/test/test2.lrxml b/demo_r1/demo_reports/test/test2.lrxml
new file mode 100644
index 0000000..6f461e9
--- /dev/null
+++ b/demo_r1/demo_reports/test/test2.lrxml
@@ -0,0 +1,1908 @@
+
+
+
+
diff --git a/demo_r1/demo_reports/test/test2_changed.lrxml b/demo_r1/demo_reports/test/test2_changed.lrxml
new file mode 100644
index 0000000..b120096
--- /dev/null
+++ b/demo_r1/demo_reports/test/test2_changed.lrxml
@@ -0,0 +1,1907 @@
+
+
+
+
diff --git a/demo_r1/demo_reports/test/test2_changed.zip b/demo_r1/demo_reports/test/test2_changed.zip
new file mode 100644
index 0000000..a775f15
Binary files /dev/null and b/demo_r1/demo_reports/test/test2_changed.zip differ
diff --git a/demo_r1/demo_reports/test/test3_changed.lrxml b/demo_r1/demo_reports/test/test3_changed.lrxml
new file mode 100644
index 0000000..b2bef31
--- /dev/null
+++ b/demo_r1/demo_reports/test/test3_changed.lrxml
@@ -0,0 +1,1907 @@
+
+
+
+
diff --git a/demo_r1/demo_reports/test1.zip b/demo_r1/demo_reports/test1.zip
new file mode 100644
index 0000000..ffc9c6b
Binary files /dev/null and b/demo_r1/demo_reports/test1.zip differ
diff --git a/demo_r1/demo_reports/test3.zip b/demo_r1/demo_reports/test3.zip
new file mode 100644
index 0000000..baf050a
Binary files /dev/null and b/demo_r1/demo_reports/test3.zip differ
diff --git a/demo_r1/demo_reports/testqrcode.lrxml b/demo_r1/demo_reports/testqrcode.lrxml
new file mode 100644
index 0000000..0754937
--- /dev/null
+++ b/demo_r1/demo_reports/testqrcode.lrxml
@@ -0,0 +1,1156 @@
+
+
+
+
diff --git a/demo_r1/demo_reports/testqrcode.zip b/demo_r1/demo_reports/testqrcode.zip
new file mode 100644
index 0000000..c9c79d9
Binary files /dev/null and b/demo_r1/demo_reports/testqrcode.zip differ
diff --git a/demo_r2/demo_reports/Facture.lrxml b/demo_r2/demo_reports/Facture.lrxml
new file mode 100644
index 0000000..9cf6c0a
--- /dev/null
+++ b/demo_r2/demo_reports/Facture.lrxml
@@ -0,0 +1,2893 @@
+
+
+
+
diff --git a/demo_r2/demo_reports/invoice.zip b/demo_r2/demo_reports/invoice.zip
new file mode 100644
index 0000000..fc9a75d
Binary files /dev/null and b/demo_r2/demo_reports/invoice.zip differ
diff --git a/include/lrdatasourceintf.h b/include/lrdatasourceintf.h
index 26f7a65..481787c 100644
--- a/include/lrdatasourceintf.h
+++ b/include/lrdatasourceintf.h
@@ -18,9 +18,12 @@ public:
virtual bool eof() = 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, 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 int columnCount() = 0;
virtual QString columnNameByIndex(int columnIndex) = 0;
+ virtual QVariant headerData(const QString &columnName, const QString &roleName) = 0;
virtual int columnIndexByName(QString name) = 0;
virtual bool isInvalid() const = 0;
virtual QString lastError() = 0;
diff --git a/include/lrdatasourcemanagerintf.h b/include/lrdatasourcemanagerintf.h
index c43b239..0ff4a55 100644
--- a/include/lrdatasourcemanagerintf.h
+++ b/include/lrdatasourcemanagerintf.h
@@ -55,6 +55,7 @@ public:
virtual bool containsVariable(const QString& variableName) = 0;
virtual QVariant variable(const QString& variableName) = 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 bool containsDatasource(const QString& dataSourceName) = 0;
virtual void clearUserVariables()=0;
diff --git a/include/lrrenderengine.h b/include/lrrenderengine.h
index ccbecd4..70048df 100644
--- a/include/lrrenderengine.h
+++ b/include/lrrenderengine.h
@@ -10,7 +10,7 @@
#include "lrscriptenginemanagerintf.h"
#include "lrpreviewreportwidget.h"
-namespace LimeReport{
+namespace LimeReport;{
class PrintRange{
public:
diff --git a/limereport/bands/lrgroupbands.cpp b/limereport/bands/lrgroupbands.cpp
index 569e0df..3eedb6a 100644
--- a/limereport/bands/lrgroupbands.cpp
+++ b/limereport/bands/lrgroupbands.cpp
@@ -62,7 +62,7 @@ namespace LimeReport{
GroupBandHeader::GroupBandHeader(QObject *owner, QGraphicsItem *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"));
setFixedPos(false);
@@ -95,7 +95,10 @@ void GroupBandHeader::startGroup(DataSourceManager* dataManager)
if (dataManager->containsDatasource(datasourceName)){
IDataSource* ds = dataManager->dataSource(datasourceName);
if (ds && ds->columnIndexByName(m_groupFiledName)!=-1)
+ {
m_groupFieldValue=ds->data(m_groupFiledName);
+
+ }
}
if (!m_condition.isEmpty()) m_conditionValue = calcCondition(dataManager);
@@ -149,6 +152,7 @@ bool GroupBandHeader::isNeedToClose(DataSourceManager* dataManager)
QString datasourceName = findDataSourceName(parentBand());
if (dataManager->containsDatasource(datasourceName)){
IDataSource* ds = dataManager->dataSource(datasourceName);
+
if (ds){
if (ds->data(m_groupFiledName).isNull() && m_groupFieldValue.isNull()) return false;
if (!ds->data(m_groupFiledName).isValid()) return false;
diff --git a/limereport/bands/lrgroupbands.h b/limereport/bands/lrgroupbands.h
index 62b9b16..85269ed 100644
--- a/limereport/bands/lrgroupbands.h
+++ b/limereport/bands/lrgroupbands.h
@@ -32,12 +32,14 @@
#include "lrbanddesignintf.h"
#include "lrdesignelementsfactory.h"
+#include "qnamespace.h"
namespace LimeReport{
class GroupBandHeader : public BandDesignIntf, public IGroupBand{
Q_OBJECT
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 keepGroupTogether READ tryToKeepTogether WRITE setTryToKeepTogether)
Q_PROPERTY(bool startNewPage READ startNewPage WRITE setStartNewPage)
@@ -60,6 +62,8 @@ public:
bool isGroupHeader() const {return true;}
QString condition() const;
void setCondition(const QString &condition);
+ Qt::SortOrder SortFieldNameBy(){return m_sortFieldNameBy;};
+ void setSortFieldNameBy(Qt::SortOrder sortOrder){m_sortFieldNameBy = sortOrder;}
private:
virtual BaseDesignIntf* createSameTypeItem(QObject* owner=0, QGraphicsItem* parent=0);
void startGroup(DataSourceManager* dataManager);
@@ -77,6 +81,7 @@ private:
bool m_resetPageNumber;
QString m_condition;
QString m_conditionValue;
+ Qt::SortOrder m_sortFieldNameBy;
};
class GroupBandFooter : public BandDesignIntf{
diff --git a/limereport/items/images/border_settings.png b/limereport/items/images/border_settings.png
new file mode 100644
index 0000000..a740874
Binary files /dev/null and b/limereport/items/images/border_settings.png differ
diff --git a/limereport/items/lrbordereditor.cpp b/limereport/items/lrbordereditor.cpp
index 63d8b88..ce923ef 100644
--- a/limereport/items/lrbordereditor.cpp
+++ b/limereport/items/lrbordereditor.cpp
@@ -15,12 +15,13 @@ BorderEditor::BorderEditor(QWidget *parent) :
connect(
ui->borderFrame, SIGNAL(borderSideClicked(LimeReport::BaseDesignIntf::BorderSide, bool)),
this, SLOT(checkToolButtons(LimeReport::BaseDesignIntf::BorderSide, bool))
- );
+ );
}
void BorderEditor::loadItem(LimeReport::BaseDesignIntf *item)
{
m_item = item;
+ qDebug()<metaObject()->className();
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::TopLine,
item->borderLines() & LimeReport::BaseDesignIntf::TopLine);
emit ui->borderFrame->borderSideClicked(LimeReport::BaseDesignIntf::BorderSide::LeftLine,
@@ -68,6 +69,11 @@ double BorderEditor::borderWidth()
return m_borderWidth;
}
+bool BorderEditor::isPage()
+{
+ return QString(m_item->metaObject()->className()) == "LimeReport::PageItemDesignIntf";
+}
+
BorderEditor::~BorderEditor()
{
delete ui;
@@ -93,18 +99,18 @@ void BorderEditor::checkToolButtons(LimeReport::BaseDesignIntf::BorderSide side,
{
switch(side)
{
- case BaseDesignIntf::BorderSide::TopLine:
- ui->topLine->setChecked(check);
- break;
- case BaseDesignIntf::BorderSide::BottomLine:
- ui->bottomLine->setChecked(check);
- break;
- case BaseDesignIntf::BorderSide::LeftLine:
- ui->leftLine->setChecked(check);
- break;
- case BaseDesignIntf::BorderSide::RightLine:
- ui->rightLine->setChecked(check);
- break;
+ case BaseDesignIntf::BorderSide::TopLine:
+ ui->topLine->setChecked(check);
+ break;
+ case BaseDesignIntf::BorderSide::BottomLine:
+ ui->bottomLine->setChecked(check);
+ break;
+ case BaseDesignIntf::BorderSide::LeftLine:
+ ui->leftLine->setChecked(check);
+ break;
+ case BaseDesignIntf::BorderSide::RightLine:
+ ui->rightLine->setChecked(check);
+ break;
}
}
diff --git a/limereport/items/lrbordereditor.h b/limereport/items/lrbordereditor.h
index 2baf2f3..7906024 100644
--- a/limereport/items/lrbordereditor.h
+++ b/limereport/items/lrbordereditor.h
@@ -22,6 +22,7 @@ public:
LimeReport::BaseDesignIntf::BorderStyle borderStyle();
QString borderColor();
double borderWidth();
+ bool isPage();
~BorderEditor();
private slots:
diff --git a/limereport/items/lrtextitem.cpp b/limereport/items/lrtextitem.cpp
index 4677892..6cfd575 100644
--- a/limereport/items/lrtextitem.cpp
+++ b/limereport/items/lrtextitem.cpp
@@ -58,8 +58,8 @@ namespace LimeReport{
TextItem::TextItem(QObject *owner, QGraphicsItem *parent)
: 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_textLayoutDirection(Qt::LayoutDirectionAuto), m_hideIfEmpty(false), m_fontLetterSpacing(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)
{
PageItemDesignIntf* pageItem = dynamic_cast(parent);
BaseDesignIntf* parentItem = dynamic_cast(parent);
@@ -77,10 +77,6 @@ TextItem::TextItem(QObject *owner, QGraphicsItem *parent)
TextItem::~TextItem(){}
-int TextItem::fakeMarginSize() const{
- return marginSize()+5;
-}
-
void TextItem::preparePopUpMenu(QMenu &menu)
{
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;
switch (m_angle){
- case Angle0:
- hOffset = fakeMarginSize();
- if ((tmpSize.height() > 0) && (m_alignment & Qt::AlignVCenter)){
- vOffset = tmpSize.height() / 2;
- }
- if ((tmpSize.height() > 0) && (m_alignment & Qt::AlignBottom)) // allow html
- vOffset = tmpSize.height();
- painter->translate(hOffset,vOffset);
+ case Angle0:
+ hOffset = marginSize();
+ if ((tmpSize.height() > 0) && (m_alignment & Qt::AlignVCenter)){
+ vOffset = tmpSize.height() / 2;
+ }
+ if ((tmpSize.height() > 0) && (m_alignment & Qt::AlignBottom)) // allow html
+ vOffset = tmpSize.height();
+ painter->translate(hOffset,vOffset);
break;
- case Angle90:
- hOffset = width() - fakeMarginSize();
- vOffset = fakeMarginSize();
- if (m_alignment & Qt::AlignVCenter){
- hOffset = (width() - text->size().height()) / 2 + text->size().height();
- }
+ case Angle90:
+ hOffset = width() - marginSize();
+ vOffset = marginSize();
+ if (m_alignment & Qt::AlignVCenter){
+ hOffset = (width() - text->size().height()) / 2 + text->size().height();
+ }
- if (m_alignment & Qt::AlignBottom){
- hOffset = (text->size().height());
- }
- painter->translate(hOffset,vOffset);
- painter->rotate(90);
+ if (m_alignment & Qt::AlignBottom){
+ hOffset = (text->size().height());
+ }
+ painter->translate(hOffset,vOffset);
+ painter->rotate(90);
break;
- case Angle180:
- hOffset = width() - fakeMarginSize();
- vOffset = height() - fakeMarginSize();
- if ((tmpSize.width()>0) && (m_alignment & Qt::AlignVCenter)){
- vOffset = tmpSize.height() / 2+ text->size().height();
- }
- if ((tmpSize.height()>0) && (m_alignment & Qt::AlignBottom)){
- vOffset = (text->size().height());
- }
- painter->translate(hOffset,vOffset);
- painter->rotate(180);
+ case Angle180:
+ hOffset = width() - marginSize();
+ vOffset = height() - marginSize();
+ if ((tmpSize.width()>0) && (m_alignment & Qt::AlignVCenter)){
+ vOffset = tmpSize.height() / 2+ text->size().height();
+ }
+ if ((tmpSize.height()>0) && (m_alignment & Qt::AlignBottom)){
+ vOffset = (text->size().height());
+ }
+ painter->translate(hOffset,vOffset);
+ painter->rotate(180);
break;
- case Angle270:
- hOffset = fakeMarginSize();
- vOffset = height()-fakeMarginSize();
- if (m_alignment & Qt::AlignVCenter){
- hOffset = (width() - text->size().height())/2;
- }
+ case Angle270:
+ hOffset = marginSize();
+ vOffset = height()-marginSize();
+ if (m_alignment & Qt::AlignVCenter){
+ hOffset = (width() - text->size().height())/2;
+ }
- if (m_alignment & Qt::AlignBottom){
- hOffset = (width() - text->size().height());
- }
- painter->translate(hOffset,vOffset);
- painter->rotate(270);
+ if (m_alignment & Qt::AlignBottom){
+ hOffset = (width() - text->size().height());
+ }
+ painter->translate(hOffset,vOffset);
+ painter->rotate(270);
break;
- case Angle45:
- painter->translate(width()/2,0);
- painter->rotate(45);
- text->setTextWidth(sqrt(2*(pow(width()/2,2))));
+ case Angle45:
+ painter->translate(width()/2,0);
+ painter->rotate(45);
+ text->setTextWidth(sqrt(2*(pow(width()/2,2))));
break;
- case Angle315:
- painter->translate(0,height()/2);
- painter->rotate(315);
- text->setTextWidth(sqrt(2*(pow(height()/2,2))));
+ case Angle315:
+ painter->translate(0,height()/2);
+ painter->rotate(315);
+ text->setTextWidth(sqrt(2*(pow(height()/2,2))));
break;
}
@@ -321,7 +317,7 @@ void TextItem::updateItemSize(DataSourceManager* dataManager, RenderPass pass, i
initTextSizes();
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()) {
@@ -338,22 +334,22 @@ void TextItem::updateItemSize(DataSourceManager* dataManager, RenderPass pass, i
void TextItem::updateLayout()
{
-// m_layout.setFont(transformToSceneFont(font()));
-// m_layout.setText(content());
-// qreal linePos = 0;
-// m_layout.beginLayout();
-// while(true){
-// QTextLine line = m_layout.createLine();
-// if (!line.isValid()) break;
-// line.setLineWidth(width()-marginSize()*2);
-// line.setPosition(QPoint(marginSize(),linePos));
-// linePos+=line.height();
-// }
-// m_layout.endLayout();
+ // m_layout.setFont(transformToSceneFont(font()));
+ // m_layout.setText(content());
+ // qreal linePos = 0;
+ // m_layout.beginLayout();
+ // while(true){
+ // QTextLine line = m_layout.createLine();
+ // if (!line.isValid()) break;
+ // line.setLineWidth(width()-marginSize()*2);
+ // line.setPosition(QPoint(marginSize(),linePos));
+ // linePos+=line.height();
+ // }
+ // m_layout.endLayout();
}
bool TextItem::isNeedExpandContent() const
-{
+{
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1))
QRegExp rx("$*\\{[^{]*\\}");
#else
@@ -380,21 +376,21 @@ QString TextItem::replaceReturns(QString text) const
void TextItem::setTextFont(TextPtr text, const QFont& value) const {
text->setDefaultFont(value);
if ((m_angle==Angle0)||(m_angle==Angle180)){
- text->setTextWidth(rect().width()-fakeMarginSize()*2);
+ text->setTextWidth(rect().width()-marginSize()*2);
} else {
- text->setTextWidth(rect().height()-fakeMarginSize()*2);
+ text->setTextWidth(rect().height()-marginSize()*2);
}
}
void TextItem::adaptFontSize(TextPtr text) const{
QFont _font = transformToSceneFont(font());
do{
-// qApp->processEvents();
+ // qApp->processEvents();
setTextFont(text,_font);
if (_font.pixelSize()>2)
_font.setPixelSize(_font.pixelSize()-1);
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
@@ -419,8 +415,8 @@ void TextItem::setLineSpacing(int value)
{
int oldValue = m_lineSpacing;
m_lineSpacing = value;
-// if (autoHeight())
-// initTextSizes();
+ // if (autoHeight())
+ // initTextSizes();
update();
notify("lineSpacing",oldValue,value);
}
@@ -473,40 +469,40 @@ QString TextItem::formatFieldValue()
if (m_valueType != Default) {
switch (m_valueType) {
case DateTime:
- {
- QDateTime dt = QDateTime::fromString(value.toString(), Qt::ISODate);
- value = (dt.isValid() ? QVariant(dt) : m_varValue);
- break;
- }
+ {
+ QDateTime dt = QDateTime::fromString(value.toString(), Qt::ISODate);
+ value = (dt.isValid() ? QVariant(dt) : m_varValue);
+ break;
+ }
case Double:
- {
- bool bOk = false;
- double dbl = value.toDouble(&bOk);
- value = (bOk ? QVariant(dbl) : m_varValue);
- }
+ {
+ bool bOk = false;
+ double dbl = value.toDouble(&bOk);
+ value = (bOk ? QVariant(dbl) : m_varValue);
+ }
default: break;
}
}
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
switch (value.type()) {
- case QVariant::Date:
- case QVariant::DateTime:
- return formatDateTime(value.toDateTime());
- case QVariant::Double:
- return formatNumber(value.toDouble());
- default:
- return value.toString();
+ case QVariant::Date:
+ case QVariant::DateTime:
+ return formatDateTime(value.toDateTime());
+ case QVariant::Double:
+ return formatNumber(value.toDouble());
+ default:
+ return value.toString();
}
#else
switch (value.typeId()) {
- case QMetaType::QDate:
- case QMetaType::QDateTime:
- return formatDateTime(value.toDateTime());
- case QMetaType::Double:
- return formatNumber(value.toDouble());
- default:
- return value.toString();
+ case QMetaType::QDate:
+ case QMetaType::QDateTime:
+ return formatDateTime(value.toDateTime());
+ case QMetaType::Double:
+ return formatNumber(value.toDouble());
+ default:
+ return value.toString();
}
#endif
@@ -679,7 +675,7 @@ void TextItem::setFollowTo(const QString &followTo)
tr("TextItem \" %1 \" already has folower \" %2 \" ")
.arg(fi->objectName())
.arg(fi->follower()->objectName())
- );
+ );
notify("followTo",followTo,"");
}
} else if (m_followTo != ""){
@@ -688,7 +684,7 @@ void TextItem::setFollowTo(const QString &followTo)
tr("Error"),
tr("TextItem \" %1 \" not found!")
.arg(m_followTo)
- );
+ );
notify("followTo",followTo,"");
}
}
@@ -774,13 +770,13 @@ void TextItem::setAllowHTML(bool allowHTML)
{
if (m_allowHTML!=allowHTML){
m_allowHTML = allowHTML;
-// if (m_text){
-// if (allowHTML)
-// m_text->setHtml(m_strText);
-// else
-// m_text->setPlainText(m_strText);
-// update();
-// }
+ // if (m_text){
+ // if (allowHTML)
+ // m_text->setHtml(m_strText);
+ // else
+ // m_text->setPlainText(m_strText);
+ // update();
+ // }
update();
notify("allowHTML",!m_allowHTML,allowHTML);
}
@@ -811,9 +807,9 @@ bool TextItem::isNeedUpdateSize(RenderPass pass) const
}
bool res = (m_textSize.height()>geometry().height()&&autoHeight()) ||
- (m_textSize.width()>geometry().width()&&autoWidth()) ||
- m_follower ||
- isNeedExpandContent();
+ (m_textSize.width()>geometry().width()&&autoWidth()) ||
+ m_follower ||
+ isNeedExpandContent();
return res;
}
@@ -896,7 +892,7 @@ void TextItem::setAdaptFontToSize(bool value)
if (m_adaptFontToSize!=value){
bool oldValue = m_adaptFontToSize;
m_adaptFontToSize=value;
-// initText();
+ // initText();
invalidateRect(rect());
notify("updateFontToSize",oldValue,value);
}
@@ -918,10 +914,10 @@ QString TextItem::extractText(QTextBlock& curBlock, int height){
linesHeight += curBlock.layout()->lineAt(curLine).height() + lineSpacing();
if (height > 0 && linesHeight > (height-borderLineSize() * 2)) {goto loop_exit;}
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){
@@ -1003,10 +999,10 @@ BaseDesignIntf *TextItem::cloneEmpty(int height, QObject *owner, QGraphicsItem *
void TextItem::objectLoadFinished()
{
ItemDesignIntf::objectLoadFinished();
-// if (itemMode() == DesignMode || !isNeedExpandContent()){
-// if (autoHeight() && autoWidth())
-// initTextSizes();
-// }
+ // if (itemMode() == DesignMode || !isNeedExpandContent()){
+ // if (autoHeight() && autoWidth())
+ // initTextSizes();
+ // }
}
void TextItem::setTextItemFont(QFont value)
@@ -1023,8 +1019,8 @@ void TextItem::setTextItemFont(QFont value)
QWidget *TextItem::defaultEditor()
{
QSettings* l_settings = (page()->settings() != 0) ?
- page()->settings() :
- (page()->reportEditor()!=0) ? page()->reportEditor()->settings() : 0;
+ page()->settings() :
+ (page()->reportEditor()!=0) ? page()->reportEditor()->settings() : 0;
QWidget* editor = new TextItemEditor(this,page(),l_settings);
editor->setAttribute(Qt::WA_DeleteOnClose);
return editor;
diff --git a/limereport/items/lrtextitem.h b/limereport/items/lrtextitem.h
index 0d63415..7febe0e 100644
--- a/limereport/items/lrtextitem.h
+++ b/limereport/items/lrtextitem.h
@@ -177,7 +177,7 @@ public:
void setTextLayoutDirection(const Qt::LayoutDirection &textLayoutDirection);
void setWatermark(bool watermark);
-
+
bool isReplaceCarriageReturns() const;
void setReplaceCarriageReturns(bool isReplaceCarriageReturns);
@@ -192,7 +192,6 @@ protected:
bool isNeedExpandContent() const;
QString replaceBR(QString text) const;
QString replaceReturns(QString text) const;
- int fakeMarginSize() const;
QString getTextPart(int height, int skipHeight);
void restoreLinksEvent();
void preparePopUpMenu(QMenu &menu);
diff --git a/limereport/lrbanddesignintf.cpp b/limereport/lrbanddesignintf.cpp
index 73a9404..9aa916f 100644
--- a/limereport/lrbanddesignintf.cpp
+++ b/limereport/lrbanddesignintf.cpp
@@ -60,7 +60,6 @@ void BandMarker::paint(QPainter *painter, const QStyleOptionGraphicsItem* /**opt
boundingRect().bottomLeft().y()-4,
boundingRect().width(),4), Qt::lightGray
);
- qDebug()<setRenderHint(QPainter::Antialiasing);
qreal size = (boundingRect().width()(bi);
-// if (bi){
-// ContentItemDesignIntf* pci = dynamic_cast(bi->patternItem());
-// ci->setContent(pci->content());
-// }
-// }
-
-// updateItemSize(dataManager,FirstPass,height());
-//}
-
BaseDesignIntf* BandDesignIntf::cloneUpperPart(int height, QObject *owner, QGraphicsItem *parent)
{
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)
@@ -958,14 +938,9 @@ void BandDesignIntf::setKeepTopSpace(bool value)
}
}
-int BandDesignIntf::bootomSpace() const
+void BandDesignIntf::setBottomSpace(qreal bottomSpace)
{
- return m_bottomSpace;
-}
-
-void BandDesignIntf::setBootomSpace(int bootomSpace)
-{
- m_bottomSpace = bootomSpace;
+ m_bottomSpace = bottomSpace;
}
bool BandDesignIntf::repeatOnEachRow() const
@@ -1138,7 +1113,6 @@ void BandDesignIntf::updateItemSize(DataSourceManager* dataManager, RenderPass p
spaceBorder += borderLineSize() + 2;
}
- spaceBorder += m_bottomSpace;
restoreLinks();
snapshotItemsLayout();
@@ -1150,6 +1124,7 @@ void BandDesignIntf::updateItemSize(DataSourceManager* dataManager, RenderPass p
item->setY(item->y() - minTop);
}
}
+
setHeight(findMaxBottom() + spaceBorder);
}
if ((maxHeight > 0) && (height() > maxHeight)){
@@ -1164,6 +1139,15 @@ void BandDesignIntf::updateBandNameLabel()
if (m_bandNameLabel) m_bandNameLabel->updateLabel(bandTitle());
}
+void BandDesignIntf::initFromItem(BaseDesignIntf *source)
+{
+ ItemsContainerDesignInft::initFromItem(source);
+ BandDesignIntf* source_band = dynamic_cast(source);
+ if (source_band){
+ this->setBottomSpace(source_band->bottomSpace());
+ }
+}
+
QColor BandDesignIntf::selectionColor() const
{
return Qt::yellow;
diff --git a/limereport/lrbanddesignintf.h b/limereport/lrbanddesignintf.h
index 8960eeb..584260f 100644
--- a/limereport/lrbanddesignintf.h
+++ b/limereport/lrbanddesignintf.h
@@ -156,8 +156,8 @@ public:
virtual bool isUnique() const;
void setItemMode(BaseDesignIntf::ItemMode mode);
void updateItemSize(DataSourceManager *dataManager, RenderPass pass=FirstPass, int maxHeight=0);
-// void recalcItems(DataSourceManager* dataManager);
void updateBandNameLabel();
+ void initFromItem(BaseDesignIntf* source);
virtual QColor selectionColor() const;
int bandIndex() const;
@@ -261,11 +261,10 @@ public:
void setAlternateBackgroundColor(const QColor &alternateBackgroundColor);
bool useAlternateBackgroundColor() const;
void setUseAlternateBackgroundColor(bool useAlternateBackgroundColor);
- qreal bottomSpace() const;
+ qreal bottomSpace();
+ void setBottomSpace(qreal bottomSpace);
void setBackgroundModeProperty(BGMode value);
void setBackgroundOpacity(int value);
- int bootomSpace() const;
- void setBootomSpace(int bootomSpace);
void updateBandMarkerGeometry();
int shiftItems() const;
void setShiftItems(int shiftItems);
diff --git a/limereport/lrbasedesignintf.cpp b/limereport/lrbasedesignintf.cpp
index d66efeb..90fca96 100644
--- a/limereport/lrbasedesignintf.cpp
+++ b/limereport/lrbasedesignintf.cpp
@@ -413,6 +413,7 @@ void BaseDesignIntf::mousePressEvent(QGraphicsSceneMouseEvent *event)
void BaseDesignIntf::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
+ removeGuideLines();
QRectF newGeometry = geometry();
m_isChangingPos = false;
if (newGeometry != m_oldGeometry) {
@@ -429,7 +430,10 @@ void BaseDesignIntf::paint(QPainter *ppainter, const QStyleOptionGraphicsItem *o
ppainter->save();
setupPainter(ppainter);
+ if(!isPageItem())
drawBorder(ppainter, rect());
+ else
+ drawBorder(ppainter, page()->pageItem()->pageRect());
if(m_shadow)
drawShadow(ppainter, rect(), 6);
// if (m_joinMarkerOn) { drawMarker(ppainter, Const::JOIN_COLOR);}
@@ -544,13 +548,14 @@ void BaseDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
return;
}
+
int hStep = dynamic_cast(scene())->horizontalGridStep();
int vStep = dynamic_cast(scene())->verticalGridStep();
if (m_resizeDirectionFlags & ResizeLeft) {
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 posLeftCorner = div(mapToParent(event->pos()).x(), hStep).quot * hStep;
if (posLeftCorner < 0 )
@@ -562,15 +567,15 @@ void BaseDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
if (m_resizeDirectionFlags & ResizeRight) {
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);
}
}
if (m_resizeDirectionFlags & ResizeTop) {
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 posTopCorner = div(mapToParent(event->pos()).y(), vStep).quot * vStep;
if (posTopCorner < 0 )
@@ -582,8 +587,8 @@ void BaseDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
if (m_resizeDirectionFlags & ResizeBottom) {
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);
}
}
@@ -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
@@ -659,11 +690,11 @@ Qt::CursorShape BaseDesignIntf::getPossibleCursor(int cursorFlags)
if ((cursorFlags == Fixed) || (scene()->selectedItems().count() > 1)) return Qt::ArrowCursor;
if (((cursorFlags & ResizeRight) && (cursorFlags & ResizeTop)) ||
- ((cursorFlags & ResizeLeft) && (cursorFlags & ResizeBottom))) {
+ ((cursorFlags & ResizeLeft) && (cursorFlags & ResizeBottom))) {
return Qt::SizeBDiagCursor;
}
if (((cursorFlags & ResizeLeft) && (cursorFlags & ResizeTop)) ||
- ((cursorFlags & ResizeRight) && (cursorFlags & ResizeBottom))) {
+ ((cursorFlags & ResizeRight) && (cursorFlags & ResizeBottom))) {
return Qt::SizeFDiagCursor;
}
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
{
return m_isChangingPos;
@@ -775,6 +823,11 @@ bool BaseDesignIntf::isShapeItem() const
return QString(metaObject()->className()) == "LimeReport::ShapeItem";
}
+bool BaseDesignIntf::isPageItem() const
+{
+return QString(metaObject()->className()) == "LimeReport::PageItemDesignIntf";
+}
+
bool BaseDesignIntf::hasShadow()
{
return m_shadow;
@@ -1014,7 +1067,7 @@ void BaseDesignIntf::moveUp()
void BaseDesignIntf::sizeRight()
{
if ((m_possibleResizeDirectionFlags & ResizeLeft) ||
- (m_possibleResizeDirectionFlags & ResizeRight)) {
+ (m_possibleResizeDirectionFlags & ResizeRight)) {
if (page()) setWidth(width() + page()->horizontalGridStep());
}
}
@@ -1022,7 +1075,7 @@ void BaseDesignIntf::sizeRight()
void BaseDesignIntf::sizeLeft()
{
if ((m_possibleResizeDirectionFlags & ResizeLeft) ||
- (m_possibleResizeDirectionFlags & ResizeRight)) {
+ (m_possibleResizeDirectionFlags & ResizeRight)) {
if(page()) setWidth(width() - page()->horizontalGridStep());
}
}
@@ -1030,7 +1083,7 @@ void BaseDesignIntf::sizeLeft()
void BaseDesignIntf::sizeUp()
{
if ((m_possibleResizeDirectionFlags & ResizeTop) ||
- (m_possibleResizeDirectionFlags & ResizeBottom)) {
+ (m_possibleResizeDirectionFlags & ResizeBottom)) {
if (page()) setHeight(height() - page()->verticalGridStep());
}
}
@@ -1038,7 +1091,7 @@ void BaseDesignIntf::sizeUp()
void BaseDesignIntf::sizeDown()
{
if ((m_possibleResizeDirectionFlags & ResizeTop) ||
- (m_possibleResizeDirectionFlags & ResizeBottom)) {
+ (m_possibleResizeDirectionFlags & ResizeBottom)) {
if (page()) setHeight(height() + page()->verticalGridStep());
}
}
@@ -1066,12 +1119,32 @@ void BaseDesignIntf::drawTopLine(QPainter *painter, QRectF rect) const
if(isShapeItem())
return;
painter->setPen(borderPen(TopLine));
- painter->drawLine(rect.x(), rect.y(), rect.width(), rect.y());
- if(borderStyle() == BorderStyle::Doubled)
- painter->drawLine(rect.x()+3+m_borderLineSize,
- rect.y()+3+m_borderLineSize,
- rect.width()-3-m_borderLineSize,
- rect.y()+3+m_borderLineSize);
+ if(!isPageItem())
+ {
+ if(borderStyle() == BorderStyle::Doubled)
+ painter->drawLine(rect.x()+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
@@ -1080,12 +1153,29 @@ void BaseDesignIntf::drawBootomLine(QPainter *painter, QRectF rect) const
return;
painter->setPen(borderPen(BottomLine));
+ if(!isPageItem())
+ {
painter->drawLine(rect.x(), rect.height(), rect.width(), rect.height());
- if(borderStyle() == BorderStyle::Doubled)
- painter->drawLine(rect.x()+3+m_borderLineSize,
- rect.height()-3-m_borderLineSize,
- rect.width()-3-m_borderLineSize,
- rect.height()-3-m_borderLineSize);
+ if(borderStyle() == BorderStyle::Doubled)
+ painter->drawLine(rect.x()+3+m_borderLineSize,
+ rect.height()-3-m_borderLineSize,
+ rect.width()-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
@@ -1093,13 +1183,28 @@ void BaseDesignIntf::drawRightLine(QPainter *painter, QRectF rect) const
if(isShapeItem())
return;
painter->setPen(borderPen(RightLine));
-
+ if(!isPageItem())
+ {
painter->drawLine(rect.width(), rect.y(), rect.width(), rect.height());
- if(borderStyle() == BorderStyle::Doubled)
- painter->drawLine(rect.width()-3 - m_borderLineSize,
- rect.y()+3+m_borderLineSize,
- rect.width()-3-m_borderLineSize,
- rect.height()-3-m_borderLineSize);
+ if(borderStyle() == BorderStyle::Doubled)
+ painter->drawLine(rect.width()-3 - m_borderLineSize,
+ rect.y()+3+m_borderLineSize,
+ rect.width()-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
@@ -1107,12 +1212,29 @@ void BaseDesignIntf::drawLeftLine(QPainter *painter, QRectF rect) const
if(isShapeItem())
return;
painter->setPen(borderPen(LeftLine));
+ if(!isPageItem())
+ {
painter->drawLine(rect.x(), rect.y(), rect.x(), rect.height());
- if(borderStyle() == BorderStyle::Doubled)
- painter->drawLine(rect.x()+3+m_borderLineSize,
- rect.y()+3+m_borderLineSize,
- rect.x()+3+m_borderLineSize,
- rect.height()-3-m_borderLineSize);
+ 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);
+ }
+ 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
@@ -1214,7 +1336,7 @@ void BaseDesignIntf::setGeometryProperty(QRect rect)
}
}
-PageDesignIntf *BaseDesignIntf::page()
+PageDesignIntf *BaseDesignIntf::page() const
{
return dynamic_cast(scene());
}
@@ -1230,7 +1352,7 @@ QPen BaseDesignIntf::borderPen(BorderSide side/*, bool selected*/) const
if (m_borderLinesFlags & side) {
pen.setColor(m_borderColor);
if(borderStyle() != BorderStyle::Doubled)
- pen.setStyle(static_cast(m_borderStyle));
+ pen.setStyle(static_cast(m_borderStyle));
//pen.setCosmetic(true);
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)
{
if (event->button() == Qt::LeftButton &&
- ((itemMode()&EditMode)||(itemMode()&DesignMode))
- ) {
+ ((itemMode()&EditMode)||(itemMode()&DesignMode))
+ ) {
showEditorDialog();
}
QGraphicsItem::mouseDoubleClickEvent(event);
@@ -1448,7 +1570,7 @@ void BaseDesignIntf::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
menu.addSeparator();
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"));
pasteAction->setEnabled(false);
@@ -1484,6 +1606,54 @@ void BaseDesignIntf::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
QAction* noBordersAction = menu.addAction(QIcon(":/report/images/noLines"), tr("No borders"));
QAction* allBordersAction = menu.addAction(QIcon(":/report/images/allLines"), tr("All 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);
QAction* a = menu.exec(event->screenPos());
if (a){
@@ -1515,8 +1685,12 @@ void BaseDesignIntf::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
page->addHLayout();
if (a == createVLayout)
page->addVLayout();
+
processPopUpAction(a);
}
+
+
+
}
int BaseDesignIntf::possibleMoveDirectionFlags() const
diff --git a/limereport/lrbasedesignintf.h b/limereport/lrbasedesignintf.h
index 4314de9..fa820ab 100644
--- a/limereport/lrbasedesignintf.h
+++ b/limereport/lrbasedesignintf.h
@@ -253,7 +253,7 @@ public:
virtual void setBorderLinesFlags(LimeReport::BaseDesignIntf::BorderLines flags);
void setGeometryProperty(QRect rect);
- PageDesignIntf* page();
+ PageDesignIntf* page() const;
BorderLines borderLines() const;
@@ -265,7 +265,7 @@ public:
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* createSameTypeItem(QObject* owner=0, QGraphicsItem* parent=0) = 0;
- void initFromItem(BaseDesignIntf* source);
+ virtual void initFromItem(BaseDesignIntf* source);
virtual bool canBeSplitted(int height) const;
virtual qreal minHeight() const {return 0;}
@@ -339,6 +339,7 @@ public:
bool isChangingPos() const;
void setIsChangingPos(bool isChangingPos);
bool isShapeItem() const;
+ bool isPageItem() const;
bool hasShadow();
void setShadow(bool sh);
Q_INVOKABLE QString setItemWidth(qreal width);
@@ -427,7 +428,8 @@ private:
void moveSelectedItems(QPointF delta);
Qt::CursorShape getPossibleCursor(int cursorFlags);
void updatePossibleDirectionFlags();
-
+ void addGuideLine(qreal x1, qreal y1, qreal x2, qreal y2);
+ void removeGuideLines();
private slots:
void onChangeGeometryTimeOut();
@@ -495,6 +497,7 @@ private:
bool m_isChangingPos;
bool m_isMoveable;
bool m_shadow;
+ QList guideLines;
signals:
void geometryChanged(QObject* object, QRectF newGeometry, QRectF oldGeometry);
diff --git a/limereport/lrcollection.h b/limereport/lrcollection.h
index e66d1b9..db9285e 100644
--- a/limereport/lrcollection.h
+++ b/limereport/lrcollection.h
@@ -44,8 +44,11 @@ public:
Q_DECLARE_METATYPE(ACollectionProperty)
namespace LimeReport{
-
+#if __cplusplus >= 201703L
const int inline COLLECTION_TYPE_ID = qMetaTypeId();
+#else
+const int COLLECTION_TYPE_ID = qMetaTypeId();
+#endif
class LIMEREPORT_EXPORT ICollectionContainer{
public:
virtual QObject* createElement(const QString& collectionName,const QString& elementType)=0;
diff --git a/limereport/lrdatadesignintf.cpp b/limereport/lrdatadesignintf.cpp
index 0315c27..f7b3aa2 100644
--- a/limereport/lrdatadesignintf.cpp
+++ b/limereport/lrdatadesignintf.cpp
@@ -272,6 +272,24 @@ QVariant ModelToDataSource::dataByRowIndex(const QString &columnName, int rowInd
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)
{
for( int i=0; i < m_model->rowCount(); ++i ){
@@ -310,6 +328,13 @@ int ModelToDataSource::columnIndexByName(QString name)
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()
{
return m_lastError;
@@ -722,6 +747,18 @@ QVariant CallbackDatasource::dataByRowIndex(const QString &columnName, int rowIn
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)
{
int backupCurrentRow = m_currentRow;
@@ -816,6 +853,12 @@ int CallbackDatasource::columnIndexByName(QString name)
return -1;
}
+QVariant CallbackDatasource::headerData(const QString &columnName, const QString &roleName)
+{
+ Q_UNUSED(roleName)
+ return columnName; // STUB
+}
+
bool CallbackDatasource::checkNextRecord(int recordNum){
if (bof()) checkIfEmpty();
if (m_rowCount > 0) {
diff --git a/limereport/lrdatadesignintf.h b/limereport/lrdatadesignintf.h
index f76de85..f070f7a 100644
--- a/limereport/lrdatadesignintf.h
+++ b/limereport/lrdatadesignintf.h
@@ -388,10 +388,13 @@ public:
bool bof();
QVariant data(const QString& columnName);
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);
int columnCount();
QString columnNameByIndex(int columnIndex);
int columnIndexByName(QString name);
+ QVariant headerData(const QString &columnName, const QString &roleName);
QString lastError();
virtual QAbstractItemModel* model();
int currentRow();
@@ -421,6 +424,8 @@ public:
bool eof(){return m_eof;}
QVariant data(const QString &columnName);
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);
int columnCount();
QString columnNameByIndex(int columnIndex);
@@ -428,6 +433,7 @@ public:
bool isInvalid() const{ return false;}
QString lastError(){ return "";}
QAbstractItemModel *model(){return 0;}
+ QVariant headerData(const QString &columnName, const QString &roleName);
private:
bool checkNextRecord(int recordNum);
bool checkIfEmpty();
@@ -441,6 +447,7 @@ private:
QHash m_valuesCache;
bool m_getDataFromCache;
int m_lastKeyRow;
+
};
class CallbackDatasourceHolder :public QObject, public IDataSourceHolder{
diff --git a/limereport/lrdatasourceintf.h b/limereport/lrdatasourceintf.h
index 26f7a65..481787c 100644
--- a/limereport/lrdatasourceintf.h
+++ b/limereport/lrdatasourceintf.h
@@ -18,9 +18,12 @@ public:
virtual bool eof() = 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, 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 int columnCount() = 0;
virtual QString columnNameByIndex(int columnIndex) = 0;
+ virtual QVariant headerData(const QString &columnName, const QString &roleName) = 0;
virtual int columnIndexByName(QString name) = 0;
virtual bool isInvalid() const = 0;
virtual QString lastError() = 0;
diff --git a/limereport/lrdatasourcemanager.cpp b/limereport/lrdatasourcemanager.cpp
index 91f1189..78c875d 100644
--- a/limereport/lrdatasourcemanager.cpp
+++ b/limereport/lrdatasourcemanager.cpp
@@ -466,7 +466,7 @@ QString DataSourceManager::replaceVariables(QString value){
}
}
}
- return value;
+ return value;
#endif
return QString();
}
@@ -612,13 +612,13 @@ QString DataSourceManager::replaceFields(QString query, QMap &a
query.replace(pos,rx.cap(0).length(),":"+extractField(field));
}
}
- return query;
+ return query;
#endif
return query;
}
void DataSourceManager::setReportVariable(const QString &name, const QVariant &value)
-{
+{
if (!containsVariable(name)){
addVariable(name,value);
} else changeVariable(name,value);
@@ -1689,6 +1689,28 @@ QVariant DataSourceManager::fieldDataByRowIndex(const QString &fieldName, int ro
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)
{
IDataSource* ds = dataSource(datasourceName);
@@ -1698,6 +1720,44 @@ QVariant DataSourceManager::fieldDataByKey(const QString& datasourceName, const
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)
{
QueryHolder* qh = dynamic_cast(dataSourceHolder(datasourceName));
diff --git a/limereport/lrdatasourcemanager.h b/limereport/lrdatasourcemanager.h
index f870b77..f6d8508 100644
--- a/limereport/lrdatasourcemanager.h
+++ b/limereport/lrdatasourcemanager.h
@@ -173,12 +173,18 @@ public:
bool containsField(const QString& fieldName);
QVariant fieldData(const QString& fieldName);
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(
const QString& datasourceName,
const QString& valueFieldName,
const QString& keyFieldName,
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);
QString extractDataSource(const QString& fieldName);
diff --git a/limereport/lrdatasourcemanagerintf.h b/limereport/lrdatasourcemanagerintf.h
index c43b239..0ff4a55 100644
--- a/limereport/lrdatasourcemanagerintf.h
+++ b/limereport/lrdatasourcemanagerintf.h
@@ -55,6 +55,7 @@ public:
virtual bool containsVariable(const QString& variableName) = 0;
virtual QVariant variable(const QString& variableName) = 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 bool containsDatasource(const QString& dataSourceName) = 0;
virtual void clearUserVariables()=0;
diff --git a/limereport/lritemscontainerdesignitf.cpp b/limereport/lritemscontainerdesignitf.cpp
index 365e7e3..3cc0388 100644
--- a/limereport/lritemscontainerdesignitf.cpp
+++ b/limereport/lritemscontainerdesignitf.cpp
@@ -102,6 +102,8 @@ qreal ItemsContainerDesignInft::findMaxBottom() const
if(subItem)
if ( subItem->isVisible() && (subItem->geometry().bottom()>maxBottom) )
maxBottom = subItem->geometry().bottom();
+ if(subItem->objectName() == "VerticalLayout22")
+ qDebug()<height();
}
return maxBottom;
}
diff --git a/limereport/lrpagedesignintf.cpp b/limereport/lrpagedesignintf.cpp
index 35323b3..8bb4eda 100644
--- a/limereport/lrpagedesignintf.cpp
+++ b/limereport/lrpagedesignintf.cpp
@@ -73,7 +73,7 @@ PageDesignIntf::PageDesignIntf(QObject *parent):
m_itemInsertRect(0),
m_itemMode(DesignMode),
m_cutterBorder(0),
- m_infoPosRect(0),
+// m_infoPosRect(0),
m_currentCommand(-1),
m_changeSizeMode(false),
m_changePosMode(false),
@@ -120,10 +120,10 @@ void PageDesignIntf::updatePageRect()
if (m_pageItem.isNull()) {
m_pageItem = PageItemDesignIntf::create(this);
addItem(m_pageItem.data());
- m_pageItem->setTopMargin(5);
- m_pageItem->setBottomMargin(5);
- m_pageItem->setLeftMargin(5);
- m_pageItem->setRightMargin(5);
+ m_pageItem->setTopMargin(10);
+ m_pageItem->setBottomMargin(10);
+ m_pageItem->setLeftMargin(10);
+ m_pageItem->setRightMargin(10);
m_pageItem->setObjectName("ReportPage1");
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)));
@@ -324,24 +324,23 @@ void PageDesignIntf::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
saveSelectedItemsGeometry();
m_changePosOrSizeMode = true;
}
- qreal posY = div(page->mapFromScene(event->scenePos()).y(), verticalGridStep()).quot * verticalGridStep();
- qreal posX = div(page->mapFromScene(event->scenePos()).x(), verticalGridStep()).quot * horizontalGridStep();
- if(!m_infoPosRect)
- {
+// qreal posY = div(page->mapFromScene(event->scenePos()).y(), verticalGridStep()).quot * verticalGridStep();
+// qreal posX = div(page->mapFromScene(event->scenePos()).x(), verticalGridStep()).quot * horizontalGridStep();
+// if(!m_infoPosRect)
+// {
+// m_infoPosRect = new QGraphicsTextItem();
+// m_infoPosRect->setDefaultTextColor(QColor(100,150,50));
- m_infoPosRect = new QGraphicsTextItem();
- m_infoPosRect->setDefaultTextColor(QColor(100,150,50));
+// QFont font("Arial");
+// font.setPointSize(16);
+// font.setBold(true);
+// m_infoPosRect->setFont(font);
+// addItem(m_infoPosRect);
+// }
- QFont font("Arial");
- font.setPointSize(16);
- 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);
+// 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_multiSelectStarted = false;
}
- if(m_infoPosRect)
- {
- delete m_infoPosRect;
- m_infoPosRect = 0;
- }
+// if(m_infoPosRect)
+// {
+// delete m_infoPosRect;
+// m_infoPosRect = 0;
+// }
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)
{
return c1->pos().x() < c2->pos().x();
@@ -2158,10 +2162,9 @@ bool PasteCommand::insertItem(ItemsReaderIntf::Ptr reader)
reader->readItem(item);
item->setParent(parentItem);
item->setParentItem(parentItem);
- if (page()->reportItemsByName(item->objectName()).size() > 0){
+ if (page()->reportItemsByName(item->objectName()).size()>1){
item->setObjectName(objectName);
}
- else
foreach (BaseDesignIntf* child, item->childBaseItems()){
changeName(page(), child);
};
diff --git a/limereport/lrpagedesignintf.h b/limereport/lrpagedesignintf.h
index 1ef209e..5ea69f9 100644
--- a/limereport/lrpagedesignintf.h
+++ b/limereport/lrpagedesignintf.h
@@ -251,6 +251,7 @@ namespace LimeReport {
void sameHeight();
void addHLayout();
void addVLayout();
+ void setItemAlign(BaseDesignIntf::ItemAlign itemAlign);
void setFont(const QFont &font);
void setTextAlign(const Qt::Alignment& alignment);
void setBorders(const BaseDesignIntf::BorderLines& border);
@@ -271,7 +272,7 @@ namespace LimeReport {
void bandDeleted(QObject* band);
void slotPageItemLoaded(QObject *);
void slotSelectionChanged();
- void slotAnimationStoped(QObject *animation);
+ void slotAnimationStoped(QObject *animation);
private:
template
BaseDesignIntf* internalAddBand(T bandType);
@@ -300,7 +301,7 @@ namespace LimeReport {
BaseDesignIntf::ItemMode m_itemMode;
QGraphicsRectItem* m_cutterBorder;
QGraphicsRectItem* m_pageRect;
- QGraphicsTextItem* m_infoPosRect;
+// QGraphicsTextItem* m_infoPosRect;
QVector m_commandsList;
QVector m_positionStamp;
QVector m_geometryStamp;
diff --git a/limereport/lrpageitemdesignintf.cpp b/limereport/lrpageitemdesignintf.cpp
index 57f05ae..dde5ecb 100644
--- a/limereport/lrpageitemdesignintf.cpp
+++ b/limereport/lrpageitemdesignintf.cpp
@@ -91,13 +91,14 @@ void PageItemDesignIntf::paint(QPainter *ppainter, const QStyleOptionGraphicsIte
QRectF rect = pageRect();
if (isExtendedInDesignMode()) rect.adjust(0,0,0,m_extendedHeight);
ppainter->save();
- ppainter->setOpacity(0.8);
+ ppainter->setOpacity(1);
ppainter->fillRect(boundingRect(), pageBorderColor());
ppainter->setOpacity(1);
ppainter->fillRect(rect, Qt::white);
paintGrid(ppainter, rect);
ppainter->setPen(gridColor());
ppainter->drawRect(boundingRect());
+ drawBorder(ppainter,pageRect());
drawShadow(ppainter, boundingRect(), 10);
ppainter->restore();
}
@@ -113,6 +114,8 @@ void PageItemDesignIntf::paint(QPainter *ppainter, const QStyleOptionGraphicsIte
QRectF tmpRect = rect();
tmpRect.adjust(-4,-4,4,4);
ppainter->drawRect(tmpRect);
+ //drawShadow(ppainter, tmpRect, 10);
+ drawBorder(ppainter,pageRect());
ppainter->restore();
BaseDesignIntf::paint(ppainter,option,widget);
}
@@ -142,7 +145,7 @@ QColor PageItemDesignIntf::selectionColor() const
QColor PageItemDesignIntf::pageBorderColor() const
{
- return QColor(100,150,50);
+ return QColor(255,255,255);
}
QColor PageItemDesignIntf::gridColor() const
diff --git a/limereport/lrpageitemdesignintf.h b/limereport/lrpageitemdesignintf.h
index 1170a8f..654cb09 100644
--- a/limereport/lrpageitemdesignintf.h
+++ b/limereport/lrpageitemdesignintf.h
@@ -169,12 +169,12 @@ public:
bool canAcceptPaste() const{ return true;}
bool resetPageNumber() const;
void setResetPageNumber(bool resetPageNumber);
- void updateSubItemsSize(RenderPass pass, DataSourceManager *dataManager);
- void swapBands(BandDesignIntf *band, BandDesignIntf *bandToSwap);
+ void updateSubItemsSize(RenderPass pass, DataSourceManager *dataManager);
+ void swapBands(BandDesignIntf *band, BandDesignIntf *bandToSwap);
void moveBandFromTo(int from, int to);
QList createBandGroup(int beginIndex, int endIndex);
-
+
bool isExtendedInDesignMode() const;
void setExtendedInDesignMode(bool isExtendedInDesignMode);
int extendedHeight() const;
@@ -197,7 +197,7 @@ public:
void placeTearOffBand();
BandDesignIntf *pageFooter() const;
void setPageFooter(BandDesignIntf *pageFooter);
-
+
PrintBehavior printBehavior() const;
void setPrintBehavior(const PrintBehavior &printBehavior);
@@ -211,6 +211,8 @@ public:
bool mixWithPriorPage() const;
void setMixWithPriorPage(bool value);
+ QRectF& pageRect(){return m_pageRect;}
+
signals:
void beforeFirstPageRendered();
@@ -222,7 +224,6 @@ protected slots:
void setUnitTypeProperty(BaseDesignIntf::UnitType value);
protected:
void collectionLoadFinished(const QString& collectionName);
- QRectF& pageRect(){return m_pageRect;}
void updateMarginRect();
QSizeF getRectByPageSize(const PageSize &size);
void initPageSize(const PageSize &size);
diff --git a/limereport/lrreportdesignwindow.cpp b/limereport/lrreportdesignwindow.cpp
index ccf7a93..4da439f 100644
--- a/limereport/lrreportdesignwindow.cpp
+++ b/limereport/lrreportdesignwindow.cpp
@@ -215,7 +215,7 @@ void ReportDesignWindow::createActions()
m_useMagnetAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_M));
connect(m_useMagnetAction,SIGNAL(toggled(bool)),this,SLOT(slotUseMagnet(bool)));
-
+
m_newTextItemAction = new QAction(tr("Text Item"),this);
m_newTextItemAction->setIcon(QIcon(":/items/TextItem"));
m_actionMap.insert("TextItem",m_newTextItemAction);
@@ -253,7 +253,10 @@ void ReportDesignWindow::createActions()
m_previewReportAction->setIcon(QIcon(":/report/images/render"));
m_previewReportAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_P));
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->setIcon(QIcon(":/report/images/pin"));
connect(m_testAction,SIGNAL(triggered()),this,SLOT(slotTest()));
@@ -372,13 +375,13 @@ void ReportDesignWindow::createToolBars()
m_mainToolBar->addSeparator();
m_mainToolBar->addAction(m_zoomInReportAction);
- m_mainToolBar->addAction(m_zoomOutReportAction);
+ m_mainToolBar->addAction(m_zoomOutReportAction);
m_mainToolBar->addSeparator();
m_mainToolBar->addAction(m_previewReportAction);
//m_mainToolBar->addSeparator();
//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->setIconSize(m_mainToolBar->iconSize());
@@ -517,7 +520,7 @@ void ReportDesignWindow::createMainMenu()
m_fileMenu->addAction(m_saveReportAction);
m_fileMenu->addAction(m_saveReportAsAction);
m_fileMenu->addAction(m_previewReportAction);
- //m_fileMenu->addAction(m_printReportAction);
+ m_fileMenu->addAction(m_printReportAction);
m_editMenu = menuBar()->addMenu(tr("Edit"));
m_editMenu->addAction(m_redoAction);
m_editMenu->addAction(m_undoAction);
@@ -858,7 +861,7 @@ void ReportDesignWindow::restoreSetting()
QDesktopWidget *desktop = QApplication::desktop();
int screenWidth = desktop->screenGeometry().width();
- int screenHeight = desktop->screenGeometry().height();
+ int screenHeight = desktop->screenGeometry().height();
#endif
int x = screenWidth * 0.1;
int y = screenHeight * 0.1;
@@ -973,7 +976,7 @@ QSettings*ReportDesignWindow::settings()
}
void ReportDesignWindow::slotNewReport()
-{
+{
if (checkNeedToSave()) {
m_lblReportName->setText("");
startNewReport();
@@ -1601,7 +1604,7 @@ void ReportDesignWindow::closeEvent(QCloseEvent * event)
event->ignore();
return;
}
- if (checkNeedToSave()){
+ if (checkNeedToSave()){
m_dataBrowser->closeAllDataWindows();
writeState();
#ifdef Q_OS_WIN
diff --git a/limereport/lrreportengine.cpp b/limereport/lrreportengine.cpp
index 0fc7d08..2dffed9 100644
--- a/limereport/lrreportengine.cpp
+++ b/limereport/lrreportengine.cpp
@@ -277,9 +277,9 @@ bool ReportEnginePrivate::printPages(ReportPages pages, QPrinter *printer)
QPrinterInfo pi;
if (!pi.defaultPrinter().isNull())
#if QT_VERSION >= 0x050300
- m_printer.data()->setPrinterName(pi.defaultPrinterName());
+ m_printer.data()->setPrinterName(pi.defaultPrinterName());
#else
- m_printer.data()->setPrinterName(pi.defaultPrinter().printerName());
+ m_printer.data()->setPrinterName(pi.defaultPrinter().printerName());
#endif
QPrintDialog dialog(m_printer.data(),QApplication::activeWindow());
m_printerSelected = dialog.exec()!=QDialog::Rejected;
@@ -310,22 +310,22 @@ void ReportEnginePrivate::internalPrintPages(ReportPages pages, QPrinter &printe
printProcessors.insert("default",QSharedPointer(new PrintProcessor(&printer)));
int pageCount = (printer.printRange() == QPrinter::AllPages) ?
- pages.size() :
- printer.toPage() - printer.fromPage();
+ pages.size() :
+ printer.toPage() - printer.fromPage();
emit printingStarted(pageCount);
foreach(PageItemDesignIntf::Ptr page, pages){
if ( !m_cancelPrinting &&
- ((printer.printRange() == QPrinter::AllPages) ||
- ( (printer.printRange()==QPrinter::PageRange) &&
- (currenPage >= printer.fromPage()) &&
- (currenPage <= printer.toPage())
- ))
- )
+ ((printer.printRange() == QPrinter::AllPages) ||
+ ( (printer.printRange()==QPrinter::PageRange) &&
+ (currenPage >= printer.fromPage()) &&
+ (currenPage <= printer.toPage())
+ ))
+ )
{
- printProcessors["default"]->printPage(page);
- emit pagePrintingFinished(currenPage);
- QApplication::processEvents();
+ printProcessors["default"]->printPage(page);
+ emit pagePrintingFinished(currenPage);
+ QApplication::processEvents();
}
currenPage++;
@@ -382,9 +382,9 @@ QStringList ReportEnginePrivate::aviableReportTranslations()
void ReportEnginePrivate::setReportTranslation(const QString &languageName)
{
foreach(QLocale::Language language, aviableLanguages()){
- if (QLocale::languageToString(language).compare(languageName) == 0){
- setReportLanguage(language);
- }
+ if (QLocale::languageToString(language).compare(languageName) == 0){
+ setReportLanguage(language);
+ }
}
}
@@ -504,7 +504,7 @@ bool ReportEnginePrivate::showPreviewWindow(ReportPages pages, PreviewHints hint
w->setPages(pages);
w->setLayoutDirection(m_previewLayoutDirection);
w->setStyleSheet(styleSheet());
-// w->setDefaultPrinter()
+ // w->setDefaultPrinter()
if (!dataManager()->errorsList().isEmpty()){
w->setErrorMessages(dataManager()->errorsList());
@@ -542,15 +542,15 @@ void ReportEnginePrivate::previewReport(PreviewHints hints)
void ReportEnginePrivate::previewReport(QPrinter* printer, PreviewHints hints)
{
- try{
- dataManager()->setDesignTime(false);
- ReportPages pages = renderToPages();
- dataManager()->setDesignTime(true);
- showPreviewWindow(pages, hints, printer);
- } catch (ReportError &exception){
- saveError(exception.what());
- showError(exception.what());
- }
+ try{
+ dataManager()->setDesignTime(false);
+ ReportPages pages = renderToPages();
+ dataManager()->setDesignTime(true);
+ showPreviewWindow(pages, hints, printer);
+ } catch (ReportError &exception){
+ saveError(exception.what());
+ showError(exception.what());
+ }
}
ReportDesignWindowInterface*ReportEnginePrivate::getDesignerWindow()
@@ -569,7 +569,7 @@ ReportDesignWindowInterface*ReportEnginePrivate::getDesignerWindow()
m_designerWindow->setShowProgressDialog(m_showProgressDialog);
#endif
}
- }
+ }
if (m_designerWindow){
m_datasources->updateDatasourceModel();
}
@@ -664,19 +664,19 @@ bool ReportEnginePrivate::slotLoadFromFile(const QString &fileName)
if (!QFile::exists(fileName))
{
- if ( hasActivePreview() )
- {
- QMessageBox::information( NULL,
- tr( "Report File Change" ),
- tr( "The report file \"%1\" has changed names or been deleted.\n\nThis preview is no longer valid." ).arg( fileName )
- );
+ if ( hasActivePreview() )
+ {
+ QMessageBox::information( NULL,
+ tr( "Report File Change" ),
+ 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();
@@ -708,7 +708,7 @@ bool ReportEnginePrivate::slotLoadFromFile(const QString &fileName)
if ( hasActivePreview() )
{
- currentPreview->reloadPreview();
+ currentPreview->reloadPreview();
}
EASY_END_BLOCK;
return true;
@@ -778,23 +778,23 @@ QSettings*ReportEnginePrivate::settings()
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() )
- {
- m_fileWatcher->removePaths( m_fileWatcher->files() );
- }
+ if ( !m_fileWatcher->files().isEmpty() )
+ {
+ m_fileWatcher->removePaths( m_fileWatcher->files() );
+ }
- if ( autoLoadPreviewOnChange )
- {
- m_fileWatcher->addPath( fileName );
- }
+ if ( autoLoadPreviewOnChange )
+ {
+ m_fileWatcher->addPath( fileName );
+ }
- bool result = slotLoadFromFile( fileName );
- if (result) {
- emit loadFinished();
- }
- return result;
+ bool result = slotLoadFromFile( fileName );
+ if (result) {
+ emit loadFinished();
+ }
+ return result;
}
bool ReportEnginePrivate::loadFromByteArray(QByteArray* data, const QString &name){
@@ -1302,7 +1302,7 @@ ReportPages ReportEnginePrivate::renderToPages()
scriptContext()->qobjectToScript("engine",this);
#ifdef USE_QTSCRIPTENGINE
- ScriptEngineManager::instance().scriptEngine()->pushContext();
+ ScriptEngineManager::instance().scriptEngine()->pushContext();
#endif
if (m_scriptEngineContext->runInitScript()){
@@ -1320,10 +1320,10 @@ ReportPages ReportEnginePrivate::renderToPages()
if (!page->isTOC() && page->isPrintable()){
page->setReportSettings(&m_reportSettings);
result = appendPages(
- result,
- m_reportRender->renderPageToPages(page),
- page->mixWithPriorPage() ? MixPages : AppendPages
- );
+ result,
+ m_reportRender->renderPageToPages(page),
+ page->mixWithPriorPage() ? MixPages : AppendPages
+ );
} else if (page->isTOC()){
startTOCPage = result.count();
pageAfterTOCIndex = i+1;
@@ -1340,20 +1340,20 @@ ReportPages ReportEnginePrivate::renderToPages()
if ( m_renderingPages.count() > (pageAfterTOCIndex))
secondPage = m_renderingPages.at(pageAfterTOCIndex);
ReportPages pages = m_reportRender->renderTOC(
- page,
- true,
- secondPage && secondPage->resetPageNumber()
- );
+ page,
+ true,
+ secondPage && secondPage->resetPageNumber()
+ );
for (int j=0; jrenderPageToPages(page),
- page->mixWithPriorPage() ? MixPages : AppendPages
- );
+ result,
+ m_reportRender->renderPageToPages(page),
+ page->mixWithPriorPage() ? MixPages : AppendPages
+ );
}
}
}
@@ -1367,7 +1367,7 @@ ReportPages ReportEnginePrivate::renderToPages()
m_reportRendering = false;
#ifdef USE_QTSCRIPTENGINE
- ScriptEngineManager::instance().scriptEngine()->popContext();
+ ScriptEngineManager::instance().scriptEngine()->popContext();
#endif
return result;
} else {
@@ -1818,7 +1818,7 @@ PrintProcessor::PrintProcessor(QPrinter* printer)
bool PrintProcessor::printPage(PageItemDesignIntf::Ptr page)
{
-#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1))
+
if (!m_firstPage && !m_painter->isActive()) return false;
PageDesignIntf* backupPage = dynamic_cast(page->scene());
@@ -1836,91 +1836,47 @@ bool PrintProcessor::printPage(PageItemDesignIntf::Ptr page)
m_firstPage = false;
}
+#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1))
qreal leftMargin, topMargin, rightMargin, bottomMargin;
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(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
- if (!m_firstPage && !m_painter->isActive()) return false;
- PageDesignIntf* backupPage = dynamic_cast(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 topMargin = m_printer->pageLayout().margins().top();
qreal rightMargin = m_printer->pageLayout().margins().right();
qreal bottomMargin = m_printer->pageLayout().margins().bottom();
+#endif
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->pageLayout().pageSize() != QPageSize((QPageSize::PageSizeId)page->pageSize()) &&
+ (printerPageRect.size().height() + bottomMargin + topMargin) * page->unitFactor());
+#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1))
+ if (page->printBehavior() == PageItemDesignIntf::Split &&
+ m_printer->pageSize() != static_cast(page->pageSize()) &&
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 pageHeight = page->geometry().height();
- QRectF currentPrintingRect = printerPageRect;
qreal curHeight = 0;
qreal curWidth = 0;
+ QRectF currentPrintingRect = printerPageRect;
+
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(QPrinter::Millimeter), currentPrintingRect);
- currentPrintingRect.adjust(printerPageRect.size().width(), 0, printerPageRect.size().width(), 0);
+ m_renderPage.render(m_painter, QRectF(), currentPrintingRect);
curWidth += printerPageRect.size().width();
+ currentPrintingRect = QRectF(
+ curWidth, 0,
+ printerPageRect.size().width() > (pageWidth - curWidth) ? (pageWidth - curWidth) : printerPageRect.size().width(), pageHeight
+ );
}
pageHeight -= printerPageRect.size().height();
@@ -1943,7 +1899,6 @@ bool PrintProcessor::printPage(PageItemDesignIntf::Ptr page)
page->setPos(backupPagePos);
m_renderPage.removePageItem(page);
if (backupPage) backupPage->reactivatePageItem(page);
-#endif
return true;
}
@@ -1952,14 +1907,14 @@ void PrintProcessor::initPrinter(PageItemDesignIntf* page)
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 1))
if (page->oldPrintMode()){
m_printer->setPageMargins(page->leftMargin(),
- page->topMargin(),
- page->rightMargin(),
- page->bottomMargin(),
- QPrinter::Millimeter);
+ page->topMargin(),
+ page->rightMargin(),
+ page->bottomMargin(),
+ QPrinter::Millimeter);
m_printer->setOrientation(static_cast(page->pageOrientation()));
QSizeF pageSize = (page->pageOrientation()==PageItemDesignIntf::Landscape)?
- QSizeF(page->sizeMM().height(),page->sizeMM().width()):
- page->sizeMM();
+ QSizeF(page->sizeMM().height(),page->sizeMM().width()):
+ page->sizeMM();
m_printer->setPaperSize(pageSize,QPrinter::Millimeter);
} else {
m_printer->setFullPage(page->fullPage());
@@ -1968,13 +1923,13 @@ void PrintProcessor::initPrinter(PageItemDesignIntf* page)
m_printer->setOrientation(static_cast(page->pageOrientation()));
if (page->pageSize()==PageItemDesignIntf::Custom){
QSizeF pageSize = (page->pageOrientation()==PageItemDesignIntf::Landscape)?
- QSizeF(page->sizeMM().height(),page->sizeMM().width()):
- page->sizeMM();
+ QSizeF(page->sizeMM().height(),page->sizeMM().width()):
+ page->sizeMM();
if (page->getSetPageSizeToPrinter() || m_printer->outputFormat() == QPrinter::PdfFormat)
- m_printer->setPaperSize(pageSize, QPrinter::Millimeter);
+ m_printer->setPaperSize(pageSize, QPrinter::Millimeter);
} else {
if (page->getSetPageSizeToPrinter() || m_printer->outputFormat() == QPrinter::PdfFormat)
- m_printer->setPaperSize(static_cast(page->pageSize()));
+ m_printer->setPaperSize(static_cast(page->pageSize()));
}
}
#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->setPageOrientation((QPageLayout::Orientation)page->pageOrientation());
QSizeF pageSize = (page->pageOrientation()==PageItemDesignIntf::Landscape)?
- QSizeF(page->sizeMM().height(),page->sizeMM().width()):
- page->sizeMM();
+ QSizeF(page->sizeMM().height(),page->sizeMM().width()):
+ page->sizeMM();
m_printer->setPageSize(QPageSize(pageSize, QPageSize::Millimeter));
- } else {
+ } else {
m_printer->setFullPage(page->fullPage());
if (page->dropPrinterMargins())
m_printer->setPageMargins(QMarginsF(0, 0, 0, 0), QPageLayout::Point);
m_printer->setPageOrientation((QPageLayout::Orientation)page->pageOrientation());
if (page->pageSize()==PageItemDesignIntf::Custom){
QSizeF pageSize = (page->pageOrientation()==PageItemDesignIntf::Landscape)?
- QSizeF(page->sizeMM().height(),page->sizeMM().width()):
- page->sizeMM();
+ QSizeF(page->sizeMM().height(),page->sizeMM().width()):
+ page->sizeMM();
if (page->getSetPageSizeToPrinter() || m_printer->outputFormat() == QPrinter::PdfFormat)
- m_printer->setPageSize(QPageSize(pageSize, QPageSize::Millimeter));
+ m_printer->setPageSize(QPageSize(pageSize, QPageSize::Millimeter));
} else {
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
@@ -2181,4 +2136,3 @@ qreal WatermarkHelper::valueToPixels(qreal value)
}// namespace LimeReport
-
diff --git a/limereport/lrreportrender.cpp b/limereport/lrreportrender.cpp
index d412b19..39b1e9f 100644
--- a/limereport/lrreportrender.cpp
+++ b/limereport/lrreportrender.cpp
@@ -32,6 +32,7 @@
#include "lrglobal.h"
#include "lrreportrender.h"
+#include "lrgroupbands.h"
#include "lrpagedesignintf.h"
#include "lrbanddesignintf.h"
#include "lritemdesignintf.h"
@@ -66,9 +67,9 @@ bool ReportRender::isNeedToRearrangeColumnsItems()
maxHeightColumn = i;
}
if (maxHeightColumn>0 && columnItemsCount(maxHeightColumn) lastColumnItem(maxHeightColumn-1)->height()
- ){
- return true;
+ maxHeight> lastColumnItem(maxHeightColumn-1)->height()
+ ){
+ return true;
}
}
return false;
@@ -78,8 +79,8 @@ BandDesignIntf *ReportRender::lastColumnItem(int columnIndex)
{
if (columnIndex<0) return 0;
for(int i=0;icolumnIndex()>columnIndex)
- return m_columnedBandItems[i-1];
+ if (m_columnedBandItems[i]->columnIndex()>columnIndex)
+ return m_columnedBandItems[i-1];
}
return m_columnedBandItems.last();
}
@@ -90,15 +91,15 @@ void ReportRender::rearrangeColumnsItems()
qreal startHeight = columnHeigth(0);
int avg = m_columnedBandItems.size() / m_columnedBandItems[0]->columnsCount();
for (int i = 1; i < m_columnedBandItems[0]->columnsCount(); ++i){
- if (columnItemsCount(i) < avg){
- int getCount = avg * (m_columnedBandItems[0]->columnsCount()-i) - columnItemsCount(i);
- for (int j = 0; j < getCount; ++j){
- BandDesignIntf* band = lastColumnItem(i-1);
- band->setPos(band->pos().x()+band->width(),m_columnedBandItems[0]->pos().y());
- band->setColumnIndex(i);
- }
+ if (columnItemsCount(i) < avg){
+ int getCount = avg * (m_columnedBandItems[0]->columnsCount()-i) - columnItemsCount(i);
+ for (int j = 0; j < getCount; ++j){
+ BandDesignIntf* band = lastColumnItem(i-1);
+ band->setPos(band->pos().x()-30,m_columnedBandItems[0]->pos().y());
+ band->setColumnIndex(i);
+ }
- }
+ }
}
m_renderPageItem->relocateBands();
m_maxHeightByColumn[0]+=startHeight-maxColumnHeight();
@@ -122,9 +123,9 @@ qreal ReportRender::columnHeigth(int columnIndex)
{
qreal result = 0;
for(int i=0;icolumnIndex()==columnIndex)
- result += m_columnedBandItems[i]->height();
- if (m_columnedBandItems[i]->columnIndex()>columnIndex) break;
+ if (m_columnedBandItems[i]->columnIndex()==columnIndex)
+ result += m_columnedBandItems[i]->height();
+ if (m_columnedBandItems[i]->columnIndex()>columnIndex) break;
}
return result;
}
@@ -206,7 +207,7 @@ void ReportRender::analizeItem(ContentItemDesignIntf* contentItem, BandDesignInt
rx.setMinimal(true);
if (rx.indexIn(content)>=0){
functions.append(functionName);
- }
+ }
#endif
}
if (functions.size()>0)
@@ -270,7 +271,7 @@ void ReportRender::renderPage(PageItemDesignIntf* patternPage, bool isTOC, bool
startNewPage(true);
renderReportHeader(m_patternPageItem, AfterPageHeader);
-
+ m_dataSourceSorted = false;
BandDesignIntf* lastRenderedBand = 0;
for (int i=0;idataBandCount() && !m_renderCanceled; i++){
lastRenderedBand = m_patternPageItem->dataBandAt(i);
@@ -416,7 +417,7 @@ void ReportRender::extractGroupFuntionsFromItem(ContentItemDesignIntf* contentIt
if (dataBand){
GroupFunction* gf = datasources()->addGroupFunction(
functionName, captures.at(Const::VALUE_INDEX), band->objectName(), dataBand->objectName()
- );
+ );
if (gf){
connect(dataBand, SIGNAL(bandRendered(BandDesignIntf*)),
gf, SLOT(slotBandRendered(BandDesignIntf*)));
@@ -426,7 +427,7 @@ void ReportRender::extractGroupFuntionsFromItem(ContentItemDesignIntf* contentIt
} else {
GroupFunction* gf = datasources()->addGroupFunction(
functionName, captures.at(Const::VALUE_INDEX), band->objectName(), captures.at(dsIndex)
- );
+ );
gf->setInvalid(tr("Databand \"%1\" not found").arg(captures.at(dsIndex)));
}
}
@@ -474,7 +475,7 @@ void ReportRender::extractGroupFuntionsFromItem(ContentItemDesignIntf* contentIt
gf->setInvalid(tr("Wrong using function %1").arg(functionName));
}
}
- }
+ }
#endif
}
@@ -510,14 +511,14 @@ void ReportRender::replaceGroupFunctionsInItem(ContentItemDesignIntf* contentIte
QString expressionIndex = datasources()->putGroupFunctionsExpressions(captures.at(Const::VALUE_INDEX));
if (captures.size()<5){
content.replace(captures.at(0), QString("%1(%2,%3)")
- .arg(functionName).arg('"'+expressionIndex+'"').arg('"'+band->objectName()+'"'));
+ .arg(functionName).arg('"'+expressionIndex+'"').arg('"'+band->objectName()+'"'));
} else {
content.replace(captures.at(0), QString("%1(%2,%3,%4)").arg(
- functionName,
- '"'+expressionIndex+'"',
- '"'+band->objectName()+'"',
- captures.at(4)
- ));
+ functionName,
+ '"'+expressionIndex+'"',
+ '"'+band->objectName()+'"',
+ captures.at(4)
+ ));
}
}
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()+'"'));
} else {
content.replace(captures.at(0),QString("%1(%2,%3,%4)").arg(
- functionName,
- '"'+expressionIndex+'"',
- '"'+band->objectName()+'"',
- captures.at(4)
- ));
+ functionName,
+ '"'+expressionIndex+'"',
+ '"'+band->objectName()+'"',
+ captures.at(4)
+ ));
}
}
pos += rx.matchedLength();
@@ -573,8 +574,8 @@ void ReportRender::replaceGroupsFunction(BandDesignIntf *band)
QColor ReportRender::makeBackgroundColor(BandDesignIntf* band){
if (band->useAlternateBackgroundColor()){
return datasources()->variable(QLatin1String("line_") + band->objectName().toLower()).toInt() %2 == 0 ?
- band->backgroundColor() :
- band->alternateBackgroundColor();
+ band->backgroundColor() :
+ band->alternateBackgroundColor();
}
return band->backgroundColor();
}
@@ -591,12 +592,12 @@ BandDesignIntf* ReportRender::renderBand(BandDesignIntf *patternBand, BandDesign
BandDesignIntf* bandClone = 0;
if (bandData){
- bandClone = bandData;
+ bandClone = bandData;
} else {
bandClone = renderData(patternBand);
}
- if (isLast) bandClone->setBootomSpace(1);
+ if (isLast) bandClone->setBottomSpace(1);
if (mode == ForcedStartPage){
savePage();
@@ -613,7 +614,7 @@ BandDesignIntf* ReportRender::renderBand(BandDesignIntf *patternBand, BandDesign
if ( isLast && bandClone->keepFooterTogether() && bandClone->sliceLastRow() ){
if (m_maxHeightByColumn[m_currentColumn] < (bandClone->height()+m_reportFooterHeight))
m_maxHeightByColumn[m_currentColumn] -= ((m_maxHeightByColumn[m_currentColumn]-bandClone->height())+(bandClone->height()*calcSlicePercent(bandClone->height())));
- }
+ }
if (!bandClone->isEmpty() || patternBand->printIfEmpty()){
if (!registerBand(bandClone)){
@@ -645,7 +646,7 @@ BandDesignIntf* ReportRender::renderBand(BandDesignIntf *patternBand, BandDesign
patternBand->bandHeader()->columnsCount()>1 &&
!m_lostHeadersMoved &&
patternBand->bandNestingLevel() == 0
- ){
+ ){
renderBand(patternBand->bandHeader(), 0, mode);
}
} else {
@@ -697,7 +698,7 @@ void ReportRender::renderDataBand(BandDesignIntf *dataBand)
m_lastRenderedFooter = 0;
if (!dataBand->datasourceName().isEmpty())
- bandDatasource = datasources()->dataSource(dataBand->datasourceName());
+ bandDatasource = datasources()->dataSource(dataBand->datasourceName());
BandDesignIntf* header = dataBand->bandHeader();
BandDesignIntf* footer = dataBand->bandFooter();
@@ -778,7 +779,7 @@ void ReportRender::renderDataBand(BandDesignIntf *dataBand)
}
if (!dataBand->keepFooterTogether())
- m_reprintableBands.removeOne(header);
+ m_reprintableBands.removeOne(header);
if (header) recalcIfNeeded(header);
bool didGoBack = !bandDatasource->eof() && bandDatasource->prior();
@@ -812,7 +813,7 @@ void ReportRender::renderPageHeader(PageItemDesignIntf *patternPage)
if (band){
if (m_datasources->variable("#PAGE").toInt()!=1 ||
band->property("printOnFirstPage").toBool()
- )
+ )
renderBand(band, 0);
}
}
@@ -964,6 +965,14 @@ void ReportRender::renderDataHeader(BandDesignIntf *header)
void ReportRender::renderGroupHeader(BandDesignIntf *parentBand, IDataSource* dataSource, bool firstTime)
{
+ GroupBandHeader *group = dynamic_cast(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)){
IGroupBand* gb = dynamic_cast(band);
if (gb&&gb->isNeedToClose(datasources())){
@@ -1153,7 +1162,7 @@ void ReportRender::placeBandOnPage(BandDesignIntf* band, int columnIndex){
bool isMultiColumnHeader(BandDesignIntf* band){
return ( (band->columnsCount() > 1 ) &&
- (band->isHeader() &&
+ (band->isHeader() &&
((band->bandNestingLevel() == 0) || (band->columnsFillDirection() == BandDesignIntf::Horizontal))));
}
@@ -1182,7 +1191,7 @@ bool ReportRender::registerBand(BandDesignIntf *band, bool registerInChildren)
}
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 (m_currentColumn < band->columnsCount()-1)
@@ -1194,7 +1203,7 @@ bool ReportRender::registerBand(BandDesignIntf *band, bool registerInChildren)
if ((m_currentColumn !=0) &&
(m_maxHeightByColumn[0] == m_maxHeightByColumn[m_currentColumn]) &&
(m_maxHeightByColumn[0] >= band->height())
- ){
+ ){
m_currentColumn = 0;
}
}
@@ -1203,13 +1212,13 @@ bool ReportRender::registerBand(BandDesignIntf *band, bool registerInChildren)
m_currentColumn = m_currentColumn == -1 ? 0: m_currentColumn;
if ( (band->height() <= m_maxHeightByColumn[m_currentColumn]) ||
- m_patternPageItem->endlessHeight() ||
- (isMultiColumnHeader(band) && (band->height() <= m_maxHeightByColumn[0]))
- ){
+ m_patternPageItem->endlessHeight() ||
+ (isMultiColumnHeader(band) && (band->height() <= m_maxHeightByColumn[0]))
+ ){
if ( (band->bandType() == BandDesignIntf::PageFooter) ){
- for (int i=0; i < m_maxHeightByColumn.size(); ++i)
- m_maxHeightByColumn[i]+=band->height();
+ for (int i=0; i < m_maxHeightByColumn.size(); ++i)
+ m_maxHeightByColumn[i]+=band->height();
}
if ( isMultiColumnHeader(band)){
@@ -1245,7 +1254,7 @@ bool ReportRender::registerBand(BandDesignIntf *band, bool registerInChildren)
band->bandType()!=BandDesignIntf::ReportFooter &&
!list->contains(band) &&
!band->reprintOnEachPage()
- )
+ )
list->append(band);
}
@@ -1283,7 +1292,7 @@ BandDesignIntf* ReportRender::sliceBand(BandDesignIntf *band, BandDesignIntf* pa
DataBandDesignIntf* data = dynamic_cast(band);
if (isLast && data && data->keepFooterTogether() &&
band->height()sliceLastRow()
- ){
+ ){
if (band->height()>(m_maxHeightByColumn[m_currentColumn]-m_reportFooterHeight)){
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)
{
- int sliceHeight = height;
- BandDesignIntf* upperBandPart = dynamic_cast(band->cloneUpperPart(sliceHeight));
- BandDesignIntf* bottomBandPart = dynamic_cast(band->cloneBottomPart(sliceHeight));
+ //int sliceHeight = height;
+ BandDesignIntf* upperBandPart = dynamic_cast(band->cloneUpperPart(height));
+ BandDesignIntf* bottomBandPart = dynamic_cast(band->cloneBottomPart(height));
if (!bottomBandPart->isEmpty()){
if (patternBand->keepFooterTogether())
closeFooterGroup(patternBand);
@@ -1351,6 +1360,7 @@ BandDesignIntf *ReportRender::saveUppperPartReturnBottom(BandDesignIntf *band, i
bottomBandPart->copyBookmarks(band);
}
if (!upperBandPart->isEmpty()){
+ upperBandPart->setBottomSpace(0);
upperBandPart->updateItemSize(m_datasources, FirstPass, height);
registerBand(upperBandPart);
upperBandPart->copyBookmarks(band);
@@ -1366,7 +1376,7 @@ BandDesignIntf *ReportRender::saveUppperPartReturnBottom(BandDesignIntf *band, i
patternBand->bandHeader()->columnsCount()>1 &&
!m_lostHeadersMoved &&
patternBand->bandNestingLevel() == 0
- ){
+ ){
renderBand(patternBand->bandHeader(), 0, StartNewPageAsNeeded);
}
@@ -1398,6 +1408,7 @@ BandDesignIntf *ReportRender::renderData(BandDesignIntf *patternBand, bool emitB
emit(patternBand->preparedForRender());
bandClone->updateItemSize(m_datasources);
+ bandClone->setBottomSpace(patternBand->height() - patternBand->findMaxBottom());
//m_scriptEngineContext->baseDesignIntfToScript(bandClone);
emit(patternBand->afterData());
@@ -1484,7 +1495,7 @@ void ReportRender::checkFooterGroup(BandDesignIntf *groupBand)
foreach(BandDesignIntf* band, *holder){
qreal percent = band->height()*100 / m_dataAreaSize;
if (m_renderedDataBandCount<=1 || percent>20 ){
- holder->removeAll(band);
+ holder->removeAll(band);
}
}
}
@@ -1523,8 +1534,8 @@ void ReportRender::checkLostHeadersOnPrevPage()
it.toBack();
if (it.hasPrevious()){
if (it.previous()->isFooter()){
- if (it.hasPrevious()) it.previous();
- else return;
+ if (it.hasPrevious()) it.previous();
+ else return;
}
}
@@ -1561,8 +1572,8 @@ void ReportRender::checkLostHeadersInPrevColumn()
it.toBack();
if (it.hasPrevious()){
if (it.previous()->isFooter()){
- if (it.hasPrevious()) it.previous();
- else return;
+ if (it.hasPrevious()) it.previous();
+ else return;
}
}
@@ -1578,7 +1589,7 @@ void ReportRender::checkLostHeadersInPrevColumn()
if (lostHeaders.size() > 0){
m_lostHeadersMoved = true;
-// 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){
registerBand(header);
@@ -1596,7 +1607,7 @@ BandDesignIntf* ReportRender::findEnclosingGroup()
foreach(BandDesignIntf* gb, m_childBands.keys()){
if (m_childBands.value(gb)->tryToKeepTogether()&&
((gb->bandIndex()bandIndex();
}
@@ -1671,7 +1682,7 @@ void ReportRender::savePage(bool isLast)
pageHeight += band->height();
}
m_renderPageItem->setHeight(pageHeight + 10 +
- (m_patternPageItem->topMargin() + m_patternPageItem->bottomMargin()) * Const::mmFACTOR);
+ (m_patternPageItem->topMargin() + m_patternPageItem->bottomMargin()) * Const::mmFACTOR);
}
}
diff --git a/limereport/lrreportrender.h b/limereport/lrreportrender.h
index 97f818b..7529c5f 100644
--- a/limereport/lrreportrender.h
+++ b/limereport/lrreportrender.h
@@ -92,7 +92,7 @@ public:
enum BandPrintMode {PrintAlwaysPrintable, PrintNotAlwaysPrintable };
enum ResetPageNuberType{BandReset, PageReset};
enum PageRenderStage{BeforePageHeader, AfterPageHeader};
- typedef QSharedPointer Ptr;
+ typedef QSharedPointer Ptr;
~ReportRender();
ReportRender(QObject *parent = 0);
void setDatasources(DataSourceManager* value);
@@ -220,6 +220,7 @@ private:
unsigned long long m_currentNameIndex;
bool m_newPageStarted;
bool m_lostHeadersMoved;
+ bool m_dataSourceSorted = false;
};
} // namespace LimeReport
diff --git a/limereport/lrscriptenginemanager.cpp b/limereport/lrscriptenginemanager.cpp
index 31220d3..7b9562d 100644
--- a/limereport/lrscriptenginemanager.cpp
+++ b/limereport/lrscriptenginemanager.cpp
@@ -649,7 +649,7 @@ QVariant ScriptEngineManager::evaluateScript(const QString& script){
QVariant varValue;
if (script.contains(rx)){
-#else
+#else
QRegularExpression rx = getScriptRegEx();
QVariant varValue;
@@ -712,9 +712,12 @@ int ScriptEngineManager::getPageFreeSpace(PageItemDesignIntf* page){
height += band->geometry().height() * m_dataManager->dataSource(band->datasourceName())->model()->rowCount();
}
else height += band->height();
+
}
+ height += (page->topMargin() + page->bottomMargin()) * Const::mmFACTOR;
+
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)
@@ -1073,6 +1076,79 @@ bool ScriptEngineManager::createReopenDatasourceFunction()
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()
:m_model(0), m_context(0), m_dataManager(0)
{
@@ -1114,6 +1190,11 @@ ScriptEngineManager::ScriptEngineManager()
createAddTableOfContentsItemFunction();
createClearTableOfContentsFunction();
createReopenDatasourceFunction();
+ createGetFieldByRowIndexEx();
+ createGetFieldByRowIndexEx2();
+ createHeaderData();
+ createHeaderColumnNameByIndex();
+ createColumnCount();
m_model = new ScriptEngineModel(this);
}
@@ -1866,6 +1947,42 @@ QFont ScriptFunctionsManager::font(const QString &family, int pointSize, bool it
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
void ScriptFunctionsManager::addItemsToComboBox(QJSValue object, const QStringList &values)
diff --git a/limereport/lrscriptenginemanager.h b/limereport/lrscriptenginemanager.h
index d027a1a..8da2b0b 100644
--- a/limereport/lrscriptenginemanager.h
+++ b/limereport/lrscriptenginemanager.h
@@ -378,6 +378,44 @@ public:
Q_INVOKABLE void addTableOfContentsItem(const QString& uniqKey, const QString& content, int indent = 0);
Q_INVOKABLE void clearTableOfContents();
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
Q_INVOKABLE void addItemsToComboBox(QJSValue object, const QStringList& values);
Q_INVOKABLE void addItemToComboBox(QJSValue object, const QString& value);
@@ -506,6 +544,12 @@ private:
bool createAddTableOfContentsItemFunction();
bool createClearTableOfContentsFunction();
bool createReopenDatasourceFunction();
+ bool createGetFieldByRowIndexEx();
+ bool createGetFieldByRowIndexEx2();
+ bool createHeaderData();
+ bool createHeaderColumnNameByIndex();
+ bool createColumnCount();
+
private:
ScriptEngineManager();
ScriptEngineType* m_scriptEngine;
diff --git a/limereport/objectinspector/lrobjectitemmodel.cpp b/limereport/objectinspector/lrobjectitemmodel.cpp
index c0e5398..1f768d9 100644
--- a/limereport/objectinspector/lrobjectitemmodel.cpp
+++ b/limereport/objectinspector/lrobjectitemmodel.cpp
@@ -174,6 +174,8 @@ void QObjectPropertyModel::translatePropertyName()
tr("gridChartLines");
tr("horizontalAxisOnTop");
tr("mixWithPriorPage");
+ tr("shadow");
+ tr("borderStyle");
}
void QObjectPropertyModel::clearObjectsList()
diff --git a/limereport/objectinspector/propertyItems/lrenumpropitem.cpp b/limereport/objectinspector/propertyItems/lrenumpropitem.cpp
index b9a1a0c..9addfd2 100644
--- a/limereport/objectinspector/propertyItems/lrenumpropitem.cpp
+++ b/limereport/objectinspector/propertyItems/lrenumpropitem.cpp
@@ -135,9 +135,6 @@ void EnumPropItem::translateEnumItemName()
tr("Pie");
tr("VerticalBar");
tr("HorizontalBar");
- tr("LegendAlignTop");
- tr("LegendAlignCenter");
- tr("LegendAlignBottom");
tr("TitleAlignLeft");
tr("TitleAlignRight");
tr("TitleAlignCenter");
@@ -147,6 +144,31 @@ void EnumPropItem::translateEnumItemName()
tr("Inches");
tr("Scale");
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
diff --git a/limereport/scripteditor/lrcompletermodel.cpp b/limereport/scripteditor/lrcompletermodel.cpp
index 29c7116..70299f6 100644
--- a/limereport/scripteditor/lrcompletermodel.cpp
+++ b/limereport/scripteditor/lrcompletermodel.cpp
@@ -22,16 +22,17 @@ QModelIndex CompleterModel::index(int row, int column, const QModelIndex &parent
return createIndex(row, column, parentItem->child(row));
}
-QModelIndex CompleterModel::parent(const QModelIndex &child) const
-{
- if (child.isValid()){
- CompleterItem *childItem = static_cast(child.internalPointer());
- CompleterItem *parentItem = childItem->parent();
- if (parentItem != &m_root) {
- return indexFromItem(parentItem);
- }
+QModelIndex CompleterModel::parent(const QModelIndex &child) const {
+ if(child.isValid()) {
+ if(CompleterItem *childItem = static_cast(child.internalPointer());
+ childItem) {
+ CompleterItem *parentItem = childItem->parent();
+ if(parentItem != &m_root) {
+ return indexFromItem(parentItem);
+ }
}
- return QModelIndex();
+ }
+ return QModelIndex();
}
int CompleterModel::rowCount(const QModelIndex &parent) const
diff --git a/limereport/scripteditor/lrcompletermodel.h b/limereport/scripteditor/lrcompletermodel.h
index 862437a..8f218e8 100644
--- a/limereport/scripteditor/lrcompletermodel.h
+++ b/limereport/scripteditor/lrcompletermodel.h
@@ -12,7 +12,9 @@ public:
CompleterItem(QString text, QIcon icon):m_parent(0), m_text(text), m_icon(icon), m_model(0){}
~CompleterItem();
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;}
int row() const{
if (m_parent){
@@ -33,7 +35,7 @@ public:
void appendRow(CompleterItem* child);
void appendRows(const QList &children);
private:
- CompleterItem* m_parent;
+ CompleterItem* m_parent{nullptr};
QVector > m_children;
QString m_text;
QIcon m_icon;
diff --git a/limereport/serializators/lrxmlwriter.cpp b/limereport/serializators/lrxmlwriter.cpp
index fdae62c..d07d8b8 100644
--- a/limereport/serializators/lrxmlwriter.cpp
+++ b/limereport/serializators/lrxmlwriter.cpp
@@ -80,7 +80,8 @@ bool XMLWriter::setContent(QString fileName)
{
QFile xmlFile(fileName);
if (xmlFile.open(QFile::ReadOnly)){
- return m_doc->setContent(&xmlFile);
+ m_doc->setContent(&xmlFile);
+ return true;
}
return false;
}
diff --git a/translations/limereport_ar.ts b/translations/limereport_ar.ts
index f15e62e..2cef5f6 100644
--- a/translations/limereport_ar.ts
+++ b/translations/limereport_ar.ts
@@ -8,17 +8,6 @@
-
- BorderFrameEditor
-
- BorderFrameEditor
-
-
-
- Text
-
-
-
ChartAxisEditor
@@ -519,6 +508,62 @@ p, li { white-space: pre-wrap; }
Edit borders...
+
+ Align items
+
+
+
+ Align to left
+ محاذاة يسار
+
+
+ Align to right
+ محاذاة يمين
+
+
+ Align to top
+ محاذاة لأعلى
+
+
+ Align to bottom
+ محاذاة لأسفل
+
+
+ Align to horizontal center
+ محاذاة وسط (أفقي)
+
+
+ Align to vertical center
+ محاذاة وسط(عمودي)
+
+
+ Resize items
+
+
+
+ Same width
+
+
+
+ Same height
+
+
+
+ Align items to page
+
+
+
+ Align to center
+
+
+
+ cancel alignement
+
+
+
+ Align to page width
+
+
LimeReport::BorderEditor
@@ -1159,18 +1204,6 @@ p, li { white-space: pre-wrap; }
HorizontalBar
-
- LegendAlignTop
-
-
-
- LegendAlignCenter
-
-
-
- LegendAlignBottom
-
-
TitleAlignLeft
@@ -1207,6 +1240,102 @@ p, li { white-space: pre-wrap; }
Split
+
+ GridLines
+
+
+
+ Lines
+
+
+
+ Solid
+
+
+
+ NoStyle
+
+
+
+ Dashed
+
+
+
+ Dot
+
+
+
+ DashDot
+
+
+
+ DashDotDot
+
+
+
+ Doubled
+
+
+
+ LegendPoints
+
+
+
+ LegendLines
+
+
+
+ LegendAlignRightCenter
+
+
+
+ LegendAlignRightTop
+
+
+
+ LegendAlignRightBottom
+
+
+
+ LegendAlignBottomRight
+
+
+
+ LegendAlignBottomCenter
+
+
+
+ LegendAlignBottomLeft
+
+
+
+ SolidLine
+
+
+
+ NoPen
+
+
+
+ DashLine
+
+
+
+ DotLine
+
+
+
+ DashDotLine
+
+
+
+ DashDotDotLine
+
+
+
+ CustomDashLine
+
+
LimeReport::FlagsPropItem
@@ -2336,6 +2465,14 @@ p, li { white-space: pre-wrap; }
mixWithPriorPage
+
+ shadow
+
+
+
+ borderStyle
+
+
LimeReport::RectPropItem
@@ -2676,6 +2813,10 @@ p, li { white-space: pre-wrap; }
The rendering is in process
+
+ Print Report
+
+
LimeReport::ReportEnginePrivate
@@ -3056,6 +3197,18 @@ This preview is no longer valid.
RowIndex
+
+ RoleIndex
+
+
+
+ RoleName
+
+
+
+ columnIndex
+
+
LimeReport::SettingDialog
diff --git a/translations/limereport_es.ts b/translations/limereport_es.ts
index 4171599..a954f05 100644
--- a/translations/limereport_es.ts
+++ b/translations/limereport_es.ts
@@ -8,17 +8,6 @@
-
- BorderFrameEditor
-
- BorderFrameEditor
-
-
-
- Text
-
-
-
ChartAxisEditor
@@ -647,6 +636,62 @@ p, li { white-space: pre-wrap; }
Edit borders...
+
+ Align items
+
+
+
+ Align to left
+ Alinear a la izquierda
+
+
+ Align to right
+ Alinear a la derecha
+
+
+ Align to top
+ Alinear arriba
+
+
+ Align to bottom
+ Alinear abajo
+
+
+ Align to horizontal center
+ Centrar horizontalmente
+
+
+ Align to vertical center
+ Centrar verticalmente
+
+
+ Resize items
+
+
+
+ Same width
+
+
+
+ Same height
+
+
+
+ Align items to page
+
+
+
+ Align to center
+
+
+
+ cancel alignement
+
+
+
+ Align to page width
+
+
LimeReport::BorderEditor
@@ -1287,18 +1332,6 @@ p, li { white-space: pre-wrap; }
HorizontalBar
Barra horizontal
-
- LegendAlignTop
- Alinear Leyenda Arriba
-
-
- LegendAlignCenter
- Centrar leyenda
-
-
- LegendAlignBottom
- Alinear Leyenda Abajo
-
TitleAlignLeft
Alinear titulo a la izquierda
@@ -1335,6 +1368,102 @@ p, li { white-space: pre-wrap; }
Split
+
+ GridLines
+
+
+
+ Lines
+
+
+
+ Solid
+
+
+
+ NoStyle
+
+
+
+ Dashed
+
+
+
+ Dot
+
+
+
+ DashDot
+
+
+
+ DashDotDot
+
+
+
+ Doubled
+
+
+
+ LegendPoints
+
+
+
+ LegendLines
+
+
+
+ LegendAlignRightCenter
+
+
+
+ LegendAlignRightTop
+
+
+
+ LegendAlignRightBottom
+
+
+
+ LegendAlignBottomRight
+
+
+
+ LegendAlignBottomCenter
+
+
+
+ LegendAlignBottomLeft
+
+
+
+ SolidLine
+
+
+
+ NoPen
+
+
+
+ DashLine
+
+
+
+ DotLine
+
+
+
+ DashDotLine
+
+
+
+ DashDotDotLine
+
+
+
+ CustomDashLine
+
+
LimeReport::FlagsPropItem
@@ -2464,6 +2593,14 @@ p, li { white-space: pre-wrap; }
mixWithPriorPage
+
+ shadow
+
+
+
+ borderStyle
+
+
LimeReport::RectPropItem
@@ -2804,6 +2941,10 @@ p, li { white-space: pre-wrap; }
The rendering is in process
+
+ Print Report
+
+
LimeReport::ReportEnginePrivate
@@ -3186,6 +3327,18 @@ Esta vista previa ya no es válida.
RowIndex
Índice de fila
+
+ RoleIndex
+
+
+
+ RoleName
+
+
+
+ columnIndex
+
+
LimeReport::SettingDialog
diff --git a/translations/limereport_fr.ts b/translations/limereport_fr.ts
index 28c4a61..88af34f 100644
--- a/translations/limereport_fr.ts
+++ b/translations/limereport_fr.ts
@@ -9,19 +9,6 @@
-
- BorderFrameEditor
-
-
- BorderFrameEditor
-
-
-
-
- Text
-
-
-
ChartAxisEditor
@@ -443,123 +430,123 @@ p, li { white-space: pre-wrap; }
LimeReport::BandDesignIntf
-
+
DataBand
bande de données
-
+
DataHeaderBand
En-tête de données
-
+
DataFooterBand
Pied de données
-
+
ReportHeader
En-tête de rapport
-
+
ReportFooter
Pied de rapport
-
+
PageHeader
En-tête de page
-
+
PageFooter
Pied de page
-
+
SubDetailBand
Sous-détails
-
+
SubDetailHeaderBand
En-tête de sous-détails
-
+
SubDetailFooterBand
Pied de sous-détails
-
+
GroupBandHeader
Groupe d'en-tête
-
+
GroupBandFooter
Groupe de pieds
-
+
TearOffBand
Bande détachable
-
+
connected to
Connecté à
-
+
Bring to top
Placer au premier-plan
-
+
Send to back
Placer en arrière-plan
-
+
Cut
Couper
-
+
Copy
Copier
-
-
+
+
Auto height
Hauteur automatique
-
-
+
+
Splittable
Divisible
-
+
+
-
Keep top space
Conserver l'espace supérieur
-
-
+
+
Keep bottom space
Conserver l'espace inférieur
-
-
+
+
Print if empty
Imprimer si vide
@@ -567,61 +554,133 @@ p, li { white-space: pre-wrap; }
LimeReport::BaseDesignIntf
-
-
+
+
Lock item geometry
Verrouiller la géométrie d'un élément
-
+
Copy
Copier
-
+
Cut
Couper
-
+
Paste
Coller
-
+
Bring to top
Placer au premier-plan
-
+
Send to back
Placer en arrière-plan
-
+
Create Horizontal Layout
Créer une disposition horizontale
-
+
Create Vertical Layout
Créer une disposition verticale
-
+
No borders
Aucune bordure
-
+
All borders
Toutes les bordures
-
+
Edit borders...
+
+
+ Align items
+
+
+
+
+
+ Align to left
+ Aligner à gauche
+
+
+
+
+ Align to right
+ Aligner à droite
+
+
+
+ Align to top
+ Aligner en haut
+
+
+
+ Align to bottom
+ Aligner en bas
+
+
+
+ Align to horizontal center
+ Aligner au centre horizontal
+
+
+
+ Align to vertical center
+ Aligner au centre vertical
+
+
+
+ Resize items
+
+
+
+
+ Same width
+
+
+
+
+ Same height
+
+
+
+
+ Align items to page
+
+
+
+
+ Align to center
+
+
+
+
+ cancel alignement
+
+
+
+
+ Align to page width
+
+
LimeReport::BorderEditor
@@ -771,8 +830,8 @@ p, li { white-space: pre-wrap; }
LimeReport::ConnectionDesc
-
-
+
+
defaultConnection
Connexion par défaut
@@ -1456,63 +1515,168 @@ p, li { white-space: pre-wrap; }
HorizontalBar
Barre horizontale
+
+
+ GridLines
+
+
+
+
+ Lines
+
+
+
+
+ Solid
+
+
+
+
+ NoStyle
+
+
+
+
+ Dashed
+
+
+
+
+ Dot
+
+
+
+
+ DashDot
+
+
+
+
+ DashDotDot
+
+
+
+
+ Doubled
+
+
+
+
+ LegendPoints
+
+
+
+
+ LegendLines
+
+
+
+
+ LegendAlignRightCenter
+
+
+
+
+ LegendAlignRightTop
+
+
+
+
+ LegendAlignRightBottom
+
+
+
+
+ LegendAlignBottomRight
+
+
+
+
+ LegendAlignBottomCenter
+
+
+
+
+ LegendAlignBottomLeft
+
+
+
+
+ SolidLine
+
+
+
+
+ NoPen
+
+
+
+
+ DashLine
+
+
+
+
+ DotLine
+
+
+
+
+ DashDotLine
+
+
+
+
+ DashDotDotLine
+
+
+
+
+ CustomDashLine
+
+
- LegendAlignTop
- Aligner la légende en haut
-
-
-
- LegendAlignCenter
- Aligner la légende au centre
-
-
-
- LegendAlignBottom
- Aligner la légende en bas
-
-
-
TitleAlignLeft
Aligner le titre à gauche
-
+
TitleAlignRight
Aligner le titre à droite
-
+
TitleAlignCenter
Aligner le titre au centre
-
+
Layout
Disposition
-
+
Table
Tableau
-
+
Millimeters
Millimètres
-
+
Inches
Pouces
-
+
Scale
Échèlle
-
+
Split
Diviser
@@ -1599,7 +1763,7 @@ p, li { white-space: pre-wrap; }
LimeReport::GroupBandFooter
-
+
GroupFooter
Pied de groupe
@@ -1612,12 +1776,12 @@ p, li { white-space: pre-wrap; }
En-tête de groupe
-
+
Group field not found
Champ de groupe non trouvé
-
+
Datasource "%1" not found!
Source de donnée "%1" introuvable!
@@ -1782,12 +1946,12 @@ p, li { white-space: pre-wrap; }
LimeReport::MasterDetailProxyModel
-
+
Field: "%1" not found in "%2" child datasource
Le champ: "%1"est introuvable dans la source de donnée enfant "%2"
-
+
Field: "%1" not found in "%2" master datasource
Le champ: "%1"est introuvable dans la source de donnée principale "%2"
@@ -1795,7 +1959,7 @@ p, li { white-space: pre-wrap; }
LimeReport::ModelToDataSource
-
+
model is destroyed
Le modèle a été supprimé
@@ -1978,43 +2142,43 @@ p, li { white-space: pre-wrap; }
LimeReport::PageItemDesignIntf
-
-
+
+
Edit
Edition
-
+
Paste
Coller
-
-
+
+
Page is TOC
Table de contenus
-
-
+
+
Reset page number
Réinitialiser le numéro de page
-
-
+
+
Full page
Page entière
-
-
+
+
Set page size to printer
Adapterr la taille de la page à l'imprimante
-
-
+
+
Mix with prior page
@@ -2234,7 +2398,7 @@ p, li { white-space: pre-wrap; }
LimeReport::ProxyHolder
-
+
Datasource has been invalidated
La source de donnée n'a pas été validée
@@ -2919,17 +3083,27 @@ p, li { white-space: pre-wrap; }
-
+
+ shadow
+
+
+
+
+ borderStyle
+
+
+
+
Property Name
Propriété
-
+
Property value
Valeur
-
+
Warning
Avertissement
@@ -2996,7 +3170,7 @@ p, li { white-space: pre-wrap; }
LimeReport::ReportDesignWindow
-
+
Rendered %1 pages
%1 pages préparées
@@ -3106,259 +3280,264 @@ p, li { white-space: pre-wrap; }
Afficher l'aperçu du rapport
-
+
+ Print Report
+
+
+
+
Edit layouts mode
Modifier le mode de mise en forme
-
+
Horizontal layout
Mise en page horizontale
-
+
Vertical layout
Disposition verticale
-
+
About
A propos
-
+
Hide left panel | Alt+L
Masquer le volet gauche
-
+
Hide right panel | Alt+R
Masquer le volet droite
-
+
Delete dialog
Supprimer la boite du dialogue
-
+
Add new dialog
Ajouter une boite de dialogue
-
+
Lock selected items
Verrouiller les éléments sélectionnés
-
+
Unlock selected items
Déverrouiller les éléments sélectionnés
-
+
Select one level items
Sélectionner un niveau d'éléments
-
+
Report Tools
Outils de rapport
-
+
Main Tools
Outils principales
-
+
Font
Police
-
+
Text alignment
Alignement de texte
-
+
Items alignment
Alignement des éléments
-
+
Borders
Bordures
-
+
Report bands
Bandesde rapport
-
+
Report Header
En-tête du rapport
-
+
Report Footer
Pied de rapport
-
+
Page Header
En-tête de page
-
+
Page Footer
Pied de page
-
+
Data
Données
-
+
Data Header
En-tête de données
-
+
Data Footer
Pied de données
-
+
SubDetail
Sous-détails
-
+
SubDetailHeader
En-tête de sous-détails
-
+
SubDetailFooter
Pied de sous-détails
-
+
GroupHeader
En-tête de groupe
-
+
GroupFooter
Pied de groupe
-
+
Tear-off Band
Bande détachable
-
+
File
Fichier
-
+
Edit
Edition
-
+
Info
-
+
Recent Files
Fichiers récents
-
-
+
+
Object Inspector
Inspecteur d'objets
-
+
Report structure
Structure du rapport
-
+
Widget Box
Boite de Widget
-
+
Property Editor
Editeur de propriété
-
+
Action Editor
Editeur d'action
-
+
Resource Editor
Editeur de ressource
-
+
SignalSlot Editor
Editeur de Signaux & Slots
-
+
Dialog Designer Tools
Boite à outils du Designer
-
+
Data Browser
Navigateur de données
-
+
Script Browser
Navigateur de script
-
+
Report has been modified! Do you want save the report?
Le rapport a été modifié! Voulez-vous l'enregistrer?
-
-
+
+
Report file name
Nom du fichier du rapport
-
+
Attention
Attention
-
+
The rendering is in process
La préparation du rapport est en cours
-
+
Warning
Avertissement
-
+
File "%1" not found!
Fichier "%1" introuvable!
@@ -3424,26 +3603,26 @@ Cet aperçu n'est plus valide.
LimeReport::ReportRender
-
-
-
+
+
+
Error
Erreur
-
+
page index out of range
Indice de la page dépassé
-
-
+
+
Databand "%1" not found
Bande de données "%1 introuvable
-
-
+
+
Wrong using function %1
Utilisation incorrecte de la fonction "%1"
@@ -3709,13 +3888,13 @@ Cet aperçu n'est plus valide.
LimeReport::ScriptEngineContext
-
+
Dialog with name: %1 can`t be created
Le dialogue avec le nom "%1" ne peut pas être crée
-
-
+
+
Error
Erreur
@@ -3728,20 +3907,20 @@ Cet aperçu n'est plus valide.
Fonctions de groupe
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
Value
Valeur
-
+
BandName
Nom de la bande
@@ -3752,7 +3931,10 @@ Cet aperçu n'est plus valide.
-
+
+
+
+
FieldName
Nom du champ
@@ -3769,123 +3951,148 @@ Cet aperçu n'est plus valide.
Champ "%1 introuvable dans %2!
-
+
SYSTEM
Système
-
-
-
+
+
+
NUMBER
Nombre
-
-
-
-
-
+
+
+
+
+
Format
-
+
Precision
Précision
-
-
-
-
+
+
+
+
Locale
Local
-
-
-
-
-
-
+
+
+
+
+
+
DATE&TIME
Date&Heure
-
+
CurrencySymbol
Symbolde de la monnaie
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
GENERAL
General
-
-
-
+
+
+
Name
Nom
-
+
Datasource
Source de donnée
-
+
ValueField
Valeur
-
+
KeyField
Clé
-
+
KeyFieldValue
Valeur de la clé
-
+
+
+
RowIndex
-
-
-
+
+
+
Unique identifier
Identifiant unique
-
-
+
+
Content
Contenu
-
+
Indent
Indenter
-
+
+
+
datasourceName
Nom de source de donnée
+
+
+ RoleIndex
+
+
+
+
+
+ RoleName
+
+
+
+
+ columnIndex
+
+
LimeReport::SettingDialog
@@ -4029,66 +4236,66 @@ Cet aperçu n'est plus valide.
LimeReport::TextItem
-
-
+
+
Edit
Edition
-
-
+
+
Auto height
Hauteur automatique
-
-
+
+
Allow HTML
Interpréter HTML
-
-
+
+
Allow HTML in fields
Interpréter HTML dans les champs
-
-
+
+
Stretch to max height
Etirer à la hauteur maximale
-
-
+
+
Transparent
Transparent
-
-
+
+
Watermark
Filigrane
-
-
+
+
Hide if empty
Masquer si vide
-
-
+
+
Error
Erreur
-
+
TextItem " %1 " already has folower " %2 "
L'élément texte " %1 " a toujours un copain " %2 "
-
+
TextItem " %1 " not found!
Elément "%1" introuvable!
@@ -4336,27 +4543,27 @@ Cet aperçu n'est plus valide.
Connexion invalidé %1
-
+
Master datasource "%1" not found!
Source de donnée principale "%1" introuvable!
-
+
Master datasouce "%1" not found!
Source de donnée principale "%1" introuvable!
-
+
Child
Enfant
-
+
and child
est enfant
-
+
datasouce "%1" not found!
Source de donnée "%1" introuvable!
@@ -4472,29 +4679,29 @@ Cet aperçu n'est plus valide.
-
-
+
+
Attention!
-
-
+
+
Selected elements have different parent containers
Les éléments sélectionnés ont un parent différent
-
+
Object with name %1 already exists!
L'objet avec le nom "%1" existe déja!
-
+
Function %1 not found or have wrong arguments
La fonction %1 est introuvable ou contient des paramètres incorrects
-
+
Datasource manager not found
Gestionnaire de source de donnée introuvable
diff --git a/translations/limereport_pl.ts b/translations/limereport_pl.ts
index 071166e..96c10d7 100644
--- a/translations/limereport_pl.ts
+++ b/translations/limereport_pl.ts
@@ -9,19 +9,6 @@
-
- BorderFrameEditor
-
-
- BorderFrameEditor
-
-
-
-
- Text
-
-
-
ChartAxisEditor
@@ -455,123 +442,123 @@ p, li { white-space: pre-wrap; }
LimeReport::BandDesignIntf
-
+
DataBand
Sekcja danych
-
+
DataHeaderBand
Nagłówek sekcji danych
-
+
DataFooterBand
Stopka sekcji danych
-
+
ReportHeader
Nagłówek raportu
-
+
ReportFooter
Stopka raportu
-
+
PageHeader
Nagłówek strony
-
+
PageFooter
Stopka strony
-
+
SubDetailBand
Podsekcja danych
-
+
SubDetailHeaderBand
Podsekcja danych nagłówek
-
+
SubDetailFooterBand
Podsekcja danych stopka
-
+
GroupBandHeader
Nagłówek sekcji grupowania
-
+
GroupBandFooter
Stopka sekcji grupowania
-
+
TearOffBand
Urwanie sekcji
-
+
connected to
połączony do
-
+
Bring to top
Przenieś na górę
-
+
Send to back
Przenieś na dół
-
+
Cut
Wytnij
-
+
Copy
Kopiuj
-
-
+
+
Auto height
Automatyczna wysokość
-
-
+
+
Splittable
Rozdzielane
-
+
+
-
Keep top space
-
-
+
+
Keep bottom space
Zachowaj dolną przestrzeń
-
-
+
+
Print if empty
Drukuj jeśli pusty
@@ -579,61 +566,133 @@ p, li { white-space: pre-wrap; }
LimeReport::BaseDesignIntf
-
-
+
+
Lock item geometry
Zablokuj geometrię pozycji
-
+
Copy
Kopiuj
-
+
Cut
Wytnij
-
+
Paste
Wklej
-
+
Bring to top
Przenieś na górę
-
+
Send to back
Przenieś na dół
-
+
Create Horizontal Layout
Utwórz układ poziomy
-
+
Create Vertical Layout
Utwórz układ pionowy
-
+
No borders
Bez obramowania
-
+
All borders
Pełne obramowanie
-
+
Edit borders...
+
+
+ Align items
+
+
+
+
+
+ Align to left
+ Wyrównaj do lewej
+
+
+
+
+ Align to right
+ Wyrównaj do prawej
+
+
+
+ Align to top
+ Wyrównaj do góry
+
+
+
+ Align to bottom
+ Wyrównaj do dołu
+
+
+
+ Align to horizontal center
+ Wyrównaj do środka poziomo
+
+
+
+ Align to vertical center
+ Wyrównaj do środka pionowo
+
+
+
+ Resize items
+
+
+
+
+ Same width
+
+
+
+
+ Same height
+
+
+
+
+ Align items to page
+
+
+
+
+ Align to center
+
+
+
+
+ cancel alignement
+
+
+
+
+ Align to page width
+
+
LimeReport::BorderEditor
@@ -783,8 +842,8 @@ p, li { white-space: pre-wrap; }
LimeReport::ConnectionDesc
-
-
+
+
defaultConnection
Domyślne połączenie
@@ -1468,63 +1527,168 @@ p, li { white-space: pre-wrap; }
HorizontalBar
Pasek poziomy
+
+
+ GridLines
+
+
+
+
+ Lines
+
+
+
+
+ Solid
+
+
+
+
+ NoStyle
+
+
+
+
+ Dashed
+
+
+
+
+ Dot
+
+
+
+
+ DashDot
+
+
+
+
+ DashDotDot
+
+
+
+
+ Doubled
+
+
+
+
+ LegendPoints
+
+
+
+
+ LegendLines
+
+
+
+
+ LegendAlignRightCenter
+
+
+
+
+ LegendAlignRightTop
+
+
+
+
+ LegendAlignRightBottom
+
+
+
+
+ LegendAlignBottomRight
+
+
+
+
+ LegendAlignBottomCenter
+
+
+
+
+ LegendAlignBottomLeft
+
+
+
+
+ SolidLine
+
+
+
+
+ NoPen
+
+
+
+
+ DashLine
+
+
+
+
+ DotLine
+
+
+
+
+ DashDotLine
+
+
+
+
+ DashDotDotLine
+
+
+
+
+ CustomDashLine
+
+
- LegendAlignTop
- Wyrównaj do góry legendę
-
-
-
- LegendAlignCenter
- Wyśrodkuj legendę
-
-
-
- LegendAlignBottom
- Wyrównaj do dołu legendę
-
-
-
TitleAlignLeft
Wyrównaj do lewej tytuł
-
+
TitleAlignRight
Wyrównaj do prawej tytuł
-
+
TitleAlignCenter
Wyśrodkuj tytuł
-
+
Layout
Układ
-
+
Table
Tabela
-
+
Millimeters
Milimetry
-
+
Inches
Cale
-
+
Scale
Skala
-
+
Split
Podział
@@ -1611,7 +1775,7 @@ p, li { white-space: pre-wrap; }
LimeReport::GroupBandFooter
-
+
GroupFooter
Stopka grupująca
@@ -1624,12 +1788,12 @@ p, li { white-space: pre-wrap; }
Nagłówek grupujący
-
+
Group field not found
Pole grupujące nie znalezione
-
+
Datasource "%1" not found!
Źródło danych "%1" nie znalezione!
@@ -1794,12 +1958,12 @@ p, li { white-space: pre-wrap; }
LimeReport::MasterDetailProxyModel
-
+
Field: "%1" not found in "%2" child datasource
Pole: "%1" nie znalezione w "%2" źródle danch dziecka
-
+
Field: "%1" not found in "%2" master datasource
Pole: "%1" nie znalezione w "%2" głównym źródle danch
@@ -1807,7 +1971,7 @@ p, li { white-space: pre-wrap; }
LimeReport::ModelToDataSource
-
+
model is destroyed
Model danych jest zniszczony
@@ -1990,43 +2154,43 @@ p, li { white-space: pre-wrap; }
LimeReport::PageItemDesignIntf
-
-
+
+
Edit
Edycja
-
+
Paste
Wklej
-
-
+
+
Page is TOC
Strona to spis treści
-
-
+
+
Reset page number
Zresetuj numer strony
-
-
+
+
Full page
Cała strona
-
-
+
+
Set page size to printer
Ustaw rozmiar strony na drukarkę
-
-
+
+
Mix with prior page
@@ -2246,7 +2410,7 @@ p, li { white-space: pre-wrap; }
LimeReport::ProxyHolder
-
+
Datasource has been invalidated
Źródło danych zostało unieważnione
@@ -2931,17 +3095,27 @@ p, li { white-space: pre-wrap; }
-
+
+ shadow
+
+
+
+
+ borderStyle
+
+
+
+
Property Name
Nazwa właściwości
-
+
Property value
Wartość właściwości
-
+
Warning
Uwaga
@@ -3008,7 +3182,7 @@ p, li { white-space: pre-wrap; }
LimeReport::ReportDesignWindow
-
+
Rendered %1 pages
@@ -3118,259 +3292,264 @@ p, li { white-space: pre-wrap; }
Renderuj raport
-
+
+ Print Report
+
+
+
+
Edit layouts mode
Edytuj tryb układu
-
+
Horizontal layout
Układ poziomy
-
+
Vertical layout
Układ pionowy
-
+
About
O
-
+
Hide left panel | Alt+L
Ukryj lewy panel | Alt+L
-
+
Hide right panel | Alt+R
Ukryj prawy panel | Alt+R
-
+
Delete dialog
Dialog kasowania
-
+
Add new dialog
Dodaj nowy dialog
-
+
Lock selected items
Zablokuj zaznaczone elementy
-
+
Unlock selected items
Odblokuj zaznaczone elementy
-
+
Select one level items
Wybierz elementy na jednym poziomie
-
+
Report Tools
Narzędzia raportu
-
+
Main Tools
Główne narzędzia
-
+
Font
Czcionka
-
+
Text alignment
Wyrównanie tekstu
-
+
Items alignment
Wyrównanie elementów
-
+
Borders
Krawędzie
-
+
Report bands
Pasma raportu
-
+
Report Header
Nagłówek raportu
-
+
Report Footer
Stopka raportu
-
+
Page Header
Nagłówek strony
-
+
Page Footer
Stopka strony
-
+
Data
Dane
-
+
Data Header
Nagłówek danych
-
+
Data Footer
Stopka danych
-
+
SubDetail
Pod szczegóły
-
+
SubDetailHeader
Nagłówek pod szczegółów
-
+
SubDetailFooter
Stopka pod szczegółów
-
+
GroupHeader
Nagłówek grupujący
-
+
GroupFooter
Stopka grupująca
-
+
Tear-off Band
Sekcja zrywająca
-
+
File
Plik
-
+
Edit
Edycja
-
+
Info
Informacja
-
+
Recent Files
Ostatnie pliki
-
-
+
+
Object Inspector
Inspektor obiektów
-
+
Report structure
Struktura raportu
-
+
Widget Box
Pudełko widżetów
-
+
Property Editor
Edytor właściowości
-
+
Action Editor
Edytor akcji
-
+
Resource Editor
Edytor zasobów
-
+
SignalSlot Editor
Edytor sygnałów i slotów
-
+
Dialog Designer Tools
Narzędzia projektowania dialogów
-
+
Data Browser
Przeglądarka danych
-
+
Script Browser
Przeglądarka skryptów
-
+
Report has been modified! Do you want save the report?
Raport został zmodyfikowany! Czy chcesz zapisać raport?
-
-
+
+
Report file name
Nazwa pliku raportu
-
+
Attention
Uwaga
-
+
The rendering is in process
-
+
Warning
Ostrzeżenie
-
+
File "%1" not found!
Plik "%1" nie znaleziony!
@@ -3436,26 +3615,26 @@ Ten podgląd nie jest już prawidłowy.
LimeReport::ReportRender
-
-
-
+
+
+
Error
Błąd
-
+
page index out of range
indeks strony poza zakresem
-
-
+
+
Databand "%1" not found
Sekcja danych "%1" nie znaleziona
-
-
+
+
Wrong using function %1
Złe użycie funkcji %1
@@ -3721,13 +3900,13 @@ Ten podgląd nie jest już prawidłowy.
LimeReport::ScriptEngineContext
-
+
Dialog with name: %1 can`t be created
Okno dialogowe z nazwą:%1 nie można utworzyć
-
-
+
+
Error
Błąd
@@ -3740,20 +3919,20 @@ Ten podgląd nie jest już prawidłowy.
FUNKCJE GRUPUJĄCE
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
Value
Wartość
-
+
BandName
Nazwa sekcji
@@ -3764,7 +3943,10 @@ Ten podgląd nie jest już prawidłowy.
-
+
+
+
+
FieldName
Nazwa pola
@@ -3781,120 +3963,145 @@ Ten podgląd nie jest już prawidłowy.
Pole %1 nie znalezione w %2!
-
+
SYSTEM
SYSTEM
-
-
-
+
+
+
NUMBER
LICZBA
-
-
-
-
-
+
+
+
+
+
Format
Format
-
+
Precision
Precyzja
-
-
-
-
+
+
+
+
Locale
Ustawienia lokalne
-
-
-
-
-
-
+
+
+
+
+
+
DATE&TIME
Data i czas
-
+
Datasource
Źródło danych
-
+
ValueField
Pole wartości
-
+
KeyField
Pole klucza
-
+
KeyFieldValue
Wartość pola klucza
-
+
+
+
RowIndex
Indeks wiersza
-
-
-
+
+
+
Unique identifier
Unikalny identyfikator
-
-
+
+
Content
Zawartość
-
+
Indent
Akapit
-
+
+
+
datasourceName
Nazwa źródła danych
-
+
+ RoleIndex
+
+
+
+
+
+ RoleName
+
+
+
+
+ columnIndex
+
+
+
+
CurrencySymbol
Symbol waluty
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
GENERAL
OGÓLNY
-
-
-
+
+
+
Name
Nazwa
@@ -4041,66 +4248,66 @@ Ten podgląd nie jest już prawidłowy.
LimeReport::TextItem
-
-
+
+
Edit
Edycja
-
-
+
+
Auto height
Automatyczna wysokość
-
-
+
+
Allow HTML
Zezwalaj HTML
-
-
+
+
Allow HTML in fields
Zezwalaj HTML w polach
-
-
+
+
Stretch to max height
Rozciągnij się do maksymalnej wysokości
-
-
+
+
Transparent
Przezroczysty
-
-
+
+
Watermark
Znak wodny
-
-
+
+
Hide if empty
Ukryj jeśli pusty
-
-
+
+
Error
Błąd
-
+
TextItem " %1 " already has folower " %2 "
Pole tekstowe " %1 " już ma folower " %2 "
-
+
TextItem " %1 " not found!
Nie znaleziono pole tekstowego "%1"!
@@ -4348,27 +4555,27 @@ Ten podgląd nie jest już prawidłowy.
Nieprawidłowe połączenie! %1
-
+
Master datasource "%1" not found!
Nie znaleziono głównego źródła danych "%1"!
-
+
Master datasouce "%1" not found!
Nie znaleziono głównego źródła danych "%1"!
-
+
Child
Dziecko
-
+
and child
i dziecko
-
+
datasouce "%1" not found!
nie znaleziono źródła danych "%1"!
@@ -4484,29 +4691,29 @@ Ten podgląd nie jest już prawidłowy.
Ciąg znaków
-
-
+
+
Attention!
Uwaga!
-
-
+
+
Selected elements have different parent containers
Wybrane elementy mają różne pojemniki nadrzędne
-
+
Object with name %1 already exists!
Obiekt o nazwie %1 już istnieje!
-
+
Function %1 not found or have wrong arguments
Funkcja %1 nie znaleziona lub ma błędne argumenty
-
+
Datasource manager not found
Nie znaleziono menedżera źródła danych
diff --git a/translations/limereport_ru.qm b/translations/limereport_ru.qm
index c90174a..b060962 100644
Binary files a/translations/limereport_ru.qm and b/translations/limereport_ru.qm differ
diff --git a/translations/limereport_ru.ts b/translations/limereport_ru.ts
index ca3444c..9cac29d 100644
--- a/translations/limereport_ru.ts
+++ b/translations/limereport_ru.ts
@@ -8,17 +8,6 @@
$ClassName$
-
- BorderFrameEditor
-
- BorderFrameEditor
-
-
-
- Text
-
-
-
ChartAxisEditor
@@ -524,6 +513,62 @@ p, li { white-space: pre-wrap; }
Edit borders...
+
+ Align items
+
+
+
+ Align to left
+ Выровнять по левому краю
+
+
+ Align to right
+ Выровнять по правому краю
+
+
+ Align to top
+ Выровнять по верхнему краю
+
+
+ Align to bottom
+ Выровнять по нижнему краю
+
+
+ Align to horizontal center
+ Центрировать горизонтально
+
+
+ Align to vertical center
+ Центрировать вертикально
+
+
+ Resize items
+
+
+
+ Same width
+
+
+
+ Same height
+
+
+
+ Align items to page
+
+
+
+ Align to center
+
+
+
+ cancel alignement
+
+
+
+ Align to page width
+
+
LimeReport::BorderEditor
@@ -1172,18 +1217,6 @@ p, li { white-space: pre-wrap; }
HorizontalBar
Горизонтальная панель
-
- LegendAlignTop
- Легенда сверху
-
-
- LegendAlignCenter
- Легенда по центру
-
-
- LegendAlignBottom
- Легенда снизу
-
TitleAlignLeft
Название слева
@@ -1212,6 +1245,102 @@ p, li { white-space: pre-wrap; }
Split
Разделить
+
+ GridLines
+
+
+
+ Lines
+
+
+
+ Solid
+
+
+
+ NoStyle
+
+
+
+ Dashed
+
+
+
+ Dot
+
+
+
+ DashDot
+
+
+
+ DashDotDot
+
+
+
+ Doubled
+
+
+
+ LegendPoints
+
+
+
+ LegendLines
+
+
+
+ LegendAlignRightCenter
+
+
+
+ LegendAlignRightTop
+
+
+
+ LegendAlignRightBottom
+
+
+
+ LegendAlignBottomRight
+
+
+
+ LegendAlignBottomCenter
+
+
+
+ LegendAlignBottomLeft
+
+
+
+ SolidLine
+
+
+
+ NoPen
+
+
+
+ DashLine
+
+
+
+ DotLine
+
+
+
+ DashDotLine
+
+
+
+ DashDotDotLine
+
+
+
+ CustomDashLine
+
+
LimeReport::FlagsPropItem
@@ -2341,6 +2470,14 @@ p, li { white-space: pre-wrap; }
horizontalAxisOnTop
+
+ shadow
+
+
+
+ borderStyle
+
+
LimeReport::RectPropItem
@@ -2681,6 +2818,10 @@ p, li { white-space: pre-wrap; }
The rendering is in process
Отчет находится в процессе создания
+
+ Print Report
+
+
LimeReport::ReportEnginePrivate
@@ -3061,6 +3202,18 @@ This preview is no longer valid.
RowIndex
Индекс строки
+
+ RoleIndex
+
+
+
+ RoleName
+
+
+
+ columnIndex
+
+
LimeReport::SettingDialog
diff --git a/translations/limereport_zh.ts b/translations/limereport_zh.ts
index 264fe9a..2942150 100644
--- a/translations/limereport_zh.ts
+++ b/translations/limereport_zh.ts
@@ -8,17 +8,6 @@
$ClassName$
-
- BorderFrameEditor
-
- BorderFrameEditor
-
-
-
- Text
-
-
-
ChartAxisEditor
@@ -531,6 +520,62 @@ p, li { white-space: pre-wrap; }
Edit borders...
+
+ Align items
+
+
+
+ Align to left
+ 左对齐
+
+
+ Align to right
+ 右对齐
+
+
+ Align to top
+ 顶部对齐
+
+
+ Align to bottom
+ 底部对齐
+
+
+ Align to horizontal center
+ 水平居中
+
+
+ Align to vertical center
+ 居中对齐
+
+
+ Resize items
+
+
+
+ Same width
+
+
+
+ Same height
+
+
+
+ Align items to page
+
+
+
+ Align to center
+
+
+
+ cancel alignement
+
+
+
+ Align to page width
+
+
LimeReport::BorderEditor
@@ -1171,18 +1216,6 @@ p, li { white-space: pre-wrap; }
HorizontalBar
条形图
-
- LegendAlignTop
- 图例靠上对齐
-
-
- LegendAlignCenter
- 图例居中
-
-
- LegendAlignBottom
- 图例靠下对齐
-
TitleAlignLeft
标题左对齐
@@ -1219,6 +1252,102 @@ p, li { white-space: pre-wrap; }
Split
划分
+
+ GridLines
+
+
+
+ Lines
+
+
+
+ Solid
+
+
+
+ NoStyle
+
+
+
+ Dashed
+
+
+
+ Dot
+
+
+
+ DashDot
+
+
+
+ DashDotDot
+
+
+
+ Doubled
+
+
+
+ LegendPoints
+
+
+
+ LegendLines
+
+
+
+ LegendAlignRightCenter
+
+
+
+ LegendAlignRightTop
+
+
+
+ LegendAlignRightBottom
+
+
+
+ LegendAlignBottomRight
+
+
+
+ LegendAlignBottomCenter
+
+
+
+ LegendAlignBottomLeft
+
+
+
+ SolidLine
+
+
+
+ NoPen
+
+
+
+ DashLine
+
+
+
+ DotLine
+
+
+
+ DashDotLine
+
+
+
+ DashDotDotLine
+
+
+
+ CustomDashLine
+
+
LimeReport::FlagsPropItem
@@ -2348,6 +2477,14 @@ p, li { white-space: pre-wrap; }
mixWithPriorPage
+
+ shadow
+
+
+
+ borderStyle
+
+
LimeReport::RectPropItem
@@ -2688,6 +2825,10 @@ p, li { white-space: pre-wrap; }
The rendering is in process
正在处理中
+
+ Print Report
+
+
LimeReport::ReportEnginePrivate
@@ -3070,6 +3211,18 @@ This preview is no longer valid.
RowIndex
行索引
+
+ RoleIndex
+
+
+
+ RoleName
+
+
+
+ columnIndex
+
+
LimeReport::SettingDialog