mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
Make report/atlas settings actions checkable, so they can also hide the panels
This commit is contained in:
parent
a4f854e2c1
commit
4e6a072e49
@ -659,9 +659,11 @@ QgsLayoutDesignerDialog::QgsLayoutDesignerDialog( QWidget *parent, Qt::WindowFla
|
|||||||
|
|
||||||
mAtlasDock = new QgsDockWidget( tr( "Atlas" ), this );
|
mAtlasDock = new QgsDockWidget( tr( "Atlas" ), this );
|
||||||
mAtlasDock->setObjectName( QStringLiteral( "AtlasDock" ) );
|
mAtlasDock->setObjectName( QStringLiteral( "AtlasDock" ) );
|
||||||
|
connect( mAtlasDock, &QDockWidget::visibilityChanged, mActionAtlasSettings, &QAction::setChecked );
|
||||||
|
|
||||||
mReportDock = new QgsDockWidget( tr( "Report" ), this );
|
mReportDock = new QgsDockWidget( tr( "Report" ), this );
|
||||||
mReportDock->setObjectName( QStringLiteral( "ReportDock" ) );
|
mReportDock->setObjectName( QStringLiteral( "ReportDock" ) );
|
||||||
|
connect( mReportDock, &QDockWidget::visibilityChanged, mActionReportSettings, &QAction::setChecked );
|
||||||
|
|
||||||
const QList<QDockWidget *> docks = findChildren<QDockWidget *>();
|
const QList<QDockWidget *> docks = findChildren<QDockWidget *>();
|
||||||
for ( QDockWidget *dock : docks )
|
for ( QDockWidget *dock : docks )
|
||||||
@ -1992,12 +1994,12 @@ void QgsLayoutDesignerDialog::exportToSvg()
|
|||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QgsLayoutDesignerDialog::showAtlasSettings()
|
void QgsLayoutDesignerDialog::showAtlasSettings( bool checked )
|
||||||
{
|
{
|
||||||
if ( !mAtlasDock )
|
if ( !mAtlasDock )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mAtlasDock->setUserVisible( true );
|
mAtlasDock->setUserVisible( checked );
|
||||||
}
|
}
|
||||||
|
|
||||||
void QgsLayoutDesignerDialog::atlasPreviewTriggered( bool checked )
|
void QgsLayoutDesignerDialog::atlasPreviewTriggered( bool checked )
|
||||||
@ -3274,12 +3276,12 @@ void QgsLayoutDesignerDialog::printReport()
|
|||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QgsLayoutDesignerDialog::showReportSettings()
|
void QgsLayoutDesignerDialog::showReportSettings( bool checked )
|
||||||
{
|
{
|
||||||
if ( !mReportDock )
|
if ( !mReportDock )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mReportDock->setUserVisible( true );
|
mReportDock->setUserVisible( checked );
|
||||||
}
|
}
|
||||||
|
|
||||||
void QgsLayoutDesignerDialog::pageSetup()
|
void QgsLayoutDesignerDialog::pageSetup()
|
||||||
|
@ -309,7 +309,7 @@ class QgsLayoutDesignerDialog: public QMainWindow, private Ui::QgsLayoutDesigner
|
|||||||
void exportToRaster();
|
void exportToRaster();
|
||||||
void exportToPdf();
|
void exportToPdf();
|
||||||
void exportToSvg();
|
void exportToSvg();
|
||||||
void showAtlasSettings();
|
void showAtlasSettings( bool checked );
|
||||||
void atlasPreviewTriggered( bool checked );
|
void atlasPreviewTriggered( bool checked );
|
||||||
void atlasPageComboEditingFinished();
|
void atlasPageComboEditingFinished();
|
||||||
void atlasNext();
|
void atlasNext();
|
||||||
@ -325,7 +325,7 @@ class QgsLayoutDesignerDialog: public QMainWindow, private Ui::QgsLayoutDesigner
|
|||||||
void exportReportToSvg();
|
void exportReportToSvg();
|
||||||
void exportReportToPdf();
|
void exportReportToPdf();
|
||||||
void printReport();
|
void printReport();
|
||||||
void showReportSettings();
|
void showReportSettings( bool checked );
|
||||||
|
|
||||||
void pageSetup();
|
void pageSetup();
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>2180</width>
|
<width>2180</width>
|
||||||
<height>42</height>
|
<height>25</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="mLayoutMenu">
|
<widget class="QMenu" name="mLayoutMenu">
|
||||||
@ -1369,6 +1369,9 @@
|
|||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="mActionAtlasSettings">
|
<action name="mActionAtlasSettings">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../images/images.qrc">
|
<iconset resource="../../../images/images.qrc">
|
||||||
<normaloff>:/images/themes/default/mActionAtlasSettings.svg</normaloff>:/images/themes/default/mActionAtlasSettings.svg</iconset>
|
<normaloff>:/images/themes/default/mActionAtlasSettings.svg</normaloff>:/images/themes/default/mActionAtlasSettings.svg</iconset>
|
||||||
@ -1429,6 +1432,9 @@
|
|||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="mActionReportSettings">
|
<action name="mActionReportSettings">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../../images/images.qrc">
|
<iconset resource="../../../images/images.qrc">
|
||||||
<normaloff>:/images/themes/default/mActionAtlasSettings.svg</normaloff>:/images/themes/default/mActionAtlasSettings.svg</iconset>
|
<normaloff>:/images/themes/default/mActionAtlasSettings.svg</normaloff>:/images/themes/default/mActionAtlasSettings.svg</iconset>
|
||||||
@ -1510,6 +1516,7 @@
|
|||||||
<include location="../../../images/images.qrc"/>
|
<include location="../../../images/images.qrc"/>
|
||||||
<include location="../../../images/images.qrc"/>
|
<include location="../../../images/images.qrc"/>
|
||||||
<include location="../../../images/images.qrc"/>
|
<include location="../../../images/images.qrc"/>
|
||||||
|
<include location="../../../images/images.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user