本文整理汇总了C++中DownloadManager::setStandardPath方法的典型用法代码示例。如果您正苦于以下问题:C++ DownloadManager::setStandardPath方法的具体用法?C++ DownloadManager::setStandardPath怎么用?C++ DownloadManager::setStandardPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DownloadManager
的用法示例。
在下文中一共展示了DownloadManager::setStandardPath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: save
void SettingsDialog::save()
{
SettingsManager * manager = SettingsManager::settingsManager();
HistoryManager * historyManager = HistoryManager::historyManager();
DownloadManager * downloadManager = DownloadManager::downloadManager();
NetworkAccessManager * networkAccessManager = NetworkAccessManager::networkAccessManager();
TabManager * tabManager = TabManager::tabManager();
manager->setImagesEnabled(m_imagesCheckBox->isChecked());
manager->setJavascriptEnabled(m_javascriptCheckBox->isChecked());
manager->setJavaEnabled(m_javaCheckBox->isChecked());
manager->setPluginsEnabled(m_pluginsCheckBox->isChecked());
manager->setSansFontFamily(m_sansFontComboBox->currentFont().family());
manager->setSerifFontFamily(m_serifFontComboBox->currentFont().family());
manager->setMonoFontFamily(m_monoFontComboBox->currentFont().family());
manager->setStandardFontSize(m_standardFontSpinBox->value());
manager->setMonoFontSize(m_monoFontSpinBox->value());
historyManager->setPrivateBrowsingEnabled(m_privateBrowsingCheckBox->isChecked());
int index = m_historyExpirationComboBox->currentIndex();
int days = m_historyExpirationComboBox->itemData(index).toInt();
historyManager->setExpirationDays(days);
QString path;
if(m_downloadCheckBox->isChecked())
{
path = m_downloadLineEdit->text();
}
else
{
path = "";
}
downloadManager->setStandardPath(path);
networkAccessManager->setCacheSize(m_cacheSizeSpinBox->value() * 1024 * 1024);
QUrl url;
if(!m_proxyLineEdit->text().isEmpty())
{
url.setHost(m_proxyLineEdit->text());
url.setPort(m_proxySpinBox->value());
}
networkAccessManager->setProxy(url);
tabManager->setAddTabPolicy(TabManager::AddTabPolicy(m_addTabPolicyComboBox->currentIndex()));
}