本文整理汇总了C++中GeneralSettings::setSplitView方法的典型用法代码示例。如果您正苦于以下问题:C++ GeneralSettings::setSplitView方法的具体用法?C++ GeneralSettings::setSplitView怎么用?C++ GeneralSettings::setSplitView使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GeneralSettings
的用法示例。
在下文中一共展示了GeneralSettings::setSplitView方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: applySettings
void StartupSettingsPage::applySettings()
{
GeneralSettings* settings = GeneralSettings::self();
const KUrl url(m_homeUrl->text());
KFileItem fileItem(KFileItem::Unknown, KFileItem::Unknown, url);
if ((url.isValid() && fileItem.isDir()) || (url.protocol() == QLatin1String("timeline"))) {
settings->setHomeUrl(url.prettyUrl());
} else {
KMessageBox::error(this, i18nc("@info", "The location for the home folder is invalid or does not exist, it will not be applied."));
}
settings->setSplitView(m_splitView->isChecked());
settings->setEditableUrl(m_editableUrl->isChecked());
settings->setShowFullPath(m_showFullPath->isChecked());
settings->setFilterBar(m_filterBar->isChecked());
settings->writeConfig();
}
示例2: applySettings
void StartupSettingsPage::applySettings()
{
GeneralSettings* settings = GeneralSettings::self();
const QUrl url(QUrl::fromUserInput(m_homeUrl->text(), QString(), QUrl::AssumeLocalFile));
KFileItem fileItem(url);
if ((url.isValid() && fileItem.isDir()) || (url.scheme() == QLatin1String("timeline"))) {
settings->setHomeUrl(url.toDisplayString(QUrl::PreferLocalFile));
} else {
KMessageBox::error(this, i18nc("@info", "The location for the home folder is invalid or does not exist, it will not be applied."));
}
settings->setSplitView(m_splitView->isChecked());
settings->setEditableUrl(m_editableUrl->isChecked());
settings->setShowFullPath(m_showFullPath->isChecked());
settings->setFilterBar(m_filterBar->isChecked());
settings->save();
}