本文整理汇总了C++中ksharedconfig::Ptr类的典型用法代码示例。如果您正苦于以下问题:C++ Ptr类的具体用法?C++ Ptr怎么用?C++ Ptr使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Ptr类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: loadConfig
void RecentFolders::loadConfig()
{
KSharedConfig::Ptr config = KSharedConfig::openConfig(QStringLiteral("kio_recentfolders"));
KConfigGroup group = config->group(QStringLiteral("General"));
if (group.hasKey(CONFIG_BACK_DAYS)) {
backDays = group.readEntry<uint>(CONFIG_BACK_DAYS, backDays);
} else {
group.writeEntry(CONFIG_BACK_DAYS, backDays);
}
}
开发者ID:ZaWertun,项目名称:kio_recentfolders,代码行数:11,代码来源:kio_recentfolders.cpp
示例2: applySettings
void SetupMisc::applySettings()
{
KSharedConfig::Ptr config = KGlobal::config();
KConfigGroup group = config->group(d->configGroupName);
group.writeEntry(d->configDeleteItem2TrashEntry, d->useTrash->isChecked());
group.writeEntry(d->configShowSplashEntry, d->showSplash->isChecked());
group.writeEntry(d->configSidebarTitleStyleEntry, d->sidebarType->currentIndex());
group.writeEntry(d->configSortOrderEntry, d->sortOrderComboBox->currentIndex());
group.writeEntry(d->configReverseSortEntry, d->sortReverse->isChecked());
config->sync();
}
开发者ID:UIKit0,项目名称:digikam,代码行数:11,代码来源:setupmisc.cpp
示例3: readSettings
void QueueMgrWindow::readSettings()
{
KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup group = config->group(configGroupName());
d->verticalSplitter->restoreState(group, d->VERTICAL_SPLITTER_CONFIG_KEY);
d->bottomSplitter->restoreState(group, d->BOTTOM_SPLITTER_CONFIG_KEY);
d->topSplitter->restoreState(group, d->TOP_SPLITTER_CONFIG_KEY);
readFullScreenSettings(group);
}
开发者ID:swatilodha,项目名称:digikam,代码行数:11,代码来源:queuemgrwindow.cpp
示例4: writeSettings
void BCGTool::writeSettings()
{
KSharedConfig::Ptr config = KGlobal::config();
KConfigGroup group = config->group(d->configGroupName);
group.writeEntry(d->configHistogramChannelEntry, (int)d->gboxSettings->histogramBox()->channel());
group.writeEntry(d->configHistogramScaleEntry, (int)d->gboxSettings->histogramBox()->scale());
d->settingsView->writeSettings(group);
config->sync();
}
开发者ID:rickysarraf,项目名称:digikam,代码行数:11,代码来源:bcgtool.cpp
示例5: writeSettings
void QueueMgrWindow::writeSettings()
{
KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup group = config->group(configGroupName());
d->topSplitter->saveState(group, d->TOP_SPLITTER_CONFIG_KEY);
d->bottomSplitter->saveState(group, d->BOTTOM_SPLITTER_CONFIG_KEY);
d->verticalSplitter->saveState(group, d->VERTICAL_SPLITTER_CONFIG_KEY);
config->sync();
}
开发者ID:swatilodha,项目名称:digikam,代码行数:11,代码来源:queuemgrwindow.cpp
示例6: load
void ArchiveMailWidget::load()
{
KSharedConfig::Ptr config = KGlobal::config();
const QStringList collectionList = config->groupList().filter( QRegExp( archiveMailCollectionPattern ) );
const int numberOfCollection = collectionList.count();
for(int i = 0 ; i < numberOfCollection; ++i) {
KConfigGroup group = config->group(collectionList.at(i));
ArchiveMailInfo *info = new ArchiveMailInfo(group);
createOrUpdateItem(info);
}
}
开发者ID:chusopr,项目名称:kdepim-ktimetracker-akonadi,代码行数:11,代码来源:archivemaildialog.cpp
示例7: readSettings
void ShearTool::readSettings()
{
KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup group = config->group(d->configGroupName);
// d->mainHAngleInput->setValue(group.readEntry(d->configMainHAngleEntry, d->mainHAngleInput->defaultValue()));
// d->mainVAngleInput->setValue(group.readEntry(d->configMainVAngleEntry, d->mainVAngleInput->defaultValue()));
// d->fineHAngleInput->setValue(group.readEntry(d->configFineHAngleEntry, d->fineHAngleInput->defaultValue()));
// d->fineVAngleInput->setValue(group.readEntry(d->configFineVAngleEntry, d->fineVAngleInput->defaultValue()));
d->antialiasInput->setChecked(group.readEntry(d->configAntiAliasingEntry, true));
slotPreview();
}
开发者ID:Match-Yang,项目名称:digikam,代码行数:11,代码来源:sheartool.cpp
示例8: readSettings
void CharcoalTool::readSettings()
{
KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup group = config->group(d->configGroupName);
d->pencilInput->blockSignals(true);
d->smoothInput->blockSignals(true);
d->pencilInput->setValue(group.readEntry(d->configPencilAdjustmentEntry, d->pencilInput->defaultValue()));
d->smoothInput->setValue(group.readEntry(d->configSmoothAdjustmentEntry, d->smoothInput->defaultValue()));
d->pencilInput->blockSignals(false);
d->smoothInput->blockSignals(false);
}
开发者ID:Match-Yang,项目名称:digikam,代码行数:11,代码来源:charcoaltool.cpp
示例9: readSettings
void LensAutoFixTool::readSettings()
{
d->gboxSettings->blockSignals(true);
KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup group = config->group(d->configGroupName);
d->showGrid->setChecked(group.readEntry(d->configShowGrid, false));
d->cameraSelector->readSettings(group);
d->settingsView->readSettings(group);
d->gboxSettings->blockSignals(false);
slotTimer();
}
开发者ID:KDE,项目名称:digikam,代码行数:12,代码来源:lensautofixtool.cpp
示例10: readSettings
void WhiteBalanceTool::readSettings()
{
KSharedConfig::Ptr config = KGlobal::config();
KConfigGroup group = config->group(d->configGroupName);
d->gboxSettings->histogramBox()->setChannel((ChannelType)group.readEntry(d->configHistogramChannelEntry,
(int)LuminosityChannel));
d->gboxSettings->histogramBox()->setScale((HistogramScale)group.readEntry(d->configHistogramScaleEntry,
(int)LogScaleHistogram));
d->settingsView->readSettings(group);
}
开发者ID:rickysarraf,项目名称:digikam,代码行数:12,代码来源:whitebalancetool.cpp
示例11: writeSettings
void LensDistortionTool::writeSettings()
{
KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup group = config->group(d->configGroupName);
group.writeEntry(d->config2ndOrderDistortionEntry, d->mainInput->value());
group.writeEntry(d->config4thOrderDistortionEntry, d->edgeInput->value());
group.writeEntry(d->configZoomFactorEntry, d->rescaleInput->value());
group.writeEntry(d->configBrightenEntry, d->brightenInput->value());
config->sync();
}
开发者ID:Match-Yang,项目名称:digikam,代码行数:12,代码来源:lensdistortiontool.cpp
示例12: triggerRescale
void cardMap::triggerRescale()
{
// TODO save settings to some config file on s60?
#ifndef Q_OS_SYMBIAN
KSharedConfig::Ptr config = KGlobal::config();
KConfigGroup cs(config, settings_group );
cs.writeEntry( "CardWidth", d->_wantedCardWidth );
config->sync();
#endif
if ( PatienceView::instance() && PatienceView::instance()->dscene() )
PatienceView::instance()->dscene()->rescale(false);
}
开发者ID:nielsslot,项目名称:kdegamess60,代码行数:12,代码来源:cardmaps.cpp
示例13: writeSettings
void ShearTool::writeSettings()
{
KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup group = config->group(d->configGroupName);
// group.writeEntry(d->configMainHAngleEntry, d->mainHAngleInput->value());
// group.writeEntry(d->configMainVAngleEntry, d->mainVAngleInput->value());
// group.writeEntry(d->configFineHAngleEntry, d->fineHAngleInput->value());
// group.writeEntry(d->configFineVAngleEntry, d->fineVAngleInput->value());
group.writeEntry(d->configAntiAliasingEntry, d->antialiasInput->isChecked());
config->sync();
}
开发者ID:Match-Yang,项目名称:digikam,代码行数:12,代码来源:sheartool.cpp
示例14: cs
void Repository::Private::readConfig()
{
KSharedConfig::Ptr config = KGlobal::config();
// Sometimes the location can be unequal to the entry in the CVS/Root.
//
// This can happen when the checkout was done with a repository name
// like :pserver:[email protected]:/home/kde. When cvs then saves the
// name into the .cvspass file, it adds the default cvs port to it like
// this :pserver:[email protected]:2401/home/kde. This name is then also
// used for the configuration group.
//
// In order to be able to read this group, we then have to manually add
// the port number to it.
QString repositoryGroup = QLatin1String("Repository-") + location;
if( !config->hasGroup(repositoryGroup) )
{
// find the position of the first path separator
const int insertPos = repositoryGroup.indexOf('/');
if( insertPos > 0 )
{
// add port to location
// (1) :pserver:[email protected]:/path
if( repositoryGroup.at(insertPos - 1) == ':' )
repositoryGroup.insert(insertPos, "2401");
// (2) :pserver:[email protected]/path
else
repositoryGroup.insert(insertPos, ":2401");
}
}
KConfigGroup group = config->group(repositoryGroup);
// should we retrieve the CVSROOT/cvsignore file from the cvs server?
retrieveCvsignoreFile = group.readEntry("RetrieveCvsignore", false);
// see if there is a specific compression level set for this repository
compressionLevel = group.readEntry("Compression", -1);
// use default global compression level instead?
if( compressionLevel < 0 )
{
KConfigGroup cs(config, "General");
compressionLevel = cs.readEntry("Compression", 0);
}
// get remote shell client to access the remote repository
rsh = group.readPathEntry("rsh", QString());
// get program to start on the server side
server = group.readEntry("cvs_server");
}
开发者ID:sdoerner,项目名称:cervisia-conversion,代码行数:52,代码来源:repository.cpp
示例15: size
StorageServiceManagerMainWindow::~StorageServiceManagerMainWindow()
{
delete mStorageServiceMainWidget;
KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup group = config->group(QStringLiteral("StorageServiceManagerMainWindow"));
group.writeEntry("Size", size());
qCDebug(STORAGESERVICEMANAGER_LOG) << " StorageServiceManagerMainWindow::~StorageServiceManagerMainWindow()";
if (StorageServiceManagerGlobalConfig::self()->closeWallet()) {
PimCommon::StorageServiceSettings::self()->closeWallet();
}
delete mNetworkConfigurationManager;
}
开发者ID:KDE,项目名称:kdepim,代码行数:13,代码来源:storageservicemanagermainwindow.cpp
示例16: save
bool FollowUpReminderInfoWidget::save()
{
if (!mChanged) {
return false;
}
KSharedConfig::Ptr config = KSharedConfig::openConfig();
// first, delete all filter groups:
const QStringList filterGroups = config->groupList().filter(QRegularExpression(followUpItemPattern()));
foreach (const QString &group, filterGroups) {
config->deleteGroup(group);
}
开发者ID:KDE,项目名称:kdepim,代码行数:13,代码来源:followupreminderinfowidget.cpp
示例17: save
void ArchiveMailWidget::save()
{
if (!mChanged)
return;
KSharedConfig::Ptr config = KGlobal::config();
// first, delete all filter groups:
const QStringList filterGroups =config->groupList().filter( QRegExp( archiveMailCollectionPattern ) );
foreach ( const QString &group, filterGroups ) {
config->deleteGroup( group );
}
开发者ID:chusopr,项目名称:kdepim-ktimetracker-akonadi,代码行数:13,代码来源:archivemaildialog.cpp
示例18: readSettings
void RainDropTool::readSettings()
{
KSharedConfig::Ptr config = KGlobal::config();
KConfigGroup group = config->group(d->configGroupName);
blockWidgetSignals(true);
d->dropInput->setValue(group.readEntry(d->configDropAdjustmentEntry, d->dropInput->defaultValue()));
d->amountInput->setValue(group.readEntry(d->configAmountAdjustmentEntry, d->amountInput->defaultValue()));
d->coeffInput->setValue(group.readEntry(d->configCoeffAdjustmentEntry, d->coeffInput->defaultValue()));
blockWidgetSignals(false);
}
开发者ID:UIKit0,项目名称:digikam,代码行数:13,代码来源:raindroptool.cpp
示例19: KAuthorizedPrivate
KAuthorizedPrivate()
: actionRestrictions( false ), blockEverything(false),mutex(QMutex::Recursive)
{
Q_ASSERT_X(QCoreApplication::instance(),"KAuthorizedPrivate()","There has to be an existing QCoreApplication::instance() pointer");
KSharedConfig::Ptr config = KGlobal::config();
Q_ASSERT_X(config,"KAuthorizedPrivate()","There has to be an existing KGlobal::config() pointer");
if (!config) {
blockEverything=true;
return;
}
actionRestrictions = config->hasGroup("KDE Action Restrictions" ) && !kde_kiosk_exception;
}
开发者ID:vasi,项目名称:kdelibs,代码行数:14,代码来源:kauthorized.cpp
示例20: applySettings
void QueueMgrWindow::applySettings()
{
// Do not apply general settings from config panel if BQM is busy.
if (d->busy)
{
return;
}
d->queuePool->applySettings();
KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup group = config->group(configGroupName());
readFullScreenSettings(group);
}
开发者ID:swatilodha,项目名称:digikam,代码行数:14,代码来源:queuemgrwindow.cpp
注:本文中的ksharedconfig::Ptr类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论