mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-24 20:44:39 +03:00
Merge branch 'master' into 1.4
# Conflicts: # limereport/lrreportengine.cpp # limereport/lrreportengine_p.h
This commit is contained in:
commit
b55582fad2
@ -31,10 +31,24 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include "lrglobal.h"
|
#include "lrglobal.h"
|
||||||
|
|
||||||
QString LimeReport::extractClassName(QString className)
|
namespace LimeReport {
|
||||||
|
|
||||||
|
QString extractClassName(QString className)
|
||||||
{
|
{
|
||||||
int startPos=className.lastIndexOf("::");
|
int startPos=className.lastIndexOf("::");
|
||||||
if(startPos==-1) startPos=0;
|
if(startPos==-1) startPos=0;
|
||||||
else startPos+=2;
|
else startPos+=2;
|
||||||
return className.right(className.length()-startPos);
|
return className.right(className.length()-startPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ReportSettings::suppressAbsentFieldsAndVarsWarnings() const
|
||||||
|
{
|
||||||
|
return m_suppressAbsentFieldsAndVarsWarnings;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReportSettings::setSuppressAbsentFieldsAndVarsWarnings(bool suppressAbsentFieldsAndVarsWarnings)
|
||||||
|
{
|
||||||
|
m_suppressAbsentFieldsAndVarsWarnings = suppressAbsentFieldsAndVarsWarnings;
|
||||||
|
}
|
||||||
|
|
||||||
|
} //namespace LimeReport
|
||||||
|
@ -84,6 +84,16 @@ namespace Const{
|
|||||||
ReportError(const QString& message):std::runtime_error(message.toStdString()){}
|
ReportError(const QString& message):std::runtime_error(message.toStdString()){}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class ReportSettings{
|
||||||
|
public:
|
||||||
|
ReportSettings():m_suppressAbsentFieldsAndVarsWarnings(false){}
|
||||||
|
void setDefaultValues(){m_suppressAbsentFieldsAndVarsWarnings = false;}
|
||||||
|
bool suppressAbsentFieldsAndVarsWarnings() const;
|
||||||
|
void setSuppressAbsentFieldsAndVarsWarnings(bool suppressAbsentFieldsAndVarsWarnings);
|
||||||
|
private:
|
||||||
|
bool m_suppressAbsentFieldsAndVarsWarnings;
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace LimeReport
|
} // namespace LimeReport
|
||||||
|
|
||||||
|
|
||||||
|
@ -75,7 +75,8 @@ BaseDesignIntf::BaseDesignIntf(const QString &storageTypeName, QObject *owner, Q
|
|||||||
m_margin(4),
|
m_margin(4),
|
||||||
m_itemAlign(DesignedItemAlign),
|
m_itemAlign(DesignedItemAlign),
|
||||||
m_changingItemAlign(false),
|
m_changingItemAlign(false),
|
||||||
m_borderColor(Qt::black)
|
m_borderColor(Qt::black),
|
||||||
|
m_reportSettings(0)
|
||||||
{
|
{
|
||||||
setGeometry(QRectF(0, 0, m_width, m_height));
|
setGeometry(QRectF(0, 0, m_width, m_height));
|
||||||
if (BaseDesignIntf *item = dynamic_cast<BaseDesignIntf *>(parent)) {
|
if (BaseDesignIntf *item = dynamic_cast<BaseDesignIntf *>(parent)) {
|
||||||
@ -626,6 +627,19 @@ void BaseDesignIntf::turnOnSelectionMarker(bool value)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReportSettings *BaseDesignIntf::reportSettings() const
|
||||||
|
{
|
||||||
|
return m_reportSettings;
|
||||||
|
}
|
||||||
|
|
||||||
|
void BaseDesignIntf::setReportSettings(ReportSettings *reportSettings)
|
||||||
|
{
|
||||||
|
m_reportSettings = reportSettings;
|
||||||
|
foreach(BaseDesignIntf* child, childBaseItems()){
|
||||||
|
child->setReportSettings(reportSettings);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QColor BaseDesignIntf::borderColor() const
|
QColor BaseDesignIntf::borderColor() const
|
||||||
{
|
{
|
||||||
return m_borderColor;
|
return m_borderColor;
|
||||||
@ -1187,6 +1201,7 @@ BaseDesignIntf *BaseDesignIntf::cloneItemWOChild(ItemMode mode, QObject *owner,
|
|||||||
clone->setObjectName(this->objectName());
|
clone->setObjectName(this->objectName());
|
||||||
clone->setItemMode(mode);
|
clone->setItemMode(mode);
|
||||||
clone->objectLoadStarted();
|
clone->objectLoadStarted();
|
||||||
|
clone->setReportSettings(this->reportSettings());
|
||||||
for (int i = 0; i < clone->metaObject()->propertyCount(); i++) {
|
for (int i = 0; i < clone->metaObject()->propertyCount(); i++) {
|
||||||
if (clone->metaObject()->property(i).isWritable())
|
if (clone->metaObject()->property(i).isWritable())
|
||||||
clone->setProperty(clone->metaObject()->property(i).name(), property(clone->metaObject()->property(i).name()));
|
clone->setProperty(clone->metaObject()->property(i).name(), property(clone->metaObject()->property(i).name()));
|
||||||
|
@ -246,6 +246,8 @@ public:
|
|||||||
void setBorderColor(const QColor &borderColor);
|
void setBorderColor(const QColor &borderColor);
|
||||||
void setItemVisible(const bool& value);
|
void setItemVisible(const bool& value);
|
||||||
virtual bool canContainChildren(){ return false;}
|
virtual bool canContainChildren(){ return false;}
|
||||||
|
ReportSettings* reportSettings() const;
|
||||||
|
void setReportSettings(ReportSettings *reportSettings);
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
//ICollectionContainer
|
//ICollectionContainer
|
||||||
@ -347,6 +349,7 @@ private:
|
|||||||
ItemAlign m_itemAlign;
|
ItemAlign m_itemAlign;
|
||||||
bool m_changingItemAlign;
|
bool m_changingItemAlign;
|
||||||
QColor m_borderColor;
|
QColor m_borderColor;
|
||||||
|
ReportSettings* m_reportSettings;
|
||||||
signals:
|
signals:
|
||||||
void geometryChanged(QObject* object, QRectF newGeometry, QRectF oldGeometry);
|
void geometryChanged(QObject* object, QRectF newGeometry, QRectF oldGeometry);
|
||||||
void posChanged(QObject* object, QPointF newPos, QPointF oldPos);
|
void posChanged(QObject* object, QPointF newPos, QPointF oldPos);
|
||||||
|
@ -323,13 +323,16 @@ QSharedPointer<QAbstractItemModel>DataSourceManager::previewSQL(const QString &c
|
|||||||
query.exec();
|
query.exec();
|
||||||
model->setQuery(query);
|
model->setQuery(query);
|
||||||
m_lastError = model->lastError().text();
|
m_lastError = model->lastError().text();
|
||||||
|
putError(m_lastError);
|
||||||
if (model->query().isActive())
|
if (model->query().isActive())
|
||||||
return QSharedPointer<QAbstractItemModel>(model);
|
return QSharedPointer<QAbstractItemModel>(model);
|
||||||
else
|
else
|
||||||
return QSharedPointer<QAbstractItemModel>(0);
|
return QSharedPointer<QAbstractItemModel>(0);
|
||||||
}
|
}
|
||||||
if (!db.isOpen())
|
if (!db.isOpen()){
|
||||||
m_lastError = tr("Connection \"%1\" is not open").arg(connectionName);
|
m_lastError = tr("Connection \"%1\" is not open").arg(connectionName);
|
||||||
|
putError(m_lastError);
|
||||||
|
}
|
||||||
return QSharedPointer<QAbstractItemModel>(0);
|
return QSharedPointer<QAbstractItemModel>(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -657,7 +660,7 @@ void DataSourceManager::putProxyDesc(ProxyDesc *proxyDesc)
|
|||||||
bool DataSourceManager::connectConnection(ConnectionDesc *connectionDesc)
|
bool DataSourceManager::connectConnection(ConnectionDesc *connectionDesc)
|
||||||
{
|
{
|
||||||
bool connected = false;
|
bool connected = false;
|
||||||
clearErrorsList();
|
clearErrors();
|
||||||
QString lastError ="";
|
QString lastError ="";
|
||||||
|
|
||||||
foreach(QString datasourceName, dataSourceNames()){
|
foreach(QString datasourceName, dataSourceNames()){
|
||||||
|
@ -178,7 +178,7 @@ public:
|
|||||||
QString lastError() const { return m_lastError;}
|
QString lastError() const { return m_lastError;}
|
||||||
|
|
||||||
void putError(QString error){ if (!m_errorsList.contains(error)) m_errorsList.append(error);}
|
void putError(QString error){ if (!m_errorsList.contains(error)) m_errorsList.append(error);}
|
||||||
void clearErrorsList(){ m_errorsList.clear();}
|
void clearErrors(){ m_errorsList.clear(); m_lastError = "";}
|
||||||
QStringList errorsList(){ return m_errorsList;}
|
QStringList errorsList(){ return m_errorsList;}
|
||||||
bool designTime() const;
|
bool designTime() const;
|
||||||
void setDesignTime(bool designTime);
|
void setDesignTime(bool designTime);
|
||||||
|
@ -31,10 +31,24 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include "lrglobal.h"
|
#include "lrglobal.h"
|
||||||
|
|
||||||
QString LimeReport::extractClassName(QString className)
|
namespace LimeReport {
|
||||||
|
|
||||||
|
QString extractClassName(QString className)
|
||||||
{
|
{
|
||||||
int startPos=className.lastIndexOf("::");
|
int startPos=className.lastIndexOf("::");
|
||||||
if(startPos==-1) startPos=0;
|
if(startPos==-1) startPos=0;
|
||||||
else startPos+=2;
|
else startPos+=2;
|
||||||
return className.right(className.length()-startPos);
|
return className.right(className.length()-startPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ReportSettings::suppressAbsentFieldsAndVarsWarnings() const
|
||||||
|
{
|
||||||
|
return m_suppressAbsentFieldsAndVarsWarnings;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReportSettings::setSuppressAbsentFieldsAndVarsWarnings(bool suppressAbsentFieldsAndVarsWarnings)
|
||||||
|
{
|
||||||
|
m_suppressAbsentFieldsAndVarsWarnings = suppressAbsentFieldsAndVarsWarnings;
|
||||||
|
}
|
||||||
|
|
||||||
|
} //namespace LimeReport
|
||||||
|
@ -84,6 +84,16 @@ namespace Const{
|
|||||||
ReportError(const QString& message):std::runtime_error(message.toStdString()){}
|
ReportError(const QString& message):std::runtime_error(message.toStdString()){}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class ReportSettings{
|
||||||
|
public:
|
||||||
|
ReportSettings():m_suppressAbsentFieldsAndVarsWarnings(false){}
|
||||||
|
void setDefaultValues(){m_suppressAbsentFieldsAndVarsWarnings = false;}
|
||||||
|
bool suppressAbsentFieldsAndVarsWarnings() const;
|
||||||
|
void setSuppressAbsentFieldsAndVarsWarnings(bool suppressAbsentFieldsAndVarsWarnings);
|
||||||
|
private:
|
||||||
|
bool m_suppressAbsentFieldsAndVarsWarnings;
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace LimeReport
|
} // namespace LimeReport
|
||||||
|
|
||||||
|
|
||||||
|
@ -149,14 +149,12 @@ QString ContentItemDesignIntf::expandDataFields(QString context, ExpandType expa
|
|||||||
context.replace(rx.cap(0),fieldValue);
|
context.replace(rx.cap(0),fieldValue);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
QString error;
|
QString error = QString("Field %1 not found in %2 !!! ").arg(field).arg(this->objectName());
|
||||||
if (dataManager->lastError().isEmpty()){
|
|
||||||
error = QString("Field %1 not found in %2 !!! ").arg(field).arg(this->objectName());
|
|
||||||
dataManager->putError(error);
|
dataManager->putError(error);
|
||||||
} else {
|
if (!reportSettings() || !reportSettings()->suppressAbsentFieldsAndVarsWarnings())
|
||||||
error = dataManager->lastError();
|
|
||||||
}
|
|
||||||
context.replace(rx.cap(0),error);
|
context.replace(rx.cap(0),error);
|
||||||
|
else
|
||||||
|
context.replace(rx.cap(0),"");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -188,7 +186,13 @@ QString ContentItemDesignIntf::expandUserVariables(QString context, RenderPass p
|
|||||||
pos=0;
|
pos=0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
context.replace(rx.cap(0),tr("Variable %1 not found").arg(variable));
|
QString error;
|
||||||
|
error = tr("Variable %1 not found").arg(variable);
|
||||||
|
dataManager->putError(error);
|
||||||
|
if (!reportSettings() || reportSettings()->suppressAbsentFieldsAndVarsWarnings())
|
||||||
|
context.replace(rx.cap(0),error);
|
||||||
|
else
|
||||||
|
context.replace(rx.cap(0),"");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,8 @@ PageDesignIntf::PageDesignIntf(QObject *parent):
|
|||||||
m_multiSelectStarted(false),
|
m_multiSelectStarted(false),
|
||||||
m_movedItem(0),
|
m_movedItem(0),
|
||||||
m_joinItem(0),
|
m_joinItem(0),
|
||||||
m_magneticMovement(false)
|
m_magneticMovement(false),
|
||||||
|
m_reportSettings(0)
|
||||||
{
|
{
|
||||||
m_reportEditor = dynamic_cast<ReportEnginePrivate *>(parent);
|
m_reportEditor = dynamic_cast<ReportEnginePrivate *>(parent);
|
||||||
updatePageRect();
|
updatePageRect();
|
||||||
@ -1044,6 +1045,17 @@ void PageDesignIntf::changeSelectedGroupProperty(const QString &name, const QVar
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReportSettings *PageDesignIntf::getReportSettings() const
|
||||||
|
{
|
||||||
|
return m_reportSettings;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PageDesignIntf::setReportSettings(ReportSettings *reportSettings)
|
||||||
|
{
|
||||||
|
m_reportSettings = reportSettings;
|
||||||
|
m_pageItem->setReportSettings(m_reportSettings);
|
||||||
|
}
|
||||||
|
|
||||||
bool PageDesignIntf::magneticMovement() const
|
bool PageDesignIntf::magneticMovement() const
|
||||||
{
|
{
|
||||||
return m_magneticMovement;
|
return m_magneticMovement;
|
||||||
|
@ -179,6 +179,9 @@ namespace LimeReport {
|
|||||||
bool magneticMovement() const;
|
bool magneticMovement() const;
|
||||||
void setMagneticMovement(bool magneticMovement);
|
void setMagneticMovement(bool magneticMovement);
|
||||||
|
|
||||||
|
ReportSettings *getReportSettings() const;
|
||||||
|
void setReportSettings(ReportSettings *reportSettings);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual void keyPressEvent(QKeyEvent *event);
|
virtual void keyPressEvent(QKeyEvent *event);
|
||||||
@ -310,6 +313,7 @@ namespace LimeReport {
|
|||||||
BaseDesignIntf* m_joinItem;
|
BaseDesignIntf* m_joinItem;
|
||||||
JoinType m_joinType;
|
JoinType m_joinType;
|
||||||
bool m_magneticMovement;
|
bool m_magneticMovement;
|
||||||
|
ReportSettings* m_reportSettings;
|
||||||
};
|
};
|
||||||
|
|
||||||
class AbstractPageCommand : public CommandIf{
|
class AbstractPageCommand : public CommandIf{
|
||||||
|
@ -506,11 +506,13 @@ void ReportDesignWidget::editSetting()
|
|||||||
setting.setVerticalGridStep(m_verticalGridStep);
|
setting.setVerticalGridStep(m_verticalGridStep);
|
||||||
setting.setHorizontalGridStep(m_horizontalGridStep);
|
setting.setHorizontalGridStep(m_horizontalGridStep);
|
||||||
setting.setDefaultFont(m_defaultFont);
|
setting.setDefaultFont(m_defaultFont);
|
||||||
|
setting.setSuppressAbsentFieldsAndVarsWarnings(m_report->suppressFieldAndVarError());
|
||||||
|
|
||||||
if (setting.exec()){
|
if (setting.exec()){
|
||||||
m_horizontalGridStep = setting.horizontalGridStep();
|
m_horizontalGridStep = setting.horizontalGridStep();
|
||||||
m_verticalGridStep = setting.verticalGridStep();
|
m_verticalGridStep = setting.verticalGridStep();
|
||||||
m_defaultFont = setting.defaultFont();
|
m_defaultFont = setting.defaultFont();
|
||||||
|
m_report->setSuppressFieldAndVarError(setting.suppressAbsentFieldsAndVarsWarnings());
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -94,6 +94,7 @@ PageDesignIntf *ReportEnginePrivate::createPage(const QString &pageName)
|
|||||||
PageDesignIntf* page =new PageDesignIntf();
|
PageDesignIntf* page =new PageDesignIntf();
|
||||||
page->setObjectName(pageName);
|
page->setObjectName(pageName);
|
||||||
page->setReportEditor(this);
|
page->setReportEditor(this);
|
||||||
|
page->setReportSettings(&m_reportSettings);
|
||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,6 +130,7 @@ void ReportEnginePrivate::collectionLoadFinished(const QString &)
|
|||||||
{
|
{
|
||||||
foreach (PageDesignIntf* page, m_pages) {
|
foreach (PageDesignIntf* page, m_pages) {
|
||||||
page->setReportEditor(this);
|
page->setReportEditor(this);
|
||||||
|
page->setReportSettings(&m_reportSettings);
|
||||||
page->setSceneRect(-Const::SCENE_MARGIN,-Const::SCENE_MARGIN,
|
page->setSceneRect(-Const::SCENE_MARGIN,-Const::SCENE_MARGIN,
|
||||||
page->pageItem()->width()+Const::SCENE_MARGIN*2,
|
page->pageItem()->width()+Const::SCENE_MARGIN*2,
|
||||||
page->pageItem()->height()+Const::SCENE_MARGIN*2);
|
page->pageItem()->height()+Const::SCENE_MARGIN*2);
|
||||||
@ -165,6 +167,7 @@ void ReportEnginePrivate::clearReport()
|
|||||||
m_datasources->clear(DataSourceManager::Owned);
|
m_datasources->clear(DataSourceManager::Owned);
|
||||||
m_fileName="";
|
m_fileName="";
|
||||||
m_scriptEngineContext->clear();
|
m_scriptEngineContext->clear();
|
||||||
|
m_reportSettings.setDefaultValues();
|
||||||
emit cleared();
|
emit cleared();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -614,6 +617,16 @@ QString ReportEnginePrivate::renderToString()
|
|||||||
}else return QString();
|
}else return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ReportEnginePrivate::suppressFieldAndVarError() const
|
||||||
|
{
|
||||||
|
return m_reportSettings.suppressAbsentFieldsAndVarsWarnings();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReportEnginePrivate::setSuppressFieldAndVarError(bool suppressFieldAndVarError)
|
||||||
|
{
|
||||||
|
m_reportSettings.setSuppressAbsentFieldsAndVarsWarnings(suppressFieldAndVarError);
|
||||||
|
}
|
||||||
|
|
||||||
QString ReportEnginePrivate::previewWindowTitle() const
|
QString ReportEnginePrivate::previewWindowTitle() const
|
||||||
{
|
{
|
||||||
return m_previewWindowTitle;
|
return m_previewWindowTitle;
|
||||||
@ -637,7 +650,7 @@ void ReportEnginePrivate::setPreviewWindowIcon(const QIcon &previewWindowIcon)
|
|||||||
ReportPages ReportEnginePrivate::renderToPages()
|
ReportPages ReportEnginePrivate::renderToPages()
|
||||||
{
|
{
|
||||||
m_reportRender = ReportRender::Ptr(new ReportRender);
|
m_reportRender = ReportRender::Ptr(new ReportRender);
|
||||||
dataManager()->clearErrorsList();
|
dataManager()->clearErrors();
|
||||||
dataManager()->connectAllDatabases();
|
dataManager()->connectAllDatabases();
|
||||||
dataManager()->setDesignTime(false);
|
dataManager()->setDesignTime(false);
|
||||||
connect(m_reportRender.data(),SIGNAL(pageRendered(int)),
|
connect(m_reportRender.data(),SIGNAL(pageRendered(int)),
|
||||||
@ -649,6 +662,7 @@ ReportPages ReportEnginePrivate::renderToPages()
|
|||||||
m_reportRender->setScriptContext(scriptContext());
|
m_reportRender->setScriptContext(scriptContext());
|
||||||
|
|
||||||
foreach(PageDesignIntf* page , m_pages){
|
foreach(PageDesignIntf* page , m_pages){
|
||||||
|
m_pages.at(0)->setReportSettings(&m_reportSettings);
|
||||||
result.append(m_reportRender->renderPageToPages(page));
|
result.append(m_reportRender->renderPageToPages(page));
|
||||||
}
|
}
|
||||||
emit renderFinished();
|
emit renderFinished();
|
||||||
|
@ -57,6 +57,7 @@ class ReportEnginePrivate : public QObject, public ICollectionContainer
|
|||||||
Q_PROPERTY(ACollectionProperty pages READ fakeCollectionReader())
|
Q_PROPERTY(ACollectionProperty pages READ fakeCollectionReader())
|
||||||
Q_PROPERTY(QObject* datasourcesManager READ dataManager)
|
Q_PROPERTY(QObject* datasourcesManager READ dataManager)
|
||||||
Q_PROPERTY(QObject* scriptContext READ scriptContext)
|
Q_PROPERTY(QObject* scriptContext READ scriptContext)
|
||||||
|
Q_PROPERTY(bool suppressFieldAndVarError READ suppressFieldAndVarError WRITE setSuppressFieldAndVarError)
|
||||||
friend class PreviewReportWidget;
|
friend class PreviewReportWidget;
|
||||||
public:
|
public:
|
||||||
static void printReport(ItemsReaderIntf::Ptr reader, QPrinter &printer);
|
static void printReport(ItemsReaderIntf::Ptr reader, QPrinter &printer);
|
||||||
@ -118,6 +119,9 @@ public:
|
|||||||
QString previewWindowTitle() const;
|
QString previewWindowTitle() const;
|
||||||
void setPreviewWindowTitle(const QString &previewWindowTitle);
|
void setPreviewWindowTitle(const QString &previewWindowTitle);
|
||||||
|
|
||||||
|
bool suppressFieldAndVarError() const;
|
||||||
|
void setSuppressFieldAndVarError(bool suppressFieldAndVarError);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void pagesLoadFinished();
|
void pagesLoadFinished();
|
||||||
void datasourceCollectionLoadFinished(const QString& collectionName);
|
void datasourceCollectionLoadFinished(const QString& collectionName);
|
||||||
@ -165,6 +169,7 @@ private:
|
|||||||
QIcon m_previewWindowIcon;
|
QIcon m_previewWindowIcon;
|
||||||
QString m_previewWindowTitle;
|
QString m_previewWindowTitle;
|
||||||
QPointer<ReportDesignWindow> m_designerWindow;
|
QPointer<ReportDesignWindow> m_designerWindow;
|
||||||
|
ReportSettings m_reportSettings;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,15 @@ QFont SettingDialog::defaultFont()
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SettingDialog::suppressAbsentFieldsAndVarsWarnings()
|
||||||
|
{
|
||||||
|
return ui->cbSuppressWarnings->isChecked();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SettingDialog::setSuppressAbsentFieldsAndVarsWarnings(bool value){
|
||||||
|
ui->cbSuppressWarnings->setChecked(value);
|
||||||
|
}
|
||||||
|
|
||||||
void SettingDialog::setHorizontalGridStep(int value)
|
void SettingDialog::setHorizontalGridStep(int value)
|
||||||
{
|
{
|
||||||
ui->horizontalGridStep->setValue(value);
|
ui->horizontalGridStep->setValue(value);
|
||||||
|
@ -19,6 +19,8 @@ public:
|
|||||||
int verticalGridStep();
|
int verticalGridStep();
|
||||||
int horizontalGridStep();
|
int horizontalGridStep();
|
||||||
QFont defaultFont();
|
QFont defaultFont();
|
||||||
|
bool suppressAbsentFieldsAndVarsWarnings();
|
||||||
|
void setSuppressAbsentFieldsAndVarsWarnings(bool value);
|
||||||
void setHorizontalGridStep(int value);
|
void setHorizontalGridStep(int value);
|
||||||
void setVerticalGridStep(int value);
|
void setVerticalGridStep(int value);
|
||||||
void setDefaultFont(const QFont& value);
|
void setDefaultFont(const QFont& value);
|
||||||
|
@ -7,13 +7,19 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>351</width>
|
<width>351</width>
|
||||||
<height>185</height>
|
<height>318</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Designer setting</string>
|
<string>Designer setting</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_3">
|
||||||
|
<property name="title">
|
||||||
|
<string>Designer Setting</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
@ -102,6 +108,25 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
|
<property name="title">
|
||||||
|
<string>Report Setting</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="cbSuppressWarnings">
|
||||||
|
<property name="text">
|
||||||
|
<string>Suppress absent fields and variables warning</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@ -153,8 +178,8 @@
|
|||||||
<slot>accept()</slot>
|
<slot>accept()</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>248</x>
|
<x>221</x>
|
||||||
<y>254</y>
|
<y>307</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>157</x>
|
<x>157</x>
|
||||||
@ -169,8 +194,8 @@
|
|||||||
<slot>reject()</slot>
|
<slot>reject()</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>316</x>
|
<x>221</x>
|
||||||
<y>260</y>
|
<y>307</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>286</x>
|
<x>286</x>
|
||||||
|
Loading…
Reference in New Issue
Block a user