mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-25 00:54:39 +03:00
fix #59 setResultEditable(bool value) has been added
This commit is contained in:
parent
21b3f0e912
commit
7af7a16840
@ -98,6 +98,8 @@ public:
|
|||||||
PreviewReportWidget *createPreviewWidget(QWidget *parent = 0);
|
PreviewReportWidget *createPreviewWidget(QWidget *parent = 0);
|
||||||
void setPreviewWindowTitle(const QString& title);
|
void setPreviewWindowTitle(const QString& title);
|
||||||
void setPreviewWindowIcon(const QIcon& icon);
|
void setPreviewWindowIcon(const QIcon& icon);
|
||||||
|
void setResultEditable(bool value);
|
||||||
|
bool resultIsEditable();
|
||||||
bool isBusy();
|
bool isBusy();
|
||||||
signals:
|
signals:
|
||||||
void renderStarted();
|
void renderStarted();
|
||||||
|
@ -645,7 +645,7 @@ bool TextItem::isNeedUpdateSize(RenderPass pass) const
|
|||||||
{
|
{
|
||||||
Q_UNUSED(pass)
|
Q_UNUSED(pass)
|
||||||
|
|
||||||
if (autoHeight() && autoWidth() || hasFollower()){
|
if ((autoHeight() && autoWidth()) || hasFollower()){
|
||||||
initTextSizes();
|
initTextSizes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,6 +166,11 @@ void PreviewReportWindow::setMenuVisible(bool value)
|
|||||||
ui->menubar->setVisible(value);
|
ui->menubar->setVisible(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PreviewReportWindow::setHideResultEditButton(bool value)
|
||||||
|
{
|
||||||
|
ui->actionEdit_Mode->setVisible(value);
|
||||||
|
}
|
||||||
|
|
||||||
QSettings*PreviewReportWindow::settings()
|
QSettings*PreviewReportWindow::settings()
|
||||||
{
|
{
|
||||||
if (m_settings){
|
if (m_settings){
|
||||||
|
@ -65,6 +65,7 @@ public:
|
|||||||
void setToolBarVisible(bool value);
|
void setToolBarVisible(bool value);
|
||||||
void setStatusBarVisible(bool value);
|
void setStatusBarVisible(bool value);
|
||||||
void setMenuVisible(bool value);
|
void setMenuVisible(bool value);
|
||||||
|
void setHideResultEditButton(bool value);
|
||||||
QSettings* settings();
|
QSettings* settings();
|
||||||
protected:
|
protected:
|
||||||
void writeSetting();
|
void writeSetting();
|
||||||
|
@ -58,7 +58,8 @@ ReportEnginePrivate::ReportEnginePrivate(QObject *parent) :
|
|||||||
QObject(parent), m_fileName(""), m_settings(0), m_ownedSettings(false),
|
QObject(parent), m_fileName(""), m_settings(0), m_ownedSettings(false),
|
||||||
m_printer(new QPrinter(QPrinter::HighResolution)), m_printerSelected(false),
|
m_printer(new QPrinter(QPrinter::HighResolution)), m_printerSelected(false),
|
||||||
m_showProgressDialog(true), m_reportName(""), m_activePreview(0),
|
m_showProgressDialog(true), m_reportName(""), m_activePreview(0),
|
||||||
m_previewWindowIcon(":/report/images/logo32"), m_previewWindowTitle(tr("Preview")), m_reportRendering(false)
|
m_previewWindowIcon(":/report/images/logo32"), m_previewWindowTitle(tr("Preview")),
|
||||||
|
m_reportRendering(false), m_resultIsEditable(true)
|
||||||
{
|
{
|
||||||
m_datasources = new DataSourceManager(this);
|
m_datasources = new DataSourceManager(this);
|
||||||
m_datasources->setReportSettings(&m_reportSettings);
|
m_datasources->setReportSettings(&m_reportSettings);
|
||||||
@ -383,6 +384,8 @@ void ReportEnginePrivate::previewReport(PreviewHints hints)
|
|||||||
w->setToolBarVisible(!hints.testFlag(HidePreviewToolBar));
|
w->setToolBarVisible(!hints.testFlag(HidePreviewToolBar));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
w->setHideResultEditButton(resultIsEditable());
|
||||||
|
|
||||||
m_activePreview = w;
|
m_activePreview = w;
|
||||||
connect(w,SIGNAL(destroyed(QObject*)), this, SLOT(slotPreviewWindowDestroed(QObject*)));
|
connect(w,SIGNAL(destroyed(QObject*)), this, SLOT(slotPreviewWindowDestroed(QObject*)));
|
||||||
qDebug()<<"render time ="<<start.msecsTo(QTime::currentTime());
|
qDebug()<<"render time ="<<start.msecsTo(QTime::currentTime());
|
||||||
@ -626,6 +629,16 @@ QString ReportEnginePrivate::renderToString()
|
|||||||
}else return QString();
|
}else return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ReportEnginePrivate::resultIsEditable() const
|
||||||
|
{
|
||||||
|
return m_resultIsEditable;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReportEnginePrivate::setResultEditable(bool value)
|
||||||
|
{
|
||||||
|
m_resultIsEditable = value;
|
||||||
|
}
|
||||||
|
|
||||||
bool ReportEnginePrivate::suppressFieldAndVarError() const
|
bool ReportEnginePrivate::suppressFieldAndVarError() const
|
||||||
{
|
{
|
||||||
return m_reportSettings.suppressAbsentFieldsAndVarsWarnings();
|
return m_reportSettings.suppressAbsentFieldsAndVarsWarnings();
|
||||||
@ -776,6 +789,18 @@ void ReportEngine::setPreviewWindowIcon(const QIcon &icon)
|
|||||||
d->setPreviewWindowIcon(icon);
|
d->setPreviewWindowIcon(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ReportEngine::setResultEditable(bool value)
|
||||||
|
{
|
||||||
|
Q_D(ReportEngine);
|
||||||
|
d->setResultEditable(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ReportEngine::resultIsEditable()
|
||||||
|
{
|
||||||
|
Q_D(ReportEngine);
|
||||||
|
return d->resultIsEditable();
|
||||||
|
}
|
||||||
|
|
||||||
bool ReportEngine::isBusy()
|
bool ReportEngine::isBusy()
|
||||||
{
|
{
|
||||||
Q_D(ReportEngine);
|
Q_D(ReportEngine);
|
||||||
|
@ -98,6 +98,8 @@ public:
|
|||||||
PreviewReportWidget *createPreviewWidget(QWidget *parent = 0);
|
PreviewReportWidget *createPreviewWidget(QWidget *parent = 0);
|
||||||
void setPreviewWindowTitle(const QString& title);
|
void setPreviewWindowTitle(const QString& title);
|
||||||
void setPreviewWindowIcon(const QIcon& icon);
|
void setPreviewWindowIcon(const QIcon& icon);
|
||||||
|
void setResultEditable(bool value);
|
||||||
|
bool resultIsEditable();
|
||||||
bool isBusy();
|
bool isBusy();
|
||||||
signals:
|
signals:
|
||||||
void renderStarted();
|
void renderStarted();
|
||||||
|
@ -122,6 +122,9 @@ public:
|
|||||||
bool suppressFieldAndVarError() const;
|
bool suppressFieldAndVarError() const;
|
||||||
void setSuppressFieldAndVarError(bool suppressFieldAndVarError);
|
void setSuppressFieldAndVarError(bool suppressFieldAndVarError);
|
||||||
bool isBusy();
|
bool isBusy();
|
||||||
|
bool resultIsEditable() const;
|
||||||
|
void setResultEditable(bool value);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void pagesLoadFinished();
|
void pagesLoadFinished();
|
||||||
void datasourceCollectionLoadFinished(const QString& collectionName);
|
void datasourceCollectionLoadFinished(const QString& collectionName);
|
||||||
@ -171,6 +174,7 @@ private:
|
|||||||
QPointer<ReportDesignWindow> m_designerWindow;
|
QPointer<ReportDesignWindow> m_designerWindow;
|
||||||
ReportSettings m_reportSettings;
|
ReportSettings m_reportSettings;
|
||||||
bool m_reportRendering;
|
bool m_reportRendering;
|
||||||
|
bool m_resultIsEditable;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user