bool myState;
bool myEmpty;
bool myBlock;
+ bool myShown;
};
/*!
myCont->installEventFilter( this );
installFilters();
+
+ myShown = myCont->isVisibleTo( myCont->parentWidget() );
}
/*!
e->type() == QEvent::Hide || e->type() == QEvent::HideToParent ) )
{
installFilters();
- QApplication::postEvent( this, new QEvent( (QEvent::Type)Update ) );
}
if ( o == myCont && e->type() == QEvent::ChildAdded )
if ( o != myCont && e->type() == QEvent::WindowTitleChange )
updateCaption();
- if ( ( o != myCont && ( e->type() == QEvent::Hide || e->type() == QEvent::HideToParent ) ) ||
- ( e->type() == QEvent::Show || e->type() == QEvent::ShowToParent ) )
+ if ( o != myCont && ( e->type() == QEvent::HideToParent || e->type() == QEvent::ShowToParent ) )
updateVisibility();
if ( o == myCont && e->type() == QEvent::ChildRemoved )
bool QtxDockWidget::Watcher::isVisible() const
{
- bool vis = false;
- if ( myCont && myCont->toggleViewAction() )
- vis = myCont->toggleViewAction()->isChecked();
- return vis;
+ return myShown;
}
void QtxDockWidget::Watcher::setEmpty( const bool on )
void QtxDockWidget::Watcher::setVisible( const bool on )
{
- if ( !myCont || !myCont->toggleViewAction() )
- return;
-
- bool block = myCont->toggleViewAction()->signalsBlocked();
- myCont->toggleViewAction()->blockSignals( true );
- myCont->toggleViewAction()->setChecked( on );
- myCont->toggleViewAction()->blockSignals( block );
+ myShown = on;
}
/*!