mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-25 04:54:40 +03:00
setPreviewWindowIcon, setPreviewWindowTitle added to LimeReport::ReportEngine
This commit is contained in:
parent
8aa23b3fb9
commit
225ee41289
@ -89,6 +89,8 @@ public:
|
|||||||
void setReportName(const QString& name);
|
void setReportName(const QString& name);
|
||||||
QString reportName();
|
QString reportName();
|
||||||
PreviewReportWidget *createPreviewWidget(QWidget *parent = 0);
|
PreviewReportWidget *createPreviewWidget(QWidget *parent = 0);
|
||||||
|
void setPreviewWindowTitle(const QString& title);
|
||||||
|
void setPreviewWindowIcon(const QIcon& icon);
|
||||||
signals:
|
signals:
|
||||||
void renderStarted();
|
void renderStarted();
|
||||||
void renderFinished();
|
void renderFinished();
|
||||||
|
@ -57,7 +57,8 @@ QSettings* ReportEngine::m_settings = 0;
|
|||||||
ReportEnginePrivate::ReportEnginePrivate(QObject *parent) :
|
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_datasources= new DataSourceManager(this);
|
m_datasources= new DataSourceManager(this);
|
||||||
m_datasources->setObjectName("datasources");
|
m_datasources->setObjectName("datasources");
|
||||||
@ -297,7 +298,9 @@ void ReportEnginePrivate::previewReport()
|
|||||||
w->setWindowFlags(Qt::Dialog|Qt::WindowMaximizeButtonHint|Qt::WindowCloseButtonHint| Qt::WindowMinMaxButtonsHint);
|
w->setWindowFlags(Qt::Dialog|Qt::WindowMaximizeButtonHint|Qt::WindowCloseButtonHint| Qt::WindowMinMaxButtonsHint);
|
||||||
w->setAttribute(Qt::WA_DeleteOnClose,true);
|
w->setAttribute(Qt::WA_DeleteOnClose,true);
|
||||||
w->setWindowModality(Qt::ApplicationModal);
|
w->setWindowModality(Qt::ApplicationModal);
|
||||||
w->setWindowIcon(QIcon(":/report/images/main.ico"));
|
//w->setWindowIcon(QIcon(":/report/images/main.ico"));
|
||||||
|
w->setWindowIcon(m_previewWindowIcon);
|
||||||
|
w->setWindowTitle(m_previewWindowTitle);
|
||||||
w->setSettings(settings());
|
w->setSettings(settings());
|
||||||
w->setPages(pages);
|
w->setPages(pages);
|
||||||
if (!dataManager()->errorsList().isEmpty()){
|
if (!dataManager()->errorsList().isEmpty()){
|
||||||
@ -379,7 +382,7 @@ void ReportEnginePrivate::designReport()
|
|||||||
{
|
{
|
||||||
LimeReport::ReportDesignWindow* w = new LimeReport::ReportDesignWindow(this,QApplication::activeWindow(),settings());
|
LimeReport::ReportDesignWindow* w = new LimeReport::ReportDesignWindow(this,QApplication::activeWindow(),settings());
|
||||||
w->setAttribute(Qt::WA_DeleteOnClose,true);
|
w->setAttribute(Qt::WA_DeleteOnClose,true);
|
||||||
w->setWindowIcon(QIcon(":report/images/main"));
|
w->setWindowIcon(QIcon(":report/images/logo32"));
|
||||||
w->setShowProgressDialog(m_showProgressDialog);
|
w->setShowProgressDialog(m_showProgressDialog);
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MAC)
|
||||||
//w->showModal();
|
//w->showModal();
|
||||||
@ -537,6 +540,26 @@ QString ReportEnginePrivate::renderToString()
|
|||||||
}else return QString();
|
}else return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString ReportEnginePrivate::previewWindowTitle() const
|
||||||
|
{
|
||||||
|
return m_previewWindowTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReportEnginePrivate::setPreviewWindowTitle(const QString &previewWindowTitle)
|
||||||
|
{
|
||||||
|
m_previewWindowTitle = previewWindowTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
QIcon ReportEnginePrivate::previewWindowIcon() const
|
||||||
|
{
|
||||||
|
return m_previewWindowIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReportEnginePrivate::setPreviewWindowIcon(const QIcon &previewWindowIcon)
|
||||||
|
{
|
||||||
|
m_previewWindowIcon = previewWindowIcon;
|
||||||
|
}
|
||||||
|
|
||||||
ReportPages ReportEnginePrivate::renderToPages()
|
ReportPages ReportEnginePrivate::renderToPages()
|
||||||
{
|
{
|
||||||
m_reportRender = ReportRender::Ptr(new ReportRender);
|
m_reportRender = ReportRender::Ptr(new ReportRender);
|
||||||
@ -619,6 +642,18 @@ PreviewReportWidget* ReportEngine::createPreviewWidget(QWidget *parent)
|
|||||||
return d->createPreviewWidget(parent);
|
return d->createPreviewWidget(parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ReportEngine::setPreviewWindowTitle(const QString &title)
|
||||||
|
{
|
||||||
|
Q_D(ReportEngine);
|
||||||
|
d->setPreviewWindowTitle(title);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReportEngine::setPreviewWindowIcon(const QIcon &icon)
|
||||||
|
{
|
||||||
|
Q_D(ReportEngine);
|
||||||
|
d->setPreviewWindowIcon(icon);
|
||||||
|
}
|
||||||
|
|
||||||
void ReportEngine::setShowProgressDialog(bool value)
|
void ReportEngine::setShowProgressDialog(bool value)
|
||||||
{
|
{
|
||||||
Q_D(ReportEngine);
|
Q_D(ReportEngine);
|
||||||
|
@ -89,6 +89,8 @@ public:
|
|||||||
void setReportName(const QString& name);
|
void setReportName(const QString& name);
|
||||||
QString reportName();
|
QString reportName();
|
||||||
PreviewReportWidget *createPreviewWidget(QWidget *parent = 0);
|
PreviewReportWidget *createPreviewWidget(QWidget *parent = 0);
|
||||||
|
void setPreviewWindowTitle(const QString& title);
|
||||||
|
void setPreviewWindowIcon(const QIcon& icon);
|
||||||
signals:
|
signals:
|
||||||
void renderStarted();
|
void renderStarted();
|
||||||
void renderFinished();
|
void renderFinished();
|
||||||
|
@ -104,6 +104,11 @@ public:
|
|||||||
bool hasActivePreview(){return m_activePreview;}
|
bool hasActivePreview(){return m_activePreview;}
|
||||||
PageDesignIntf *createPreviewScene(QObject *parent);
|
PageDesignIntf *createPreviewScene(QObject *parent);
|
||||||
PreviewReportWidget *createPreviewWidget(QWidget *parent);
|
PreviewReportWidget *createPreviewWidget(QWidget *parent);
|
||||||
|
QIcon previewWindowIcon() const;
|
||||||
|
void setPreviewWindowIcon(const QIcon &previewWindowIcon);
|
||||||
|
QString previewWindowTitle() const;
|
||||||
|
void setPreviewWindowTitle(const QString &previewWindowTitle);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void pagesLoadFinished();
|
void pagesLoadFinished();
|
||||||
void datasourceCollectionLoadFinished(const QString& collectionName);
|
void datasourceCollectionLoadFinished(const QString& collectionName);
|
||||||
@ -146,6 +151,8 @@ private:
|
|||||||
QString m_reportsDir;
|
QString m_reportsDir;
|
||||||
QString m_reportName;
|
QString m_reportName;
|
||||||
QMainWindow* m_activePreview;
|
QMainWindow* m_activePreview;
|
||||||
|
QIcon m_previewWindowIcon;
|
||||||
|
QString m_previewWindowTitle;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user