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 ) {
71 connect(
this, &QgsDockWidget::visibilityChanged, mAction, [=](
bool visible ) {
72 mAction->setChecked( visible );
86 QDockWidget::closeEvent( e );
94 QDockWidget::showEvent( e );
97void QgsDockWidget::handleVisibilityChanged(
bool visible )
99 mVisibleAndActive = visible;