0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-11-25 00:18:06 +03:00

Show ToolBar action has been added to preview window

This commit is contained in:
Arin Alex
2016-08-08 15:50:04 +03:00
parent 7ce974090e
commit 4970b09327
13 changed files with 69 additions and 18 deletions

View File

@@ -70,6 +70,7 @@ PreviewReportWindow::PreviewReportWindow(ReportEnginePrivate *report,QWidget *pa
connect(m_previewReportWidget, SIGNAL(scalePercentChanged(int)), this, SLOT(slotScalePercentChanged(int)));
connect(m_scalePercent, SIGNAL(currentIndexChanged(QString)), this, SLOT(scaleComboboxChanged(QString)));
restoreSetting();
selectStateIcon();
}
void PreviewReportWindow::writeSetting()
@@ -138,7 +139,8 @@ void PreviewReportWindow::setErrorMessages(const QStringList &value){
void PreviewReportWindow::setToolBarVisible(bool value)
{
ui->toolBar->setVisible(value);
ui->toolBar->setHidden(value);
selectStateIcon();
}
void PreviewReportWindow::setStatusBarVisible(bool value)
@@ -224,6 +226,15 @@ void PreviewReportWindow::moveEvent(QMoveEvent* e)
#endif
}
void PreviewReportWindow::selectStateIcon()
{
if (ui->toolBar->isHidden()){
ui->actionShow_Toolbar->setIcon(QIcon(":/report/images/not_checked.png"));
} else {
ui->actionShow_Toolbar->setIcon(QIcon(":/report/images/checked.png"));
}
}
void PreviewReportWindow::slotPrint()
{
m_previewReportWidget->print();
@@ -327,4 +338,13 @@ void PreviewReportWindow::on_actionShowMessages_toggled(bool value)
m_previewReportWidget->setErrorsMesagesVisible(value);
}
void PreviewReportWindow::on_actionShow_Toolbar_triggered()
{
setToolBarVisible(!ui->toolBar->isHidden());
writeSetting();
}
}// namespace LimeReport