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


C++ DownloadManager::standardPath方法代码示例

本文整理汇总了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);
}
开发者ID:OS2World,项目名称:APP-INTERNET-Surfer,代码行数:46,代码来源:settingsdialog.cpp


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