本文整理汇总了C++中DownloadManager::standardPath方法的典型用法代码示例。如果您正苦于以下问题:C++ DownloadManager::standardPath方法的具体用法?C++ DownloadManager::standardPath怎么用?C++ DownloadManager::standardPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DownloadManager
的用法示例。
在下文中一共展示了DownloadManager::standardPath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: load
void SettingsDialog::load()
{
SettingsManager * manager = SettingsManager::settingsManager();
HistoryManager * historyManager = HistoryManager::historyManager();
DownloadManager * downloadManager = DownloadManager::downloadManager();
NetworkAccessManager * networkAccessManager = NetworkAccessManager::networkAccessManager();
TabManager * tabManager = TabManager::tabManager();
m_imagesCheckBox->setChecked(manager->isImagesEnabled());
m_javascriptCheckBox->setChecked(manager->isJavascriptEnabled());
m_javaCheckBox->setChecked(manager->isJavaEnabled());
m_pluginsCheckBox->setChecked(manager->isPluginsEnabled());
m_sansFontComboBox->setCurrentFont(QFont(manager->sansFontFamily()));
m_serifFontComboBox->setCurrentFont(QFont(manager->serifFontFamily()));
m_monoFontComboBox->setCurrentFont(QFont(manager->monoFontFamily()));
m_standardFontSpinBox->setValue(manager->standardFontSize());
m_monoFontSpinBox->setValue(manager->monoFontSize());
m_privateBrowsingCheckBox->setChecked(historyManager->isPrivateBrowsingEnabled());
m_historyExpirationComboBox->setCurrentIndex(2);
for(int i = 0; i < 8; i++)
{
if(m_historyExpirationComboBox->itemData(i).toInt() ==
historyManager->expirationDays())
{
m_historyExpirationComboBox->setCurrentIndex(i);
break;
}
}
QString path = downloadManager->standardPath();
if(path.isEmpty())
{
m_downloadCheckBox->setChecked(false);
}
else
{
m_downloadCheckBox->setChecked(true);
m_downloadLineEdit->setText(path);
}
m_cacheSizeSpinBox->setValue(networkAccessManager->cacheSize() / 1024 / 1024);
QUrl url(networkAccessManager->proxy());
if(!url.isEmpty())
{
m_proxyLineEdit->setText(url.host());
m_proxySpinBox->setValue(url.port());
}
m_addTabPolicyComboBox->setCurrentIndex(tabManager->addTabPolicy() == TabManager::AddAfterLast ? 0 : 1);
}