예제 #1
0
/* private slots */
void ProxyWidget::actionTriggered()
{
    if ( sender()==next ) {
        if ( isTriggered ) emit viewNextDock();
        return;
    } else if ( sender()==prev ) {
        if ( isTriggered ) emit viewPrevDock();
        return;
    };
    isTriggered = true;
    if ( usedViewMode!=SOFT_TOUCHED ) return;
    // see for:
    // MainWindow::initConnListWidget() &
    // MainWindow::initDockWidgets()
    // sets the object names for docks.
    if        ( sender()==connAct ) {
        emit viewDock("connListDock");
    } else if ( sender()==domainsAct ) {
        emit viewDock("domainDock");
    } else if ( sender()==networksAct ) {
        emit viewDock("networkDock");
    } else if ( sender()==storagesAct ) {
        emit viewDock("storagePoolDock");
    } else if ( sender()==ifacesAct ) {
        emit viewDock("ifaceDock");
    } else if ( sender()==secretsAct ) {
        emit viewDock("secretDock");
    } else if ( sender()==logAct ) {
        emit viewDock("logDock");
    };
    update();
}
예제 #2
0
/* private slots */
void ToolBar::wheelEvent(QWheelEvent *ev)
{
    ev->ignore();
    if ( !wheelEventState ) return;
    if ( ev->type()==QEvent::Wheel ) {
        if ( ev->delta()>0 ) {
            emit viewNextDock();
        } else if ( ev->delta()<0 ) {
            emit viewPrevDock();
        };
    };
}