# Clear Help panel
sg.infoClear()
+
+.. _hp_update_panel
+
+Notifications
+=============
+
+Each time when *Help panel* is shown, currently active module is informed via
+the virtual method ``updateInfoPanel()``. This method can be used to properly
+update the contents of the *Help panel*, depending on the current context.
// It is not movable and not floatable.
dock->setAllowedAreas( Qt::RightDockWidgetArea );
dock->setFeatures( QDockWidget::DockWidgetClosable );
+ connect( dock, SIGNAL( aboutToShow()), this, SLOT( onInfoPanelShown() ) );
}
else {
dock->setFeatures( QDockWidget::AllDockWidgetFeatures );
}
}
+void LightApp_Application::onInfoPanelShown()
+{
+ if ( activeModule() && activeModule()->inherits( "LightApp_Module" ) )
+ ((LightApp_Module*)activeModule())->updateInfoPanel();
+}
+
/*!
Internal method.
Returns all top level toolbars.
virtual void onDesktopMessage( const QString& );
+ virtual void onInfoPanelShown();
+
private slots:
void onSelection();
void onRefresh();
{
}
+/*!NOT IMPLEMENTED*/
+void LightApp_Module::updateInfoPanel()
+{
+}
+
/*!NOT IMPLEMENTED*/
void LightApp_Module::createPreferences()
{
void MenuItem();
+ virtual void updateInfoPanel();
+
protected slots:
virtual void onModelSaved();
virtual void onModelOpened();
*/
QSize QtxDockWidget::sizeHint() const
{
- QSize sz = QDockWidget::sizeHint();
-
- // printf( "----------------> QtxDockWidget::sizeHint()\n" );
-
return QSize( 500, 100 );
-
- return sz;
}
/*!
*/
QSize QtxDockWidget::minimumSizeHint() const
{
- QSize sz = QDockWidget::minimumSizeHint();
-
- return sz;
+ return QDockWidget::minimumSizeHint();
}
/*!
else
myWatcher->hidden( this );
}
+
+ if ( on )
+ emit( aboutToShow() );
}
/*!
signals:
void orientationChanged( Qt::Orientation );
+ void aboutToShow();
public slots:
virtual void setVisible( bool );