initShortcuts( accels );
}
+/*!
+ \brief Set context of shortcuts.
+ \param context context of shortcuts
+ \sa shortcuts()
+*/
+void QtxSearchTool::setShortcutContext( const Qt::ShortcutContext context )
+{
+ ShortcutList::Iterator it;
+ for ( it = myShortcuts.begin(); it != myShortcuts.end(); ++it )
+ {
+ if ( !(*it).isNull() )
+ {
+ QShortcut* sc = (*it);
+ sc->setContext( context );
+ }
+ }
+}
+
/*!
\brief Add custom widget.
\param w custom widget to be added
void setShortcuts( const QKeySequence& );
void setShortcuts( const QList<QKeySequence>& );
+ void setShortcutContext( const Qt::ShortcutContext );
+
int addCustomWidget( QWidget*, int = -1 );
QWidget* customWidget( int ) const;
int customWidgetId( QWidget* ) const;
/*!
\brief Set active widget
\param wid widget to activate
+ \param activateArea flag used to activate the widget's area if necessary
*/
-void QtxWorkstack::setActiveWindow( QWidget* wid )
+void QtxWorkstack::setActiveWindow( QWidget* wid, const bool activateArea )
{
+ if( activateArea )
+ if( QtxWorkstackArea* area = wgArea( wid ) )
+ setActiveArea( area );
+
if( activeArea() )
activeArea()->setActiveWidget( wid );
}
QWidgetList splitWindowList() const;
QWidget* activeWindow() const;
- void setActiveWindow( QWidget* );
+ void setActiveWindow( QWidget*, const bool activateArea = false );
int accel( const int ) const;
void setAccel( const int, const int );