本文整理汇总了C++中TomahawkSettings::scannerTime方法的典型用法代码示例。如果您正苦于以下问题:C++ TomahawkSettings::scannerTime方法的具体用法?C++ TomahawkSettings::scannerTime怎么用?C++ TomahawkSettings::scannerTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TomahawkSettings
的用法示例。
在下文中一共展示了TomahawkSettings::scannerTime方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
//.........这里部分代码省略.........
m_advancedWidgetUi->checkBoxSongChangeNotifications->setVisible( false );
#endif
//Network settings
TomahawkSettings::ExternalAddressMode mode = TomahawkSettings::instance()->externalAddressMode();
if ( mode == TomahawkSettings::Lan )
m_advancedWidgetUi->lanOnlyRadioButton->setChecked( true );
else if ( mode == TomahawkSettings::Static )
m_advancedWidgetUi->staticIpRadioButton->setChecked( true );
else
m_advancedWidgetUi->upnpRadioButton->setChecked( true );
m_advancedWidgetUi->staticHostNamePortLabel->setEnabled( m_advancedWidgetUi->staticIpRadioButton->isChecked() );
m_advancedWidgetUi->staticHostName->setEnabled( m_advancedWidgetUi->staticIpRadioButton->isChecked() );
m_advancedWidgetUi->staticPort->setEnabled( m_advancedWidgetUi->staticIpRadioButton->isChecked() );
m_advancedWidgetUi->staticHostNameLabel->setEnabled( m_advancedWidgetUi->staticIpRadioButton->isChecked() );
m_advancedWidgetUi->staticPortLabel->setEnabled( m_advancedWidgetUi->staticIpRadioButton->isChecked() );
bool useProxy = TomahawkSettings::instance()->proxyType() == QNetworkProxy::Socks5Proxy;
m_advancedWidgetUi->enableProxyCheckBox->setChecked( useProxy );
m_advancedWidgetUi->proxyButton->setEnabled( useProxy );
m_advancedWidgetUi->aclEntryClearButton->setEnabled( TomahawkSettings::instance()->aclEntries().size() > 0 );
connect( m_advancedWidgetUi->aclEntryClearButton, SIGNAL( clicked( bool ) ), this, SLOT( aclEntryClearButtonClicked() ) );
#ifdef Q_WS_MAC
// Avoid resize handles on sheets on osx
m_proxySettings.setSizeGripEnabled( true );
QSizeGrip* p = m_proxySettings.findChild< QSizeGrip* >();
p->setFixedSize( 0, 0 );
#endif
m_accountsWidgetUi->installFromFileBtn->setText( tr( "Install from file" ) );
// Accounts
AccountDelegate* accountDelegate = new AccountDelegate( this );
m_accountsWidgetUi->accountsView->setItemDelegate( accountDelegate );
m_accountsWidgetUi->accountsView->setContextMenuPolicy( Qt::CustomContextMenu );
m_accountsWidgetUi->accountsView->setVerticalScrollMode( QAbstractItemView::ScrollPerPixel );
m_accountsWidgetUi->accountsView->setMouseTracking( true );
connect( accountDelegate, SIGNAL( openConfig( Tomahawk::Accounts::Account* ) ), this, SLOT( openAccountConfig( Tomahawk::Accounts::Account* ) ) );
connect( accountDelegate, SIGNAL( openConfig( Tomahawk::Accounts::AccountFactory* ) ), this, SLOT( openAccountFactoryConfig( Tomahawk::Accounts::AccountFactory* ) ) );
connect( accountDelegate, SIGNAL( update( QModelIndex ) ), m_accountsWidgetUi->accountsView, SLOT( update( QModelIndex ) ) );
m_accountModel = new AccountModel( this );
m_accountProxy = new AccountModelFilterProxy( m_accountModel );
m_accountProxy->setSourceModel( m_accountModel );
connect( m_accountProxy, SIGNAL( startInstalling( QPersistentModelIndex ) ), accountDelegate, SLOT( startInstalling(QPersistentModelIndex) ) );
connect( m_accountProxy, SIGNAL( doneInstalling( QPersistentModelIndex ) ), accountDelegate, SLOT( doneInstalling(QPersistentModelIndex) ) );
connect( m_accountProxy, SIGNAL( errorInstalling( QPersistentModelIndex ) ), accountDelegate, SLOT( errorInstalling(QPersistentModelIndex) ) );
connect( m_accountProxy, SIGNAL( scrollTo( QModelIndex ) ), this, SLOT( scrollTo( QModelIndex ) ) );
m_accountsWidgetUi->accountsView->setModel( m_accountProxy );
connect( m_accountsWidgetUi->installFromFileBtn, SIGNAL( clicked( bool ) ), this, SLOT( installFromFile() ) );
connect( m_accountModel, SIGNAL( createAccount( Tomahawk::Accounts::AccountFactory* ) ), this, SLOT( createAccountFromFactory( Tomahawk::Accounts::AccountFactory* ) ) );
m_accountsWidgetUi->accountsFilterCombo->addItem( tr( "All" ), Accounts::NoType );
m_accountsWidgetUi->accountsFilterCombo->addItem( accountTypeToString( SipType ), SipType );
m_accountsWidgetUi->accountsFilterCombo->addItem( accountTypeToString( ResolverType ), ResolverType );
m_accountsWidgetUi->accountsFilterCombo->addItem( accountTypeToString( StatusPushType ), StatusPushType );
connect( m_accountsWidgetUi->accountsFilterCombo, SIGNAL( activated( int ) ), this, SLOT( accountsFilterChanged( int ) ) );
if ( !Servent::instance()->isReady() )
{
m_sipSpinner = new AnimatedSpinner( m_accountsWidgetUi->accountsView );
m_sipSpinner->fadeIn();
connect( Servent::instance(), SIGNAL( ready() ), this, SLOT( serventReady() ) );
}
// ADVANCED
m_advancedWidgetUi->staticHostName->setText( s->externalHostname() );
m_advancedWidgetUi->staticPort->setValue( s->externalPort() );
m_advancedWidgetUi->proxyButton->setVisible( true );
m_collectionWidgetUi->checkBoxWatchForChanges->setChecked( s->watchForChanges() );
m_collectionWidgetUi->scannerTimeSpinBox->setValue( s->scannerTime() );
m_collectionWidgetUi->enableEchonestCatalog->setChecked( s->enableEchonestCatalogs() );
connect( m_collectionWidgetUi->checkBoxWatchForChanges, SIGNAL( clicked( bool ) ), SLOT( updateScanOptionsView() ) );
if ( m_collectionWidgetUi->checkBoxWatchForChanges->isChecked() )
{
m_collectionWidgetUi->scanTimeLabel->show();
m_collectionWidgetUi->scannerTimeSpinBox->show();
}
else
{
m_collectionWidgetUi->scanTimeLabel->hide();
m_collectionWidgetUi->scannerTimeSpinBox->hide();
}
foreach ( const QString& dir, TomahawkSettings::instance()->scannerPaths() )
{
m_collectionWidgetUi->dirTree->checkPath( dir, Qt::Checked );
}
示例2: if
//.........这里部分代码省略.........
m_accountModel = new AccountModel( this );
m_accountProxy = new AccountModelFilterProxy( m_accountModel );
m_accountProxy->setSourceModel( m_accountModel );
connect( m_accountProxy, SIGNAL( startInstalling( QPersistentModelIndex ) ), accountDelegate, SLOT( startInstalling(QPersistentModelIndex) ) );
connect( m_accountProxy, SIGNAL( doneInstalling( QPersistentModelIndex ) ), accountDelegate, SLOT( doneInstalling(QPersistentModelIndex) ) );
connect( m_accountProxy, SIGNAL( errorInstalling( QPersistentModelIndex ) ), accountDelegate, SLOT( errorInstalling(QPersistentModelIndex) ) );
connect( m_accountProxy, SIGNAL( scrollTo( QModelIndex ) ), SLOT( scrollTo( QModelIndex ) ) );
m_accountsWidgetUi->accountsView->setModel( m_accountProxy );
connect( m_accountsWidgetUi->installFromFileBtn, SIGNAL( clicked( bool ) ), SLOT( installFromFile() ) );
connect( m_accountModel, SIGNAL( createAccount( Tomahawk::Accounts::AccountFactory* ) ), SLOT( createAccountFromFactory( Tomahawk::Accounts::AccountFactory* ) ) );
m_accountsWidgetUi->accountsFilterCombo->addItem( tr( "All" ), Accounts::NoType );
m_accountsWidgetUi->accountsFilterCombo->addItem( accountTypeToString( SipType ), SipType );
m_accountsWidgetUi->accountsFilterCombo->addItem( accountTypeToString( ResolverType ), ResolverType );
m_accountsWidgetUi->accountsFilterCombo->addItem( accountTypeToString( StatusPushType ), StatusPushType );
connect( m_accountsWidgetUi->accountsFilterCombo, SIGNAL( activated( int ) ), SLOT( accountsFilterChanged( int ) ) );
if ( !Servent::instance()->isReady() )
{
m_sipSpinner = new AnimatedSpinner( m_accountsWidgetUi->accountsView );
m_sipSpinner->fadeIn();
connect( Servent::instance(), SIGNAL( ready() ), SLOT( serventReady() ) );
}
// ADVANCED
m_advancedWidgetUi->proxyButton->setVisible( true );
m_collectionWidgetUi->checkBoxWatchForChanges->setChecked( s->watchForChanges() );
m_collectionWidgetUi->scannerTimeSpinBox->setValue( s->scannerTime() );
m_collectionWidgetUi->enableEchonestCatalog->setChecked( s->enableEchonestCatalogs() );
connect( m_collectionWidgetUi->checkBoxWatchForChanges, SIGNAL( clicked( bool ) ), SLOT( updateScanOptionsView() ) );
if ( m_collectionWidgetUi->checkBoxWatchForChanges->isChecked() )
{
m_collectionWidgetUi->scanTimeLabel->show();
m_collectionWidgetUi->scannerTimeSpinBox->show();
}
else
{
m_collectionWidgetUi->scanTimeLabel->hide();
m_collectionWidgetUi->scannerTimeSpinBox->hide();
}
/* foreach ( const QString& dir, TomahawkSettings::instance()->scannerPaths() )
{
m_collectionWidgetUi->dirTree->checkPath( dir, Qt::Checked );
}*/
m_collectionWidgetUi->pathListWidget->addItems( TomahawkSettings::instance()->scannerPaths() );
const int buttonSize = TomahawkUtils::defaultFontHeight() * 2.5;
m_collectionWidgetUi->addLibraryPathButton->setFixedSize( buttonSize, buttonSize );
m_collectionWidgetUi->removeLibraryPathButton->setFixedSize( m_collectionWidgetUi->addLibraryPathButton->size() );
connect( m_collectionWidgetUi->addLibraryPathButton, SIGNAL( clicked() ), SLOT( addLibraryPath() ) );
connect( m_collectionWidgetUi->removeLibraryPathButton, SIGNAL( clicked() ), SLOT( removeLibraryPath() ) );
int buttonsWidth = qMax( m_advancedWidgetUi->proxyButton->sizeHint().width(),
m_advancedWidgetUi->aclEntryClearButton->sizeHint().width() );
m_advancedWidgetUi->proxyButton->setFixedWidth( buttonsWidth );
m_advancedWidgetUi->aclEntryClearButton->setFixedWidth( buttonsWidth );
示例3: QDialog
SettingsDialog::SettingsDialog( QWidget *parent )
: QDialog( parent )
, ui( new Ui_StackedSettingsDialog )
, m_proxySettings( this )
, m_rejected( false )
, m_accountModel( 0 )
, m_sipSpinner( 0 )
{
ui->setupUi( this );
TomahawkSettings* s = TomahawkSettings::instance();
TomahawkUtils::unmarginLayout( layout() );
ui->stackedWidget->setContentsMargins( 4, 4, 4, 0 );
ui->checkBoxReporter->setChecked( s->crashReporterEnabled() );
ui->checkBoxHttp->setChecked( s->httpEnabled() );
ui->checkBoxStaticPreferred->setChecked( s->preferStaticHostPort() );
ui->checkBoxUpnp->setChecked( s->externalAddressMode() == TomahawkSettings::Upnp );
ui->checkBoxUpnp->setEnabled( !s->preferStaticHostPort() );
createIcons();
#ifdef Q_WS_X11
ui->listWidget->setFrameShape( QFrame::StyledPanel );
ui->listWidget->setFrameShadow( QFrame::Sunken );
setContentsMargins( 4, 4, 4, 4 );
#else
setContentsMargins( 0, 4, 4, 4 );
#endif
#ifdef Q_WS_MAC
ui->listWidget->setFixedWidth( 83 );
#endif
#ifdef Q_WS_MAC
// Avoid resize handles on sheets on osx
m_proxySettings.setSizeGripEnabled( true );
QSizeGrip* p = m_proxySettings.findChild< QSizeGrip* >();
p->setFixedSize( 0, 0 );
#endif
// Accounts
AccountDelegate* accountDelegate = new AccountDelegate( this );
ui->accountsView->setItemDelegate( accountDelegate );
ui->accountsView->setContextMenuPolicy( Qt::CustomContextMenu );
ui->accountsView->setVerticalScrollMode( QAbstractItemView::ScrollPerPixel );
ui->accountsView->setMouseTracking( true );
connect( accountDelegate, SIGNAL( openConfig( Tomahawk::Accounts::Account* ) ), this, SLOT( openAccountConfig( Tomahawk::Accounts::Account* ) ) );
connect( accountDelegate, SIGNAL( openConfig( Tomahawk::Accounts::AccountFactory* ) ), this, SLOT( openAccountFactoryConfig( Tomahawk::Accounts::AccountFactory* ) ) );
connect( accountDelegate, SIGNAL( update( QModelIndex ) ), ui->accountsView, SLOT( update( QModelIndex ) ) );
m_accountModel = new AccountModel( this );
m_accountProxy = new AccountModelFilterProxy( m_accountModel );
m_accountProxy->setSourceModel( m_accountModel );
connect( m_accountProxy, SIGNAL( scrollTo( QModelIndex ) ), this, SLOT( scrollTo( QModelIndex ) ) );
ui->accountsView->setModel( m_accountProxy );
connect( ui->installFromFileBtn, SIGNAL( clicked( bool ) ), this, SLOT( installFromFile() ) );
connect( m_accountModel, SIGNAL( createAccount( Tomahawk::Accounts::AccountFactory* ) ), this, SLOT( createAccountFromFactory( Tomahawk::Accounts::AccountFactory* ) ) );
ui->accountsFilterCombo->addItem( tr( "All" ), Accounts::NoType );
ui->accountsFilterCombo->addItem( accountTypeToString( SipType ), SipType );
ui->accountsFilterCombo->addItem( accountTypeToString( ResolverType ), ResolverType );
ui->accountsFilterCombo->addItem( accountTypeToString( StatusPushType ), StatusPushType );
connect( ui->accountsFilterCombo, SIGNAL( activated( int ) ), this, SLOT( accountsFilterChanged( int ) ) );
if ( !Servent::instance()->isReady() )
{
m_sipSpinner = new LoadingSpinner( ui->accountsView );
m_sipSpinner->fadeIn();
connect( Servent::instance(), SIGNAL( ready() ), this, SLOT( serventReady() ) );
}
// ADVANCED
ui->staticHostName->setText( s->externalHostname() );
ui->staticPort->setValue( s->externalPort() );
ui->proxyButton->setVisible( true );
ui->checkBoxWatchForChanges->setChecked( s->watchForChanges() );
ui->scannerTimeSpinBox->setValue( s->scannerTime() );
ui->enableEchonestCatalog->setChecked( s->enableEchonestCatalogs() );
connect( ui->checkBoxWatchForChanges, SIGNAL( clicked( bool ) ), SLOT( updateScanOptionsView() ) );
if ( ui->checkBoxWatchForChanges->isChecked() )
{
ui->scanTimeLabel->show();
ui->scannerTimeSpinBox->show();
}
else
{
ui->scanTimeLabel->hide();
ui->scannerTimeSpinBox->hide();
}
foreach ( const QString& dir, TomahawkSettings::instance()->scannerPaths() )
//.........这里部分代码省略.........