From 20fe567ab250f386e230a14a538d102b3fa679f4 Mon Sep 17 00:00:00 2001 From: Sergey Popovichev Date: Wed, 17 Feb 2016 10:28:27 +0300 Subject: [PATCH] 1.3.1 --- demo/r1/demo_reports/columns_demo.lrxml | 245 +++ demo/r1/demo_reports/ordres_by_date.lrxml | 168 ++ demo/r1/mainwindow.cpp | 3 + demo/r1/r1.pro | 9 +- limereport.pro | 5 + report-lib_ru.ts | 1466 ------------- src/bands/lrdataband.h | 2 + src/bands/lrgroupbands.cpp | 35 +- src/bands/lrgroupbands.h | 18 +- src/bands/lrsubdetailband.h | 2 + src/databrowser/lrdatabrowser.cpp | 6 +- .../editors/lritemsborderseditorwidget.cpp | 6 +- src/items/lrbarcodeitem.cpp | 7 +- src/items/lrbarcodeitem.h | 2 +- src/items/lrhorizontallayout.cpp | 105 +- src/items/lrhorizontallayout.h | 19 +- src/items/lrimageitem.cpp | 6 +- src/items/lrimageitem.h | 2 +- src/items/lrtextitem.cpp | 17 +- src/items/lrtextitem.h | 8 +- src/items/lrtextitemeditor.cpp | 20 +- src/lrbanddesignintf.cpp | 67 +- src/lrbanddesignintf.h | 36 +- src/lrbasedesignintf.cpp | 116 +- src/lrbasedesignintf.h | 20 +- src/lrdatadesignintf.cpp | 76 +- src/lrdatadesignintf.h | 38 +- src/lrdatasourcemanager.cpp | 74 +- src/lrdatasourcemanager.h | 3 - src/lritemdesignintf.cpp | 39 +- src/lritemdesignintf.h | 6 +- src/lrpagedesignintf.cpp | 64 +- src/lrpagedesignintf.h | 15 +- src/lrpageitemdesignintf.cpp | 7 +- src/lrreportdesignwidget.cpp | 2 +- src/lrreportdesignwindow.cpp | 27 +- src/lrreportengine_p.h | 7 +- src/lrreportrender.cpp | 231 ++- src/lrreportrender.h | 34 +- src/lrscriptenginemanager.cpp | 70 +- src/lrscriptenginemanager.h | 7 + src/objectinspector/lrobjectitemmodel.cpp | 19 +- src/objectinspector/lrobjectitemmodel.h | 2 +- translations/limereport_ru.qm | Bin 0 -> 85584 bytes translations/limereport_ru.ts | 1842 +++++++++++++++++ 45 files changed, 3169 insertions(+), 1784 deletions(-) create mode 100644 demo/r1/demo_reports/columns_demo.lrxml create mode 100644 demo/r1/demo_reports/ordres_by_date.lrxml delete mode 100644 report-lib_ru.ts create mode 100644 translations/limereport_ru.qm create mode 100644 translations/limereport_ru.ts diff --git a/demo/r1/demo_reports/columns_demo.lrxml b/demo/r1/demo_reports/columns_demo.lrxml new file mode 100644 index 0000000..ad8a2ec --- /dev/null +++ b/demo/r1/demo_reports/columns_demo.lrxml @@ -0,0 +1,245 @@ + + + + + + page1 + + + + + + + + ReportPage1 + + + + DataBand1 + + + + TextItem1 + + + + + DataBand1 + + + + $D{orders.OrderID} + + + + + + + + + + + + + + + TextItem2 + + + + + DataBand1 + + + + $D{orders.OrderDate} + + + + + + + + + + + + + + + BarcodeItem1 + + + + + DataBand1 + + + + $D{orders.OrderID} + + 1 + + + + + + + + + + TextItem4 + + + + + DataBand1 + + + + $D{orders.ShipName} + + + + + + + + + + + + + + + TextItem5 + + + + + DataBand1 + + + + $D{orders.ShipPostalCode} + + + + + + + + + + + + + + + + + ReportPage1 + + + + + + + + orders + + + + + + + + + ReportHeader1 + + + + TextItem3 + + + + + ReportHeader1 + + + + Orders selected by condition used variable OrdersDate + + + + + + + + + + + + + + + + + ReportPage1 + + + + + + + + + + + + + + + + + + + + + + + + + datasources + + + + northwind.db + QSQLITE + ./demo_reports/northwind.db + + + + + + + + + + orders + Select * from orders where OrderDate = $V{OrdersDate} + northwind.db + + + + + + + + OrdersDate + 2005-03-22 + + + + + diff --git a/demo/r1/demo_reports/ordres_by_date.lrxml b/demo/r1/demo_reports/ordres_by_date.lrxml new file mode 100644 index 0000000..baf2cf9 --- /dev/null +++ b/demo/r1/demo_reports/ordres_by_date.lrxml @@ -0,0 +1,168 @@ + + + + + + page1 + + + + + + + + ReportPage1 + + + + DataBand1 + + + + TextItem1 + + + + + DataBand1 + + + $D{orders.OrderID} + + + + + + + + + + + + + + + TextItem2 + + + + + DataBand1 + + + $D{orders.OrderDate} + + + + + + + + + + + + + + + + + ReportPage1 + + + + + + + orders + + + + + + + ReportHeader1 + + + + TextItem3 + + + + + ReportHeader1 + + + Orders selected by condition used variable OrdersDate + + + + + + + + + + + + + + + + + ReportPage1 + + + + + + + + + + + + + + + + + + + + + + + datasources + + + + northwind.db + QSQLITE + ./demo_reports/northwind.db + + + + + + + + + + orders + Select * from orders where OrderDate = $V{OrdersDate} + northwind.db + + + + + + + + OrdersDate + 2005-03-22 + + + + + diff --git a/demo/r1/mainwindow.cpp b/demo/r1/mainwindow.cpp index cb28e42..6b8b8fc 100644 --- a/demo/r1/mainwindow.cpp +++ b/demo/r1/mainwindow.cpp @@ -115,6 +115,9 @@ void MainWindow::on_pushButton_2_clicked() QString fileName = QFileDialog::getOpenFileName(this,"Select report file",QApplication::applicationDirPath()+"/demo_reports/","*.lrxml"); if (!fileName.isEmpty()) { report->loadFromFile(fileName); + if (!ui->leVariableName->text().isEmpty() && !ui->leVariableValue->text().isEmpty()){ + report->dataManager()->setReportVariable(ui->leVariableName->text(), ui->leVariableValue->text()); + } report->previewReport(); } } diff --git a/demo/r1/r1.pro b/demo/r1/r1.pro index 36665f2..33cfd0e 100644 --- a/demo/r1/r1.pro +++ b/demo/r1/r1.pro @@ -14,11 +14,16 @@ win32 { EXTRA_DIR ~= s,/,\\,g DEST_DIR ~= s,/,\\,g QMAKE_POST_LINK += $$QMAKE_COPY_DIR $$quote($$EXTRA_DIR) $$quote($$DEST_DIR) $$escape_expand(\\n\\t) + CONFIG(release, debug|release) { + DEST_DIR = $$OUT_PWD/release/demo_reports/ + DEST_DIR ~= s,/,\\,g + QMAKE_POST_LINK += $$QMAKE_COPY_DIR $$quote($$EXTRA_DIR) $$quote($$DEST_DIR) $$escape_expand(\\n\\t) + } } greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport -TARGET = r1 +TARGET = LRDemo TEMPLATE = app SOURCES += main.cpp\ @@ -41,4 +46,4 @@ RESOURCES += \ win32 { RC_FILE += mainicon.rc -} \ No newline at end of file +} diff --git a/limereport.pro b/limereport.pro index 6ae3a53..9bc8022 100644 --- a/limereport.pro +++ b/limereport.pro @@ -43,3 +43,8 @@ INCLUDEPATH += report report/bands report/base report/databrowser report/items r CONFIG(release, debug|release): DESTDIR = $$PWD/lib/release/ else:CONFIG(debug, debug|release): DESTDIR = $$PWD/lib/debug/ +#win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../zint-2.4.3/build-backend_dll-Desktop_Qt_5_5_0_MSVC2010_32bit-Release/release/ -lQtZint22 +#else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../zint-2.4.3/build-backend_dll-Desktop_Qt_5_5_0_MSVC2010_32bit-Release/debug/ -lQtZint22 + +#INCLUDEPATH += $$PWD/../zint-2.4.3/backend $$PWD/../zint-2.4.3/backend_qt4 +#DEPENDPATH += $$PWD/../zint-2.4.3/backend $$PWD/../zint-2.4.3/backend_qt4 diff --git a/report-lib_ru.ts b/report-lib_ru.ts deleted file mode 100644 index bc69495..0000000 --- a/report-lib_ru.ts +++ /dev/null @@ -1,1466 +0,0 @@ - - - - - ConnectionDialog - - - - Connection - Подключение - - - - Connection Name - Название соединения - - - - Driver - Драйвер - - - - Server - Сервер - - - - User - Пользователь - - - - Password - Пароль - - - - Database - База данных - - - - ... - - - - - Auto connect - Авто соединение - - - - Check connection - Проверить соединение - - - - Cancel - Отмена - - - - Ok - - - - - - Error - Ошибка - - - - Connection succsesfully established! - Соединение успешно установлено ! - - - - Connection Name is empty - Название соединения не указано - - - - Connection with name - Соединение с названием - - - - already exists - уже существует - - - - DataBrowser - - - - Datasources - - - - - Add database connection - - - - - - - - - - - - - - - - ... - - - - - Variables - - - - - LRVariableDialog - - - Variable - - - - - Name - - - - - Value - - - - - Type - - - - - Attention - - - - - LimeReport::AVariablesHolder - - - - - - variable with name - - - - - already exists !! - - - - - - - does not exists !! - - - - - LimeReport::AlignmentPropItem - - - Left - - - - - Right - - - - - - Center - - - - - Justify - - - - - Top - - - - - Botom - - - - - horizontal - - - - - vertical - - - - - LimeReport::ContentItemDesignIntf - - - Variable %1 not found - - - - - LimeReport::DataBand - - - Data - - - - - LimeReport::DataBrowser - - - Datasources - - - - - - - - Attention - - - - - Do you really want delete "%1" connection ? - - - - - User variables - - - - - System variables - - - - - Do you really want delete "%1" datasource ? - - - - - Do you really want delete variable "%1" ? - - - - - Error - - - - - LimeReport::DataSourceManager - - - - Datasource "%1" not found ! - - - - - connection with name "%1" already exists ! - - - - - data source with name "%1" already exists !! - - - - - datasource with name "%1"already exists !! - - - - - - datasource with name "%1" already exists !! - - - - - invalid connection - - - - - LimeReport::DataSourceModel - - - Datasources - - - - - Variables - - - - - LimeReport::FontEditorWidget - - - Font bold - - - - - Font Italic - - - - - Font Underline - - - - - LimeReport::FontPropItem - - - bold - - - - - italic - - - - - underline - - - - - size - - - - - family - - - - - LimeReport::GroupBandFooter - - - GroupFooter - - - - - LimeReport::GroupBandHeader - - - GroupHeader - - - - - LimeReport::GroupFunction - - - Field "%1" not found - - - - - Variable "%1" not found - - - - - Item "%1" not found - - - - - LimeReport::ItemsAlignmentEditorWidget - - - Bring to top - - - - - Send to back - - - - - Align to left - - - - - Align to right - - - - - Align to vertical center - - - - - Align to top - - - - - Align to bottom - - - - - Align to horizontal center - - - - - Set same height - - - - - Set same width - - - - - LimeReport::ItemsBordersEditorWidget - - - - - - Top line - - - - - No borders - - - - - All borders - - - - - LimeReport::MasterDetailProxyModel - - - Field: "%1" not found in "%2" child datasource - - - - - Field: "%1" not found in "%2" master datasource - - - - - LimeReport::ModelToDataSource - - - model i s destroyed - - - - - LimeReport::ObjectBrowser - - - Objects - - - - - LimeReport::PageDesignIntf - - - Attention! - - - - - Elements have different parent containers - - - - - LimeReport::PageFooter - - - Page Footer - - - - - LimeReport::PageHeader - - - Page Header - - - - - LimeReport::QObjectPropertyModel - - - Property Name - - - - - Property value - - - - - LimeReport::RectMMPropItem - - - - - width - - - - - - - height - - - - - LimeReport::RectPropItem - - - width - - - - - height - - - - - LimeReport::ReportDesignIntfPrivate - - - Error - - - - - LimeReport::ReportDesignWidget - - - - Page - - - - - Script - - - - - Report file name - - - - - Error - - - - - Wrong file format - - - - - LimeReport::ReportDesignWindow - - - New Report - - - - - New Report Page - - - - - Edit Mode - - - - - Undo - - - - - Redo - - - - - Copy - - - - - Paste - - - - - Cut - - - - - Text Item - - - - - Save Report - - - - - Save Report As - - - - - Load Report - - - - - Delete item - - - - - Zoom In - - - - - Zoom Out - - - - - Render Report - - - - - Edit layouts mode - - - - - Horizontal layout - - - - - Report Tools - - - - - Font - - - - - Text alignment - - - - - Items alignment - - - - - Borders - - - - - Report Header - - - - - Report Footer - - - - - Page Header - - - - - Page Footer - - - - - Data - - - - - SubDetail - - - - - SubDetailHeader - - - - - SubDetailFooter - - - - - GroupHeader - - - - - GroupFooter - - - - - File - - - - - Edit - - - - - Object Inspector - - - - - Report structure - - - - - Data Browser - - - - - Script Browser - - - - - Report has been modified ! Do you want save the report ? - - - - - - Report file name - - - - - LimeReport::ReportFooter - - - Report Footer - - - - - LimeReport::ReportHeader - - - Report Header - - - - - LimeReport::ReportRender - - - Error - - - - - Databand "%1" not found - - - - - Wrong using function %1 - - - - - LimeReport::ScriptBrowser - - - NO CATEGORY - - - - - - - Error - - - - - Dialog with name: %1 already exists - - - - - ui file must cointain QDialog instead QWidget or QMainWindow - - - - - wrong file format - - - - - LimeReport::ScriptEngineContext - - - Dialog with name: %1 can`t be created - - - - - LimeReport::SubDetailBand - - - SubDetail - - - - - LimeReport::TextAlignmentEditorWidget - - - Text align left - - - - - - Text align center - - - - - Text align right - - - - - Text align justify - - - - - Text align top - - - - - Text align bottom - - - - - PreviewReportWindow - - - Preview - - - - - View - - - - - Report - - - - - toolBar - - - - - Print - - - - - Ctrl+P - - - - - Zoom In - - - - - Zoom Out - - - - - - Prior Page - - - - - - Next Page - - - - - - Close Preview - - - - - Edit Mode - - - - - - Save to file - - - - - - Показать ошибки - - - - - Font - - - - - Text align - - - - - of %1 - - - - - Report file name - - - - - QObject - - - - Data - - - - - GroupHeader - - - - - GroupFooter - - - - - - Page Footer - - - - - - Page Header - - - - - - Report Footer - - - - - - Report Header - - - - - - SubDetail - - - - - SubDetailHeader - - - - - SubDetailFooter - - - - - alignment - - - - - Barcode Item - - - - - HLayout - - - - - Image Item - - - - - Shape Item - - - - - itemLocation - - - - - Text Item - - - - - Invalid connection! %1 - - - - - Master datasouce "%1" not found! - - - - - Child - - - - - and child - - - - - datasouce "%1" not found! - - - - - Function %1 not found or have wrong arguments - - - - - bool - - - - - QColor - - - - - - datasource - - - - - - field - - - - - enum - - - - - flags - - - - - QFont - - - - - QImage - - - - - int - - - - - qreal - - - - - QRect - - - - - QRectF - - - - - geometry - - - - - mm - - - - - QString - - - - - Wrong file format - - - - - File %1 not opened - - - - - Content string is empty - - - - - Content is empty - - - - - SQLEditDialog - - - Datasource - - - - - Connection - - - - - Datasource Name - - - - - Subdetail - - - - - Master datasource - - - - - Sub query mode - - - - - Filter mode - - - - - SQL - - - - - Child datasource - - - - - Fields map - - - - - - ... - - - - - Cancel - - - - - Ok - - - - - Error - - - - - Datasource Name is empty ! - - - - - SQL is empty ! - - - - - Datasource with name: "%1" already exists ! - - - - - Datasource with name %1 already exist - - - - - ScriptBrowser - - - Form - - - - - Functions - - - - - - - - - - ... - - - - - Dialogs - - - - - Type - - - - - Name - - - - - TextItemEditor - - - Text Item Editor - - - - - Content - - - - - Data - - - - - Functions - - - - - Editor settings - - - - - Editor font - - - - - ... - - - - - Ok - - - - - Cancel - - - - - Esc - - - - - WaitForm - - - Wait - - - - - Please wait ... - - - - diff --git a/src/bands/lrdataband.h b/src/bands/lrdataband.h index e08214a..8288279 100644 --- a/src/bands/lrdataband.h +++ b/src/bands/lrdataband.h @@ -43,6 +43,8 @@ class DataBand : public DataBandDesignIntf Q_PROPERTY(bool splittable READ isSplittable WRITE setSplittable ) Q_PROPERTY(bool keepFooterTogether READ keepFooterTogether WRITE setKeepFooterTogether) Q_PROPERTY(bool sliceLastRow READ sliceLastRow WRITE setSliceLastRow) + Q_PROPERTY(int columnsCount READ columnsCount WRITE setColumnsCount) + Q_PROPERTY(BandColumnsLayoutType columnsFillDirection READ columnsFillDirection WRITE setColumnsFillDirection) public: DataBand(QObject* owner = 0, QGraphicsItem* parent=0); bool isUnique() const; diff --git a/src/bands/lrgroupbands.cpp b/src/bands/lrgroupbands.cpp index 01a7856..3702d73 100644 --- a/src/bands/lrgroupbands.cpp +++ b/src/bands/lrgroupbands.cpp @@ -63,7 +63,7 @@ namespace LimeReport{ GroupBandHeader::GroupBandHeader(QObject *owner, QGraphicsItem *parent) : BandDesignIntf(BandDesignIntf::GroupHeader, xmlTagHeader, owner,parent), - m_groupFiledName(""), m_groupStarted(false) + m_groupFiledName(""), m_groupStarted(false), m_startNewPage(false), m_resetPageNumber(false) { setBandTypeText(tr("GroupHeader")); setFixedPos(false); @@ -85,16 +85,15 @@ BaseDesignIntf *GroupBandHeader::createSameTypeItem(QObject *owner, QGraphicsIte return new GroupBandHeader(owner, parent); } -void GroupBandHeader::startGroup() +void GroupBandHeader::startGroup(DataSourceManager* dataManager) { m_groupStarted=true; - DataSourceManager* dm = DataSourceManager::instance(); QString lineVar = QLatin1String("line_")+objectName().toLower(); - dm->setReportVariable(lineVar,1); + dataManager->setReportVariable(lineVar,1); - if ((dm->dataSource(parentBand()->datasourceName()))){ - IDataSource* ds = dm->dataSource(parentBand()->datasourceName()); + if ((dataManager->dataSource(parentBand()->datasourceName()))){ + IDataSource* ds = dataManager->dataSource(parentBand()->datasourceName()); if (ds->columnIndexByName(m_groupFiledName)!=-1) m_groupFieldValue=ds->data(m_groupFiledName); } @@ -105,16 +104,20 @@ QColor GroupBandHeader::bandColor() const return QColor(Qt::darkBlue); } -bool GroupBandHeader::isNeedToClose() +void GroupBandHeader::setStartNewPage(bool value) +{ + m_startNewPage = value; +} + +bool GroupBandHeader::isNeedToClose(DataSourceManager* dataManager) { //if (m_groupFieldValue.isNull()) return false; if (!m_groupStarted) return false; - DataSourceManager* dm = DataSourceManager::instance(); if (m_groupFiledName.isNull() || m_groupFiledName.isEmpty()) - dm->putError("Group Field Not found"); - if ((dm->dataSource(parentBand()->datasourceName()))){ - IDataSource* ds = dm->dataSource(parentBand()->datasourceName()); + dataManager->putError("Group Field Not found"); + if ((dataManager->dataSource(parentBand()->datasourceName()))){ + IDataSource* ds = dataManager->dataSource(parentBand()->datasourceName()); if (ds->data(m_groupFiledName).isNull() && m_groupFieldValue.isNull()) return false; return ds->data(m_groupFiledName)!=m_groupFieldValue; } @@ -138,6 +141,16 @@ int GroupBandHeader::index() return bandIndex(); } +bool GroupBandHeader::resetPageNumber() const +{ + return m_resetPageNumber; +} + +void GroupBandHeader::setResetPageNumber(bool resetPageNumber) +{ + m_resetPageNumber = resetPageNumber; +} + GroupBandFooter::GroupBandFooter(QObject *owner, QGraphicsItem *parent) :BandDesignIntf(BandDesignIntf::GroupFooter, xmlTagFooter, owner,parent) { diff --git a/src/bands/lrgroupbands.h b/src/bands/lrgroupbands.h index 56c7127..59b0475 100644 --- a/src/bands/lrgroupbands.h +++ b/src/bands/lrgroupbands.h @@ -40,6 +40,8 @@ class GroupBandHeader : public BandDesignIntf, public IGroupBand{ Q_PROPERTY(QString groupFieldName READ groupFieldName WRITE setGroupFieldName) Q_PROPERTY(bool splittable READ isSplittable WRITE setSplittable ) Q_PROPERTY(bool keepGroupTogether READ tryToKeepTogether WRITE setTryToKeepTogether) + Q_PROPERTY(bool startNewPage READ startNewPage WRITE setStartNewPage) + Q_PROPERTY(bool resetPageNumber READ resetPageNumber WRITE setResetPageNumber) public: GroupBandHeader(QObject* owner = 0, QGraphicsItem* parent=0); virtual bool isUnique() const; @@ -48,17 +50,23 @@ public: QString groupFieldName(){return m_groupFiledName;} void setGroupFieldName(QString fieldName){m_groupFiledName=fieldName;} QColor bandColor() const; + bool startNewPage() const {return m_startNewPage;} + void setStartNewPage(bool value); + bool resetPageNumber() const; + void setResetPageNumber(bool resetPageNumber); private: virtual BaseDesignIntf* createSameTypeItem(QObject* owner=0, QGraphicsItem* parent=0); - virtual void startGroup(); - virtual bool isNeedToClose(); - virtual bool isStarted(); - virtual void closeGroup(); - virtual int index(); + void startGroup(DataSourceManager* dataManager); + bool isNeedToClose(DataSourceManager *dataManager); + bool isStarted(); + void closeGroup(); + int index(); private: QVariant m_groupFieldValue; QString m_groupFiledName; bool m_groupStarted; + bool m_startNewPage; + bool m_resetPageNumber; }; class GroupBandFooter : public BandDesignIntf{ diff --git a/src/bands/lrsubdetailband.h b/src/bands/lrsubdetailband.h index a18dee7..f93f8e1 100644 --- a/src/bands/lrsubdetailband.h +++ b/src/bands/lrsubdetailband.h @@ -39,6 +39,8 @@ class SubDetailBand : public DataBandDesignIntf { Q_OBJECT Q_PROPERTY(bool splittable READ isSplittable WRITE setSplittable) + Q_PROPERTY(int columnsCount READ columnsCount WRITE setColumnsCount) + Q_PROPERTY(BandColumnsLayoutType columnsFillDirection READ columnsFillDirection WRITE setColumnsFillDirection) public: SubDetailBand(QObject* owner = 0, QGraphicsItem* parent=0); bool isUnique() const {return false;} diff --git a/src/databrowser/lrdatabrowser.cpp b/src/databrowser/lrdatabrowser.cpp index c44aae8..aa80064 100644 --- a/src/databrowser/lrdatabrowser.cpp +++ b/src/databrowser/lrdatabrowser.cpp @@ -131,7 +131,7 @@ void DataBrowser::slotDeleteConnection() QMessageBox::critical( this, tr("Attention"), - tr("Do you really want delete \"%1\" connection ?").arg(getConnectionName()), + tr("Do you really want to delete \"%1\" connection ?").arg(getConnectionName()), QMessageBox::Ok|QMessageBox::No, QMessageBox::No )==QMessageBox::Ok @@ -366,7 +366,7 @@ void DataBrowser::slotDeleteDatasource() QMessageBox::critical( this, tr("Attention"), - tr("Do you really want delete \"%1\" datasource ?").arg(datasourceName), + tr("Do you really want to delete \"%1\" datasource ?").arg(datasourceName), QMessageBox::Ok|QMessageBox::No, QMessageBox::No )==QMessageBox::Ok @@ -668,7 +668,7 @@ void DataBrowser::on_deleteVariable_clicked() { QString varName = getVariable(); if (!varName.isEmpty()){ - if (QMessageBox::critical(this,tr("Attention"),QString(tr("Do you really want delete variable \"%1\" ?")).arg(varName), + if (QMessageBox::critical(this,tr("Attention"),QString(tr("Do you really want to delete variable \"%1\" ?")).arg(varName), QMessageBox::Ok|QMessageBox::Cancel, QMessageBox::Cancel )==QMessageBox::Ok){ m_report->dataManager()->deleteVariable(varName); diff --git a/src/items/editors/lritemsborderseditorwidget.cpp b/src/items/editors/lritemsborderseditorwidget.cpp index 4597b06..afdf766 100644 --- a/src/items/editors/lritemsborderseditorwidget.cpp +++ b/src/items/editors/lritemsborderseditorwidget.cpp @@ -97,19 +97,19 @@ void ItemsBordersEditorWidget::initEditor() connect(m_topLine,SIGNAL(toggled(bool)),this,SLOT(buttonClicked(bool))); addAction(m_topLine); - m_bottomLine = new QAction(tr("Top line"),this); + m_bottomLine = new QAction(tr("Bottom line"),this); m_bottomLine->setIcon(QIcon(":/report/images/bottomLine")); m_bottomLine->setCheckable(true); connect(m_bottomLine,SIGNAL(toggled(bool)),this,SLOT(buttonClicked(bool))); addAction(m_bottomLine); - m_leftLine = new QAction(tr("Top line"),this); + m_leftLine = new QAction(tr("Left line"),this); m_leftLine->setIcon(QIcon(":/report/images/leftLine")); m_leftLine->setCheckable(true); connect(m_leftLine,SIGNAL(toggled(bool)),this,SLOT(buttonClicked(bool))); addAction(m_leftLine); - m_rightLine = new QAction(tr("Top line"),this); + m_rightLine = new QAction(tr("Right line"),this); m_rightLine->setIcon(QIcon(":/report/images/rightLine")); m_rightLine->setCheckable(true); connect(m_rightLine,SIGNAL(toggled(bool)),this,SLOT(buttonClicked(bool))); diff --git a/src/items/lrbarcodeitem.cpp b/src/items/lrbarcodeitem.cpp index 14dc8f8..751c16e 100644 --- a/src/items/lrbarcodeitem.cpp +++ b/src/items/lrbarcodeitem.cpp @@ -231,15 +231,16 @@ void BarcodeItem::setPdf417CodeWords(int pdf417CodeWords) } } -void BarcodeItem::updateItemSize(RenderPass pass, int) +void BarcodeItem::updateItemSize(DataSourceManager* dataManager, RenderPass pass, int maxHeight) { switch(pass){ case FirstPass: - setContent(expandUserVariables(content(),pass,NoEscapeSymbols)); - setContent(expandDataFields(content(),NoEscapeSymbols)); + setContent(expandUserVariables(content(),pass,NoEscapeSymbols, dataManager)); + setContent(expandDataFields(content(), NoEscapeSymbols, dataManager)); break; default:; } + BaseDesignIntf::updateItemSize(dataManager, pass, maxHeight); } bool BarcodeItem::isNeedUpdateSize(RenderPass pass) const diff --git a/src/items/lrbarcodeitem.h b/src/items/lrbarcodeitem.h index 001aec0..b79351b 100644 --- a/src/items/lrbarcodeitem.h +++ b/src/items/lrbarcodeitem.h @@ -132,7 +132,7 @@ public: ~BarcodeItem(); virtual BaseDesignIntf* createSameTypeItem(QObject *owner, QGraphicsItem *parent); virtual void paint(QPainter *ppainter, const QStyleOptionGraphicsItem *option, QWidget *widget); - virtual void updateItemSize(RenderPass pass, int); + virtual void updateItemSize(DataSourceManager *dataManager, RenderPass pass, int maxHeight); virtual bool isNeedUpdateSize(RenderPass pass) const; void setContent(const QString& content); QString content() const {return m_content;} diff --git a/src/items/lrhorizontallayout.cpp b/src/items/lrhorizontallayout.cpp index 4e645e2..bc764f6 100644 --- a/src/items/lrhorizontallayout.cpp +++ b/src/items/lrhorizontallayout.cpp @@ -61,7 +61,7 @@ bool lessThen(BaseDesignIntf *c1, BaseDesignIntf* c2){ HorizontalLayout::HorizontalLayout(QObject *owner, QGraphicsItem *parent) - : LayoutDesignIntf(xmlTag, owner, parent),m_isRelocating(false) + : LayoutDesignIntf(xmlTag, owner, parent),m_isRelocating(false),m_layoutType(Layout) { setPosibleResizeDirectionFlags(ResizeBottom); m_layoutMarker = new LayoutMarker(this); @@ -101,6 +101,9 @@ void HorizontalLayout::geometryChangedEvent(QRectF newRect, QRectF ) { m_layoutMarker->setHeight(newRect.height()); relocateChildren(); + if (m_layoutType == Table && !m_isRelocating){ + divideSpace(); + } } void HorizontalLayout::setChildVisibility(bool value){ @@ -186,6 +189,13 @@ BaseDesignIntf *HorizontalLayout::cloneBottomPart(int height, QObject *owner, QG return bottomPart; } +void HorizontalLayout::setItemAlign(const BaseDesignIntf::ItemAlign &itemAlign) +{ + if (itemAlign == ParentWidthItemAlign) + setLayoutType(Table); + BaseDesignIntf::setItemAlign(itemAlign); +} + void HorizontalLayout::restoreChild(BaseDesignIntf* item){ if (m_children.contains(item)) return; @@ -200,7 +210,11 @@ void HorizontalLayout::restoreChild(BaseDesignIntf* item){ } connect(item,SIGNAL(destroyed(QObject*)),this,SLOT(slotOnChildDestroy(QObject*))); - connect(item,SIGNAL(geometryChanged(QObject*,QRectF,QRectF)),this,SLOT(slotOnChildGeometryChanged(QObject*,QRectF,QRectF))); + connect(item,SIGNAL(geometryChanged(QObject*,QRectF,QRectF)), + this,SLOT(slotOnChildGeometryChanged(QObject*,QRectF,QRectF))); + connect(item, SIGNAL(itemAlignChanged(BaseDesignIntf*,ItemAlign,ItemAlign)), + this, SLOT(slotOnChildItemAlignChanged(BaseDesignIntf*,ItemAlign,ItemAlign))); + item->setFixedPos(true); item->setPosibleResizeDirectionFlags(ResizeRight | ResizeBottom); item->setParent(this); @@ -319,17 +333,18 @@ void HorizontalLayout::beforeDelete() } } -void HorizontalLayout::updateItemSize(RenderPass pass, int maxHeight) +void HorizontalLayout::updateItemSize(DataSourceManager* dataManager, RenderPass pass, int maxHeight) { m_isRelocating=true; - ItemDesignIntf::updateItemSize(pass,maxHeight); + ItemDesignIntf::updateItemSize(dataManager, pass, maxHeight); foreach(QGraphicsItem *child, childItems()){ BaseDesignIntf* item = dynamic_cast(child); - if (item) item->updateItemSize(pass,maxHeight); + if (item) item->updateItemSize(dataManager, pass, maxHeight); } updateLayoutSize(); relocateChildren(); m_isRelocating=false; + BaseDesignIntf::updateItemSize(dataManager, pass, maxHeight); } bool HorizontalLayout::isNeedUpdateSize(RenderPass pass) const @@ -359,15 +374,89 @@ void HorizontalLayout::slotOnChildDestroy(QObject* child) } } -void HorizontalLayout::slotOnChildGeometryChanged(QObject *, QRectF newGeometry, QRectF) +BaseDesignIntf* HorizontalLayout::findNext(BaseDesignIntf* item){ + if (m_children.count()i+1){ return m_children[i+1];} + } + return 0; +} + +BaseDesignIntf* HorizontalLayout::findPrior(BaseDesignIntf* item){ + if (m_children.count()width(); + } + qreal delta = (width() - itemsSumSize)/m_children.size(); + for (int i=0; isetWidth(m_children[i]->width()+(delta)); + if ((i+1)setPos(m_children[i+1]->pos().x()+delta*(i+1),m_children[i+1]->pos().y()); + } + m_isRelocating = false; +} +void HorizontalLayout::slotOnChildGeometryChanged(QObject *item, QRectF newGeometry, QRectF oldGeometry) { if (!m_isRelocating){ setHeight(newGeometry.height()); - relocateChildren(); - updateLayoutSize(); + if (m_layoutType == Layout){ + relocateChildren(); + updateLayoutSize(); + } else { + m_isRelocating = true; + qreal delta = newGeometry.width()-oldGeometry.width(); + BaseDesignIntf* resizingItem = findNext(dynamic_cast(item)); + if (resizingItem) { + resizingItem->setWidth(resizingItem->width()-delta); + resizingItem->setPos(resizingItem->pos().x()+delta,resizingItem->pos().y()); + } + updateLayoutSize(); + m_isRelocating = false; + } } } +void HorizontalLayout::slotOnChildItemAlignChanged(BaseDesignIntf *item, const BaseDesignIntf::ItemAlign &, const BaseDesignIntf::ItemAlign&) +{ + item->setPosibleResizeDirectionFlags(ResizeBottom | ResizeRight); +} + +HorizontalLayout::LayoutType HorizontalLayout::layoutType() const +{ + return m_layoutType; +} + +void HorizontalLayout::setLayoutType(const LayoutType &layoutType) +{ + if (m_layoutType != layoutType){ + LayoutType oldValue = m_layoutType; + m_layoutType = layoutType; + notify("layoutType",oldValue,layoutType); + } + +} + LayoutMarker::LayoutMarker(HorizontalLayout *layout, QGraphicsItem *parent) :QGraphicsItem(parent), m_rect(0,0,30,30), m_color(Qt::red), m_layout(layout){ setFlag(QGraphicsItem::ItemIsMovable); diff --git a/src/items/lrhorizontallayout.h b/src/items/lrhorizontallayout.h index 5e480be..c00b92b 100644 --- a/src/items/lrhorizontallayout.h +++ b/src/items/lrhorizontallayout.h @@ -57,7 +57,11 @@ private: class HorizontalLayout : public LayoutDesignIntf { Q_OBJECT + Q_ENUMS(LayoutType) + Q_PROPERTY(LayoutType layoutType READ layoutType WRITE setLayoutType) public: + friend class LayoutMarker; + enum LayoutType{Layout,Table}; HorizontalLayout(QObject *owner = 0, QGraphicsItem *parent = 0); ~HorizontalLayout(); BaseDesignIntf *createSameTypeItem(QObject *owner = 0, QGraphicsItem *parent = 0); @@ -68,13 +72,17 @@ public: friend class BaseDesignIntf; void restoreChild(BaseDesignIntf *item); bool isEmpty() const; + LayoutType layoutType() const; + void setLayoutType(const LayoutType &layoutType); protected: void collectionLoadFinished(const QString &collectionName); void objectLoadFinished(); void updateLayoutSize(); void relocateChildren(); + BaseDesignIntf *findNext(BaseDesignIntf *item); + BaseDesignIntf *findPrior(BaseDesignIntf *item); void beforeDelete(); - void updateItemSize(RenderPass pass, int maxHeight); + void updateItemSize(DataSourceManager *dataManager, RenderPass pass, int maxHeight); bool isNeedUpdateSize(RenderPass pass) const; void childAddedEvent(BaseDesignIntf *child); void setChildVisibility(bool value); @@ -85,16 +93,19 @@ protected: BaseDesignIntf* cloneUpperPart(int height, QObject* owner=0, QGraphicsItem* parent=0); BaseDesignIntf* cloneBottomPart(int height, QObject *owner=0, QGraphicsItem *parent=0); + void setItemAlign(const ItemAlign &itemAlign); private slots: void slotOnChildDestroy(QObject *child); - void slotOnChildGeometryChanged(QObject*, QRectF newGeometry, QRectF); + void slotOnChildGeometryChanged(QObject*item, QRectF newGeometry, QRectF oldGeometry); + void slotOnChildItemAlignChanged(BaseDesignIntf* item, const ItemAlign&, const ItemAlign&); //void slotOnPosChanged(QObject*, QPointF newPos, QPointF ); +private: + void divideSpace(); private: QList m_children; bool m_isRelocating; LayoutMarker* m_layoutMarker; - - friend class LayoutMarker; + LayoutType m_layoutType; }; } //namespace LimeReport diff --git a/src/items/lrimageitem.cpp b/src/items/lrimageitem.cpp index 674186a..472f363 100644 --- a/src/items/lrimageitem.cpp +++ b/src/items/lrimageitem.cpp @@ -54,11 +54,10 @@ BaseDesignIntf *ImageItem::createSameTypeItem(QObject *owner, QGraphicsItem *par return new ImageItem(owner,parent); } -void ImageItem::updateItemSize(RenderPass , int ) +void ImageItem::updateItemSize(DataSourceManager* dataManager, RenderPass pass, int maxHeight) { if (!m_datasource.isEmpty() && !m_field.isEmpty() && m_picture.isNull()){ - DataSourceManager* dm = DataSourceManager::instance(); - IDataSource* ds = dm->dataSource(m_datasource); + IDataSource* ds = dataManager->dataSource(m_datasource); if (ds) { QVariant data = ds->data(m_field); if (data.isValid()){ @@ -73,6 +72,7 @@ void ImageItem::updateItemSize(RenderPass , int ) setWidth(m_picture.width()); setHeight(m_picture.height()); } + BaseDesignIntf::updateItemSize(dataManager, pass, maxHeight); } bool ImageItem::isNeedUpdateSize(RenderPass) const diff --git a/src/items/lrimageitem.h b/src/items/lrimageitem.h index f9e6e7e..4e3fa23 100644 --- a/src/items/lrimageitem.h +++ b/src/items/lrimageitem.h @@ -68,7 +68,7 @@ public: protected: BaseDesignIntf* createSameTypeItem(QObject *owner, QGraphicsItem *parent); - void updateItemSize(RenderPass, int); + void updateItemSize(DataSourceManager *dataManager, RenderPass pass, int maxHeight); bool isNeedUpdateSize(RenderPass) const; bool drawDesignBorders() const {return m_picture.isNull();} private: diff --git a/src/items/lrtextitem.cpp b/src/items/lrtextitem.cpp index 1a83a14..f533f67 100644 --- a/src/items/lrtextitem.cpp +++ b/src/items/lrtextitem.cpp @@ -173,10 +173,10 @@ void TextItem::setContent(const QString &value) } } -void TextItem::updateItemSize(RenderPass pass, int /*maxHeight*/) +void TextItem::updateItemSize(DataSourceManager* dataManager, RenderPass pass, int maxHeight) { if (isNeedExpandContent()) - expandContent(pass); + expandContent(dataManager, pass); if (!isLoading()) initText(); @@ -187,6 +187,7 @@ void TextItem::updateItemSize(RenderPass pass, int /*maxHeight*/) if ((m_textSize.height()>height()) && (m_autoHeight) ){ setHeight(m_textSize.height()+5); } + BaseDesignIntf::updateItemSize(dataManager, pass, maxHeight); } void TextItem::updateLayout() @@ -298,18 +299,18 @@ void TextItem::setAlignment(Qt::Alignment value) } } -void TextItem::expandContent(RenderPass pass) +void TextItem::expandContent(DataSourceManager* dataManager, RenderPass pass) { QString context=content(); switch(pass){ case FirstPass: - context=expandUserVariables(context, pass, NoEscapeSymbols); - context=expandScripts(context); - context=expandDataFields(context, NoEscapeSymbols); + context=expandUserVariables(context, pass, NoEscapeSymbols, dataManager); + context=expandScripts(context, dataManager); + context=expandDataFields(context, NoEscapeSymbols, dataManager); break; case SecondPass:; - context=expandUserVariables(context, pass, NoEscapeSymbols); - context=expandScripts(context); + context=expandUserVariables(context, pass, NoEscapeSymbols, dataManager); + context=expandScripts(context, dataManager); } setContent(context); diff --git a/src/items/lrtextitem.h b/src/items/lrtextitem.h index 1d73401..7b5069e 100644 --- a/src/items/lrtextitem.h +++ b/src/items/lrtextitem.h @@ -77,10 +77,10 @@ public: void setAlignment(Qt::Alignment value); Qt::Alignment alignment(){return m_alignment;} - virtual void geometryChangedEvent(QRectF, QRectF); - virtual bool isNeedUpdateSize(RenderPass) const; - virtual void updateItemSize(RenderPass pass, int); - void expandContent(RenderPass pass); + void geometryChangedEvent(QRectF, QRectF); + bool isNeedUpdateSize(RenderPass) const; + void updateItemSize(DataSourceManager *dataManager, RenderPass pass, int maxHeight); + void expandContent(DataSourceManager *dataManager, RenderPass pass); void setAutoHeight(bool value); bool autoHeight() const {return m_autoHeight;} diff --git a/src/items/lrtextitemeditor.cpp b/src/items/lrtextitemeditor.cpp index 55b0f52..527e66f 100644 --- a/src/items/lrtextitemeditor.cpp +++ b/src/items/lrtextitemeditor.cpp @@ -34,6 +34,7 @@ #include "lrscriptenginemanager.h" #include "lrdatadesignintf.h" #include "lrdatasourcemanager.h" + #include #include @@ -111,10 +112,13 @@ void TextItemEditor::initUI() m_datasourcesMenu = new QMenu(this); - LimeReport::DataSourceManager* dm = LimeReport::DataSourceManager::instance(); + LimeReport::DataSourceManager* dm = m_page->datasourceManager(); + LimeReport::ScriptEngineManager& se = LimeReport::ScriptEngineManager::instance(); + se.setDataManager(dm); + if (dm){ ui->twData->setModel(dm->datasourcesModel()); - ui->twScriptEngine->setModel(LimeReport::ScriptEngineManager::instance().model()); + ui->twScriptEngine->setModel(se.model()); foreach(QString dsName,dm->dataSourceNames()){ foreach(QString field, dm->fieldNames(dsName)){ @@ -125,8 +129,6 @@ void TextItemEditor::initUI() ui->tabWidget->setVisible(false); } - LimeReport::ScriptEngineManager& se = LimeReport::ScriptEngineManager::instance(); - foreach (LimeReport::ScriptFunctionDesc functionDesc, se.functionsDescriber()) { dataWords<datasourceManager(); QStringList dataSources; foreach(QString dsName,dm->dataSourceNames()){ dataSources<datasourceManager(); foreach(QString field, dm->fieldNames(datasource)){ fields<0){ + qreal oldValue = m_columnsCount; + qreal fullWidth = m_columnsCount * width(); + m_columnsCount = value; + if (!isLoading()){ + setWidth(fullWidth/m_columnsCount); + notify("columnsCount",oldValue,value); + } + } +} + +void BandDesignIntf::setColumnsFillDirection(BandDesignIntf::BandColumnsLayoutType value) +{ + if (m_columnsFillDirection!=value){ + qreal oldValue = m_columnsFillDirection; + m_columnsFillDirection = value; + if (!isLoading()) + notify("columnsFillDirection",oldValue,value); + } + +} + BaseDesignIntf* BandDesignIntf::cloneUpperPart(int height, QObject *owner, QGraphicsItem *parent) { int maxBottom = 0; @@ -473,6 +500,15 @@ void BandDesignIntf::emitBandRendered(BandDesignIntf* band) emit bandRendered(band); } +void BandDesignIntf::setSplittable(bool value){ + if (m_splitable!=value){ + bool oldValue = m_splitable; + m_splitable = value; + if (!isLoading()) + notify("splittable",oldValue,value); + } +} + bool itemSortContainerLessThen(const PItemSortContainer c1, const PItemSortContainer c2) { VSegment vS1(c1->m_rect),vS2(c2->m_rect); @@ -496,13 +532,13 @@ void BandDesignIntf::snapshotItemsLayout() qSort(m_bandItems.begin(),m_bandItems.end(),itemSortContainerLessThen); } -void BandDesignIntf::arrangeSubItems(RenderPass pass, ArrangeType type) +void BandDesignIntf::arrangeSubItems(RenderPass pass, DataSourceManager *dataManager, ArrangeType type) { bool needArrage=(type==Force); foreach (PItemSortContainer item, m_bandItems) { if (item->m_item->isNeedUpdateSize(pass)){ - item->m_item->updateItemSize(pass); + item->m_item->updateItemSize(dataManager, pass); needArrage=true; } } @@ -656,6 +692,16 @@ void BandDesignIntf::childBandDeleted(QObject *band) m_childBands.removeAt(m_childBands.indexOf(reinterpret_cast(band))); } +int BandDesignIntf::columnIndex() const +{ + return m_columnIndex; +} + +void BandDesignIntf::setColumnIndex(int columnIndex) +{ + m_columnIndex = columnIndex; +} + bool BandDesignIntf::printIfEmpty() const { return m_printIfEmpty; @@ -707,24 +753,29 @@ bool BandDesignIntf::keepFooterTogether() const return m_keepFooterTogether; } -void BandDesignIntf::setKeepFooterTogether(bool keepFooterTogether) +void BandDesignIntf::setKeepFooterTogether(bool value) { - m_keepFooterTogether = keepFooterTogether; + if (m_keepFooterTogether!=value){ + bool oldValue = m_keepFooterTogether; + m_keepFooterTogether = value; + if (!isLoading()) + notify("keepFooterTogether",oldValue,value); + } } -void BandDesignIntf::updateItemSize(RenderPass pass,int maxHeight) +void BandDesignIntf::updateItemSize(DataSourceManager* dataManager, RenderPass pass, int maxHeight) { qreal spaceBorder=0; if (keepBottomSpaceOption()) spaceBorder=height()-findMaxBottom(); snapshotItemsLayout(); - arrangeSubItems(pass); + arrangeSubItems(pass, dataManager); if (autoHeight() && height()0)&&(height()>maxHeight)){ trimToMaxHeight(maxHeight); setHeight(maxHeight); } - BaseDesignIntf::updateItemSize(pass,maxHeight); + BaseDesignIntf::updateItemSize(dataManager, pass, maxHeight); } QColor BandDesignIntf::selectionColor() const diff --git a/src/lrbanddesignintf.h b/src/lrbanddesignintf.h index fbf3f3f..b190a75 100644 --- a/src/lrbanddesignintf.h +++ b/src/lrbanddesignintf.h @@ -30,6 +30,7 @@ #ifndef LRBANDDESIGNINTF_H #define LRBANDDESIGNINTF_H #include "lrbasedesignintf.h" +#include "lrdatasourcemanager.h" #include namespace LimeReport { @@ -37,11 +38,13 @@ namespace LimeReport { class IGroupBand { public: - virtual void startGroup()=0; - virtual bool isNeedToClose()=0; - virtual bool isStarted()=0; - virtual void closeGroup()=0; - virtual int index()=0; + virtual void startGroup(DataSourceManager* dataManager) = 0; + virtual bool isNeedToClose(DataSourceManager* dataManager) = 0; + virtual bool isStarted() = 0; + virtual void closeGroup() = 0; + virtual int index() = 0; + virtual bool startNewPage()const = 0 ; + virtual bool resetPageNumber()const = 0 ; virtual ~IGroupBand(){} }; @@ -89,6 +92,7 @@ class BandDesignIntf : public BaseDesignIntf Q_PROPERTY(QString parentBand READ parentBandName WRITE setParentBandName DESIGNABLE false ) Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor) Q_PROPERTY(bool printIfEmpty READ printIfEmpty WRITE setPrintIfEmpty) + Q_ENUMS(BandColumnsLayoutType) friend class BandMarker; friend class BandNameLabel; public: @@ -108,6 +112,10 @@ public: PageFooter=11 }; + enum BandColumnsLayoutType{ + Horizontal, Vertical + }; + BandDesignIntf(BandsType bandType, const QString& xmlTypeName, QObject* owner = 0, QGraphicsItem* parent=0); ~BandDesignIntf(); @@ -116,7 +124,7 @@ public: virtual QString bandTitle() const; virtual QIcon bandIcon() const; virtual bool isUnique() const; - virtual void updateItemSize(RenderPass pass=FirstPass, int maxHeight=0); + virtual void updateItemSize(DataSourceManager *dataManager, RenderPass pass=FirstPass, int maxHeight=0); virtual QColor selectionColor() const; int bandIndex() const; @@ -165,10 +173,10 @@ public: void emitBandRendered(BandDesignIntf *band); bool isSplittable() const {return m_splitable;} - void setSplittable(bool value){m_splitable=value;} + void setSplittable(bool value); bool keepFooterTogether() const; - void setKeepFooterTogether(bool keepFooterTogether); + void setKeepFooterTogether(bool value); int maxScalePercent() const; void setMaxScalePercent(int maxScalePercent); @@ -182,11 +190,16 @@ public: virtual BandDesignIntf* bandHeader(); virtual BandDesignIntf* bandFooter(); + int columnsCount() const {return m_columnsCount;} + BandColumnsLayoutType columnsFillDirection(){ return m_columnsFillDirection;} + int columnIndex() const; + void setColumnIndex(int columnIndex); + signals: void bandRendered(BandDesignIntf* band); protected: void snapshotItemsLayout(); - void arrangeSubItems(RenderPass pass, ArrangeType type = AsNeeded); + void arrangeSubItems(RenderPass pass, DataSourceManager *dataManager, ArrangeType type = AsNeeded); qreal findMaxBottom(); qreal findMaxHeight(); void trimToMaxHeight(int maxHeight); @@ -207,6 +220,8 @@ protected: virtual QColor bandColor() const; void setMarkerColor(QColor color); void checkEmptyTable(); + void setColumnsCount(int value); + void setColumnsFillDirection(BandColumnsLayoutType value); private slots: void childBandDeleted(QObject* band); private: @@ -228,6 +243,9 @@ private: bool m_sliceLastRow; bool m_printIfEmpty; BandNameLabel* m_bandNameLabel; + int m_columnsCount; + int m_columnIndex; + BandColumnsLayoutType m_columnsFillDirection; }; class DataBandDesignIntf : public BandDesignIntf{ diff --git a/src/lrbasedesignintf.cpp b/src/lrbasedesignintf.cpp index bbc3395..6de3689 100644 --- a/src/lrbasedesignintf.cpp +++ b/src/lrbasedesignintf.cpp @@ -70,7 +70,9 @@ BaseDesignIntf::BaseDesignIntf(const QString &storageTypeName, QObject *owner, Q m_selectionMarker(0), m_backgroundBrush(Solid), m_backgroundBrushcolor(Qt::white), - m_margin(4) + m_margin(4), + m_itemAlign(DesignedItemAlign), + m_changingItemAlign(false) { setGeometry(QRectF(0, 0, m_width, m_height)); if (BaseDesignIntf *item = dynamic_cast(parent)) { @@ -164,6 +166,8 @@ qreal BaseDesignIntf::width() const void BaseDesignIntf::setWidth(qreal width) { setGeometry(QRectF(rect().x(), rect().y(), width, rect().height())); + if (!m_changingItemAlign) + updateItemAlign(); } qreal BaseDesignIntf::height() const @@ -493,17 +497,83 @@ void BaseDesignIntf::setZValueProperty(qreal value) } } -//void BaseDesignIntf::slotObjectNameChanged(const QString &newName) -//{ -// if (!isLoading() && page() && this->itemMode()==LimeReport::DesignMode){ -// QList list = page()->reportItemsByName(newName); -// if (list.size()>1){ -// setObjectName(page()->genObjectName(*this)); -// notify("objectName",newName,objectName()); -// } +BaseDesignIntf::ItemAlign BaseDesignIntf::itemAlign() const +{ + return m_itemAlign; +} -// } -//} +QPointF BaseDesignIntf::modifyPosForAlignedItem(const QPointF& pos){ + QPointF result = pos; + BaseDesignIntf* parent = dynamic_cast(parentItem()); + PageItemDesignIntf* parentPage = dynamic_cast(parentItem()); + if (parent){ + qreal leftBorder = parentPage?parentPage->leftMargin()*mmFactor():0; + qreal rightBorder = parentPage?parentPage->rightMargin()*mmFactor():0; + qreal aviableSpace = parent->width()-(leftBorder+rightBorder); + + switch(m_itemAlign){ + case LeftItemAlign: + result.setX(leftBorder); + break; + case RightItemAlign: + result.setX(parent->width()-rightBorder); + break; + case CenterItemAlign: + result.setX((aviableSpace-width())/2); + break; + case ParentWidthItemAlign: + result.setX(leftBorder); + case DesignedItemAlign: + break; + } + } + return result; +} + +void BaseDesignIntf::updateItemAlign(){ + BaseDesignIntf* parent = dynamic_cast(parentItem()); + PageItemDesignIntf* parentPage = dynamic_cast(parentItem()); + m_changingItemAlign = true; + if (parent){ + qreal leftBorder = parentPage?parentPage->leftMargin()*mmFactor():0; + qreal rightBorder = parentPage?parentPage->rightMargin()*mmFactor():0; + qreal aviableSpace = parent->width()-(leftBorder+rightBorder); + + setPos(modifyPosForAlignedItem(pos())); + if (m_itemAlign == ParentWidthItemAlign) + setWidth(aviableSpace); + } + m_changingItemAlign = false; +} + +void BaseDesignIntf::updatePosibleDirectionFlags(){ + setPosibleResizeDirectionFlags(AllDirections); + switch(m_itemAlign){ + case LeftItemAlign: + setPosibleResizeDirectionFlags(AllDirections^ResizeLeft); + break; + case RightItemAlign: + setPosibleResizeDirectionFlags(AllDirections^ResizeRight); + break; + case ParentWidthItemAlign: + setPosibleResizeDirectionFlags(ResizeBottom|ResizeTop); + case CenterItemAlign: + case DesignedItemAlign: + break; + } +} + +void BaseDesignIntf::setItemAlign(const ItemAlign &itemAlign) +{ + if (m_itemAlign != itemAlign){ + ItemAlign oldValue = m_itemAlign; + m_itemAlign = itemAlign; + notify("itemAlign",oldValue,itemAlign); + updatePosibleDirectionFlags(); + updateItemAlign(); + emit itemAlignChanged(this, oldValue, itemAlign); + } +} QString BaseDesignIntf::itemTypeName() const { @@ -738,6 +808,10 @@ QVariant BaseDesignIntf::itemChange(QGraphicsItem::GraphicsItemChange change, co updateSelectionMarker(); m_selectionMarker->setVisible(value.toBool()); } + if (change == QGraphicsItem::ItemParentHasChanged) { + parentChangedEvent(dynamic_cast(value.value())); + } + return QGraphicsItem::itemChange(change, value); } @@ -746,6 +820,11 @@ void BaseDesignIntf::childAddedEvent(BaseDesignIntf *child) Q_UNUSED(child) } +void BaseDesignIntf::parentChangedEvent(BaseDesignIntf *) +{ + +} + QPainterPath BaseDesignIntf::shape() const { QPainterPath path; @@ -804,8 +883,9 @@ void BaseDesignIntf::setItemMode(ItemMode mode) void BaseDesignIntf::setItemPos(const QPointF &newPos) { QPointF oldPos = pos(); - QGraphicsItem::setPos(newPos); - emit posChanged(this, newPos, oldPos); + QPointF finalPos = modifyPosForAlignedItem(newPos); + QGraphicsItem::setPos(finalPos); + emit posChanged(this, finalPos, oldPos); } void BaseDesignIntf::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) @@ -925,10 +1005,12 @@ ReportEnginePrivate *BaseDesignIntf::reportEditor() else return 0; } -void BaseDesignIntf::updateItemSize(RenderPass pass, int maxHeight) +void BaseDesignIntf::updateItemSize(DataSourceManager *dataManager, RenderPass pass, int maxHeight) { Q_UNUSED(maxHeight); + Q_UNUSED(dataManager); m_currentPass = pass; + updateItemAlign(); } bool BaseDesignIntf::isNeedUpdateSize(RenderPass /*pass*/) const @@ -943,8 +1025,10 @@ QObject *BaseDesignIntf::createElement(const QString& /*collectionName*/, const { BaseDesignIntf* obj = 0; try{ - obj = LimeReport::DesignElementsFactory::instance().objectCreator(elementType)(this, this); - connect(obj,SIGNAL(propertyChanged(QString,QVariant,QVariant)),page(),SLOT(slotItemPropertyChanged(QString,QVariant,QVariant))); + if (LimeReport::DesignElementsFactory::instance().objectCreator(elementType)){ + obj = LimeReport::DesignElementsFactory::instance().objectCreator(elementType)(this, this); + connect(obj,SIGNAL(propertyChanged(QString,QVariant,QVariant)),page(),SLOT(slotItemPropertyChanged(QString,QVariant,QVariant))); + } } catch (ReportError error){ qDebug()< childBaseItems(); BaseDesignIntf* childByName(const QString& name); @@ -212,6 +216,10 @@ public: void setItemTypeName(const QString &itemTypeName); void emitObjectNamePropertyChanged(const QString& oldName, const QString& newName); void showEditorDialog(); + ItemAlign itemAlign() const; + virtual void setItemAlign(const ItemAlign &itemAlign); + void updateItemAlign(); + QPointF modifyPosForAlignedItem(const QPointF &pos); protected: //ICollectionContainer @@ -236,6 +244,7 @@ protected: virtual void initMode(LimeReport::BaseDesignIntf::ItemMode mode); virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value); virtual void childAddedEvent(BaseDesignIntf* child); + virtual void parentChangedEvent(BaseDesignIntf*); void drawTopLine(QPainter *painter, QRectF rect) const; void drawBootomLine(QPainter *painter, QRectF rect) const; @@ -257,14 +266,14 @@ protected: RenderPass currentRenderPass(){return m_currentPass;} virtual bool drawDesignBorders() const {return true;} + private: void updateSelectionMarker(); int resizeDirectionFlags(QPointF position); void moveSelectedItems(QPointF delta); Qt::CursorShape getPosibleCursor(int cursorFlags); void setZValueProperty(qreal value); -private slots: -// void slotObjectNameChanged(const QString& newName); + void updatePosibleDirectionFlags(); private: QPointF m_startPos; QPointF m_startScenePos; @@ -306,6 +315,8 @@ private: RenderPass m_currentPass; int m_margin; QString m_itemTypeName; + ItemAlign m_itemAlign; + bool m_changingItemAlign; signals: void geometryChanged(QObject* object, QRectF newGeometry, QRectF oldGeometry); void posChanged(QObject* object, QPointF newPos, QPointF oldPos); @@ -316,6 +327,7 @@ signals: void propertyChanged(const QString& propertName, const QVariant& oldValue,const QVariant& newValue); void propertyObjectNameChanged(const QString& oldValue, const QString& newValue); void propertyesChanged(QVector propertyNames); + void itemAlignChanged(BaseDesignIntf* item, const ItemAlign& oldValue, const ItemAlign& newValue); }; } //namespace LimeReport diff --git a/src/lrdatadesignintf.cpp b/src/lrdatadesignintf.cpp index e410fbc..a4f9f52 100644 --- a/src/lrdatadesignintf.cpp +++ b/src/lrdatadesignintf.cpp @@ -56,8 +56,9 @@ IDataSource * ModelHolder::dataSource(IDataSource::DatasourceMode mode) return m_dataSource; } -QueryHolder::QueryHolder(QString queryText, QString connectionName) - : m_query(0), m_queryText(queryText), m_connectionName(connectionName), m_mode(IDataSource::RENDER_MODE) +QueryHolder::QueryHolder(QString queryText, QString connectionName, DataSourceManager *dataManager) + : m_query(0), m_queryText(queryText), m_connectionName(connectionName), + m_mode(IDataSource::RENDER_MODE), m_dataManager(dataManager) { extractParams(); } @@ -98,7 +99,7 @@ bool QueryHolder::runQuery(IDataSource::DatasourceMode mode) return false; } else setLastError(""); - setDatasource(IDataSource::Ptr(new ModelToDataSource(model,true))); + setDatasource(IDataSource::Ptr(new ModelToDataSource(model,true))); return true; } @@ -112,6 +113,18 @@ void QueryHolder::setConnectionName(QString connectionName) m_connectionName=connectionName; } +void QueryHolder::invalidate(IDataSource::DatasourceMode mode){ + QSqlDatabase db = QSqlDatabase::database(m_connectionName); + if (!db.isValid()){ + setLastError(QObject::tr("Invalid connection! %1").arg(m_connectionName)); + delete m_query; + m_dataSource.clear(); + } else { + runQuery(mode); + } + +} + void QueryHolder::update() { runQuery(m_mode); @@ -124,14 +137,13 @@ void QueryHolder::setDatasource(IDataSource::Ptr value){ void QueryHolder::fillParams(QSqlQuery *query) { - DataSourceManager* dm=DataSourceManager::instance(); foreach(QString param,m_aliasesToParam.keys()){ QVariant value; if (param.contains(".")){ - value = dm->fieldData(m_aliasesToParam.value(param)); + value = dataManager()->fieldData(m_aliasesToParam.value(param)); param=param.right(param.length()-param.indexOf('.')-1); } else { - value = dm->variable(m_aliasesToParam.value(param)); + value = dataManager()->variable(m_aliasesToParam.value(param)); } if (value.isValid() || m_mode == IDataSource::DESIGN_MODE) query->bindValue(':'+param,value); @@ -344,18 +356,16 @@ QueryDesc::QueryDesc(QString queryName, QString queryText, QString connection) :m_queryName(queryName), m_query(queryText), m_connectionName(connection) {} -SubQueryHolder::SubQueryHolder(QString queryText, QString connectionName, QString masterDatasource) - : QueryHolder(queryText,connectionName), m_masterDatasource(masterDatasource), m_invalid(false) +SubQueryHolder::SubQueryHolder(QString queryText, QString connectionName, QString masterDatasource, DataSourceManager* dataManager) + : QueryHolder(queryText, connectionName, dataManager), m_masterDatasource(masterDatasource)/*, m_invalid(false)*/ { extractParams(); } void SubQueryHolder::setMasterDatasource(const QString &value) { - DataSourceManager* dm = DataSourceManager::instance(); - if (dm->dataSource(value)){ + if (dataManager()->dataSource(value)){ m_masterDatasource = value; - m_invalid = false; } } @@ -429,8 +439,9 @@ QObject *ProxyDesc::elementAt(const QString &collectionName, int index) return m_maps.at(index); } -ProxyHolder::ProxyHolder(ProxyDesc* desc) - :m_desc(desc), m_lastError(""), m_mode(IDataSource::RENDER_MODE), m_invalid(false) +ProxyHolder::ProxyHolder(ProxyDesc* desc, DataSourceManager* dataManager) + :m_model(0), m_desc(desc), m_lastError(""), m_mode(IDataSource::RENDER_MODE), + m_invalid(false), m_dataManger(dataManager) {} QString ProxyHolder::masterDatasource() @@ -442,12 +453,12 @@ QString ProxyHolder::masterDatasource() void ProxyHolder::filterModel() { if (!m_datasource){ - DataSourceManager* dm=DataSourceManager::instance(); - if (dm){ - IDataSource* master = dm->dataSource(m_desc->master()); - IDataSource* child = dm->dataSource(m_desc->child()); + + if (dataManager()){ + IDataSource* master = dataManager()->dataSource(m_desc->master()); + IDataSource* child = dataManager()->dataSource(m_desc->child()); if (master&&child){ - m_model = new MasterDetailProxyModel(); + m_model = new MasterDetailProxyModel(dataManager()); connect(child->model(),SIGNAL(destroyed()), this, SLOT(slotChildModelDestoroyed())); m_model->setSourceModel(child->model()); m_model->setMaster(m_desc->master()); @@ -459,6 +470,8 @@ void ProxyHolder::filterModel() } catch (ReportError& exception) { m_lastError = exception.what(); } + m_invalid = false; + m_lastError.clear(); } else { m_lastError.clear(); if(!master) m_lastError+=QObject::tr("Master datasouce \"%1\" not found!").arg(m_desc->master()); @@ -484,6 +497,22 @@ IDataSource *ProxyHolder::dataSource(IDataSource::DatasourceMode mode) return m_datasource.data(); } +void ProxyHolder::invalidate(IDataSource::DatasourceMode mode) +{ + Q_UNUSED(mode) + if (m_model && m_model->isInvalid()){ + m_invalid = true; + m_lastError = tr("Datasource has been invalidated"); + } else { + filterModel(); + } +} + +void ProxyHolder::slotChildModelDestoroyed(){ + m_datasource.clear(); + m_model = 0; +} + void ProxyDesc::addFieldsCorrelation(const FieldsCorrelation& fieldsCorrelation) { m_maps.append(new FieldMapDesc(fieldsCorrelation)); @@ -493,6 +522,15 @@ void MasterDetailProxyModel::setMaster(QString name){ m_masterName=name; } +bool MasterDetailProxyModel::isInvalid() const +{ + if (m_masterName.isEmpty() || m_childName.isEmpty()) return true; + IDataSource* masterData = dataManager()->dataSource(m_masterName); + IDataSource* childData = dataManager()->dataSource(m_childName); + if (!masterData || !childData) return true; + return masterData->isInvalid() || childData->isInvalid(); +} + bool MasterDetailProxyModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const { Q_UNUSED(source_parent) @@ -529,7 +567,7 @@ QVariant MasterDetailProxyModel::sourceData(QString fieldName, int row) const QVariant MasterDetailProxyModel::masterData(QString fieldName) const { - IDataSource* master = DataSourceManager::instance()->dataSource(m_masterName); + IDataSource* master = dataManager()->dataSource(m_masterName); int columnIndex = master->columnIndexByName(fieldName); if (columnIndex!=-1){ return master->data(fieldName); diff --git a/src/lrdatadesignintf.h b/src/lrdatadesignintf.h index 1aaaab1..cb22141 100644 --- a/src/lrdatadesignintf.h +++ b/src/lrdatadesignintf.h @@ -43,6 +43,8 @@ namespace LimeReport{ +class DataSourceManager; + class IDataSource { public: enum DatasourceMode{DESIGN_MODE,RENDER_MODE}; @@ -72,7 +74,7 @@ public: virtual bool isOwned() const = 0; virtual bool isEditable() const = 0; virtual bool isRemovable() const = 0; - virtual void invalidate() = 0; + virtual void invalidate(IDataSource::DatasourceMode mode) = 0; virtual void update() = 0; virtual ~IDataSourceHolder(){} }; @@ -88,7 +90,7 @@ public: QString lastError() const { return m_dataSource->lastError(); } bool isEditable() const { return false; } bool isRemovable() const { return false; } - void invalidate(){} + void invalidate(IDataSource::DatasourceMode mode){Q_UNUSED(mode)} void update(){} signals: void modelStateChanged(); @@ -165,7 +167,7 @@ private: class QueryHolder:public IDataSourceHolder{ public: - QueryHolder(QString queryText, QString connectionName); + QueryHolder(QString queryText, QString connectionName, DataSourceManager* dataManager); ~QueryHolder(); virtual bool runQuery(IDataSource::DatasourceMode mode = IDataSource::RENDER_MODE); IDataSource* dataSource(IDataSource::DatasourceMode mode = IDataSource::RENDER_MODE); @@ -179,8 +181,9 @@ public: bool isRemovable() const { return true; } QString lastError() const { return m_lastError; } void setLastError(QString value){m_lastError=value; if (m_query) {delete m_query; m_query=0;}} - void invalidate(){} + void invalidate(IDataSource::DatasourceMode mode); void update(); + DataSourceManager* dataManager() const {return m_dataManager;} protected: void setDatasource(IDataSource::Ptr value); virtual void fillParams(QSqlQuery* query); @@ -195,6 +198,7 @@ private: QString m_lastError; IDataSource::Ptr m_dataSource; IDataSource::DatasourceMode m_mode; + DataSourceManager* m_dataManager; }; class SubQueryDesc : public QueryDesc{ @@ -211,18 +215,18 @@ private: class SubQueryHolder:public QueryHolder{ public: - SubQueryHolder(QString queryText, QString connectionName, QString masterDatasource); + SubQueryHolder(QString queryText, QString connectionName, QString masterDatasource, DataSourceManager *dataManager); QString masterDatasource(){return m_masterDatasource;} void setMasterDatasource(const QString& value); - void invalidate(){m_invalid = true;} - bool isInvalid() const{ return QueryHolder::isInvalid() || m_invalid;} + //void invalidate(){m_invalid = true;} + bool isInvalid() const{ return QueryHolder::isInvalid(); /*|| m_invalid;*/} protected: void extractParams(); QString extractField(QString source); QString replaceFields(QString query); private: QString m_masterDatasource; - bool m_invalid; + //bool m_invalid; }; struct FieldsCorrelation{ @@ -273,10 +277,12 @@ private: class MasterDetailProxyModel : public QSortFilterProxyModel{ public: - MasterDetailProxyModel():m_maps(0){} + MasterDetailProxyModel(DataSourceManager* dataManager):m_maps(0),m_dataManager(dataManager){} void setMaster(QString name); void setChildName(QString name){m_childName=name;} void setFieldsMap(QList *fieldsMap){m_maps=fieldsMap;} + bool isInvalid() const; + DataSourceManager* dataManager() const {return m_dataManager;} protected: bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const; int fieldIndexByName(QString fieldName) const; @@ -286,13 +292,13 @@ private: QList* m_maps; QString m_masterName; QString m_childName; - + DataSourceManager* m_dataManager; }; class ProxyHolder: public QObject, public IDataSourceHolder{ Q_OBJECT public: - ProxyHolder(ProxyDesc *desc); + ProxyHolder(ProxyDesc *desc, DataSourceManager *dataManager); QString masterDatasource(); void filterModel(); IDataSource* dataSource(IDataSource::DatasourceMode mode = IDataSource::RENDER_MODE); @@ -301,10 +307,11 @@ public: bool isEditable() const { return true; } bool isRemovable() const { return true; } QString lastError() const { return m_lastError; } - void invalidate(){m_invalid = true; m_lastError = tr("Datasource has been invalidated");} - void update(){}; + void invalidate(IDataSource::DatasourceMode mode); + void update(){} + DataSourceManager* dataManager() const {return m_dataManger;} private slots: - void slotChildModelDestoroyed(){m_datasource.clear();} + void slotChildModelDestoroyed(); private: IDataSource::Ptr m_datasource; MasterDetailProxyModel *m_model; @@ -312,6 +319,7 @@ private: QString m_lastError; IDataSource::DatasourceMode m_mode; bool m_invalid; + DataSourceManager* m_dataManger; }; class ModelToDataSource : public QObject, public IDataSource{ @@ -397,7 +405,7 @@ public: bool isOwned() const {return m_owned;} bool isEditable() const {return false;} bool isRemovable() const {return false;} - void invalidate(){} + void invalidate(IDataSource::DatasourceMode mode){Q_UNUSED(mode)} ~CallbackDatasourceHolder(){if (m_datasource) delete m_datasource;} void update(){} private: diff --git a/src/lrdatasourcemanager.cpp b/src/lrdatasourcemanager.cpp index 6275c07..4ac169b 100644 --- a/src/lrdatasourcemanager.cpp +++ b/src/lrdatasourcemanager.cpp @@ -210,21 +210,16 @@ void DataSourceModel::updateModel() } } -DataSourceManager* DataSourceManager::m_instance=0; - DataSourceManager::DataSourceManager(QObject *parent) : QObject(parent), m_lastError(""), m_designTime(true) { - m_instance=this; m_groupFunctionFactory.registerFunctionCreator(QLatin1String("COUNT"),new ConstructorGroupFunctionCreator); m_groupFunctionFactory.registerFunctionCreator(QLatin1String("SUM"),new ConstructorGroupFunctionCreator); m_groupFunctionFactory.registerFunctionCreator(QLatin1String("AVG"),new ConstructorGroupFunctionCreator); m_groupFunctionFactory.registerFunctionCreator(QLatin1String("MIN"),new ConstructorGroupFunctionCreator); m_groupFunctionFactory.registerFunctionCreator(QLatin1String("MAX"),new ConstructorGroupFunctionCreator); - setSystemVariable(QLatin1String("#PAGE"),1,FirstPass); setSystemVariable(QLatin1String("#PAGE_COUNT"),0,SecondPass); - m_datasourcesModel.setDataSourceManager(this); } bool DataSourceManager::designTime() const @@ -242,7 +237,6 @@ DataSourceManager::~DataSourceManager() { clear(All); clearGroupFunction(); - m_instance=0; } void DataSourceManager::connectAllDatabases() @@ -387,21 +381,6 @@ QString DataSourceManager::replaceFields(QString query, QMap &a } } return query; - -// QRegExp rx(Const::FIELD_RX); -// if (query.contains(rx)){ -// while ((rx.indexIn(query))!=-1){ -// QString field=rx.cap(0); -// field.remove("$D{"); -// field.remove("}"); -// if (field.contains(".")) -// aliasesToParam.append(field); -// else -// aliasesToParam.append(masterDatasource+"."+field); -// query.replace(rx.cap(0),":"+extractField(field)); -// } -// } -// return query; } void DataSourceManager::setReportVariable(const QString &name, const QVariant &value) @@ -415,7 +394,7 @@ void DataSourceManager::addQuery(const QString &name, const QString &sqlText, co { QueryDesc *queryDecs = new QueryDesc(name,sqlText,connectionName); putQueryDesc(queryDecs); - putHolder(name,new QueryHolder(sqlText,connectionName)); + putHolder(name,new QueryHolder(sqlText, connectionName, this)); emit datasourcesChanged(); } @@ -423,7 +402,7 @@ void DataSourceManager::addSubQuery(const QString &name, const QString &sqlText, { SubQueryDesc *subQueryDesc = new SubQueryDesc(name.toLower(),sqlText,connectionName,masterDatasource); putSubQueryDesc(subQueryDesc); - putHolder(name,new SubQueryHolder(sqlText,connectionName,masterDatasource)); + putHolder(name,new SubQueryHolder(sqlText, connectionName, masterDatasource, this)); emit datasourcesChanged(); } @@ -437,7 +416,7 @@ void DataSourceManager::addProxy(const QString &name, QString master, QString de proxyDesc->addFieldsCorrelation(correlation); } putProxyDesc(proxyDesc); - putHolder(name,new ProxyHolder(proxyDesc)); + putHolder(name,new ProxyHolder(proxyDesc, this)); emit datasourcesChanged(); } @@ -602,28 +581,28 @@ void DataSourceManager::putHolder(QString name, IDataSourceHolder *dataSource) name.toLower(), dataSource ); - } else throw ReportError(tr("data source with name \"%1\" already exists !!").arg(name)); + } else throw ReportError(tr("datasource with name \"%1\" already exists !").arg(name)); } void DataSourceManager::putQueryDesc(QueryDesc* queryDesc) { if (!containsDatasource(queryDesc->queryName())){ m_queries.append(queryDesc); - } else throw ReportError(tr("datasource with name \"%1\"already exists !!").arg(queryDesc->queryName())); + } else throw ReportError(tr("datasource with name \"%1\" already exists !").arg(queryDesc->queryName())); } void DataSourceManager::putSubQueryDesc(SubQueryDesc *subQueryDesc) { if (!containsDatasource(subQueryDesc->queryName())){ m_subqueries.append(subQueryDesc); - } else throw ReportError(tr("datasource with name \"%1\" already exists !!").arg(subQueryDesc->queryName())); + } else throw ReportError(tr("datasource with name \"%1\" already exists !").arg(subQueryDesc->queryName())); } void DataSourceManager::putProxyDesc(ProxyDesc *proxyDesc) { if (!containsDatasource(proxyDesc->name())){ m_proxies.append(proxyDesc); - } else throw ReportError(tr("datasource with name \"%1\" already exists !!").arg(proxyDesc->name())); + } else throw ReportError(tr("datasource with name \"%1\" already exists !").arg(proxyDesc->name())); } bool DataSourceManager::connectConnection(ConnectionDesc *connectionDesc) @@ -649,13 +628,20 @@ bool DataSourceManager::connectConnection(ConnectionDesc *connectionDesc) QSqlDatabase::removeDatabase(connectionDesc->name()); setLastError(lastError); return false; - //throw ReportError(lastError); } else { foreach(QString datasourceName, dataSourceNames()){ if (isQuery(datasourceName) || isSubQuery(datasourceName)){ QueryHolder* qh = dynamic_cast(dataSourceHolder(datasourceName)); if (qh){ - qh->runQuery(designTime()?IDataSource::DESIGN_MODE:IDataSource::RENDER_MODE); + qh->invalidate(designTime()?IDataSource::DESIGN_MODE:IDataSource::RENDER_MODE); + } + } + } + foreach(QString datasourceName, dataSourceNames()){ + if (isProxy(datasourceName)){ + ProxyHolder* ph = dynamic_cast(dataSourceHolder(datasourceName)); + if (ph){ + ph->invalidate(designTime()?IDataSource::DESIGN_MODE:IDataSource::RENDER_MODE); } } } @@ -699,19 +685,21 @@ bool DataSourceManager::connectConnection(const QString& connectionName) void DataSourceManager::disconnectConnection(const QString& connectionName) { + foreach(QString datasourceName, dataSourceNames()){ + if (isQuery(datasourceName) || isSubQuery(datasourceName)){ + QueryHolder* qh = dynamic_cast(dataSourceHolder(datasourceName)); + if (qh && qh->connectionName().compare(connectionName,Qt::CaseInsensitive)==0){ + qh->invalidate(designTime()?IDataSource::DESIGN_MODE:IDataSource::RENDER_MODE); + qh->setLastError(tr("invalid connection")); + } + } + } { QSqlDatabase db = QSqlDatabase::database(connectionName); if (db.isOpen()) db.close(); } if (QSqlDatabase::contains(connectionName)) QSqlDatabase::removeDatabase(connectionName); - foreach(QString datasourceName, dataSourceNames()){ - if (isQuery(datasourceName) || isSubQuery(datasourceName)){ - QueryHolder* qh = dynamic_cast(dataSourceHolder(datasourceName)); - if (qh){ - qh->setLastError(tr("invalid connection")); - } - } - } + } IDataSource *DataSourceManager::dataSource(const QString &name) @@ -881,19 +869,19 @@ void DataSourceManager::collectionLoadFinished(const QString &collectionName) if (collectionName.compare("queries",Qt::CaseInsensitive)==0){ foreach(QueryDesc* query,m_queries){ - putHolder(query->queryName(),new QueryHolder(query->queryText(),query->connectionName())); + putHolder(query->queryName(),new QueryHolder(query->queryText(), query->connectionName(), this)); } } if (collectionName.compare("subqueries",Qt::CaseInsensitive)==0){ foreach(SubQueryDesc* query,m_subqueries){ - putHolder(query->queryName(),new SubQueryHolder(query->queryText(),query->connectionName(),query->master())); + putHolder(query->queryName(),new SubQueryHolder(query->queryText(), query->connectionName(), query->master(), this)); } } if(collectionName.compare("subproxies",Qt::CaseInsensitive)==0){ foreach(ProxyDesc* proxy,m_proxies){ - putHolder(proxy->name(),new ProxyHolder(proxy)); + putHolder(proxy->name(),new ProxyHolder(proxy, this)); } } @@ -949,12 +937,12 @@ void DataSourceManager::invalidateLinkedDatasources(QString datasourceName) foreach(QString name, dataSourceNames()){ if (isSubQuery(name)){ if (subQueryByName(name)->master() == datasourceName) - dataSourceHolder(name)->invalidate(); + dataSourceHolder(name)->invalidate(designTime()?IDataSource::DESIGN_MODE:IDataSource::RENDER_MODE); } if (isProxy(name)){ ProxyDesc* proxy = proxyByName(name); if ((proxy->master() == datasourceName) || (proxy->child() == datasourceName)) - dataSourceHolder(name)->invalidate(); + dataSourceHolder(name)->invalidate(designTime()?IDataSource::DESIGN_MODE:IDataSource::RENDER_MODE); } } diff --git a/src/lrdatasourcemanager.h b/src/lrdatasourcemanager.h index 4a9179d..cb9134f 100644 --- a/src/lrdatasourcemanager.h +++ b/src/lrdatasourcemanager.h @@ -101,8 +101,6 @@ class DataSourceManager : public QObject, public ICollectionContainer, public IV Q_PROPERTY(ACollectionProperty variables READ fakeCollectionReader) friend class ReportEnginePrivate; friend class ReportRender; -public: - static DataSourceManager* instance(){return m_instance;} public: typedef QHash DataSourcesMap; enum ClearMethod {All,Owned}; @@ -211,7 +209,6 @@ private: explicit DataSourceManager(QObject *parent = 0); Q_DISABLE_COPY(DataSourceManager) private: - static DataSourceManager* m_instance; QList m_connections; QList m_queries; QList m_subqueries; diff --git a/src/lritemdesignintf.cpp b/src/lritemdesignintf.cpp index 067b998..ef8e869 100644 --- a/src/lritemdesignintf.cpp +++ b/src/lritemdesignintf.cpp @@ -113,23 +113,22 @@ void ItemDesignIntf::initFlags() } } -QString ContentItemDesignIntf::expandDataFields(QString context, ExpandType expandType) -{ - DataSourceManager* dm = DataSourceManager::instance(); +QString ContentItemDesignIntf::expandDataFields(QString context, ExpandType expandType, DataSourceManager* dataManager) +{ QRegExp rx(Const::FIELD_RX); if (context.contains(rx)){ while ((rx.indexIn(context))!=-1){ QString field=rx.cap(1); - if (dm->containsField(field)) { + if (dataManager->containsField(field)) { QString fieldValue; if (expandType == EscapeSymbols) { - if (dm->fieldData(field).isNull()) { + if (dataManager->fieldData(field).isNull()) { fieldValue="\"\""; } else { - fieldValue = escapeSimbols(dm->fieldData(field).toString()); - switch (dm->fieldData(field).type()) { + fieldValue = escapeSimbols(dataManager->fieldData(field).toString()); + switch (dataManager->fieldData(field).type()) { case QVariant::Char: case QVariant::String: case QVariant::StringList: @@ -142,18 +141,18 @@ QString ContentItemDesignIntf::expandDataFields(QString context, ExpandType expa } } } else { - fieldValue = dm->fieldData(field).toString(); + fieldValue = dataManager->fieldData(field).toString(); } context.replace(rx.cap(0),fieldValue); } else { QString error; - if (dm->lastError().isEmpty()){ + if (dataManager->lastError().isEmpty()){ error = QString("Field %1 not found in %2 !!! ").arg(field).arg(this->objectName()); - dm->putError(error); + dataManager->putError(error); } else { - error = dm->lastError(); + error = dataManager->lastError(); } context.replace(rx.cap(0),error); } @@ -163,21 +162,20 @@ QString ContentItemDesignIntf::expandDataFields(QString context, ExpandType expa return context; } -QString ContentItemDesignIntf::expandUserVariables(QString context, RenderPass pass, ExpandType expandType) +QString ContentItemDesignIntf::expandUserVariables(QString context, RenderPass pass, ExpandType expandType, DataSourceManager* dataManager) { - DataSourceManager* dm=DataSourceManager::instance(); QRegExp rx(Const::VARIABLE_RX); if (context.contains(rx)){ int pos = 0; while ((pos = rx.indexIn(context,pos))!=-1){ QString variable=rx.cap(1); pos += rx.matchedLength(); - if (dm->containsVariable(variable) ){ - if (pass==dm->variablePass(variable)){ + if (dataManager->containsVariable(variable) ){ + if (pass==dataManager->variablePass(variable)){ if (expandType==EscapeSymbols){ - context.replace(rx.cap(0),escapeSimbols(dm->variable(variable).toString())); + context.replace(rx.cap(0),escapeSimbols(dataManager->variable(variable).toString())); } else { - context.replace(rx.cap(0),dm->variable(variable).toString()); + context.replace(rx.cap(0),dataManager->variable(variable).toString()); } pos=0; } @@ -189,11 +187,12 @@ QString ContentItemDesignIntf::expandUserVariables(QString context, RenderPass p return context; } -QString ContentItemDesignIntf::expandScripts(QString context) +QString ContentItemDesignIntf::expandScripts(QString context, DataSourceManager* dataManager) { QRegExp rx(Const::SCRIPT_RX); if (context.contains(rx)){ + ScriptEngineManager::instance().setDataManager(dataManager); QScriptEngine* se = ScriptEngineManager::instance().scriptEngine(); QScriptValue svThis = se->globalObject().property("THIS"); @@ -207,8 +206,8 @@ QString ContentItemDesignIntf::expandScripts(QString context) ScriptExtractor scriptExtractor(context); if (scriptExtractor.parse()){ for(int i=0; ievaluate(scriptBody); if (!se->hasUncaughtException()) { context.replace(scriptExtractor.scriptAt(i),value.toString()); diff --git a/src/lritemdesignintf.h b/src/lritemdesignintf.h index ca2b926..1d185c5 100644 --- a/src/lritemdesignintf.h +++ b/src/lritemdesignintf.h @@ -77,9 +77,9 @@ public: enum ExpandType {EscapeSymbols, NoEscapeSymbols}; protected: QString escapeSimbols(const QString& value); - virtual QString expandUserVariables(QString context, RenderPass pass, ExpandType expandType); - virtual QString expandDataFields(QString context, ExpandType expandType); - virtual QString expandScripts(QString context); + virtual QString expandUserVariables(QString context, RenderPass pass, ExpandType expandType, DataSourceManager *dataManager); + virtual QString expandDataFields(QString context, ExpandType expandType, DataSourceManager *dataManager); + virtual QString expandScripts(QString context, DataSourceManager *dataManager); }; diff --git a/src/lrpagedesignintf.cpp b/src/lrpagedesignintf.cpp index 7651504..b276098 100644 --- a/src/lrpagedesignintf.cpp +++ b/src/lrpagedesignintf.cpp @@ -899,6 +899,13 @@ void PageDesignIntf::emitItemRemoved(BaseDesignIntf *item) emit itemRemoved(this,item); } } + +DataSourceManager *PageDesignIntf::datasourceManager() +{ + if (m_reportEditor) return m_reportEditor->dataManager(); + return 0; +} + void PageDesignIntf::registerBand(BandDesignIntf *band) { if (pageItem()&&!pageItem()->isBandRegistred(band)) { @@ -912,14 +919,22 @@ void PageDesignIntf::slotUpdateItemSize() foreach(QGraphicsItem * item, items()) { BandDesignIntf *reportBand = dynamic_cast(item); - if (reportBand) reportBand->updateItemSize(); + if (reportBand) reportBand->updateItemSize(0); } } void PageDesignIntf::saveChangeProppertyCommand(const QString &objectName, const QString &propertyName, const QVariant &oldPropertyValue, const QVariant &newPropertyValue) { if (!m_executingCommand) { - CommandIf::Ptr command = PropertyChangedCommand::create(this, objectName, propertyName, oldPropertyValue, newPropertyValue); + CommandIf::Ptr command; + if (propertyName.compare("ItemAlign",Qt::CaseInsensitive)==0){ + command = PropertyItemAlignChangedCommand::create(this, objectName, + BaseDesignIntf::ItemAlign(oldPropertyValue.toInt()), + BaseDesignIntf::ItemAlign(newPropertyValue.toInt()) + ); + } else { + command = PropertyChangedCommand::create(this, objectName, propertyName, oldPropertyValue, newPropertyValue); + } saveCommand(command, false); } } @@ -1821,5 +1836,50 @@ void PropertyObjectNameChangedCommand::undoIt() } +CommandIf::Ptr PropertyItemAlignChangedCommand::create(PageDesignIntf *page, const QString &objectName, + BaseDesignIntf::ItemAlign oldValue, BaseDesignIntf::ItemAlign newValue) +{ + PropertyItemAlignChangedCommand *command = new PropertyItemAlignChangedCommand(); + command->setPage(page); + command->m_objectName = objectName; + command->m_propertyName = "itemAlign"; + command->m_oldValue = oldValue; + command->m_newValue = newValue; + + BaseDesignIntf *reportItem = page->reportItemByName(objectName); + if (oldValue == BaseDesignIntf::DesignedItemAlign){ + command->m_savedPos = reportItem->pos(); + } + + return CommandIf::Ptr(command); +} + +bool PropertyItemAlignChangedCommand::doIt() +{ + BaseDesignIntf *reportItem = page()->reportItemByName(m_objectName); + + //if (m_oldValue == BaseDesignIntf::DesignedItemAlign){ + // m_savedPos = reportItem->pos(); + //} + + if (reportItem && (reportItem->property(m_propertyName.toLatin1()) != m_newValue)) { + reportItem->setProperty(m_propertyName.toLatin1(), m_newValue); + } + + return true; +} + +void PropertyItemAlignChangedCommand::undoIt() +{ + BaseDesignIntf *reportItem = page()->reportItemByName(m_objectName); + + if (reportItem && (reportItem->property(m_propertyName.toLatin1()) != m_oldValue)) { + reportItem->setProperty(m_propertyName.toLatin1(), m_oldValue); + } + if (m_oldValue == BaseDesignIntf::DesignedItemAlign){ + reportItem->setPos(m_savedPos); + } +} + } diff --git a/src/lrpagedesignintf.h b/src/lrpagedesignintf.h index 71ad8ac..2ee9f6e 100644 --- a/src/lrpagedesignintf.h +++ b/src/lrpagedesignintf.h @@ -129,7 +129,7 @@ namespace LimeReport { void emitRegisterdItem(BaseDesignIntf *item); void emitItemRemoved(BaseDesignIntf* item); - + DataSourceManager* datasourceManager(); protected: virtual void keyPressEvent(QKeyEvent *event); @@ -396,6 +396,19 @@ namespace LimeReport { QString m_newName; }; + class PropertyItemAlignChangedCommand : public AbstractPageCommand{ + public: + static CommandIf::Ptr create(PageDesignIntf* page, const QString& objectName, BaseDesignIntf::ItemAlign oldValue, BaseDesignIntf::ItemAlign newValue); + bool doIt(); + void undoIt(); + private: + QString m_objectName; + QString m_propertyName; + BaseDesignIntf::ItemAlign m_oldValue; + BaseDesignIntf::ItemAlign m_newValue; + QPointF m_savedPos; + }; + class CommandGroup : public AbstractPageCommand{ public: static CommandIf::Ptr create(); diff --git a/src/lrpageitemdesignintf.cpp b/src/lrpageitemdesignintf.cpp index e09d86f..ec7470c 100644 --- a/src/lrpageitemdesignintf.cpp +++ b/src/lrpageitemdesignintf.cpp @@ -285,7 +285,7 @@ void PageItemDesignIntf::registerBand(BandDesignIntf *band) band->setParent(this); band->setParentItem(this); - band->setWidth(pageRect().width()); + band->setWidth(pageRect().width()/band->columnsCount()); connect(band, SIGNAL(destroyed(QObject*)),this,SLOT(bandDeleted(QObject*))); connect(band, SIGNAL(geometryChanged(QObject*,QRectF,QRectF)),this,SLOT(bandGeometryChanged(QObject*,QRectF,QRectF))); } @@ -473,6 +473,11 @@ void PageItemDesignIntf::updateMarginRect() band->setWidth(pageRect().width()); relocateBands(); } + foreach (BaseDesignIntf* item, childBaseItems()) { + if (item->itemAlign()!=DesignedItemAlign){ + item->updateItemAlign(); + } + } update(); } diff --git a/src/lrreportdesignwidget.cpp b/src/lrreportdesignwidget.cpp index 2c612d1..96b47cc 100644 --- a/src/lrreportdesignwidget.cpp +++ b/src/lrreportdesignwidget.cpp @@ -84,7 +84,7 @@ bool GraphicsViewZoom::eventFilter(QObject *object, QEvent *event) { QWheelEvent* wheel_event = static_cast(event); if (QApplication::keyboardModifiers() == m_modifiers) { if (wheel_event->orientation() == Qt::Vertical) { - double angle = wheel_event->angleDelta().y(); + double angle = wheel_event->delta(); double factor = qPow(m_zoomFactorBase, angle); gentleZoom(factor); return true; diff --git a/src/lrreportdesignwindow.cpp b/src/lrreportdesignwindow.cpp index b5cca65..46c6fdd 100644 --- a/src/lrreportdesignwindow.cpp +++ b/src/lrreportdesignwindow.cpp @@ -190,13 +190,13 @@ void ReportDesignWindow::createActions() m_hideLeftPanel = new QAction(tr("Hide left panel"),this); m_hideLeftPanel->setCheckable(true); - m_hideLeftPanel->setChecked(true); +// m_hideLeftPanel->setChecked(true); m_hideLeftPanel->setIcon(QIcon(":/report/images/hideLeftPanel")); connect(m_hideLeftPanel,SIGNAL(toggled(bool)), this, SLOT(slotHideLeftPanel(bool))); - m_hideRightPanel = new QAction(tr("Hide left panel"),this); + m_hideRightPanel = new QAction(tr("Hide right panel"),this); m_hideRightPanel->setCheckable(true); - m_hideRightPanel->setChecked(true); +// m_hideRightPanel->setChecked(true); m_hideRightPanel->setIcon(QIcon(":/report/images/hideRightPanel")); connect(m_hideRightPanel,SIGNAL(toggled(bool)), this, SLOT(slotHideRightPanel(bool))); } @@ -279,7 +279,7 @@ void ReportDesignWindow::createItemsActions() { foreach(ItemAttribs items,DesignElementsFactory::instance().attribsMap().values()){ if (items.m_tag.compare("Item",Qt::CaseInsensitive)==0){ - QAction* tmpAction = new QAction(items.m_alias,this); + QAction* tmpAction = new QAction(QObject::tr(items.m_alias.toLatin1()),this); tmpAction->setWhatsThis(DesignElementsFactory::instance().attribsMap().key(items)); tmpAction->setIcon(QIcon(":/items/"+tmpAction->whatsThis())); connect(tmpAction,SIGNAL(triggered()),this,SLOT(slotItemActionCliked())); @@ -900,16 +900,7 @@ void ReportDesignWindow::slotShowAbout() about->exec(); } -void ReportDesignWindow::hideDockWidgets(Qt::DockWidgetArea area, bool value){ - QList dockWidgets = findChildren(); - foreach (QDockWidget* dw, dockWidgets) { - if (dockWidgetArea(dw) == area) - value ? dw->show(): dw->hide(); - } -} - -bool ReportDesignWindow::isDockAreaVisible(Qt::DockWidgetArea area) -{ +bool ReportDesignWindow::isDockAreaVisible(Qt::DockWidgetArea area){ QList dockWidgets = findChildren(); foreach (QDockWidget* dw, dockWidgets){ if ((dockWidgetArea(dw) == area) && !dw->isHidden()) @@ -918,6 +909,14 @@ bool ReportDesignWindow::isDockAreaVisible(Qt::DockWidgetArea area) return false; } +void ReportDesignWindow::hideDockWidgets(Qt::DockWidgetArea area, bool value){ + QList dockWidgets = findChildren(); + foreach (QDockWidget* dw, dockWidgets) { + if (dockWidgetArea(dw) == area) + value ? dw->show(): dw->hide(); + } +} + void ReportDesignWindow::slotHideLeftPanel(bool value) { hideDockWidgets(Qt::LeftDockWidgetArea,value); diff --git a/src/lrreportengine_p.h b/src/lrreportengine_p.h index 9273fa8..ade104a 100644 --- a/src/lrreportengine_p.h +++ b/src/lrreportengine_p.h @@ -66,7 +66,11 @@ public: int pageCount() {return m_pages.count();} DataSourceManager* dataManager(){return m_datasources;} IDataSourceManager* dataManagerIntf(){return m_datasources;} - IScriptEngineManager* scriptManagerIntf(){return &ScriptEngineManager::instance();} + + IScriptEngineManager* scriptManagerIntf(){ + ScriptEngineManager::instance().setDataManager(dataManager()); + return &ScriptEngineManager::instance(); + } void clearReport(); bool printReport(QPrinter *printer=0); @@ -121,6 +125,7 @@ private: QScopedPointer m_printer; bool m_printerSelected; bool m_showProgressDialog; + }; } diff --git a/src/lrreportrender.cpp b/src/lrreportrender.cpp index 41121a3..932347e 100644 --- a/src/lrreportrender.cpp +++ b/src/lrreportrender.cpp @@ -31,6 +31,7 @@ #include #include +#include "lrglobal.h" #include "lrreportrender.h" #include "lrpagedesignintf.h" #include "lrbanddesignintf.h" @@ -42,9 +43,18 @@ namespace LimeReport{ +void ReportRender::initColumns(){ + m_maxHeightByColumn.clear(); + m_currentStartDataPos.clear(); + m_maxHeightByColumn.append(0); + m_currentStartDataPos.append(0); +} + ReportRender::ReportRender(QObject *parent) - :QObject(parent), m_renderPageItem(0), m_pageCount(0) -{} + :QObject(parent), m_renderPageItem(0), m_pageCount(0), m_currentColumn(0) +{ + initColumns(); +} void ReportRender::setDatasources(DataSourceManager *value) { @@ -74,9 +84,10 @@ void ReportRender::renderPage(PageDesignIntf* patternPage) initGroupFunctions(); clearPageMap(); + resetPageNumber(); startNewPage(); - renderBand(m_patternPageItem->bandByType(BandDesignIntf::ReportHeader),StartNewPage); + renderBand(m_patternPageItem->bandByType(BandDesignIntf::ReportHeader),StartNewPageAsNeeded); BandDesignIntf* lastRenderedBand = 0; for (int i=0;idataBandCount() && !m_renderCanceled;i++){ @@ -87,7 +98,7 @@ void ReportRender::renderPage(PageDesignIntf* patternPage) } if (reportFooter) - renderBand(reportFooter,StartNewPage); + renderBand(reportFooter,StartNewPageAsNeeded); if (lastRenderedBand && lastRenderedBand->keepFooterTogether()) closeFooterGroup(lastRenderedBand); @@ -144,7 +155,7 @@ void ReportRender::extractGroupsFunction(BandDesignIntf *band) foreach(BaseDesignIntf* item,band->childBaseItems()){ ContentItemDesignIntf* contentItem = dynamic_cast(item); if (contentItem&&(contentItem->content().contains(QRegExp("\\$S\\s*\\{.*\\}")))){ - foreach(QString functionName, DataSourceManager::instance()->groupFunctionNames()){ + foreach(QString functionName, m_datasources->groupFunctionNames()){ QRegExp rx(QString(Const::GROUP_FUNCTION_RX).arg(functionName)); QRegExp rxName(QString(Const::GROUP_FUNCTION_NAME_RX).arg(functionName)); if (rx.indexIn(contentItem->content())>=0){ @@ -173,7 +184,7 @@ void ReportRender::replaceGroupsFunction(BandDesignIntf *band) ContentItemDesignIntf* contentItem = dynamic_cast(item); if (contentItem){ QString content = contentItem->content(); - foreach(QString functionName, DataSourceManager::instance()->groupFunctionNames()){ + foreach(QString functionName, m_datasources->groupFunctionNames()){ QRegExp rx(QString(Const::GROUP_FUNCTION_RX).arg(functionName)); if (rx.indexIn(content)>=0){ content.replace(rx,QString("%1(%2,%3)").arg(functionName).arg('"'+rx.cap(4)+'"').arg('"'+band->objectName()+'"')); @@ -188,41 +199,48 @@ void ReportRender::renderBand(BandDesignIntf *patternBand, ReportRender::DataRen { QApplication::processEvents(); if (patternBand){ + + if (mode == ForcedStartPage){ + savePage(); + startNewPage(); + } + BandDesignIntf* bandClone=renderData(patternBand); patternBand->emitBandRendered(bandClone); if ( isLast && bandClone->keepFooterTogether() && bandClone->sliceLastRow() ){ - if (m_currentMaxHeight < (bandClone->height()+m_reportFooterHeight)) - m_currentMaxHeight -= ((m_currentMaxHeight-bandClone->height())+(bandClone->height()*calcSlicePercent(bandClone->height()))); + 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)){ - if (bandClone->canBeSplitted(m_currentMaxHeight)){ + if (bandClone->canBeSplitted(m_maxHeightByColumn[m_currentColumn])){ bandClone = sliceBand(bandClone,patternBand,isLast); } else { - - qreal percent = (bandClone->height()-m_currentMaxHeight)/(bandClone->height()/100); + qreal percent = (bandClone->height()-m_maxHeightByColumn[m_currentColumn])/(bandClone->height()/100); if (bandClone->maxScalePercent()>=percent){ if (percentmaxScalePercent()){ percent += 2; bandClone->setScale((100-percent)/100); - bandClone->setHeight(m_currentMaxHeight); + bandClone->setHeight(m_maxHeightByColumn[m_currentColumn]); registerBand(bandClone); } } else { - if (mode==StartNewPage){ - savePage(); - startNewPage(); + if (mode==StartNewPageAsNeeded){ + if (bandClone->columnsCount()>1 && bandClone->columnsFillDirection()==BandDesignIntf::Vertical){ + startNewColumn(); + } else { + savePage(); + startNewPage(); + } if (!registerBand(bandClone)) { - bandClone->setHeight(m_currentMaxHeight); + bandClone->setHeight(m_maxHeightByColumn[m_currentColumn]); registerBand(bandClone); }; - } - - else { - bandClone->setHeight(m_currentMaxHeight); + } else { + bandClone->setHeight(m_maxHeightByColumn[m_currentColumn]); registerBand(bandClone); } } @@ -247,7 +265,7 @@ void ReportRender::renderDataBand(BandDesignIntf *dataBand) renderBand(dataBand->bandHeader()); renderChildHeader(dataBand,PrintNotAlwaysPrintable); - renderGroupHeader(dataBand,bandDatasource); + renderGroupHeader(dataBand, bandDatasource, true); while(!bandDatasource->eof() && !m_renderCanceled){ if (dataBand->tryToKeepTogether()) openDataGroup(dataBand); @@ -258,7 +276,7 @@ void ReportRender::renderDataBand(BandDesignIntf *dataBand) datasources()->updateChildrenData(dataBand->datasourceName()); m_lastDataBand = dataBand; - renderBand(dataBand,StartNewPage,!bandDatasource->hasNext()); + renderBand(dataBand,StartNewPageAsNeeded,!bandDatasource->hasNext()); renderChildBands(dataBand); bandDatasource->next(); @@ -270,15 +288,15 @@ void ReportRender::renderDataBand(BandDesignIntf *dataBand) datasources()->setReportVariable(groupLineVar,datasources()->variable(groupLineVar).toInt()+1); } - renderGroupHeader(dataBand,bandDatasource); + renderGroupHeader(dataBand, bandDatasource, false); if (dataBand->tryToKeepTogether()) closeDataGroup(dataBand); } - renderBand(dataBand->bandFooter(),StartNewPage); + renderBand(dataBand->bandFooter(),StartNewPageAsNeeded); renderGroupFooter(dataBand); //renderChildFooter(dataBand,PrintNotAlwaysPrintable); datasources()->deleteVariable(varName); } else if (bandDatasource==0) { - renderBand(dataBand,StartNewPage); + renderBand(dataBand,StartNewPageAsNeeded); } } @@ -294,10 +312,10 @@ void ReportRender::renderPageFooter(PageItemDesignIntf *patternPage) if (band){ BandDesignIntf* bandClone = dynamic_cast(band->cloneItem(PreviewMode, m_renderPageItem,m_renderPageItem)); replaceGroupsFunction(bandClone); - bandClone->updateItemSize(); + bandClone->updateItemSize(m_datasources); bandClone->setItemPos(m_patternPageItem->pageRect().x(),m_patternPageItem->pageRect().bottom()-bandClone->height()); bandClone->setHeight(m_pageFooterHeight); - m_currentMaxHeight+=m_pageFooterHeight; + m_maxHeightByColumn[0]+=m_pageFooterHeight; registerBand(bandClone); datasources()->clearGroupFunctionValues(band->objectName()); } @@ -311,7 +329,7 @@ void ReportRender::renderPageItems(PageItemDesignIntf* patternPage) BaseDesignIntf* cloneItem = item->cloneItem(m_renderPageItem->itemMode(), m_renderPageItem, m_renderPageItem); - cloneItem->updateItemSize(); + cloneItem->updateItemSize(m_datasources); } } } @@ -332,7 +350,7 @@ void ReportRender::renderChildHeader(BandDesignIntf *parent, BandPrintMode print if (band->metaObject()->indexOfProperty("printAlways")>0){ printAlways=band->property("printAlways").toBool(); } - if (printAlways == (printMode==PrintAlwaysPrintable) ) renderBand(band,StartNewPage); + if (printAlways == (printMode==PrintAlwaysPrintable) ) renderBand(band,StartNewPageAsNeeded); } } @@ -343,7 +361,7 @@ void ReportRender::renderChildFooter(BandDesignIntf *parent, BandPrintMode print if (band->metaObject()->indexOfProperty("printAlways")>0){ printAlways=band->property("printAlways").toBool(); } - if (printAlways == (printMode==PrintAlwaysPrintable)) renderBand(band,StartNewPage); + if (printAlways == (printMode==PrintAlwaysPrintable)) renderBand(band,StartNewPageAsNeeded); } } @@ -359,11 +377,11 @@ void ReportRender::renderChildBands(BandDesignIntf *parentBand) } } -void ReportRender::renderGroupHeader(BandDesignIntf *parentBand, IDataSource* dataSource) +void ReportRender::renderGroupHeader(BandDesignIntf *parentBand, IDataSource* dataSource, bool firstTime) { foreach(BandDesignIntf* band,parentBand->childrenByType(BandDesignIntf::GroupHeader)){ IGroupBand* gb = dynamic_cast(band); - if (gb&&gb->isNeedToClose()){ + if (gb&&gb->isNeedToClose(m_datasources)){ if (band->childBands().count()>0){ dataSource->prior(); foreach (BandDesignIntf* subBand, parentBand->childrenByType(BandDesignIntf::GroupHeader)) { @@ -374,15 +392,21 @@ void ReportRender::renderGroupHeader(BandDesignIntf *parentBand, IDataSource* da closeDataGroup(subBand); } } - renderBand(band->childBands().at(0),StartNewPage); + + renderBand(band->childBands().at(0),StartNewPageAsNeeded); dataSource->next(); } closeDataGroup(band); } if (!gb->isStarted()){ - gb->startGroup(); + gb->startGroup(m_datasources); openDataGroup(band); - renderBand(band,StartNewPage); + if (!firstTime && gb->startNewPage()){ + if (gb->resetPageNumber()) resetPageNumber(); + renderBand(band,ForcedStartPage); + } else { + renderBand(band,StartNewPageAsNeeded); + } } } } @@ -393,7 +417,7 @@ void ReportRender::renderGroupFooter(BandDesignIntf *parentBand) IGroupBand* gb = dynamic_cast(band); if (gb->isStarted()){ if (band->childBands().count()>0){ - renderBand(band->childBands().at(0),StartNewPage); + renderBand(band->childBands().at(0),StartNewPageAsNeeded); } closeDataGroup(band); } @@ -481,14 +505,58 @@ void ReportRender::closeFooterGroup(BandDesignIntf *band){ closeGroup(band); } +qreal maxVectorValue(QVector vector){ + qreal curValue = 0; + foreach (qreal value, vector) { + if (curValue vector){ + qreal curValue = vector[0]; + foreach (qreal value, vector) { + if (curValue>value) curValue=value; + } + return curValue; +} + bool ReportRender::registerBand(BandDesignIntf *band, bool registerInChildren) { - if (band->height()<=m_currentMaxHeight){ - m_currentMaxHeight-=band->height(); + if (band->columnsCount()==1 && m_maxHeightByColumn.size()>1){ + m_currentColumn = 0; + qreal minValue = minVectorValue(m_maxHeightByColumn); + m_maxHeightByColumn.clear(); + m_maxHeightByColumn.append(minValue); + qreal maxValue = maxVectorValue(m_currentStartDataPos); + m_currentStartDataPos.clear(); + m_currentStartDataPos.append(maxValue); + } + + if (band->columnsCount()>1){ + if (m_maxHeightByColumn.size()!=band->columnsCount()){ + for(int i=1;icolumnsCount();++i){ + m_maxHeightByColumn.append(m_maxHeightByColumn[0]); + m_currentStartDataPos.append(m_currentStartDataPos[0]); + } + m_currentColumn = 0; + } else { + if (band->columnsFillDirection()==BandDesignIntf::Horizontal){ + if (m_currentColumncolumnsCount()-1) + m_currentColumn = m_currentColumn+1; + else + m_currentColumn = 0; + } + } + } + + if (band->height()<=m_maxHeightByColumn[m_currentColumn]){ + m_maxHeightByColumn[m_currentColumn]-=band->height(); if (band->bandType()!=BandDesignIntf::PageFooter){ - band->setPos(m_renderPageItem->pageRect().x(),m_currentStartDataPos); - m_currentStartDataPos+=band->height(); + band->setPos(m_renderPageItem->pageRect().x()+band->width()*m_currentColumn,m_currentStartDataPos[m_currentColumn]); + m_currentStartDataPos[m_currentColumn]+=band->height(); band->setBandIndex(++m_currentIndex); + band->setColumnIndex(m_currentColumn); } m_renderPageItem->registerBand(band); @@ -514,17 +582,17 @@ qreal ReportRender::calcSlicePercent(qreal height){ BandDesignIntf* ReportRender::sliceBand(BandDesignIntf *band, BandDesignIntf* patternBand, bool isLast) { - while (band->height()>m_currentMaxHeight) { - band = saveUppperPartReturnBottom(band,m_currentMaxHeight,patternBand); + while (band->height()>m_maxHeightByColumn[m_currentColumn]) { + band = saveUppperPartReturnBottom(band,m_maxHeightByColumn[m_currentColumn],patternBand); if (!band->isEmpty()) { band->setHeight(0); - band->updateItemSize(); + band->updateItemSize(m_datasources); DataBandDesignIntf* data = dynamic_cast(band); if (isLast && data && data->keepFooterTogether() && - band->height()sliceLastRow() + band->height()sliceLastRow() ){ - if (band->height()>(m_currentMaxHeight-m_reportFooterHeight)){ - m_currentMaxHeight -= ((m_currentMaxHeight-band->height())+(band->height()*calcSlicePercent(band->height()))); + if (band->height()>(m_maxHeightByColumn[m_currentColumn]-m_reportFooterHeight)){ + m_maxHeightByColumn[m_currentColumn] -= ((m_maxHeightByColumn[m_currentColumn]-band->height())+(band->height()*calcSlicePercent(band->height()))); } } if (registerBand(band)) break; @@ -543,9 +611,11 @@ BandDesignIntf* ReportRender::sliceBand(BandDesignIntf *band, BandDesignIntf* pa void ReportRender::secondRenderPass() { - foreach(PageItemDesignIntf::Ptr page, m_renderedPages){ + for(int i=0; isetReportVariable("#PAGE_COUNT",findLastPageNumber(i)); foreach(BandDesignIntf* band, page->childBands()){ - band->updateItemSize(SecondPass); + band->updateItemSize(m_datasources, SecondPass); } } } @@ -561,11 +631,16 @@ BandDesignIntf *ReportRender::saveUppperPartReturnBottom(BandDesignIntf *band, i closeFooterGroup(patternBand); } if (!upperBandPart->isEmpty()){ - upperBandPart->updateItemSize(FirstPass,height); + upperBandPart->updateItemSize(m_datasources, FirstPass, height); registerBand(upperBandPart); } else delete upperBandPart; - savePage(); - startNewPage(); + + if (band->columnsCount()>1 && band->columnsFillDirection()==BandDesignIntf::Vertical){ + startNewColumn(); + } else { + savePage(); + startNewPage(); + } // if (!bottomBandPart->isEmpty() && patternBand->keepFooterTogether()) // openFooterGroup(patternBand); delete band; @@ -578,33 +653,66 @@ BandDesignIntf *ReportRender::renderData(BandDesignIntf *patternBand) if (patternBand->isFooter()){ replaceGroupsFunction(bandClone); } - bandClone->updateItemSize(); + bandClone->updateItemSize(m_datasources); return bandClone; } +void ReportRender::startNewColumn(){ + if (m_currentColumn < m_maxHeightByColumn.size()-1){ + m_currentColumn++; + } else { + savePage(); + startNewPage(); + } +} + void ReportRender::startNewPage() { m_renderPageItem=0; + m_currentColumn=0; + initColumns(); initRenderPage(); m_renderPageItem->setObjectName(QLatin1String("ReportPage")+QString::number(m_pageCount)); - m_currentMaxHeight=m_renderPageItem->pageRect().height(); + m_maxHeightByColumn[m_currentColumn]=m_renderPageItem->pageRect().height(); - m_currentStartDataPos=m_patternPageItem->topMargin()*Const::mmFACTOR; + m_currentStartDataPos[m_currentColumn]=m_patternPageItem->topMargin()*Const::mmFACTOR; m_currentIndex=0; renderPageHeader(m_patternPageItem); m_pageFooterHeight = calcPageFooterHeight(m_patternPageItem); - m_currentMaxHeight -= m_pageFooterHeight; + m_maxHeightByColumn[m_currentColumn] -= m_pageFooterHeight; m_currentIndex=10; - m_dataAreaSize = m_currentMaxHeight; + m_dataAreaSize = m_maxHeightByColumn[m_currentColumn]; m_renderedDataBandCount = 0; pasteGroups(); renderPageItems(m_patternPageItem); } +void ReportRender::resetPageNumber() +{ + PagesRange range; + if (!m_ranges.isEmpty()){ + m_ranges.last().lastPage = m_pageCount; + range.firstPage = m_pageCount+1; + } else { + range.firstPage = m_pageCount; + } + range.lastPage = 0; + m_ranges.append(range); +} + +int ReportRender::findLastPageNumber(int currentPage) +{ + foreach (PagesRange range, m_ranges) { + if ( range.firstPage<= (currentPage+1) && range.lastPage>= (currentPage+1) ) + return range.lastPage-(range.firstPage-1); + } + return 0; +} + void ReportRender::cutGroups() { m_popupedExpression.clear(); @@ -673,9 +781,16 @@ void ReportRender::savePage() checkFooterGroup(m_lastDataBand); cutGroups(); renderPageFooter(m_patternPageItem); + + if (m_ranges.last().lastPage==0 && m_ranges.count()>1) { + m_datasources->setReportVariable("#PAGE",1); + } else { + m_datasources->setReportVariable("#PAGE",m_datasources->variable("#PAGE").toInt()+1); + } + + m_ranges.last().lastPage = m_pageCount; m_pageCount++; - m_datasources->setReportVariable("#PAGE",m_pageCount); - m_datasources->setReportVariable("#PAGE_COUNT",m_pageCount-1); + BandDesignIntf* pageFooter = m_renderPageItem->bandByType(BandDesignIntf::PageFooter); if (pageFooter) pageFooter->setBandIndex(++m_currentIndex); m_renderedPages.append(PageItemDesignIntf::Ptr(m_renderPageItem)); diff --git a/src/lrreportrender.h b/src/lrreportrender.h index c4ec1a6..136b8ec 100644 --- a/src/lrreportrender.h +++ b/src/lrreportrender.h @@ -57,12 +57,17 @@ private: typedef QList ReportPages; +struct PagesRange{ + int firstPage; + int lastPage; +}; + class ReportRender: public QObject { Q_OBJECT Q_PROPERTY(QObject* datasourcesManager READ datasources()) public: - enum DataRenderMode {StartNewPage,NotStartNewPage}; + enum DataRenderMode {StartNewPageAsNeeded, NotStartNewPage, ForcedStartPage}; enum BandPrintMode {PrintAlwaysPrintable, PrintNotAlwaysPrintable }; typedef QSharedPointer Ptr; ~ReportRender(); @@ -93,7 +98,7 @@ private: void renderChildHeader(BandDesignIntf* parent, BandPrintMode printMode); void renderChildFooter(BandDesignIntf* parent, BandPrintMode printMode); void renderChildBands(BandDesignIntf* parentBand); - void renderGroupHeader(BandDesignIntf* parentBand, IDataSource* dataSource); + void renderGroupHeader(BandDesignIntf* parentBand, IDataSource* dataSource, bool firstTime); void renderGroupFooter(BandDesignIntf* parentBand); void initGroupFunctions(); @@ -119,10 +124,15 @@ private: void secondRenderPass(); BandDesignIntf* saveUppperPartReturnBottom(BandDesignIntf *band, int height, BandDesignIntf *patternBand); BandDesignIntf* renderData(BandDesignIntf* patternBand); + void startNewColumn(); void startNewPage(); + void resetPageNumber(); + int findLastPageNumber(int currentPage); void savePage(); QString toString(); +private: + void initColumns(); private: DataSourceManager* m_datasources; @@ -132,22 +142,24 @@ private: QMultiMap< BandDesignIntf*, GroupBandsHolder* > m_childBands; - int m_currentMaxHeight; - int m_currentStartDataPos; + //int m_maxHeightByColumn[0]; + //int m_currentStartDataPos; int m_currentIndex; int m_pageCount; QMap m_popupedValues; QMultiMap m_popupedExpression; - qreal m_pageFooterHeight; - qreal m_dataAreaSize; - qreal m_reportFooterHeight; - int m_renderedDataBandCount; + qreal m_pageFooterHeight; + qreal m_dataAreaSize; + qreal m_reportFooterHeight; + int m_renderedDataBandCount; BandDesignIntf* m_lastDataBand; - bool m_renderCanceled; - - + bool m_renderCanceled; + QVector m_maxHeightByColumn; + QVector m_currentStartDataPos; + int m_currentColumn; + QList m_ranges; }; } // namespace LimeReport #endif // LRREPORTRENDER_H diff --git a/src/lrscriptenginemanager.cpp b/src/lrscriptenginemanager.cpp index 3dfdc5d..e2f3c44 100644 --- a/src/lrscriptenginemanager.cpp +++ b/src/lrscriptenginemanager.cpp @@ -190,22 +190,9 @@ void ScriptEngineModel::updateModel() endResetModel(); } -//QScriptValue dateToStr(QScriptContext* pcontext, QScriptEngine* pengine){ -// DataSourceManager* dm = DataSourceManager::instance(); -// QString field = pcontext->argument(0).toString(); -// QString format = pcontext->argument(1).toString(); -// QScriptValue res; -// if (dm->containsField(field)){ -// res=pengine->newVariant(QLocale().toString(dm->fieldData(field).toDate(),format)); -// } else { -// QString error = (!dm->lastError().isNull())?dm->lastError():QString("Field %1 not found").arg(field); -// res=pengine->newVariant(error); -// } -// return res; -//} - -QScriptValue line(QScriptContext* pcontext, QScriptEngine* pengine){ - DataSourceManager* dm=DataSourceManager::instance(); +QScriptValue line(QScriptContext* pcontext, QScriptEngine* pengine){ + ScriptEngineManager* sm = qscriptvalue_cast(pcontext->callee().data()); + DataSourceManager* dm = sm->dataManager(); QString band = pcontext->argument(0).toString(); QScriptValue res; QString varName = QLatin1String("line_")+band.toLower(); @@ -236,7 +223,9 @@ QScriptValue now(QScriptContext* /*pcontext*/, QScriptEngine* pengine){ QScriptValue callGroupFunction(const QString& functionName, QScriptContext* pcontext, QScriptEngine* pengine){ - DataSourceManager* dm=DataSourceManager::instance(); + ScriptEngineManager* sm = qscriptvalue_cast(pcontext->callee().data()); + DataSourceManager* dm = sm->dataManager(); + QString expression = pcontext->argument(0).toString(); QString band = pcontext->argument(1).toString(); QScriptValue res; @@ -267,6 +256,26 @@ ScriptEngineManager::~ScriptEngineManager() delete m_scriptEngine; } +bool ScriptEngineManager::isFunctionExists(const QString &functionName) const +{ + foreach (ScriptFunctionDesc desc, m_functions) { + if (desc.name.compare(functionName,Qt::CaseInsensitive)==0){ + return true; + } + } + return false; +} + +void ScriptEngineManager::deleteFunction(const QString &functionsName) +{ + QMutableListIterator it(m_functions); + while(it.hasNext()){ + if (it.next().name.compare(functionsName, Qt::CaseInsensitive)==0){ + it.remove(); + } + } +} + QScriptValue ScriptEngineManager::addFunction(const QString& name, QScriptEngine::FunctionSignature function, const QString& category, @@ -278,6 +287,7 @@ QScriptValue ScriptEngineManager::addFunction(const QString& name, funct.category = category; funct.scriptValue = scriptEngine()->newFunction(function); funct.scriptValue.setProperty("functionName",name); + funct.scriptValue.setData(m_scriptEngine->toScriptValue(this)); funct.type = ScriptFunctionDesc::Native; m_functions.append(funct); if (m_model) @@ -295,6 +305,7 @@ QScriptValue ScriptEngineManager::addFunction(const QString& name, const QString funct.category = category; funct.description = description; funct.type = ScriptFunctionDesc::Script; + funct.scriptValue.setData(m_scriptEngine->toScriptValue(this)); m_functions.append(funct); m_model->updateModel(); return funct.scriptValue; @@ -313,8 +324,24 @@ QStringList ScriptEngineManager::functionsNames() return res; } +void ScriptEngineManager::setDataManager(DataSourceManager *dataManager){ + if (m_dataManager != dataManager){ + m_dataManager = dataManager; + if (m_dataManager){ + foreach(QString func, m_dataManager->groupFunctionNames()){ + if (isFunctionExists(func)) deleteFunction(func); + addFunction(func, groupFunction,"GROUP FUNCTIONS", func+"(\""+tr("FieldName")+"\",\""+tr("BandName")+"\")"); + } + foreach(ScriptFunctionDesc func, m_functions){ + if (func.type==ScriptFunctionDesc::Native) + m_scriptEngine->globalObject().setProperty(func.name,func.scriptValue); + } + } + } +} + ScriptEngineManager::ScriptEngineManager() - :m_model(0) + :m_model(0), m_dataManager(0) { m_scriptEngine = new QScriptEngine; @@ -332,10 +359,9 @@ ScriptEngineManager::ScriptEngineManager() QScriptValue fontConstructor = m_scriptEngine->newFunction(QFontPrototype::constructorQFont, fontProto); m_scriptEngine->globalObject().setProperty("QFont", fontConstructor); - DataSourceManager* dm=DataSourceManager::instance(); - foreach(QString func, dm->groupFunctionNames()){ - addFunction(func, groupFunction,"GROUP FUNCTIONS", func+"(\""+tr("FieldName")+"\",\""+tr("BandName")+"\")"); - } +// foreach(QString func, dataManager()->groupFunctionNames()){ +// addFunction(func, groupFunction,"GROUP FUNCTIONS", func+"(\""+tr("FieldName")+"\",\""+tr("BandName")+"\")"); +// } foreach(ScriptFunctionDesc func, m_functions){ if (func.type==ScriptFunctionDesc::Native) diff --git a/src/lrscriptenginemanager.h b/src/lrscriptenginemanager.h index 6c8c9f1..4372462 100644 --- a/src/lrscriptenginemanager.h +++ b/src/lrscriptenginemanager.h @@ -44,6 +44,8 @@ namespace LimeReport{ +class DataSourceManager; + struct ScriptFunctionDesc{ enum FuncType {Native,Script}; QScriptValue scriptValue; @@ -110,6 +112,8 @@ public: QScriptEngine* scriptEngine(){return m_scriptEngine;} ~ScriptEngineManager(); friend class Singleton; + bool isFunctionExists(const QString& functionName) const; + void deleteFunction(const QString& functionsName); QScriptValue addFunction(const QString& name, QScriptEngine::FunctionSignature function, const QString& category="", const QString& description=""); QScriptValue addFunction(const QString &name, const QString& script, @@ -118,6 +122,8 @@ public: QStringList functionsNames(); const QList& functionsDescriber(){return m_functions;} ScriptEngineModel* model(){return m_model;} + DataSourceManager* dataManager() const {return m_dataManager;} + void setDataManager(DataSourceManager* dataManager); private: Q_DISABLE_COPY(ScriptEngineManager) private: @@ -126,6 +132,7 @@ private: QString m_lastError; QList m_functions; ScriptEngineModel* m_model; + DataSourceManager* m_dataManager; }; class ScriptExtractor diff --git a/src/objectinspector/lrobjectitemmodel.cpp b/src/objectinspector/lrobjectitemmodel.cpp index e2e6a6d..632a7c5 100644 --- a/src/objectinspector/lrobjectitemmodel.cpp +++ b/src/objectinspector/lrobjectitemmodel.cpp @@ -35,6 +35,24 @@ namespace LimeReport { +void QObjectPropertyModel::translatePropertyName() +{ + tr("leftMargin"); + tr("rightMargin"); + tr("topMargin"); + tr("bottomMargin"); + tr("objectName"); + tr("borders"); + tr("geometry"); + tr("itemAlign"); + tr("pageOrientation"); + tr("pageSize"); + tr("TopLine"); + tr("BottomLine"); + tr("LeftLine"); + tr("RightLine"); +} + QObjectPropertyModel::QObjectPropertyModel(QObject *parent/*=0*/) :QAbstractItemModel(parent),m_rootNode(0),m_object(0),m_dataChanging(false), m_subclassesAsLevel(true), m_validator(0) {} @@ -291,7 +309,6 @@ void QObjectPropertyModel::setValidator(ValidatorIntf *validator) m_validator = validator; } - void QObjectPropertyModel::addObjectProperties(const QMetaObject *metaObject, QObject *object, ObjectPropItem::ObjectsList *objects, int level) { if (metaObject->propertyCount()>metaObject->propertyOffset()){ diff --git a/src/objectinspector/lrobjectitemmodel.h b/src/objectinspector/lrobjectitemmodel.h index b354538..98e917f 100644 --- a/src/objectinspector/lrobjectitemmodel.h +++ b/src/objectinspector/lrobjectitemmodel.h @@ -70,7 +70,7 @@ public: bool subclassesAsLevel(){return m_subclassesAsLevel;} ValidatorIntf* validator() const; void setValidator(ValidatorIntf* validator); - + void translatePropertyName(); signals: void objectPropetyChanged(const QString& , const QVariant&, const QVariant&); private slots: diff --git a/translations/limereport_ru.qm b/translations/limereport_ru.qm new file mode 100644 index 0000000000000000000000000000000000000000..4908bc1dd5eed34eed660d791fbf8717262ac40d GIT binary patch literal 85584 zcmeIb34B~xc_(_yF3GkmFTFQSr~6v;Vs~rx*0#K~%UW!8%aU4>+cYGBQt3*ncBx8T zRkEyPAekh?unjN)CNFtRfGmU|{E|uD@MA(k76vAegn{fYnfH?XLWgt$VM$2(5omb- z|M#79?!C3C)t>hcbDp;}?In(W!b`qy70>0o9b3l4fWN=#wR{|Z-}ZU0Ku- z`@(N~BVW10OLRTqJ#hG)`2APC(I1}y{3iADtA8(_iQE5NKlj|PpC|u|H*wz|d)_y? zz4P49fzNsmzwu|W?xgqdn|{Vi9K6oE@HTwE?^E8(pZXf$c8&MlKl~xj`}=$4Gx4%x zUhtM10GDs-=iQgR+&8g~qsP3(yFZ7|S?}_j{tfW;u=kp8yx&Xg*ls@G=)Li`Ug~+@ z`mFbsZJ6)gPVYy5d(iW~eZYJBLfK0sf6V)t>`!@#JAU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%i>0OP&q7W>`%6dX`={idEaaZ>DbiX+I1*BGsKUbz=8g9 z8nIqACu4iKwMx2G!Y-5vb0bX-o9&ZTyKytTE-cr|wAKLsej}iH{N^B#s>g8lBjk+gMFD(_X2D`%jU>Y3 z5ap;dPD=yE8l(HM%4XU~jO8*`r3Ia#f4v?4KTa6Cn&ldUwS&WL->xtz*)D~xk?3!Y zH~qC7HphI|#9c6>3M+?<31`!bxbhi@4=PQKW;1zRE8rN7TGtq0x43uefmc*bOa^nf z$W0m;)OhiFZ_0bfW5W_yax>IO9b&($){7YCewemO2$1y=Gh`=*TARn$3aqit zNUsC0v#dBBX_zvyvxwZ=fuSB-4vMRFDJh0Lt63$Z#-bd}mAblxh8@{!y`*Z4-pwgJ zH9)20Aiu=~{kY9qZ#Ul(%(c+0HOy^cH9l~sB&dfLSRN2MDBE?n=q#uCk6L40i$DzR zVKOZb+Tu*P+s-cYekmxI5yKQyt!j)oyoXBCEv)J(0wfmR3uoD8LvKxtZFA-FW%ODgeoTl_JUQu(XK9ZSNXkhTER)( z{J#*M6S)8l*U{w@CrHeN1Y0lQ50-EUO;RH8FbcPE6x#?%E6L}$pzwv) + + + + AboutDialog + + + About + О программе + + + + Lime Report + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/report/images/logo_100.png" height="100" style="float: left;" /><span style=" font-size:12pt; font-weight:600; color:#555555;">Report engine for </span><span style=" font-size:12pt; font-weight:600; color:#7faa18;">Qt</span><span style=" font-size:12pt; font-weight:600; color:#555555;"> framework</span></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">LimeReport - multi-platform C++ library written using Qt framework and intended for software developers that would like to add into their application capability to form report or print forms generated using templates.</span></p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><br /></p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><br /></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">Official web site : </span><a href="www.limereport.ru"><span style=" font-size:11pt; text-decoration: underline; color:#0000ff;">www.limereport.ru</span></a></p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt; text-decoration: underline; color:#0000ff;"><br /></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600; color:#000000;">This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</span></p> +<p align="justify" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt; font-weight:600; color:#000000;"><br /></p> +<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; color:#000000;">Copyright 2015 Arin Alexander. All rights reserved.</span></p></body></html> + + + + + Author + Автор + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Arin Alexander</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">arin_a@bk.ru</p></body></html> + + + + + License + Лицензия + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(c) 2015 Arin Alexander arin_a@bk.ru</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="SEC1"></a><span style=" font-family:'sans-serif'; font-weight:600; color:#333333;">G</span><span style=" font-family:'sans-serif'; font-weight:600; color:#333333;">NU LESSER GENERAL PUBLIC LICENSE</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">Version 2.1, February 1999</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">Copyright (C) 1991, 1999 Free Software Foundation, Inc.</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">Everyone is permitted to copy and distribute verbatim copies</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">of this license document, but changing it is not allowed.</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'monospace'; color:#000000; background-color:#ffffff;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">[This is the first released version of the Lesser GPL. It also counts</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;"> as the successor of the GNU Library Public License, version 2, hence</span></p> +<p style=" margin-top:0px; margin-bottom:15px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;"> the version number 2.1.]</span></p> +<p style=" margin-top:15px; margin-bottom:15px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><a name="SEC2"></a><span style=" font-family:'sans-serif'; font-weight:600; color:#333333;">P</span><span style=" font-family:'sans-serif'; font-weight:600; color:#333333;">reamble</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">We call this license the &quot;Lesser&quot; General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a &quot;work based on the library&quot; and a &quot;work that uses the library&quot;. The former contains code derived from the library, whereas the latter must be combined with the library in order to run.</span></p> +<p style=" margin-top:15px; margin-bottom:15px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><a name="SEC3"></a><span style=" font-family:'sans-serif'; font-weight:600; color:#333333;">T</span><span style=" font-family:'sans-serif'; font-weight:600; color:#333333;">ERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; font-weight:600; color:#000000;">0.</span><span style=" font-family:'sans-serif'; color:#000000;"> This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called &quot;this License&quot;). Each licensee is addressed as &quot;you&quot;.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">A &quot;library&quot; means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">The &quot;Library&quot;, below, refers to any such software library or work which has been distributed under these terms. A &quot;work based on the Library&quot; means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term &quot;modification&quot;.)</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">&quot;Source code&quot; for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; font-weight:600; color:#000000;">1.</span><span style=" font-family:'sans-serif'; color:#000000;"> You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; font-weight:600; color:#000000;">2.</span><span style=" font-family:'sans-serif'; color:#000000;"> You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:</span></p> +<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" font-family:'sans-serif'; color:#000000;" style=" margin-top:19px; margin-bottom:0px; margin-left:38px; margin-right:19px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16px; font-weight:600;">a)</span><span style=" font-size:16px;"> The modified work must itself be a software library.</span></li> +<li style=" font-family:'sans-serif'; color:#000000;" style=" margin-top:0px; margin-bottom:0px; margin-left:38px; margin-right:19px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16px; font-weight:600;">b)</span><span style=" font-size:16px;"> You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.</span></li> +<li style=" font-family:'sans-serif'; color:#000000;" style=" margin-top:0px; margin-bottom:0px; margin-left:38px; margin-right:19px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16px; font-weight:600;">c)</span><span style=" font-size:16px;"> You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.</span></li> +<li style=" font-family:'sans-serif'; color:#000000;" style=" margin-top:0px; margin-bottom:19px; margin-left:38px; margin-right:19px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16px; font-weight:600;">d)</span><span style=" font-size:16px;"> If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.</span></li></ul> +<p style=" margin-top:15px; margin-bottom:15px; margin-left:38px; margin-right:19px; -qt-block-indent:1; text-indent:0px;"><span style=" font-family:'sans-serif'; color:#000000;">(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; font-weight:600; color:#000000;">3.</span><span style=" font-family:'sans-serif'; color:#000000;"> You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">This option is useful when you wish to copy part of the code of the Library into a program that is not a library.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; font-weight:600; color:#000000;">4.</span><span style=" font-family:'sans-serif'; color:#000000;"> You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; font-weight:600; color:#000000;">5.</span><span style=" font-family:'sans-serif'; color:#000000;"> A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a &quot;work that uses the Library&quot;. Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">However, linking a &quot;work that uses the Library&quot; with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a &quot;work that uses the library&quot;. The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">When a &quot;work that uses the Library&quot; uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; font-weight:600; color:#000000;">6.</span><span style=" font-family:'sans-serif'; color:#000000;"> As an exception to the Sections above, you may also combine or link a &quot;work that uses the Library&quot; with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:</span></p> +<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" font-family:'sans-serif'; color:#000000;" style=" margin-top:19px; margin-bottom:0px; margin-left:38px; margin-right:19px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16px; font-weight:600;">a)</span><span style=" font-size:16px;"> Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable &quot;work that uses the Library&quot;, as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)</span></li> +<li style=" font-family:'sans-serif'; color:#000000;" style=" margin-top:0px; margin-bottom:0px; margin-left:38px; margin-right:19px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16px; font-weight:600;">b)</span><span style=" font-size:16px;"> Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.</span></li> +<li style=" font-family:'sans-serif'; color:#000000;" style=" margin-top:0px; margin-bottom:0px; margin-left:38px; margin-right:19px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16px; font-weight:600;">c)</span><span style=" font-size:16px;"> Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.</span></li> +<li style=" font-family:'sans-serif'; color:#000000;" style=" margin-top:0px; margin-bottom:0px; margin-left:38px; margin-right:19px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16px; font-weight:600;">d)</span><span style=" font-size:16px;"> If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.</span></li> +<li style=" font-family:'sans-serif'; color:#000000;" style=" margin-top:0px; margin-bottom:19px; margin-left:38px; margin-right:19px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16px; font-weight:600;">e)</span><span style=" font-size:16px;"> Verify that the user has already received a copy of these materials or that you have already sent this user a copy.</span></li></ul> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">For an executable, the required form of the &quot;work that uses the Library&quot; must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; font-weight:600; color:#000000;">7.</span><span style=" font-family:'sans-serif'; color:#000000;"> You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:</span></p> +<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" font-family:'sans-serif'; color:#000000;" style=" margin-top:19px; margin-bottom:0px; margin-left:38px; margin-right:19px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16px; font-weight:600;">a)</span><span style=" font-size:16px;"> Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.</span></li> +<li style=" font-family:'sans-serif'; color:#000000;" style=" margin-top:0px; margin-bottom:19px; margin-left:38px; margin-right:19px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16px; font-weight:600;">b)</span><span style=" font-size:16px;"> Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.</span></li></ul> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; font-weight:600; color:#000000;">8.</span><span style=" font-family:'sans-serif'; color:#000000;"> You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; font-weight:600; color:#000000;">9.</span><span style=" font-family:'sans-serif'; color:#000000;"> You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; font-weight:600; color:#000000;">10.</span><span style=" font-family:'sans-serif'; color:#000000;"> Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; font-weight:600; color:#000000;">11.</span><span style=" font-family:'sans-serif'; color:#000000;"> If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; font-weight:600; color:#000000;">12.</span><span style=" font-family:'sans-serif'; color:#000000;"> If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; font-weight:600; color:#000000;">13.</span><span style=" font-family:'sans-serif'; color:#000000;"> The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and &quot;any later version&quot;, you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; font-weight:600; color:#000000;">14.</span><span style=" font-family:'sans-serif'; color:#000000;"> If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; font-weight:600; color:#000000;">NO WARRANTY</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; font-weight:600; color:#000000;">15.</span><span style=" font-family:'sans-serif'; color:#000000;"> BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; font-weight:600; color:#000000;">16.</span><span style=" font-family:'sans-serif'; color:#000000;"> IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</span></p> +<p style=" margin-top:15px; margin-bottom:15px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; font-weight:600; color:#333333; background-color:#ffffff;">END OF TERMS AND CONDITIONS</span></p> +<p style=" margin-top:15px; margin-bottom:15px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><a name="SEC4"></a><span style=" font-family:'sans-serif'; font-weight:600; color:#333333;">H</span><span style=" font-family:'sans-serif'; font-weight:600; color:#333333;">ow to Apply These Terms to Your New Libraries</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License).</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the &quot;copyright&quot; line and a pointer to where the full notice is found.</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'monospace'; font-style:italic; color:#000000;">one line to give the library's name and an idea of what it does.</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'monospace'; color:#000000;">Copyright (C) </span><span style=" font-family:'monospace'; font-style:italic; color:#000000;">year</span><span style=" font-family:'monospace'; color:#000000;"> </span><span style=" font-family:'monospace'; font-style:italic; color:#000000;">name of author</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'monospace'; font-style:italic; color:#000000; background-color:#ffffff;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'monospace'; color:#000000;">This library is free software; you can redistribute it and/or</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'monospace'; color:#000000;">modify it under the terms of the GNU Lesser General Public</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'monospace'; color:#000000;">License as published by the Free Software Foundation; either</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'monospace'; color:#000000;">version 2.1 of the License, or (at your option) any later version.</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'monospace'; color:#000000; background-color:#ffffff;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'monospace'; color:#000000;">This library is distributed in the hope that it will be useful,</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'monospace'; color:#000000;">but WITHOUT ANY WARRANTY; without even the implied warranty of</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'monospace'; color:#000000;">MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'monospace'; color:#000000;">Lesser General Public License for more details.</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'monospace'; color:#000000; background-color:#ffffff;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'monospace'; color:#000000;">You should have received a copy of the GNU Lesser General Public</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'monospace'; color:#000000;">License along with this library; if not, write to the Free Software</span></p> +<p style=" margin-top:0px; margin-bottom:15px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'monospace'; color:#000000;">Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">Also add information on how to contact you by electronic and paper mail.</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">You should also get your employer (if you work as a programmer) or your school, if any, to sign a &quot;copyright disclaimer&quot; for the library, if necessary. Here is a sample; alter the names:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">Yoyodyne, Inc., hereby disclaims all copyright interest in</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">the library `Frob' (a library for tweaking knobs) written</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">by James Random Hacker.</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'monospace'; color:#000000; background-color:#ffffff;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'monospace'; font-style:italic; color:#000000;">signature of Ty Coon</span><span style=" font-family:'monospace'; color:#000000;">, 1 April 1990</span></p> +<p style=" margin-top:0px; margin-bottom:15px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'monospace'; color:#000000;">Ty Coon, President of Vice</span></p> +<p style=" margin-top:19px; margin-bottom:19px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'sans-serif'; color:#000000; background-color:#ffffff;">That's all there is to it!</span></p></body></html> + + + + + Close + Закрыть + + + + Version 1.1.1 + Версия + + + + ConnectionDialog + + + + Connection + Соединение + + + + Connection Name + Название + + + + Driver + Драйвер + + + + Server + Сервер + + + + User + Пользователь + + + + Password + Пароль + + + + Database + База данных + + + + ... + + + + + Auto connect + Автоматическое соединение + + + + Check connection + Проверить соединение + + + + Cancel + Отмена + + + + Ok + + + + + + Error + Ошибка + + + + Connection succsesfully established! + Соединение успешно установлено! + + + + Connection Name is empty + Наименование соединения не указано + + + + Connection with name + Соединение + + + + already exists + уже существует + + + + DataBrowser + + + + Datasources + Источники данных + + + + Add database connection + Добавить соединение с базой + + + + + + + + + + + + + + + ... + + + + + Variables + Переменные + + + + LRVariableDialog + + + Variable + Переменная + + + + Name + Имя переменной + + + + Value + Значение + + + + Type + Тип + + + + Attention + Внимание + + + + LimeReport::AVariablesHolder + + + + + + variable with name + переменная + + + + already exists !! + уже существует !! + + + + + + does not exists !! + не существует !! + + + + LimeReport::AlignmentPropItem + + + Left + По левому краю + + + + Right + По правому краю + + + + + Center + По центру + + + + Justify + По ширине + + + + Top + Прижать к верхнему краю + + + + Botom + Прижать к нижнему краю + + + + horizontal + горизонтально + + + + vertical + вертикально + + + + LimeReport::BandDesignIntf + + + connected to + соединён с + + + + LimeReport::ContentItemDesignIntf + + + Variable %1 not found + Переменная %1 не найдена + + + + LimeReport::DataBand + + + Data + Данные + + + + LimeReport::DataBrowser + + + Datasources + Источники данных + + + + + + + Attention + Внимание + + + + Do you really want to delete "%1" connection ? + Do you really want delete "%1" connection ? + Вы действительно хотите удалить "%1" соединение ? + + + + User variables + Пользовательские переменные + + + + System variables + Системные переменные + + + + Do you really want to delete "%1" datasource ? + Do you really want delete "%1" datasource ? + Вы действительно хотите удалить источник данных "%1" ? + + + + Do you really want to delete variable "%1" ? + + + + Do you really want delete variable "%1" ? + Вы действительно хотите удалить переменную "%1" ? + + + + Error + Ошибка + + + + LimeReport::DataFooterBand + + + DataFooter + Подвал данных + + + + LimeReport::DataHeaderBand + + + DataHeader + Заголовок данных + + + + LimeReport::DataSourceManager + + + Connection "%1" is not open + Соединение "%1" не открыто + + + + + Datasource "%1" not found ! + Источник данных "%1" не найден ! + + + + connection with name "%1" already exists ! + соединение "%1" уже существует ! + + + + + + + datasource with name "%1" already exists ! + data source with name "%1" already exists !! + источник данных "%1" уже существует ! + + + + invalid connection + нет соединения + + + + LimeReport::DataSourceModel + + + Datasources + Источники данных + + + + Variables + Переменные + + + + LimeReport::FontEditorWidget + + + Font bold + Жирный + + + + Font Italic + Курсив + + + + Font Underline + Подчеркнутый + + + + LimeReport::FontPropItem + + + bold + жирный + + + + italic + курсив + + + + underline + подчеркнутый + + + + size + размер + + + + family + название + + + + LimeReport::GroupBandFooter + + + GroupFooter + Подвал группы + + + + LimeReport::GroupBandHeader + + + GroupHeader + Заголовок группы + + + + LimeReport::GroupFunction + + + Field "%1" not found + Поле "%1" не найдено + + + + Variable "%1" not found + Переменная "%1" не найдена + + + + Item "%1" not found + Элемент "%1" не найден + + + + LimeReport::ImageItem + + + Image + Изображение + + + + LimeReport::ItemsAlignmentEditorWidget + + + Bring to top + На передний план + + + + Send to back + На задний план + + + + Align to left + Выровнять по левому краю + + + + Align to right + Выровнять по правому краю + + + + Align to vertical center + Центрировать вертикально + + + + Align to top + Выровнять по верхнему краю + + + + Align to bottom + Выровнять по нижнему краю + + + + Align to horizontal center + Центрировать горизонтально + + + + Set same height + Одинаковая высота + + + + Set same width + Одинаковая ширина + + + + LimeReport::ItemsBordersEditorWidget + + + Top line + Верхняя граница + + + + Bottom line + Нижняя граница + + + + Left line + Левая граница + + + + Right line + Правая граница + + + + No borders + Удалить границы + + + + All borders + Внешние границы + + + + LimeReport::MasterDetailProxyModel + + + Field: "%1" not found in "%2" child datasource + Поле: "%1" не найдено в подчиненном источнике данных "%2" + + + + Field: "%1" not found in "%2" master datasource + Поле: "%1" не найдено в главном источнике данных "%2" + + + + LimeReport::ModelToDataSource + + + model is destroyed + модель уничтожена + + + + LimeReport::ObjectBrowser + + + Objects + Объекты + + + + LimeReport::PageDesignIntf + + + Warning + Предупреждение + + + + Multi band deletion not allowed + Удаление нескольких бандов запрещено + + + + LimeReport::PageFooter + + + Page Footer + Нижний колонтитул + + + + LimeReport::PageHeader + + + Page Header + Верхний колонтитул + + + + LimeReport::ProxyHolder + + + Datasource has been invalidated + Источник данных находится в недействительном состоянии + + + + LimeReport::QObjectPropertyModel + + + Property Name + Свойство + + + + Property value + Значение + + + + leftMargin + Отступ левый + + + + rightMargin + Отступ правый + + + + topMargin + Отступ верхний + + + + bottomMargin + Отступ нижний + + + + objectName + Имя объекта + + + + borders + Границы + + + + geometry + Геометрия + + + + itemAlign + Расположение объекта + + + + pageOrientation + Ориентация страницы + + + + pageSize + Размер страницы + + + + TopLine + Верхняя граница + + + + BottomLine + Нижняя граница + + + + LeftLine + Левая граница + + + + RightLine + Правая граница + + + + Warning + Предупреждение + + + + LimeReport::RectMMPropItem + + + + + width + ширина + + + + + + height + высота + + + + LimeReport::RectPropItem + + + width + ширина + + + + height + высота + + + + LimeReport::ReportDesignWidget + + + Report file name + Файл отчета + + + + LimeReport::ReportDesignWindow + + + New Report + Новый отчет + + + + Edit Mode + Режим редактирования + + + + Undo + Отменить действие + + + + Redo + Повторить действие + + + + Copy + Копировать + + + + Paste + Вставить + + + + Cut + Вырезать + + + + Text Item + Текстовый элемент + + + + Save Report + Сохранить отчет + + + + Save Report As + Сохранить отчет как + + + + Load Report + Загрузить отчет + + + + Delete item + Удалить элемент + + + + Zoom In + Увеличить + + + + Zoom Out + Уменьшить + + + + Render Report + Сгенерировать отчет + + + + Edit layouts mode + Режим редактирования группировок + + + + Horizontal layout + Горизонтальная группировка + + + + About + О программе + + + + Hide left panel + Спрятать левую панель + + + + Hide right panel + Спрятать правую панель + + + + Report Tools + Элементы отчета + + + + Font + Шрифт + + + + Text alignment + Выравнивание текста + + + + Items alignment + Выравнивание объектов + + + + Borders + Границы + + + + Report Header + Заголовок отчета + + + + Report Footer + Завершение отчета + + + + Page Header + Верхний колонтитул + + + + Page Footer + Нижний колонтитул + + + + Data + Данные + + + + Data Header + Заголовок данных + + + + Data Footer + Завершение данных + + + + SubDetail + Подчиненные данные + + + + SubDetailHeader + Заголовок подчиненных данных + + + + SubDetailFooter + Завершение подчиненных данных + + + + GroupHeader + Заголовок группы + + + + GroupFooter + Завершение группы + + + + File + Файл + + + + Edit + Правка + + + + Info + Информация + + + + Object Inspector + Инспектор объектов + + + + Report structure + Структура отчета + + + + Data Browser + Инспектор данных + + + + Report has been modified ! Do you want save the report ? + Отчет был изменен ! Хотите его записать ? + + + + + Report file name + Файл отчета + + + + Rendering report + Создается отчет + + + + Abort + О генераторе + + + + page rendered + создается страница + + + + LimeReport::ReportEnginePrivate + + + Error + Ошибка + + + + LimeReport::ReportFooter + + + Report Footer + Завершение отчета + + + + LimeReport::ReportHeader + + + Report Header + Заголовок отчета + + + + LimeReport::ReportRender + + + Error + Ошибка + + + + Databand "%1" not found + Банд "%1" не найден + + + + Wrong using function %1 + Не правильное использование функции %1 + + + + LimeReport::ScriptEngineManager + + + FieldName + Имя поля + + + + + BandName + Имя банда + + + + + Value + Значение + + + + + Format + Формат + + + + Precision + Точность + + + + LimeReport::SubDetailBand + + + SubDetail + Подчиненные данные + + + + LimeReport::SubDetailHeaderBand + + + SubDetailHeader + Заголовок подчиненных данных + + + + LimeReport::TextAlignmentEditorWidget + + + Text align left + По левому краю + + + + + Text align center + По центру + + + + Text align right + По правому краю + + + + Text align justify + По ширине + + + + Text align top + Прижать к верхнему краю + + + + Text align bottom + Прижать к нижнему краю + + + + PreviewReportWindow + + + Preview + Предварительный просмотр + + + + View + Просмотр + + + + Report + Отчет + + + + toolBar + Панель инструментов + + + + Print + Печать + + + + Ctrl+P + + + + + Zoom In + Увеличить + + + + Zoom Out + Уменьшить + + + + + Prior Page + Предыдущая страница + + + + + Next Page + Следующая страница + + + + + Close Preview + Закрыть + + + + Edit Mode + Режим редактирования + + + + + Save to file + Записать в файл + + + + + Show errors + Показать ошибки + + + + First Page + Первая страница + + + + First page + Первая страница + + + + + Last Page + Последняя страница + + + + Print To PDF + Печать в PDF + + + + of %1 + из %1 + + + + Report file name + Файл отчета + + + + PDF file name + Имя PDF файла + + + + QObject + + + + Data + Данные + + + + DataHeader + Заголовок данных + + + + DataFooter + Завершение данных + + + + GroupHeader + Заголовок группы + + + + GroupFooter + Завершение группы + + + + + Page Footer + Нижний колонтитул + + + + + Page Header + Верхний колонтитул + + + + + Report Footer + Завершение отчета + + + + + Report Header + Заголовок отчета + + + + + SubDetail + Подчиненные данные + + + + SubDetailHeader + Заголовок подчиненных данных + + + + SubDetailFooter + Завершение подчиненных данных + + + + alignment + расположение + + + + Barcode Item + Элемент штрих код + + + + HLayout + Горизонтальная компоновка + + + + Image Item + Элемент изображение + + + + Shape Item + Элемент фигура + + + + itemLocation + Расположение объекта + + + + Text Item + Текстовый элемент + + + + + Invalid connection! %1 + Неверное соединение %1 + + + + Master datasouce "%1" not found! + Главный источник данных "%1" не найден! + + + + Child + Подчиненный + + + + and child + и подчиненный + + + + datasouce "%1" not found! + источник данных "%1" не найден ! + + + + Attention! + Внимание! + + + + Selected elements have different parent containers + Выделенные элементы имеют различные родительские контейнеры + + + + Object with name %1 already exists + Объект с именем %1 уже существует + + + + Function %1 not found or have wrong arguments + Функция %1 не найдена или вызвана с неверными аргументами + + + + bool + + + + + QColor + + + + + + datasource + источник данных + + + + + field + Поле + + + + enum + Перечисление + + + + flags + Флаги + + + + QFont + + + + + QImage + + + + + int + + + + + + qreal + + + + + QRect + + + + + QRectF + + + + + geometry + Геометрия + + + + mm + мм + + + + QString + + + + + File %1 not opened + Файл %1 не открыт + + + + Content string is empty + + + + + Content is empty + + + + + TopLine + Верхняя граница + + + + BottomLine + Нижняя граница + + + + LeftLine + Левая граница + + + + RightLine + Правая граница + + + + SQLEditDialog + + + Datasource + Источник данных + + + + Connection + Соединение + + + + Datasource Name + Имя источника + + + + Subdetail + Подчиненный + + + + Master datasource + Главный источник + + + + Subquery mode + Режим подзапроса + + + + Filter mode + Режим фильтрации + + + + SQL + SQL запрос + + + + + Preview + Предпросмотр + + + + Hide Preview + Скрыть + + + + Child datasource + Подчиненный источник + + + + Fields map + Поля для связи источников + + + + + ... + + + + + Data preview + Данные + + + + Cancel + Отмена + + + + Ok + + + + + Error + Ошибка + + + + Datasource Name is empty ! + Имя источника данных не заполнено ! + + + + SQL is empty ! + SQL запрос пустой ! + + + + Datasource with name: "%1" already exists ! + Источник данных с именем: "%1" уже существует ! + + + + Datasource with name %1 already exist + Источник данных с именем: "%1" уже существует + + + + + Attention + Внимание + + + + Connection is not specified + Соединение не указано + + + + Refresh + Обновить + + + + TextItemEditor + + + Text Item Editor + Редактор текстового элемента + + + + Content + Содержимое + + + + Data + Источники данных + + + + Functions + Функции + + + + Editor settings + Настройки + + + + Editor font + Шрифт редактора + + + + ... + + + + + Ok + + + + + Cancel + Отмена + + + + Esc + + + + + WaitForm + + + Wait + Ожидайте + + + + Please wait ... + Пожалуста подождите ... + + +