本文整理汇总了C++中qfu函数的典型用法代码示例。如果您正苦于以下问题:C++ qfu函数的具体用法?C++ qfu怎么用?C++ qfu使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了qfu函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: VLC_CompileBy
bool AboutDialog::eventFilter(QObject *obj, QEvent *event)
{
if (event->type() == QEvent::MouseButtonPress )
{
if( obj == ui.version )
{
if( !b_advanced )
{
ui.version->setText(qfu( VLC_CompileBy() )+ "@" + qfu( VLC_CompileHost() )
+ " " + __DATE__ + " " + __TIME__);
b_advanced = true;
}
else
{
ui.version->setText(qfu( " " VERSION_MESSAGE ) );
b_advanced = false;
}
return true;
}
else if( obj == ui.licenseButton )
showLicense();
else if( obj == ui.authorsButton )
showAuthors();
else if( obj == ui.creditsButton )
showCredit();
return false;
}
return QVLCDialog::eventFilter( obj, event);
}
示例2: assert
/* This function may not be the best way to do it
It destroys everything and gets everything again instead of just
building the necessary columns.
This does extra work if you re-display the same column. Slower...
On the other hand, this way saves memory.
There must be a more clever way.
*/
void PLItem::update( playlist_item_t *p_item, bool iscurrent )
{
assert( p_item->p_input->i_id == i_input_id );
/* Useful for the model */
i_type = p_item->p_input->i_type;
b_current = iscurrent;
item_col_strings.clear();
if( model->i_depth == 1 ) /* Selector Panel */
{
item_col_strings.append( qfu( p_item->p_input->psz_name ) );
return;
}
i_showflags = parentItem ? parentItem->i_showflags : i_showflags;
/* Meta: ID */
if( i_showflags & COLUMN_NUMBER )
{
QModelIndex idx = model->index( this, 0 );
item_col_strings.append( QString::number( idx.row() + 1 ) );
}
/* Other meta informations */
for( uint32_t i_index=2; i_index < COLUMN_END; i_index <<= 1 )
{
if( i_showflags & i_index )
{
char *psz = psz_column_meta( p_item->p_input, i_index );
item_col_strings.append( qfu( psz ) );
free( psz );
}
}
}
示例3: qfu
bool EPGItem::setData( vlc_epg_event_t *data )
{
QDateTime newtime = QDateTime::fromTime_t( data->i_start );
QString newname = qfu( data->psz_name );
QString newdesc = qfu( data->psz_description );
QString newshortdesc = qfu( data->psz_short_description );
if ( m_start != newtime ||
m_name != newname ||
m_description != newdesc ||
m_shortDescription != newshortdesc ||
m_duration != data->i_duration )
{
m_start = newtime;
m_name = newname;
setToolTip( newname );
m_description = newdesc;
m_shortDescription = newshortdesc;
setDuration( data->i_duration );
setRating( data->i_rating );
update();
return true;
}
return false;
}
示例4: QTreeWidgetItem
void MessagesDialog::buildTree( QTreeWidgetItem *parentItem,
vlc_object_t *p_obj )
{
QTreeWidgetItem *item;
if( parentItem )
item = new QTreeWidgetItem( parentItem );
else
item = new QTreeWidgetItem( ui.modulesTree );
char *name = vlc_object_get_name( p_obj );
item->setText( 0, QString("%1%2 (0x%3)")
.arg( qfu( p_obj->psz_object_type ) )
.arg( ( name != NULL )
? QString( " \"%1\"" ).arg( qfu( name ) )
: "" )
.arg( (uintptr_t)p_obj, 0, 16 )
);
free( name );
item->setExpanded( true );
vlc_list_t *l = vlc_list_children( p_obj );
for( int i=0; i < l->i_count; i++ )
buildTree( item, l->p_values[i].p_object );
vlc_list_release( l );
}
示例5: qfu
bool EPGItem::setData( const vlc_epg_event_t *data )
{
QDateTime newtime = QDateTime::fromTime_t( data->i_start );
QString newname = qfu( data->psz_name );
QString newdesc = qfu( data->psz_description );
QString newshortdesc = qfu( data->psz_short_description );
if ( m_start != newtime ||
m_name != newname ||
m_description != newdesc ||
m_shortDescription != newshortdesc ||
m_duration != data->i_duration )
{
m_start = newtime;
m_name = newname;
setToolTip( newname );
m_description = newdesc;
m_shortDescription = newshortdesc;
setDuration( data->i_duration );
setRating( data->i_rating );
m_descitems.clear();
for( int i=0; i<data->i_description_items; i++ )
{
m_descitems.append(QPair<QString, QString>(
QString(data->description_items[i].psz_key),
QString(data->description_items[i].psz_value)));
}
updatePos();
prepareGeometryChange();
return true;
}
return false;
}
示例6: clear
/**
* Update the Codecs information on parent->update()
**/
void InfoPanel::update( input_item_t *p_item)
{
if( !p_item )
{
clear();
return;
}
InfoTree->clear();
QTreeWidgetItem *current_item = NULL;
QTreeWidgetItem *child_item = NULL;
for( int i = 0; i< p_item->i_categories ; i++)
{
current_item = new QTreeWidgetItem();
current_item->setText( 0, qfu(p_item->pp_categories[i]->psz_name) );
InfoTree->addTopLevelItem( current_item );
for( int j = 0 ; j < p_item->pp_categories[i]->i_infos ; j++ )
{
child_item = new QTreeWidgetItem ();
child_item->setText( 0,
qfu(p_item->pp_categories[i]->pp_infos[j]->psz_name)
+ ": "
+ qfu(p_item->pp_categories[i]->pp_infos[j]->psz_value));
current_item->addChild(child_item);
}
InfoTree->setItemExpanded( current_item, true);
}
}
示例7: CONNECT
void StringListConfigControl::finish(module_config_t *p_module_config )
{
combo->setEditable( false );
CONNECT( combo, currentIndexChanged ( int ), this, comboIndexChanged( int ) );
if(!p_module_config) return;
char **values, **texts;
ssize_t count = config_GetPszChoices( p_this, p_item->psz_name,
&values, &texts );
for( ssize_t i = 0; i < count && texts; i++ )
{
if( texts[i] == NULL || values[i] == NULL )
continue;
combo->addItem( qfu(texts[i]), QVariant( qfu(values[i])) );
if( !strcmp( p_item->value.psz ? p_item->value.psz : "", values[i] ) )
combo->setCurrentIndex( combo->count() - 1 );
free( texts[i] );
free( values[i] );
}
free( texts );
free( values );
if( p_module_config->psz_longtext )
{
QString tipText = qtr(p_module_config->psz_longtext);
combo->setToolTip( formatTooltip(tipText) );
if( label )
label->setToolTip( formatTooltip(tipText) );
}
if( label )
label->setBuddy( combo );
}
示例8: QEvent
MsgEvent::MsgEvent( int type, const vlc_log_t *msg, const char *text )
: QEvent( (QEvent::Type)MsgEvent_Type ),
priority( type ),
object_id( msg->i_object_id ),
object_type( qfu(msg->psz_object_type) ),
header( qfu(msg->psz_header) ),
module( qfu(msg->psz_module) ),
text( qfu(text) )
{
}
示例9: QEvent
MsgEvent::MsgEvent( const msg_item_t *msg )
: QEvent( (QEvent::Type)MsgEvent_Type ),
priority( msg->i_type ),
object_id( msg->i_object_id ),
object_type( qfu(msg->psz_object_type) ),
header( qfu(msg->psz_header) ),
module( qfu(msg->psz_module) ),
text( qfu(msg->psz_msg) )
{
}
示例10: delInput
/* Define the Input used.
Add the callbacks on input
p_input is held once here */
void InputManager::setInput( input_thread_t *_p_input )
{
delInput();
p_input = _p_input;
if( p_input != NULL )
{
msg_Dbg( p_intf, "IM: Setting an input" );
vlc_object_hold( p_input );
addCallbacks();
UpdateStatus();
UpdateName();
UpdateArt();
UpdateTeletext();
UpdateNavigation();
UpdateVout();
p_item = input_GetItem( p_input );
emit rateChanged( var_GetFloat( p_input, "rate" ) );
/* Get Saved Time */
if( p_item->i_type == ITEM_TYPE_FILE )
{
char *uri = input_item_GetURI( p_item );
int i_time = RecentsMRL::getInstance( p_intf )->time( qfu(uri) );
if( i_time > 0 && qfu( uri ) != lastURI &&
!var_GetFloat( p_input, "run-time" ) &&
!var_GetFloat( p_input, "start-time" ) &&
!var_GetFloat( p_input, "stop-time" ) )
{
emit resumePlayback( (int64_t)i_time * 1000 );
}
playlist_Lock( THEPL );
// Add root items only
playlist_item_t* p_node = playlist_CurrentPlayingItem( THEPL );
if ( p_node != NULL && p_node->p_parent != NULL && p_node->p_parent->i_id == THEPL->p_playing->i_id )
{
// Save the latest URI to avoid asking to restore the
// position on the same input file.
lastURI = qfu( uri );
RecentsMRL::getInstance( p_intf )->addRecent( lastURI );
}
playlist_Unlock( THEPL );
free( uri );
}
}
else
{
p_item = NULL;
lastURI.clear();
assert( !p_input_vbi );
emit rateChanged( var_InheritFloat( p_intf, "rate" ) );
}
}
示例11: sizeof
void VLMDialog::mediasPopulator()
{
if( p_vlm )
{
int i_nMedias;
QString typeShortName;
int vlmItemCount;
vlm_media_t ***ppp_dsc = (vlm_media_t ***)malloc( sizeof( vlm_media_t ) );
/* Get medias information and numbers */
vlm_Control( p_vlm, VLM_GET_MEDIAS, ppp_dsc, &i_nMedias );
/* Loop on all of them */
for( int i = 0; i < i_nMedias; i++ )
{
VLMAWidget * vlmAwidget;
vlmItemCount = vlmItems.count();
QString mediaName = qfu( (*ppp_dsc)[i]->psz_name );
/* It may have several inputs, we take the first one by default
- an evolution will be to manage these inputs in the gui */
QString inputText = qfu( (*ppp_dsc)[i]->ppsz_input[0] );
QString outputText = qfu( (*ppp_dsc)[i]->psz_output );
/* Schedule media is a quite especial, maybe there is another way to grab information */
if( (*ppp_dsc)[i]->b_vod )
{
typeShortName = "VOD";
QString mux = qfu( (*ppp_dsc)[i]->vod.psz_mux );
vlmAwidget = new VLMVod( mediaName, inputText, inputOptions,
outputText, (*ppp_dsc)[i]->b_enabled,
mux, this );
}
else
{
typeShortName = "Bcast";
vlmAwidget = new VLMBroadcast( mediaName, inputText, inputOptions,
outputText, (*ppp_dsc)[i]->b_enabled,
(*ppp_dsc)[i]->broadcast.b_loop, this );
}
/* Add an Item of the Side List */
ui.vlmListItem->addItem( typeShortName + " : " + mediaName );
ui.vlmListItem->setCurrentRow( vlmItemCount - 1 );
/* Add a new VLMAWidget on the main List */
vlmItemLayout->insertWidget( vlmItemCount, vlmAwidget );
vlmItems.append( vlmAwidget );
clearWidgets();
}
free( ppp_dsc );
}
}
示例12: 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;
}
示例13: PLWalk
static QTreeWidgetItem * PLWalk( playlist_item_t *p_node )
{
QTreeWidgetItem *current = new QTreeWidgetItem();
current->setText( 0, qfu( p_node->p_input->psz_name ) );
current->setToolTip( 0, qfu( p_node->p_input->psz_uri ) );
current->setText( 1, QString("%1").arg( p_node->i_id ) );
current->setText( 2, QString("%1").arg( p_node->p_input->i_id ) );
current->setText( 3, QString("0x%1").arg( p_node->i_flags, 0, 16 ) );
current->setText( 4, QString("0x%1").arg( p_node->p_input->i_type, 0, 16 ) );
for ( int i = 0; p_node->i_children > 0 && i < p_node->i_children; i++ )
current->addChild( PLWalk( p_node->pp_children[ i ] ) );
return current;
}
示例14: QVLCDialog
AboutDialog::AboutDialog( intf_thread_t *_p_intf)
: QVLCDialog( (QWidget*)_p_intf->p_sys->p_mi, _p_intf ), b_advanced( false )
{
/* Build UI */
ui.setupUi( this );
setWindowTitle( qtr( "About" ) );
setWindowRole( "vlc-about" );
setWindowModality( Qt::WindowModal );
ui.version->setText(qfu( " " VERSION_MESSAGE ) );
ui.title->setText("<html><head/><body><p><span style=\" font-size:26pt; color:#353535;\"> " + qtr( "VLC media player" ) + " </span></p></body></html>");
ui.MainBlabla->setText("<html><head/><body>" +
qtr( "<p>VLC media player is a free and open source media player, encoder, and streamer made by the volunteers of the <a href=\"http://www.videolan.org/\"><span style=\" text-decoration: underline; color:#0057ae;\">VideoLAN</span></a> community.</p><p>VLC uses its internal codecs, works on essentially every popular platform, and can read almost all files, CDs, DVDs, network streams, capture cards and other media formats!</p><p><a href=\"http://www.videolan.org/contribute/\"><span style=\" text-decoration: underline; color:#0057ae;\">Help and join us!</span></a>" ) +
"</p></body> </html>");
#if 0
if( QDate::currentDate().dayOfYear() >= QT_XMAS_JOKE_DAY && var_InheritBool( p_intf, "qt-icon-change" ) )
ui.iconVLC->setPixmap( QPixmap( ":/logo/vlc128-xmas.png" ) );
else
ui.iconVLC->setPixmap( QPixmap( ":/logo/vlc128.png" ) );
#endif
#if 0
ifdef UPDATE_CHECK
#else
ui.update->hide();
#endif
/* GPL License */
ui.licensePage->setText( qfu( psz_license ) );
/* People who helped */
ui.creditPage->setText( qfu( psz_thanks ) );
/* People who wrote the software */
ui.authorsPage->setText( qfu( psz_authors ) );
ui.licenseButton->setText( "<html><head/><body><p><span style=\" text-decoration: underline; color:#0057ae;\">"+qtr( "License" )+"</span></p></body></html>");
ui.licenseButton->installEventFilter( this );
ui.authorsButton->setText( "<html><head/><body><p><span style=\" text-decoration: underline; color:#0057ae;\">"+qtr( "Authors" )+"</span></p></body></html>");
ui.authorsButton->installEventFilter( this );
ui.creditsButton->setText( "<html><head/><body><p><span style=\" text-decoration: underline; color:#0057ae;\">"+qtr( "Credits" )+"</span></p></body></html>");
ui.creditsButton->installEventFilter( this );
ui.version->installEventFilter( this );
}
示例15: switch
void SoutDialog::addDest( )
{
VirtualDestBox *db;
QString caption;
switch( ui.destBox->currentIndex() )
{
case 0:
db = new FileDestBox( this, p_intf );
caption = qtr( "File" );
break;
case 1:
db = new HTTPDestBox( this );
caption = qfu( "HTTP" );
break;
case 2:
db = new MMSHDestBox( this );
caption = qfu( "WMSP" );
break;
case 3:
db = new RTSPDestBox( this );
caption = qfu( "RTSP" );
break;
case 4:
db = new RTPDestBox( this, "ts" );
caption = "RTP/TS";
break;
case 5:
db = new RTPDestBox( this );
caption = "RTP/AVP";
break;
case 6:
db = new UDPDestBox( this );
caption = "UDP";
break;
case 7:
db = new ICEDestBox( this );
caption = "Icecast";
break;
default:
assert(0);
}
int index = ui.destTab->addTab( db, caption );
CONNECT( db, mrlUpdated(), this, updateMRL() );
ui.destTab->setCurrentIndex( index );
updateMRL();
}