本文整理汇总了C++中ksharedconfig::Ptr类的典型用法代码示例。如果您正苦于以下问题:C++ Ptr类的具体用法?C++ Ptr怎么用?C++ Ptr使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Ptr类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}
示例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();
}
示例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);
}
示例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();
}
示例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();
}
示例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);
}
}
示例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();
}
示例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);
}
示例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();
}
示例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);
}
示例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();
}
示例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);
}
示例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();
}
示例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");
}
示例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;
}