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