当前位置: 首页>>代码示例>>C++>>正文


C++ qtu函数代码示例

本文整理汇总了C++中qtu函数的典型用法代码示例。如果您正苦于以下问题:C++ qtu函数的具体用法?C++ qtu怎么用?C++ qtu使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了qtu函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: vlm_ExecuteCommand

void VLMWrapper::EditVod( const QString& name, const QString& input,
                          const QString& inputOptions, const QString& output,
                          bool b_enabled,
                          const QString& mux )
{
    vlm_message_t *message;
    QString command;

    if( !input.isEmpty() )
    {
        command = "setup \"" + name + "\" input \"" + input + "\"";
        vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
        vlm_MessageDelete( message );

        QStringList options = inputOptions.split( " :", QString::SkipEmptyParts );
        for( int i = 0; i < options.size(); i++ )
        {
            command = "setup \"" + name + "\" option \"" + options[i].trimmed() + "\"";
            vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
            vlm_MessageDelete( message );
        }
    }

    if( !output.isEmpty() )
    {
        command = "setup \"" + name + "\" output \"" + output + "\"";
        vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
        vlm_MessageDelete( message );
    }

    if( b_enabled )
    {
        command = "setup \"" + name + "\" enabled";
        vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
        vlm_MessageDelete( message );
    }
    if( !mux.isEmpty() )
    {
        command = "setup \"" + name + "\" mux \"" + mux + "\"";
        vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
        vlm_MessageDelete( message );
    }
}
开发者ID:Italianmoose,项目名称:Stereoscopic-VLC,代码行数:43,代码来源:vlm.cpp

示例2: update_Check

/* 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 ! */
        }
    }
}
开发者ID:Mettbrot,项目名称:vlc,代码行数:21,代码来源:help.cpp

示例3: getMRL

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( " :" ) );
}
开发者ID:LDiracDelta,项目名称:vlc_censor_plugin,代码行数:11,代码来源:open.cpp

示例4: colon_unescape

int Open::openMRLwithOptions( intf_thread_t* p_intf,
                     const QString &mrl,
                     QStringList *options,
                     bool b_start,
                     bool b_playlist,
                     const char *title)
{
    /* Options */
    const char **ppsz_options = NULL;
    int i_options = 0;

    if( options != NULL && options->count() > 0 )
    {
        ppsz_options = new const char *[options->count()];
        for( int j = 0; j < options->count(); j++ ) {
            QString option = colon_unescape( options->at(j) );
            if( !option.isEmpty() ) {
                ppsz_options[i_options] = strdup(qtu(option));
                i_options++;
            }
        }
    }

    /* Add to playlist */
    int i_ret = playlist_AddExt( THEPL, qtu(mrl), title, b_start,
                  i_options, ppsz_options, VLC_INPUT_OPTION_TRUSTED,
                  b_playlist );

    /* Add to recent items, only if played */
    if( i_ret == VLC_SUCCESS && b_start && b_playlist )
        RecentsMRL::getInstance( p_intf )->addRecent( mrl );

    /* Free options */
    if ( ppsz_options != NULL )
    {
        for ( int i = 0; i < i_options; ++i )
            free( (char*)ppsz_options[i] );
        delete[] ppsz_options;
    }
    return i_ret;
}
开发者ID:IAPark,项目名称:vlc,代码行数:41,代码来源:recents.cpp

示例5: vlm_ExecuteCommand

void VLMWrapper::AddSchedule( const QString& name, const QString& input,
                              const QString& inputOptions, const QString& output,
                              QDateTime _schetime, QDateTime _schedate,
                              int _scherepeatnumber, int _repeatDays,
                              bool b_enabled, const QString& mux )
{
    vlm_message_t *message;
    QString command = "new \"" + name + "\" schedule";
    vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
    vlm_MessageDelete( message );
    EditSchedule(  name, input, inputOptions, output, _schetime, _schedate,
            _scherepeatnumber, _repeatDays, b_enabled, mux );
}
开发者ID:BloodExecutioner,项目名称:vlc,代码行数:13,代码来源:vlm.cpp

示例6: toURI

QString toURI( const QString& s )
{
    if( s.contains( qfu("://") ) )
        return s;

    char *psz = vlc_path2uri( qtu(s), NULL );
    if( psz == NULL )
        return qfu("");

    QString uri = qfu( psz );
    free( psz );
    return uri;
}
开发者ID:12307,项目名称:VLC-for-VS2010,代码行数:13,代码来源:qt_dirs.cpp

示例7: qtr

/* 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 ) );
        }
    }
}
开发者ID:Kafay,项目名称:vlc,代码行数:24,代码来源:help.cpp

示例8: foreach

/**
 * Open a file,
 * pl helps you to choose from playlist or media library,
 * go to start or enqueue
 **/
void DialogsProvider::addFromSimple( bool pl, bool go)
{
    QStringList files = DialogsProvider::showSimpleOpen();
    int mode = go ? PLAYLIST_GO : PLAYLIST_PREPARSE;

    files.sort();
    foreach( const QString &file, files )
    {
        QString url = toURI( toNativeSeparators( file ) );
        playlist_Add( THEPL, qtu( url ), NULL, PLAYLIST_APPEND | mode,
                      PLAYLIST_END, pl, pl_Unlocked );
        RecentsMRL::getInstance( p_intf )->addRecent( url );
        mode = PLAYLIST_PREPARSE;
    }
开发者ID:AsamQi,项目名称:vlc,代码行数:19,代码来源:dialogs_provider.cpp

示例9: playlist_NodeCreate

playlist_item_t *RecentsMRL::toPlaylist(int length)
{
    playlist_item_t *p_node_recent = playlist_NodeCreate(THEPL, _("Recently Played"), THEPL->p_root, PLAYLIST_END, PLAYLIST_RO_FLAG, NULL);

    if ( p_node_recent == NULL )  return NULL;

    if (length == 0 || recents.count() < length)
        length = recents.count();

    for (int i = 0; i < length; i++)
    {
        input_item_t *p_input = input_item_New(qtu(recents.at(i)), NULL);
        playlist_NodeAddInput(THEPL, p_input, p_node_recent, PLAYLIST_APPEND, PLAYLIST_END, false);
    }

    return p_node_recent;
}
开发者ID:dougmencken,项目名称:vlc,代码行数:17,代码来源:recents.cpp

示例10: foreach

/**
 * Open a file,
 * pl helps you to choose from playlist or media library,
 * go to start or enqueue
 **/
void DialogsProvider::addFromSimple( bool pl, bool go)
{
    QStringList files = DialogsProvider::showSimpleOpen();
    int i = 0;
    files.sort();
    foreach( const QString &file, files )
    {
        playlist_Add( THEPL, qtu( toNativeSeparators( file ) ), NULL,
                      go ? ( PLAYLIST_APPEND | ( i ? 0 : PLAYLIST_GO ) |
                             ( i ? PLAYLIST_PREPARSE : 0 ) )
                      : ( PLAYLIST_APPEND | PLAYLIST_PREPARSE ),
                      PLAYLIST_END,
                      pl ? true : false, false );
        RecentsMRL::getInstance( p_intf )->addRecent(
            toNativeSeparators( file ) );
        i++;
    }
开发者ID:squadette,项目名称:vlc,代码行数:22,代码来源:dialogs_provider.cpp

示例11: qtr

/* TODO : VOD are not exported to the file */
bool VLMDialog::exportVLMConf()
{
    QString saveVLMConfFileName = QFileDialog::getSaveFileName( this,
                                        qtr( "Save VLM configuration as..." ),
                                        QVLCUserDir( VLC_DOCUMENTS_DIR ),
                                        qtr( "VLM conf (*.vlm);;All (*)" ) );

    if( !saveVLMConfFileName.isEmpty() )
    {
        vlm_message_t *message;
        QString command = "save \"" + saveVLMConfFileName + "\"";
        vlm_ExecuteCommand( p_vlm , qtu( command ) , &message );
        vlm_MessageDelete( message );
        return true;
    }

    return false;
}
开发者ID:BloodExecutioner,项目名称:vlc,代码行数:19,代码来源:vlm.cpp

示例12: input_item_SetTitle

/**
 * Save the MetaData, triggered by parent->save Button
 **/
void MetaPanel::saveMeta()
{
    if( p_input == NULL )
        return;

    /* now we read the modified meta data */
    input_item_SetTitle(  p_input, qtu( title_text->text() ) );
    input_item_SetArtist( p_input, qtu( artist_text->text() ) );
    input_item_SetAlbum(  p_input, qtu( collection_text->text() ) );
    input_item_SetGenre(  p_input, qtu( genre_text->text() ) );
    input_item_SetTrackNum(  p_input, qtu( seqnum_text->text() ) );
    input_item_SetDate(  p_input, qtu( date_text->text() ) );

    input_item_SetCopyright( p_input, qtu( copyright_text->text() ) );
    input_item_SetPublisher( p_input, qtu( publisher_text->text() ) );
    input_item_SetDescription( p_input, qtu( description_text->text() ) );

    playlist_t *p_playlist = pl_Get( p_intf );
    input_item_WriteMeta( VLC_OBJECT(p_playlist), p_input );

    /* Reset the status of the mode. No need to emit any signal because parent
       is the only caller */
    b_inEditMode = false;
}
开发者ID:cobr123,项目名称:qtVlc,代码行数:27,代码来源:info_panels.cpp

示例13: option

    void option( const QString& option, const QString& value = "" )
    {
        if( !b_has_bracket )
            mrl += "{";
        else
            mrl += ",";
        b_has_bracket = true;

        mrl += option;

        if( !value.isEmpty() )
        {
            char *psz = config_StringEscape( qtu(value) );
            if( psz )
            {
                mrl += "=" + qfu( psz );
                free( psz );
            }
        }
    }
开发者ID:Italianmoose,项目名称:Stereoscopic-VLC,代码行数:20,代码来源:sout.hpp

示例14: getMRLs

void OpenDialog::stream( bool b_transcode_only )
{
//    QString soutMRL = getMRL( false );
//    if( soutMRL.isEmpty() ) return;

    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( " :" ) );
}
开发者ID:Kubink,项目名称:vlc,代码行数:22,代码来源:open.cpp

示例15: assert

/**
 * Update/Create/Destroy a dialog
 **/
ExtensionDialog* ExtensionsDialogProvider::UpdateExtDialog(
        extension_dialog_t *p_dialog )
{
    assert( p_dialog );

    ExtensionDialog *dialog = ( ExtensionDialog* ) p_dialog->p_sys_intf;
    if( p_dialog->b_kill && !dialog )
    {
        /* This extension could not be activated properly but tried
           to create a dialog. We must ignore it. */
        return NULL;
    }

    vlc_mutex_lock( &p_dialog->lock );
    if( !p_dialog->b_kill && !dialog )
    {
        dialog = CreateExtDialog( p_dialog );
        dialog->setVisible( !p_dialog->b_hide );
        dialog->has_lock = false;
    }
    else if( !p_dialog->b_kill && dialog )
    {
        dialog->has_lock = true;
        dialog->UpdateWidgets();
        if( strcmp( qtu( dialog->windowTitle() ),
                    p_dialog->psz_title ) != 0 )
            dialog->setWindowTitle( qfu( p_dialog->psz_title ) );
        dialog->has_lock = false;
        dialog->setVisible( !p_dialog->b_hide );
    }
    else if( p_dialog->b_kill )
    {
        DestroyExtDialog( p_dialog );
    }
    vlc_cond_signal( &p_dialog->cond );
    vlc_mutex_unlock( &p_dialog->lock );
    return dialog;
}
开发者ID:WutongEdward,项目名称:vlc-2.1.4.32.subproject-2013,代码行数:41,代码来源:extensions.cpp


注:本文中的qtu函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。