Beispiel #1
0
bool KstIfaceImpl::activateWindow(const QString& windowname) {
  KstApp *app = KstApp::inst();
  KMdiChildView *win = app->findWindow(windowname);

  if (win) {
    win->activate();
    return true;
  }

  return false;
}
Beispiel #2
0
void KMDITest::listBoxExecuted( QListBoxItem *item )
{
    // Get the current item's text
    QString text = item->text();

    // Active the corresponding tab
    for ( QValueList< KMdiChildView *>::iterator it = m_window.begin();
        it != m_window.end(); ++it ) {
        // Get the view
        KMdiChildView *view = *it;
        assert( view );

        // Is the view we need to show?
        if ( view->caption() == text ) {
            view->activate();
            break;
        }
    }
}