本文整理汇总了C++中qfu函数的典型用法代码示例。如果您正苦于以下问题:C++ qfu函数的具体用法?C++ qfu怎么用?C++ qfu使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了qfu函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:12307,项目名称:VLC-for-VS2010,代码行数:31,代码来源:help.cpp
示例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 );
}
}
}
开发者ID:Kafay,项目名称:vlc,代码行数:42,代码来源:playlist_item.cpp
示例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;
}
开发者ID:0xheart0,项目名称:vlc,代码行数:25,代码来源:EPGItem.cpp
示例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 );
}
开发者ID:AsamQi,项目名称:vlc,代码行数:26,代码来源:messages.cpp
示例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;
}
开发者ID:IAPark,项目名称:vlc,代码行数:33,代码来源:EPGItem.cpp
示例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);
}
}
开发者ID:12307,项目名称:VLC-for-VS2010,代码行数:34,代码来源:info_panels.cpp
示例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 );
}
开发者ID:12307,项目名称:VLC-for-VS2010,代码行数:34,代码来源:preferences_widgets.cpp
示例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) )
{
}
开发者ID:AsamQi,项目名称:vlc,代码行数:10,代码来源:messages.cpp
示例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) )
{
}
开发者ID:Italianmoose,项目名称:Stereoscopic-VLC,代码行数:10,代码来源:messages.cpp
示例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" ) );
}
}
开发者ID:DaemonSnake,项目名称:vlc,代码行数:58,代码来源:input_manager.cpp
示例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 );
}
}
开发者ID:BloodExecutioner,项目名称:vlc,代码行数:53,代码来源:vlm.cpp
示例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;
}
开发者ID:12307,项目名称:VLC-for-VS2010,代码行数:13,代码来源:qt_dirs.cpp
示例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;
}
开发者ID:AsamQi,项目名称:vlc,代码行数:13,代码来源:messages.cpp
示例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 );
}
开发者ID:12307,项目名称:VLC-for-VS2010,代码行数:49,代码来源:help.cpp
示例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();
}
开发者ID:AsamQi,项目名称:vlc,代码行数:48,代码来源:sout.cpp
示例16: VStringConfigControl
/*********** String **************/
StringConfigControl::StringConfigControl( vlc_object_t *_p_this,
module_config_t *_p_item,
QWidget *_parent, QGridLayout *l,
int &line, bool pwd ) :
VStringConfigControl( _p_this, _p_item, _parent )
{
label = new QLabel( qtr(p_item->psz_text) );
text = new QLineEdit( qfu(p_item->value.psz) );
if( pwd ) text->setEchoMode( QLineEdit::Password );
finish();
if( !l )
{
QHBoxLayout *layout = new QHBoxLayout();
layout->addWidget( label, 0 ); layout->insertSpacing( 1, 10 );
layout->addWidget( text, LAST_COLUMN );
widget->setLayout( layout );
}
else
{
l->addWidget( label, line, 0 );
l->setColumnMinimumWidth( 1, 10 );
l->addWidget( text, line, LAST_COLUMN );
}
}
开发者ID:Kafay,项目名称:vlc,代码行数:26,代码来源:preferences_widgets.cpp
示例17: qtr
void FileConfigControl::updateField()
{
QString file = QFileDialog::getOpenFileName( NULL,
qtr( "Select File" ), qfu( config_GetHomeDir() ) );
if( file.isNull() ) return;
text->setText( toNativeSeparators( file ) );
}
开发者ID:Kafay,项目名称:vlc,代码行数:7,代码来源:preferences_widgets.cpp
示例18: QLineEdit
SearchLineEdit::SearchLineEdit( QWidget *parent ) : QLineEdit( parent )
{
clearButton = new QFramelessButton( this );
clearButton->setIcon( QIcon( ":/search_clear" ) );
clearButton->setIconSize( QSize( 16, 16 ) );
clearButton->setCursor( Qt::ArrowCursor );
clearButton->setToolTip( qfu(vlc_pgettext("Tooltip|Clear", "Clear")) );
clearButton->hide();
CONNECT( clearButton, clicked(), this, clear() );
int frameWidth = style()->pixelMetric( QStyle::PM_DefaultFrameWidth, 0, this );
QFontMetrics metrics( font() );
QString styleSheet = QString( "min-height: %1px; "
"padding-top: 1px; "
"padding-bottom: 1px; "
"padding-right: %2px;" )
.arg( metrics.height() + ( 2 * frameWidth ) )
.arg( clearButton->sizeHint().width() + 6 );
setStyleSheet( styleSheet );
setMessageVisible( true );
CONNECT( this, textEdited( const QString& ),
this, updateText( const QString& ) );
CONNECT( this, editingFinished(),
this, searchEditingFinished() );
}
开发者ID:dougmencken,项目名称:vlc,代码行数:31,代码来源:searchlineedit.cpp
示例19: vlc_mutex_lock
void EPGWidget::updateEPG( input_item_t *p_input_item )
{
if( !p_input_item ) return;
/* flush our EPG data if input type has changed */
if ( b_input_type_known && p_input_item->i_type != i_event_source_type ) m_epgView->reset();
i_event_source_type = p_input_item->i_type;
b_input_type_known = true;
m_epgView->cleanup(); /* expire items and flags */
/* Fixme: input could have dissapeared */
vlc_mutex_lock( & p_input_item->lock );
for ( int i = 0; i < p_input_item->i_epg; ++i )
{
vlc_epg_t *p_epg = p_input_item->pp_epg[i];
/* Read current epg events from libvlc and try to insert them */
for ( int j = 0; j < p_epg->i_event; ++j )
{
vlc_epg_event_t *p_event = p_epg->pp_event[j];
m_epgView->addEPGEvent( p_event, qfu( p_epg->psz_name ),
( p_epg->p_current == p_event ) );
}
}
vlc_mutex_unlock( & p_input_item->lock );
/* toggle our widget view */
rootWidget->setCurrentIndex(
m_epgView->hasValidData() ? EPGVIEW_WIDGET : NOEPG_WIDGET );
// Update the global duration and start time.
m_epgView->updateDuration();
m_epgView->updateStartTime();
}
开发者ID:qdk0901,项目名称:vlc,代码行数:35,代码来源:EPGWidget.cpp
示例20: qfu
QString HTTPDestBox::getMRL( const QString& mux )
{
if( HTTPEdit->text().isEmpty() ) return "";
QString path = HTTPEdit->text();
if( path[0] != '/' )
path.prepend( qfu("/") );
QString port;
port.setNum( HTTPPort->value() );
QString dst = ":" + port + path;
SoutMrl m;
m.begin( "http" );
/* Path-extension is primary muxer to use if possible,
otherwise check for mux-choise and see that it isn't mp4
then fallback to flv*/
if ( !path.contains(QRegExp("\\..{2,3}$") ) )
{
if( !mux.isEmpty() && mux.compare("mp4") )
m.option( "mux", mux );
else
m.option( "mux", "ffmpeg{mux=flv}" );
}
m.option( "dst", dst );
m.end();
return m.getMrl();
}
开发者ID:BloodExecutioner,项目名称:vlc,代码行数:28,代码来源:sout_widgets.cpp
注:本文中的qfu函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论