void OscilloscopeScreen::mouseDoubleClickEvent(QMouseEvent *e)
{
    if ( e->button() == Qt::LeftButton )
    {
        emit leftButtonDoubleClicked();
        emit leftButtonDoubleClicked(e->pos()) ;
    }
}
MiniScopesClub::MiniScopesClub (Oscilloscope**scopesList, int scopesNum) {
    ui()->setupUi(this);
    CandidateScopes = scopesList ;
    CandidateNum = scopesNum ;
    RebindWindow = NULL ;
    ScopeWindows[0] = ui()->scopeWidget1 ;
    ScopeWindows[1] = ui()->scopeWidget2 ;
    ScopeWindows[2] = ui()->scopeWidget3 ;
    ScopeWindows[3] = ui()->scopeWidget4 ;
    ScopeWindows[4] = ui()->scopeWidget5 ;
    ScopeWindows[5] = ui()->scopeWidget6 ;
    ScopeWindows[6] = ui()->scopeWidget7 ;
    ScopeWindows[7] = ui()->scopeWidget8 ;
    for (int i=0; i<MiniScopesClubCapacity; i++)
    {
        connect(ScopeWindows[i]->ui()->scopeWidget, SIGNAL(leftButtonDoubleClicked()),
                this, SLOT(on_MiniScopes_leftDoubleClicked()) ) ;
    }
}
示例#3
0
void GraphicsDImgView::mouseDoubleClickEvent(QMouseEvent* e)
{
    QGraphicsView::mouseDoubleClickEvent(e);
/*
    if (!acceptsMouseClick(e))
    {
        return;
    }
*/
    if (e->button() == Qt::LeftButton)
    {
        emit leftButtonDoubleClicked();

        if (!qApp->style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick))
        {
            emit activated();
        }
    }
}