• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ qtu函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: stop

void VLCMainwindow::StartPlayMainURL(QString rtspURL)
{
    if( vlcPlayer && libvlc_media_player_is_playing(vlcPlayer) )
        stop();

    // New Media
   // libvlc_media_t *vlcMedia = libvlc_media_new_path(vlcObject,qtu(fileOpen));
    libvlc_media_t *vlcMedia = libvlc_media_new_location(vlcObject,qtu(rtspURL));
    if( !vlcMedia )
        return;
    QMessageBox::warning(NULL, "Hello", "startPlayMainURL");
    vlcPlayer = libvlc_media_player_new_from_media (vlcMedia);
    libvlc_media_release(vlcMedia);

    //libvlc_media_player_set_xwindow(vlcPlayer, windid);

    /* And play */
    libvlc_media_player_play (vlcPlayer);

    //Set vars and text correctly
    playBut->setText("Pause");

}
开发者ID:383530895,项目名称:Strong_RTSP_Player,代码行数:23,代码来源:player.cpp


示例17: switch

void ConfigControl::doApply( intf_thread_t *p_intf )
{
    switch( getType() )
    {
        case CONFIG_ITEM_INTEGER:
        case CONFIG_ITEM_BOOL:
        {
            VIntConfigControl *vicc = qobject_cast<VIntConfigControl *>(this);
            assert( vicc );
            config_PutInt( p_intf, vicc->getName(), vicc->getValue() );
            break;
        }
        case CONFIG_ITEM_FLOAT:
        {
            VFloatConfigControl *vfcc =
                                    qobject_cast<VFloatConfigControl *>(this);
            assert( vfcc );
            config_PutFloat( p_intf, vfcc->getName(), vfcc->getValue() );
            break;
        }
        case CONFIG_ITEM_STRING:
        {
            VStringConfigControl *vscc =
                            qobject_cast<VStringConfigControl *>(this);
            assert( vscc );
            config_PutPsz( p_intf, vscc->getName(), qtu( vscc->getValue() ) );
            break;
        }
        case CONFIG_ITEM_KEY:
        {
            KeySelectorControl *ksc = qobject_cast<KeySelectorControl *>(this);
            assert( ksc );
            ksc->doApply();
        }
    }
}
开发者ID:Kafay,项目名称:vlc,代码行数:36,代码来源:preferences_widgets.cpp


示例18: switch

void VLMWrapper::ControlBroadcast( const QString& name, int BroadcastStatus,
                                   unsigned int seek )
{
    vlm_message_t *message;

    QString command = "control \"" + name + "\"";
    switch( BroadcastStatus )
    {
    case ControlBroadcastPlay:
        command += " play";
        break;
    case ControlBroadcastPause:
        command += " pause";
        break;
    case ControlBroadcastStop:
        command += " stop";
        break;
    case ControlBroadcastSeek:
        command += " seek" + seek;
        break;
    }
    vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
    vlm_MessageDelete( message );
}
开发者ID:BloodExecutioner,项目名称:vlc,代码行数:24,代码来源:vlm.cpp


示例19: make_path

void RecentsMRL::addRecent( const QString &mrl )
{
    if ( !isActive || ( filter && filter->indexIn( mrl ) >= 0 ) )
        return;

#ifdef _WIN32
    /* Add to the Windows 7 default list in taskbar */
    char* path = make_path( qtu( mrl ) );
    if( path )
    {
        wchar_t *wmrl = ToWide( path );
        SHAddToRecentDocs( SHARD_PATHW, wmrl );
        free( wmrl );
        free( path );
    }
#endif

    int i_index = recents.indexOf( mrl );
    if( 0 <= i_index )
    {
        /* move to the front */
        recents.move( i_index, 0 );
        times.move( i_index, 0 );
    }
    else
    {
        recents.prepend( mrl );
        times.prepend( "-1" );
        if( recents.count() > RECENTS_LIST_SIZE ) {
            recents.takeLast();
            times.takeLast();
        }
    }
    VLCMenuBar::updateRecents( p_intf );
    save();
}
开发者ID:dougmencken,项目名称:vlc,代码行数:36,代码来源:recents.cpp


示例20: msg_Warn

/* Generic open file */
void DialogsProvider::openFileGenericDialog( intf_dialog_args_t *p_arg )
{
    if( p_arg == NULL )
    {
        msg_Warn( p_intf, "openFileGenericDialog() called with NULL arg" );
        return;
    }

    /* Replace the extensions to a Qt format */
    int i = 0;
    QString extensions = qfu( p_arg->psz_extensions );
    while ( ( i = extensions.indexOf( "|", i ) ) != -1 )
    {
        if( ( extensions.count( "|" ) % 2 ) == 0 )
            extensions.replace( i, 1, ");;" );
        else
            extensions.replace( i, 1, "(" );
    }
    extensions.replace( ";*", " *" );
    extensions.append( ")" );

    /* Save */
    if( p_arg->b_save )
    {
        QString file = QFileDialog::getSaveFileName( NULL,
                                        qfu( p_arg->psz_title ),
                                        p_intf->p_sys->filepath, extensions );
        if( !file.isEmpty() )
        {
            p_arg->i_results = 1;
            p_arg->psz_results = (char **)malloc( p_arg->i_results * sizeof( char * ) );
            p_arg->psz_results[0] = strdup( qtu( toNativeSepNoSlash( file ) ) );
        }
        else
            p_arg->i_results = 0;
    }
    else /* non-save mode */
    {
        QStringList files = QFileDialog::getOpenFileNames( NULL,
                qfu( p_arg->psz_title ), p_intf->p_sys->filepath,
                extensions );
        p_arg->i_results = files.count();
        p_arg->psz_results = (char **)malloc( p_arg->i_results * sizeof( char * ) );
        i = 0;
        foreach( const QString &file, files )
            p_arg->psz_results[i++] = strdup( qtu( toNativeSepNoSlash( file ) ) );
        if(i == 0)
            p_intf->p_sys->filepath = QString::fromLatin1("");
        else
            p_intf->p_sys->filepath = qfu( p_arg->psz_results[i-1] );
    }

    /* Callback */
    if( p_arg->pf_callback )
        p_arg->pf_callback( p_arg );

    /* Clean afterwards */
    if( p_arg->psz_results )
    {
        for( i = 0; i < p_arg->i_results; i++ )
            free( p_arg->psz_results[i] );
        free( p_arg->psz_results );
    }
    free( p_arg->psz_title );
    free( p_arg->psz_extensions );
    free( p_arg );
}
开发者ID:42TheAnswerToLife,项目名称:vlc,代码行数:68,代码来源:dialogs_provider.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ quad函数代码示例发布时间:2022-05-30
下一篇:
C++ qtss_printf函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap