本文整理汇总了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 );
}
}
示例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 ! */
}
}
}
示例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( " :" ) );
}
示例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;
}
示例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 );
}
示例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;
}
示例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 ) );
}
}
}
示例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;
}
示例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;
}
示例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++;
}
示例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;
}
示例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;
}
示例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 );
}
}
}
示例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( " :" ) );
}
示例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;
}