void KKbdAccessExtensions::prevHandle() { QWidget* panel = d->panel; // See if current panel has another handle. If not, find previous panel. if (panel) { bool rewind = true; d->handleNdx--; rewind = (d->handleNdx < 1); if (rewind) { QWidgetList* allWidgets = getAllPanels(); allWidgets->findRef(panel); panel = 0; if (allWidgets->current()) panel = allWidgets->prev(); delete allWidgets; if (panel) { if (::qt_cast<QSplitter*>( panel )) d->handleNdx = dynamic_cast<QSplitter *>(panel)->sizes().count() - 1; else { if (dynamic_cast<QDockWindow *>(panel)->area()) d->handleNdx = 2; else d->handleNdx = 1; } } } } else { // Find last panel. QWidgetList* allWidgets = getAllPanels(); panel = allWidgets->last(); delete allWidgets; if (panel) { if (::qt_cast<QSplitter*>( panel )) d->handleNdx = dynamic_cast<QSplitter *>(panel)->sizes().count() - 1; else { if (dynamic_cast<QDockWindow *>(panel)->area()) d->handleNdx = 2; else d->handleNdx = 1; } } } d->panel = panel; if (panel) showIcon(); else exitSizing(); }