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


C++ source_ptr::isNull方法代码示例

本文整理汇总了C++中source_ptr::isNull方法的典型用法代码示例。如果您正苦于以下问题:C++ source_ptr::isNull方法的具体用法?C++ source_ptr::isNull怎么用?C++ source_ptr::isNull使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在source_ptr的用法示例。


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

示例1: socialAttributesChanged

void
Source::reportSocialAttributesChanged( DatabaseCommand_SocialAction* action )
{
    emit socialAttributesChanged();

    if ( action->action() == "latchOn" )
    {
        const source_ptr to = SourceList::instance()->get( action->comment() );
        if ( !to.isNull() )
            emit latchedOn( to );
    }
    else if ( action->action() == "latchOff" )
    {
        const source_ptr from = SourceList::instance()->get( action->comment() );
        if ( !from.isNull() )
            emit latchedOff( from );
    }
}
开发者ID:Pritoj,项目名称:tomahawk,代码行数:18,代码来源:source.cpp

示例2: foreach

unsigned int
Artist::playbackCount( const source_ptr& source )
{
    unsigned int count = 0;
    foreach ( const PlaybackLog& log, m_playbackHistory )
    {
        if ( source.isNull() || log.source == source )
            count++;
    }

    return count;
}
开发者ID:seezer,项目名称:tomahawk,代码行数:12,代码来源:Artist.cpp

示例3: locker

unsigned int
TrackData::playbackCount( const source_ptr& source )
{
    QMutexLocker locker( &s_memberMutex );

    unsigned int count = 0;
    foreach ( const PlaybackLog& log, m_playbackHistory )
    {
        if ( source.isNull() || log.source == source )
            count++;
    }

    return count;
}
开发者ID:purcaro,项目名称:tomahawk,代码行数:14,代码来源:TrackData.cpp

示例4: TrackModel

RecentlyAddedModel::RecentlyAddedModel( const source_ptr& source, QObject* parent )
    : TrackModel( parent )
    , m_source( source )
    , m_limit( LATEST_TRACK_ITEMS )
{
    if ( source.isNull() )
    {
        connect( SourceList::instance(), SIGNAL( ready() ), SLOT( onSourcesReady() ) );
        connect( SourceList::instance(), SIGNAL( sourceAdded( Tomahawk::source_ptr ) ), SLOT( onSourceAdded( Tomahawk::source_ptr ) ) );
    }
    else
    {
        onSourceAdded( source );
        loadHistory();
    }
}
开发者ID:mguentner,项目名称:tomahawk,代码行数:16,代码来源:RecentlyAddedModel.cpp

示例5: SourceTreeItem

bool
SourcesModel::appendItem( const source_ptr& source )
{
    SourceTreeItem* item = new SourceTreeItem( source, this );
    connect( item, SIGNAL( clicked( QModelIndex ) ), this, SIGNAL( clicked( QModelIndex ) ) );

//    qDebug() << "Appending source item:" << item->source()->username();
    invisibleRootItem()->appendRow( item->columns() );

    if ( !source.isNull() )
    {
        connect( source.data(), SIGNAL( offline() ), SLOT( onSourceChanged() ) );
        connect( source.data(), SIGNAL( online() ), SLOT( onSourceChanged() ) );
        connect( source.data(), SIGNAL( stats( QVariantMap ) ), SLOT( onSourceChanged() ) );
        connect( source.data(), SIGNAL( playbackStarted( Tomahawk::query_ptr ) ), SLOT( onSourceChanged() ) );
        connect( source.data(), SIGNAL( stateChanged() ), SLOT( onSourceChanged() ) );
    }
    
    return true; // FIXME
}
开发者ID:tiegz,项目名称:tomahawk,代码行数:20,代码来源:sourcesmodel.cpp


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