本文整理汇总了C++中ksharedconfig::Ptr::group方法的典型用法代码示例。如果您正苦于以下问题:C++ Ptr::group方法的具体用法?C++ Ptr::group怎么用?C++ Ptr::group使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ksharedconfig::Ptr
的用法示例。
在下文中一共展示了Ptr::group方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: readSettings
void SetupMetadata::readSettings()
{
KSharedConfig::Ptr config = KGlobal::config();
KConfigGroup group = config->group(d->configGroupName);
d->exifRotateBox->setChecked(group.readEntry(d->configEXIFRotateEntry, true));
d->exifSetOrientationBox->setChecked(group.readEntry(d->configEXIFSetOrientationEntry, true));
}
示例2: useFileMetadata
bool SetupCamera::useFileMetadata()
{
KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup group = config->group(d->configGroupName);
return (group.readEntry(d->configUseFileMetadata, false));
}
示例3: loadSettings
void K3b::InteractionDialog::slotLoadK3bDefaults()
{
KSharedConfig::Ptr c = KSharedConfig::openConfig();
c->setReadDefaults( true );
loadSettings( c->group( m_configGroup ) );
c->setReadDefaults( false );
}
示例4: readSettings
void InsertTextTool::readSettings()
{
KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup group = config->group(d->configGroupName);
QColor black(0, 0, 0);
QFont defaultFont;
int orgW = d->previewWidget->imageIface()->originalSize().width();
int orgH = d->previewWidget->imageIface()->originalSize().height();
if ( orgW > orgH )
{
d->defaultSizeFont = (int)(orgH / 8.0);
}
else
{
d->defaultSizeFont = (int)(orgW / 8.0);
}
defaultFont.setPointSize(d->defaultSizeFont);
d->textRotation->setCurrentIndex(group.readEntry(d->configTextRotationEntry, 0));
d->fontColorButton->setColor(group.readEntry(d->configFontColorEntry, black));
d->textOpacity->setValue(group.readEntry(d->configTextOpacity, 100));
d->textEdit->setText(group.readEntry(d->configTextStringEntry, i18n("Enter your text here.")));
d->textFont = group.readEntry(d->configFontPropertiesEntry, defaultFont);
d->fontChooserWidget->setFont(d->textFont);
d->alignTextMode = group.readEntry(d->configTextAlignmentEntry, (int) InsertTextWidget::ALIGN_LEFT);
d->borderText->setChecked(group.readEntry(d->configBorderTextEntry, false));
d->transparentText->setChecked(group.readEntry(d->configTransparentTextEntry, false));
d->previewWidget->setPositionHint(group.readEntry(d->configPositionHintEntry, QRect()));
d->alignButtonGroup->button(d->alignTextMode)->setChecked(true);
slotAlignModeChanged(d->alignTextMode);
}
示例5: writeSettings
void MaintenanceDlg::writeSettings()
{
KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup group = config->group(d->configGroupName);
d->expanderBox->writeSettings(group);
d->albumSelectors->saveState();
MaintenanceSettings prm = settings();
group.writeEntry(d->configUseMutiCoreCPU, prm.useMutiCoreCPU);
group.writeEntry(d->configNewItems, prm.newItems);
group.writeEntry(d->configThumbnails, prm.thumbnails);
group.writeEntry(d->configScanThumbs, prm.scanThumbs);
group.writeEntry(d->configFingerPrints, prm.fingerPrints);
group.writeEntry(d->configScanFingerPrints, prm.scanFingerPrints);
group.writeEntry(d->configDuplicates, prm.duplicates);
group.writeEntry(d->configSimilarity, prm.similarity);
group.writeEntry(d->configFaceManagement, prm.faceManagement);
group.writeEntry(d->configFaceScannedHandling, (int)prm.faceSettings.alreadyScannedHandling);
group.writeEntry(d->configImageQualitySorter, prm.qualitySort);
group.writeEntry(d->configQualityScanMode, prm.qualityScanMode);
group.writeEntry(d->configMetadataSync, prm.metadataSync);
group.writeEntry(d->configSyncDirection, prm.syncDirection);
DXmlGuiWindow::saveWindowSize(windowHandle(), group);
}
示例6: readSettings
void FilmGrainTool::readSettings()
{
KSharedConfig::Ptr config = KGlobal::config();
KConfigGroup group = config->group(d->configGroupName);
d->settingsView->readSettings(group);
}
示例7: indexingFinished
void CheckIndexingManager::indexingFinished(qint64 index, bool reindexCollection)
{
if (index != -1) {
if (!mCollectionsIndexed.contains(index)) {
mCollectionsIndexed.append(index);
}
}
if (reindexCollection) {
if (!mCollectionsNeedToBeReIndexed.contains(index)) {
mCollectionsNeedToBeReIndexed.append(index);
}
if (mCollectionsNeedToBeReIndexed.count() > 30) {
callToReindexCollection();
mCollectionsNeedToBeReIndexed.clear();
}
}
mIndex++;
if (mIndex < mListCollection.count()) {
mTimer->start();
} else {
mIsReady = true;
mIndex = 0;
callToReindexCollection();
mListCollection.clear();
mCollectionsNeedToBeReIndexed.clear();
const KSharedConfig::Ptr cfg = KSharedConfig::openConfig(QStringLiteral("kmailsearchindexingrc"));
KConfigGroup grp = cfg->group(QStringLiteral("General"));
grp.writeEntry(QStringLiteral("lastCheck"), QDateTime::currentDateTime());
grp.deleteEntry(QStringLiteral("collectionsIndexed"));
grp.sync();
}
}
示例8: testCancelLoadAllEffects
void TestScriptedEffectLoader::testCancelLoadAllEffects()
{
// this test verifies that no test gets loaded when the loader gets cleared
MockEffectsHandler mockHandler(KWin::XRenderCompositing);
KWin::ScriptedEffectLoader loader;
// prepare the configuration to hard enable/disable the effects we want to load
KSharedConfig::Ptr config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
const QString kwin4 = QStringLiteral("kwin4_effect_");
KConfigGroup plugins = config->group("Plugins");
plugins.writeEntry(kwin4 + QStringLiteral("scaleinEnabled"), true);
plugins.sync();
loader.setConfig(config);
qRegisterMetaType<KWin::Effect*>();
QSignalSpy spy(&loader, &KWin::ScriptedEffectLoader::effectLoaded);
QVERIFY(spy.isValid());
loader.queryAndLoadAll();
loader.clear();
// Should not load any effect
QVERIFY(!spy.wait(100));
QVERIFY(spy.isEmpty());
}
示例9: callToReindexCollection
CheckIndexingManager::~CheckIndexingManager()
{
callToReindexCollection();
const KSharedConfig::Ptr cfg = KSharedConfig::openConfig(QStringLiteral("kmailsearchindexingrc"));
KConfigGroup grp = cfg->group(QStringLiteral("General"));
grp.writeEntry(QStringLiteral("collectionsIndexed"), mCollectionsIndexed);
}
示例10: readSettings
void MaintenanceDlg::readSettings()
{
KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup group = config->group(d->configGroupName);
d->expanderBox->readSettings(group);
d->albumSelectors->loadState();
MaintenanceSettings prm;
d->useMutiCoreCPU->setChecked(group.readEntry(d->configUseMutiCoreCPU, prm.useMutiCoreCPU));
d->expanderBox->setChecked(Private::NewItems, group.readEntry(d->configNewItems, prm.newItems));
d->expanderBox->setChecked(Private::Thumbnails, group.readEntry(d->configThumbnails, prm.thumbnails));
d->scanThumbs->setChecked(group.readEntry(d->configScanThumbs, prm.scanThumbs));
d->expanderBox->setChecked(Private::FingerPrints, group.readEntry(d->configFingerPrints, prm.fingerPrints));
d->scanFingerPrints->setChecked(group.readEntry(d->configScanFingerPrints, prm.scanFingerPrints));
d->expanderBox->setChecked(Private::Duplicates, group.readEntry(d->configDuplicates, prm.duplicates));
d->similarity->setValue(group.readEntry(d->configSimilarity, prm.similarity));
d->expanderBox->setChecked(Private::FaceManagement, group.readEntry(d->configFaceManagement, prm.faceManagement));
d->faceScannedHandling->setCurrentIndex(group.readEntry(d->configFaceScannedHandling, (int)prm.faceSettings.alreadyScannedHandling));
d->expanderBox->setChecked(Private::ImageQualitySorter, group.readEntry(d->configImageQualitySorter, prm.qualitySort));
d->qualityScanMode->setCurrentIndex(group.readEntry(d->configQualityScanMode, prm.qualityScanMode));
d->expanderBox->setChecked(Private::MetadataSync, group.readEntry(d->configMetadataSync, prm.metadataSync));
d->syncDirection->setCurrentIndex(group.readEntry(d->configSyncDirection, prm.syncDirection));
for (int i = Private::NewItems ; i < Private::Stretch ; ++i)
{
slotItemToggled(i, d->expanderBox->isChecked(i));
}
winId();
DXmlGuiWindow::restoreWindowSize(windowHandle(), group);
resize(windowHandle()->size());
}
示例11: initTestCase
void QuickTilingTest::initTestCase()
{
qRegisterMetaType<KWin::ShellClient*>();
qRegisterMetaType<KWin::AbstractClient*>();
qRegisterMetaType<KWin::MaximizeMode>("MaximizeMode");
QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated);
QVERIFY(workspaceCreatedSpy.isValid());
kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024));
QMetaObject::invokeMethod(kwinApp()->platform(), "setOutputCount", Qt::DirectConnection, Q_ARG(int, 2));
QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit()));
// set custom config which disables the Outline
KSharedConfig::Ptr config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig);
KConfigGroup group = config->group("Outline");
group.writeEntry(QStringLiteral("QmlPath"), QString("/does/not/exist.qml"));
group.sync();
kwinApp()->setConfig(config);
kwinApp()->start();
QVERIFY(workspaceCreatedSpy.wait());
QCOMPARE(screens()->count(), 2);
QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024));
QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024));
}
示例12: showWelcomeDlg
/**
* Determines if the welcome dialogue should be displayed.
* Note that while the dialogue is displayed on the first invocation of KScope,
* it may be required on other occasions (e.g., to display important information
* on a per-version basis) and thus it is separated from isFirstTime().
* @return true if the dialogue should be shown, false otherwise
*/
bool KScopeConfig::showWelcomeDlg()
{
KSharedConfig::Ptr pConf = KGlobal::config();
KConfigGroup groupGeneral = pConf->group("General");
return groupGeneral.readEntry(SHOW_WELCOME_ENTRY, true);
}
示例13: readSettings
void RawSettingsBox::readSettings()
{
KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup group = config->group(d->optionGroupName);
histogramBox()->setChannel((ChannelType)group.readEntry(d->optionHistogramChannelEntry,
(int) LuminosityChannel));
histogramBox()->setScale((HistogramScale)group.readEntry(d->optionHistogramScaleEntry,
(int) LogScaleHistogram));
curvesWidget()->setScaleType((HistogramScale)group.readEntry(d->optionHistogramScaleEntry,
(int) LogScaleHistogram));
d->decodingSettingsBox->readSettings(group);
d->brightnessInput->setValue(group.readEntry(d->optionBrightnessEntry, 0));
d->contrastInput->setValue(group.readEntry(d->optionContrastEntry, 0));
d->gammaInput->setValue(group.readEntry(d->optionGammaEntry, 1.0));
d->saturationInput->setValue(group.readEntry(d->optionSaturationEntry, 1.0));
d->mainExposureInput->setValue(group.readEntry(d->optionMainExposureEntry, 0.0));
d->curveWidget->restoreCurve(group, d->optionCurvePrefix);
d->tabView->setCurrentIndex(group.readEntry(d->optionSettingsPageEntry, 0));
d->postProcessSettingsBox->readSettings(group);
}
示例14: isFirstTime
/**
* Determines if this is the first time KScope was launched by the current
* user.
* @return true if this is the first time, false otherwise
*/
bool KScopeConfig::isFirstTime()
{
KSharedConfig::Ptr pConf = KGlobal::config();
KConfigGroup groupGeneral = pConf->group("General");
return groupGeneral.readEntry("FirstTime", true);
}
示例15: writeSettings
void BlurTool::writeSettings()
{
KSharedConfig::Ptr config = KGlobal::config();
KConfigGroup group = config->group(d->configGroupName);
group.writeEntry(d->configRadiusAdjustmentEntry, d->radiusInput->value());
config->sync();
}