Example #1
0
FloatyWnd *FloatyPlugin::findFloaty(unsigned id)
{
    QList<QWidget *> list = QApplication::topLevelWidgets();
    QListIterator<QWidget *> it(list);
    QWidget * w;
    while (it.hasNext()) {
	w = it.next();
        if (w->inherits("FloatyWnd")){
            FloatyWnd *wnd = static_cast<FloatyWnd*>(w);
            if (wnd->id() == id)
                break;
        }
    }
    if (w)
        return static_cast<FloatyWnd*>(w);
    return NULL;
}
Example #2
0
FloatyWnd *FloatyPlugin::findFloaty(unsigned id)
{
    QWidgetList *list = QApplication::topLevelWidgets();
    QWidgetListIt it(*list);
    QWidget * w;
    while ((w = it.current()) != NULL) {
        if (w->inherits("FloatyWnd")){
            FloatyWnd *wnd = static_cast<FloatyWnd*>(w);
            if (wnd->id() == id)
                break;
        }
        ++it;
    }
    delete list;
    if (w)
        return static_cast<FloatyWnd*>(w);
    return NULL;
}