Пример #1
0
/* Enqueue Action, called from selectSlots or enqueue Menu */
void OpenDialog::enqueue( bool b_enqueue )
{
    toggleVisible();

    if( i_action_flag == SELECT )
    {
        accept();
        return;
    }

    for( int i = 0; i < OPEN_TAB_MAX; i++ )
        qobject_cast<OpenPanel*>( ui.Tab->widget( i ) )->onAccept();

    /* Sort alphabetically */
    itemsMRL.sort();

    /* Go through the item list */
    for( int i = 0; i < itemsMRL.count(); i++ )
    {
        bool b_start = !i && !b_enqueue;

        /* Take options from the UI, not from what we stored */
        QStringList optionsList = getOptions().split( " :" );

        /* Switch between enqueuing and starting the item */
        Open::openMRLwithOptions( p_intf, itemsMRL[i], &optionsList, b_start, b_pl );
    }
}
Пример #2
0
void OpenDialog::stream( bool b_transcode_only )
{
//    QString soutMRL = getMRL( false );
//    if( soutMRL.isEmpty() ) return;

    for( int i = 0; i < OPEN_TAB_MAX; i++ )
        qobject_cast<OpenPanel*>( ui.Tab->widget( i ) )->onAccept();

    QStringList soutMRLS = getMRLs(false);
    if(soutMRLS.empty())
    {
        return;
    }

    toggleVisible();

    /* Dbg and send :D */
    msg_Dbg( p_intf, "MRL(s) passed to the Sout: %i", soutMRLS.length() );
    for(int i = 0; i < soutMRLS.length(); i++)
    {
        msg_Dbg( p_intf, "MRL(s) passed to the Sout: %s", qtu( soutMRLS[i] ) );
    }
    THEDP->streamingDialog( this, soutMRLS, b_transcode_only,
                            getOptions().split( " :" ) );
}
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent), m_showButton("Toggle visible", this), m_window(0)
{
    connect(&m_showButton, SIGNAL(clicked()), this, SLOT(toggleVisible()));
    setWindowTitle(QString::fromLatin1("Main Window"));
    m_showButton.setVisible(true);
    setMinimumSize(300, 200);
}
Пример #4
0
void GotoTimeDialog::close()
{
    if ( THEMIM->getIM()->hasInput() )
    {
        int64_t i_time = (int64_t)
            ( QTime( 0, 0, 0 ).msecsTo( timeEdit->time() ) ) * 1000;
        var_SetInteger( THEMIM->getInput(), "time", i_time );
    }
    toggleVisible();
}
Пример #5
0
void OpenDialog::stream( bool b_transcode_only )
{
    QString soutMRL = getMRL( false );
    if( soutMRL.isEmpty() ) return;
    toggleVisible();

    /* Dbg and send :D */
    msg_Dbg( p_intf, "MRL passed to the Sout: %s", qtu( soutMRL ) );
    THEDP->streamingDialog( this, soutMRL, b_transcode_only,
                            ui.advancedLineInput->text().split( " :" ) );
}
Пример #6
0
void OpenDialog::finish( bool b_enqueue = false )
{
    toggleVisible();

    if( i_action_flag == SELECT )
    {
        accept();
        return;
    }

    /* Sort alphabetically */
    itemsMRL.sort();

    /* Go through the item list */
    for( int i = 0; i < itemsMRL.size(); i++ )
    {
        bool b_start = !i && !b_enqueue;

        input_item_t *p_input;
        p_input = input_item_New( qtu( itemsMRL[i] ), NULL );

        /* Insert options only for the first element.
           We don't know how to edit that anyway. */
        if( i == 0 )
        {
            /* Take options from the UI, not from what we stored */
            QStringList optionsList = ui.advancedLineInput->text().split( " :" );

            /* Insert options */
            for( int j = 0; j < optionsList.size(); j++ )
            {
                QString qs = colon_unescape( optionsList[j] );
                if( !qs.isEmpty() )
                {
                    input_item_AddOption( p_input, qtu( qs ),
                                          VLC_INPUT_OPTION_TRUSTED );
#ifdef DEBUG_QT
                    msg_Warn( p_intf, "Input option: %s", qtu( qs ) );
#endif
                }
            }
        }

        /* Switch between enqueuing and starting the item */
        /* FIXME: playlist_AddInput() can fail */
        playlist_AddInput( THEPL, p_input,
                PLAYLIST_APPEND | ( b_start ? PLAYLIST_GO : PLAYLIST_PREPARSE ),
                PLAYLIST_END, b_pl ? true : false, pl_Unlocked );
        vlc_gc_decref( p_input );

        /* Do not add the current MRL if playlist_AddInput fail */
        RecentsMRL::getInstance( p_intf )->addRecent( itemsMRL[i] );
    }
}
Пример #7
0
bool QDockWindow::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: undock((QWidget*)static_QUType_ptr.get(_o+1)); break;
    case 1: undock(); break;
    case 2: dock(); break;
    case 3: setOrientation((Orientation)(*((Orientation*)static_QUType_ptr.get(_o+1)))); break;
    case 4: setCaption((const QString&)static_QUType_QString.get(_o+1)); break;
    case 5: toggleVisible(); break;
    default:
	return QFrame::qt_invoke( _id, _o );
    }
    return TRUE;
}
Пример #8
0
void GUIManager::keyPressed(ofKeyEventArgs& eventArgs) //int key)
{
    printf("keyPressed - key = %c \n", eventArgs.key);
    switch (eventArgs.key)
    {
		case '[':
            previousPage();
            break;
            
        case ']':
            nextPage();
            break;
            
        case ' ':
            toggleVisible();
    }
}
Пример #9
0
void Calibration::onKeyPressed(ofKeyEventArgs &data)
{
    switch (data.key)
        {

        case '1':
            guihash["1"]->toggleVisible();
            //bGui1Visible = guihash["1"]->isVisible();
            break;
        case '2':
            guihash["2"]->toggleVisible();
            //bGui2Visible = guihash["2"]->isVisible();
            break;
        case '3':
            guihash["3"]->toggleVisible();
            //bGui2Visible = guihash["2"]->isVisible();
            break;
        case 'c':
            calibDot.set(ofGetMouseX(), ofGetMouseY());
            break;
        case 'g':
            toggleVisible();
            //gui0->toggleVisible();
            break;
        case 's':
            if(isVisible()) saveSettings();
            break;
        case 'l':
            if(isVisible()) loadSettings();
            break;
        case 'b':
            bDrawWhiteBg = !bDrawWhiteBg;
            break;
        case 'w':
            warper.toogleActive();
            break;
        default:
            break;
        }

    //printf("key = %i", data.key);
}
Пример #10
0
/* Check for updates */
void UpdateDialog::UpdateOrDownload()
{
    if( !b_checked )
    {
        ui.stackedWidget->setCurrentWidget( ui.updateRequestPage );
        update_Check( p_update, UpdateCallback, this );
    }
    else
    {
        QString dest_dir = QDir::tempPath();
        if( !dest_dir.isEmpty() )
        {
            dest_dir = toNativeSepNoSlash( dest_dir ) + DIR_SEP;
            msg_Dbg( p_intf, "Downloading to folder: %s", qtu( dest_dir ) );
            toggleVisible();
            update_Download( p_update, qtu( dest_dir ) );
            /* FIXME: We should trigger a change to another dialog here ! */
        }
    }
}
Пример #11
0
Файл: help.cpp Проект: Kafay/vlc
/* Check for updates */
void UpdateDialog::UpdateOrDownload()
{
    if( !b_checked )
    {
        updateButton->setEnabled( false );
        updateLabelTop->setText( qtr( "Launching an update request..." ) );
        update_Check( p_update, UpdateCallback, this );
    }
    else
    {
        QString dest_dir = QFileDialog::getExistingDirectory( this,
                                 qtr( "Select a directory..." ),
                                 qfu( config_GetHomeDir() ) );

        if( !dest_dir.isEmpty() )
        {
            dest_dir = toNativeSepNoSlash( dest_dir ) + DIR_SEP;
            msg_Dbg( p_intf, "Downloading to folder: %s", qtu( dest_dir ) );
            toggleVisible();
            update_Download( p_update, qtu( dest_dir ) );
        }
    }
}
Пример #12
0
Файл: help.cpp Проект: Kafay/vlc
void UpdateDialog::close()
{
    toggleVisible();
}
Пример #13
0
void GotoTimeDialog::cancel()
{
    reset();
    toggleVisible();
}
Пример #14
0
bool ScriptableProxyHelper::toggleVisible()
{
    INVOKE(toggleVisible());
    return m_wnd->toggleVisible();
}
Пример #15
0
Файл: help.cpp Проект: Kafay/vlc
void HelpDialog::close()
{
    toggleVisible();
}
Пример #16
0
void GotoTimeDialog::cancel()
{
    timeEdit->setTime( QTime( 0, 0, 0) );
    toggleVisible();
}
Пример #17
0
Файл: help.cpp Проект: Kafay/vlc
void AboutDialog::close()
{
    toggleVisible();
}