20#include "moc_qgsdockwidget.cpp"
25 : QDockWidget( parent, flags )
27 connect(
this, &QDockWidget::visibilityChanged,
this, &QgsDockWidget::handleVisibilityChanged );
31 : QDockWidget( title, parent, flags )
33 connect(
this, &QDockWidget::visibilityChanged,
this, &QgsDockWidget::handleVisibilityChanged );
45 if ( !mVisibleAndActive )
59 return mVisibleAndActive;
65 if ( !mAction->isCheckable() )
66 mAction->setCheckable(
true );
68 connect( mAction, &QAction::toggled,
this, [ = ](
bool visible )
72 connect(
this, &QgsDockWidget::visibilityChanged, mAction, [ = ](
bool visible )
74 mAction->setChecked( visible );
88 QDockWidget::closeEvent( e );
96 QDockWidget::showEvent( e );
99void QgsDockWidget::handleVisibilityChanged(
bool visible )
101 mVisibleAndActive = visible;