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


C++ TomahawkSettings::hasScannerPaths方法代码示例

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


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

示例1: ACLRegistryImpl


//.........这里部分代码省略.........

    // Connect up shortcuts
    if ( !m_shortcutHandler.isNull() )
    {
        connect( m_shortcutHandler.data(), SIGNAL( playPause() ), m_audioEngine.data(), SLOT( playPause() ) );
        connect( m_shortcutHandler.data(), SIGNAL( pause() ), m_audioEngine.data(), SLOT( pause() ) );
        connect( m_shortcutHandler.data(), SIGNAL( stop() ), m_audioEngine.data(), SLOT( stop() ) );
        connect( m_shortcutHandler.data(), SIGNAL( previous() ), m_audioEngine.data(), SLOT( previous() ) );
        connect( m_shortcutHandler.data(), SIGNAL( next() ), m_audioEngine.data(), SLOT( next() ) );
        connect( m_shortcutHandler.data(), SIGNAL( volumeUp() ), m_audioEngine.data(), SLOT( raiseVolume() ) );
        connect( m_shortcutHandler.data(), SIGNAL( volumeDown() ), m_audioEngine.data(), SLOT( lowerVolume() ) );
        connect( m_shortcutHandler.data(), SIGNAL( mute() ), m_audioEngine.data(), SLOT( mute() ) );
    }

    tDebug() << "Init InfoSystem.";
    m_infoSystem = QPointer<Tomahawk::InfoSystem::InfoSystem>( Tomahawk::InfoSystem::InfoSystem::instance() );

    tDebug() << "Init AccountManager.";
    m_accountManager = QPointer< Tomahawk::Accounts::AccountManager >( new Tomahawk::Accounts::AccountManager( this ) );
    connect( m_accountManager.data(), SIGNAL( ready() ), SLOT( accountManagerReady() ) );

    Echonest::Config::instance()->setNetworkAccessManager( TomahawkUtils::nam() );
#ifndef ENABLE_HEADLESS
    EchonestGenerator::setupCatalogs();

    if ( !m_headless )
    {
        tDebug() << "Init MainWindow.";
        m_mainwindow = new TomahawkWindow();
        m_mainwindow->setWindowTitle( "Tomahawk" );
        m_mainwindow->setObjectName( "TH_Main_Window" );
        if ( !arguments().contains( "--hide" ) )
        {
            m_mainwindow->show();
        }
    }
#endif

    tDebug() << "Init Local Collection.";
    initLocalCollection();
    tDebug() << "Init Pipeline.";
    initPipeline();

#ifndef ENABLE_HEADLESS
    // load remote list of resolvers able to be installed
    AtticaManager::instance();
#endif

    if ( arguments().contains( "--http" ) || TomahawkSettings::instance()->value( "network/http", true ).toBool() )
    {
        initHTTP();
    }
    connect( TomahawkSettings::instance(), SIGNAL( changed() ), SLOT( initHTTP() ) );

#ifndef ENABLE_HEADLESS
    if ( !s->hasScannerPaths() )
    {
        m_mainwindow->showSettingsDialog();
    }
#endif

#ifdef LIBLASTFM_FOUND
    tDebug() << "Init Scrobbler.";
    m_scrobbler = new Scrobbler( this );
#endif

    if ( arguments().contains( "--filescan" ) )
    {
        m_scanManager.data()->runFullRescan();
    }

    // Set up echonest catalog synchronizer
    Tomahawk::EchonestCatalogSynchronizer::instance();

    PlaylistUpdaterInterface::registerUpdaterFactory( new XspfUpdaterFactory );
    PlaylistUpdaterInterface::registerUpdaterFactory( new SpotifyUpdaterFactory );

    // Following work-around/fix taken from Clementine rev. 13e13ccd9a95 and courtesy of David Sansome
    // A bug in Qt means the wheel_scroll_lines setting gets ignored and replaced
    // with the default value of 3 in QApplicationPrivate::initialize.
    {
        QSettings qt_settings( QSettings::UserScope, "Trolltech" );
        qt_settings.beginGroup( "Qt" );
        QApplication::setWheelScrollLines( qt_settings.value( "wheelScrollLines", QApplication::wheelScrollLines() ).toInt() );
    }

#ifndef ENABLE_HEADLESS
    // Make sure to init GAM in the gui thread
    GlobalActionManager::instance();

    // check if our spotify playlist api server is up and running, and enable spotify playlist drops if so
    QNetworkReply* r = TomahawkUtils::nam()->get( QNetworkRequest( QUrl( SPOTIFY_PLAYLIST_API_URL "/pong" ) ) );
    connect( r, SIGNAL( finished() ), this, SLOT( spotifyApiCheckFinished() ) );
#endif

#ifdef Q_OS_MAC
    // Make sure to do this after main window is inited
    Tomahawk::enableFullscreen( m_mainwindow );
#endif
}
开发者ID:ricjon,项目名称:tomahawk,代码行数:101,代码来源:TomahawkApp.cpp

示例2: qt_settings

void
TomahawkApp::onInfoSystemReady()
{
    tDebug() << "Init AccountManager.";
    m_accountManager = QPointer< Tomahawk::Accounts::AccountManager >( new Tomahawk::Accounts::AccountManager( this ) );
    connect( m_accountManager.data(), SIGNAL( readyForFactories() ), SLOT( initFactoriesForAccountManager() ) );
    connect( m_accountManager.data(), SIGNAL( readyForSip() ), SLOT( initSIP() ) );

    TomahawkSettings* s = TomahawkSettings::instance();

    Echonest::Config::instance()->setNetworkAccessManager( Tomahawk::Utils::nam() );
    EchonestGenerator::setupCatalogs();

    m_scanManager = QPointer<ScanManager>( new ScanManager( this ) );
    if ( !m_headless )
    {
        tDebug() << "Init MainWindow.";
        m_mainwindow = new TomahawkWindow();
        m_mainwindow->setWindowTitle( "Tomahawk" );
        m_mainwindow->setObjectName( "TH_Main_Window" );
        if ( !arguments().contains( "--hide" ) )
        {
            m_mainwindow->show();
        }
        qApp->installEventFilter( m_mainwindow );
    }

    tDebug() << "Init Local Collection.";
    initLocalCollection();
    tDebug() << "Init Pipeline.";
    initPipeline();

    m_scanManager->init();
    if ( arguments().contains( "--filescan" ) )
    {
        m_scanManager->runFullRescan();
    }

    // load remote list of resolvers able to be installed
    AtticaManager::instance();

    if ( arguments().contains( "--http" ) || TomahawkSettings::instance()->value( "network/http", true ).toBool() )
    {
        initHTTP();
    }
    connect( TomahawkSettings::instance(), SIGNAL( changed() ), SLOT( initHTTP() ) );

    if ( !s->hasScannerPaths() )
    {
        m_mainwindow->showSettingsDialog();
    }

#ifdef LIBLASTFM_FOUND
    tDebug() << "Init Scrobbler.";
    m_scrobbler = new Scrobbler( this );
#endif

    // Set up echonest catalog synchronizer
    Tomahawk::EchonestCatalogSynchronizer::instance();

    PlaylistUpdaterInterface::registerUpdaterFactory( new XspfUpdaterFactory );
//    PlaylistUpdaterInterface::registerUpdaterFactory( new SpotifyUpdaterFactory );

    // Following work-around/fix taken from Clementine rev. 13e13ccd9a95 and courtesy of David Sansome
    // A bug in Qt means the wheel_scroll_lines setting gets ignored and replaced
    // with the default value of 3 in QApplicationPrivate::initialize.
    {
        QSettings qt_settings( QSettings::UserScope, "Trolltech" );
        qt_settings.beginGroup( "Qt" );
        QApplication::setWheelScrollLines( qt_settings.value( "wheelScrollLines", QApplication::wheelScrollLines() ).toInt() );
    }

    // Make sure to init GAM in the gui thread
    GlobalActionManager::instance();

    // check if our spotify playlist api server is up and running, and enable spotify playlist drops if so
    QNetworkRequest request( QUrl( SPOTIFY_PLAYLIST_API_URL "/pong" ) );

    QByteArray userAgent = TomahawkUtils::userAgentString( TOMAHAWK_APPLICATION_NAME, TOMAHAWK_VERSION ).toUtf8();
    tLog() << "User-Agent:" << userAgent;
    request.setRawHeader( "User-Agent", userAgent );

    QNetworkReply* r = Tomahawk::Utils::nam()->get( request );
    connect( r, SIGNAL( finished() ), this, SLOT( spotifyApiCheckFinished() ) );

#ifdef Q_OS_MAC
    // Make sure to do this after main window is inited
    Tomahawk::enableFullscreen( m_mainwindow );
#endif

    initEnergyEventHandler();

    if ( arguments().count() > 1 )
        loadUrl( arguments().last() );

    emit tomahawkLoaded();
}
开发者ID:JessicaWhite17,项目名称:tomahawk,代码行数:97,代码来源:TomahawkApp.cpp


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