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


C++ KConfigGroup::writePathEntry方法代码示例

本文整理汇总了C++中KConfigGroup::writePathEntry方法的典型用法代码示例。如果您正苦于以下问题:C++ KConfigGroup::writePathEntry方法的具体用法?C++ KConfigGroup::writePathEntry怎么用?C++ KConfigGroup::writePathEntry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在KConfigGroup的用法示例。


在下文中一共展示了KConfigGroup::writePathEntry方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: writeToConfig

void ICCSettingsContainer::writeToConfig(KConfigGroup& group) const
{
    group.writeEntry("EnableCM", enableCM);

    if (!enableCM)
    {
        return;    // No need to write settings in this case.
    }

    group.writeEntry("DefaultMismatchBehavior",       (int)defaultMismatchBehavior);
    group.writeEntry("DefaultMissingProfileBehavior", (int)defaultMissingProfileBehavior);
    group.writeEntry("DefaultUncalibratedBehavior",   (int)defaultUncalibratedBehavior);

    group.writeEntry("LastMismatchBehavior",          (int)lastMismatchBehavior);
    group.writeEntry("LastMissingProfileBehavior",    (int)lastMissingProfileBehavior);
    group.writeEntry("LastUncalibratedBehavior",      (int)lastUncalibratedBehavior);
    group.writeEntry("LastSpecifiedAssignProfile",    lastSpecifiedAssignProfile);
    group.writeEntry("LastSpecifiedInputProfile",     lastSpecifiedInputProfile);

    group.writeEntry("BPCAlgorithm",                  useBPC);
    group.writeEntry("ManagedView",                   useManagedView);
    group.writeEntry("ManagedPreviews",               useManagedPreviews);
    group.writeEntry("RenderingIntent",               renderingIntent);

    group.writePathEntry("WorkProfileFile",           workspaceProfile);
    group.writePathEntry("MonitorProfileFile",        monitorProfile);
    group.writePathEntry("InProfileFile",             defaultInputProfile);
    group.writePathEntry("ProofProfileFile",          defaultProofProfile);

    group.writeEntry("ProofingRenderingIntent",       proofingRenderingIntent);
    group.writeEntry("DoGamutCheck",                  doGamutCheck);
    group.writeEntry("GamutCheckMaskColor",           gamutCheckMaskColor);

    group.writeEntry("DefaultPath", iccFolder);
}
开发者ID:UIKit0,项目名称:digikam,代码行数:35,代码来源:iccsettingscontainer.cpp

示例2: saveEntries

    void saveEntries( const KConfigGroup &grp)
    {
        KConfigGroup cg = grp;

        if (cg.name().isEmpty()) {
            cg = KConfigGroup(cg.config(),"RecentFiles");
        }
        cg.deleteGroup();

        // write file list
        for (int i = 1; i <= recentFilesIndex.size(); ++i) {
            // i - 1 because we started from 1
            cg.writePathEntry(QString("File%1").arg(i), recentFiles[i - 1]);
            cg.writePathEntry(QString("Name%1").arg(i), recentFilesIndex[i - 1]);
        }
    }
开发者ID:TheTypoMaster,项目名称:calligra,代码行数:16,代码来源:RecentFileManager.cpp

示例3: engineMediaChanged

void MainWindow::engineMediaChanged(Phonon::MediaSource /*newSource*/)
{
    m_audioView->update();

    // update recently played list
    qDebug() << " update recent files list ";

    emit fileChanged( engine()->urlOrDisc() );
    //TODO fetch this from the Media source
    QUrl const &url = TheStream::url();
    const QString url_string = url.url();

#ifndef NO_SKIP_PR0N
    // ;-)
    if( !(url_string.contains( QLatin1String( "porn" ), Qt::CaseInsensitive )
          || url_string.contains( QLatin1String( "pr0n" ), Qt::CaseInsensitive )) ) {
#endif
        if( url.scheme() != QLatin1String( "dvd" ) && url.scheme() != QLatin1String( "vcd" ) && !url.toDisplayString().isEmpty()) {
            KConfigGroup config = KConfigGroup( KSharedConfig::openConfig(), "General" );
            const QString prettyUrl = url.toDisplayString();
            QStringList urls = config.readPathEntry( "Recent Urls", QStringList() );
            urls.removeAll( prettyUrl );
            config.writePathEntry( "Recent Urls", urls << prettyUrl );
            emit m_loadView->reloadRecentlyList();
        }
#ifndef NO_SKIP_PR0N
    }
#endif

}//engineMediaChanged
开发者ID:KDE,项目名称:dragon,代码行数:30,代码来源:stateChange.cpp

示例4: writeConfig

void ResourceNet::writeConfig( KConfigGroup &group )
{
    Resource::writeConfig( group );

    group.writePathEntry( "NetUrl", mUrl.url() );
    group.writeEntry( "NetFormat", mFormatName );
}
开发者ID:pvuorela,项目名称:kcalcore,代码行数:7,代码来源:resourcenet.cpp

示例5: setSaveLocation

void ExportManager::setSaveLocation(const QString &savePath)
{
    KSharedConfigPtr config = KSharedConfig::openConfig(QStringLiteral("spectaclerc"));
    KConfigGroup generalConfig = KConfigGroup(config, "General");

    generalConfig.writePathEntry("last-saved-to", savePath);
}
开发者ID:KDE,项目名称:spectacle,代码行数:7,代码来源:ExportManager.cpp

示例6: setKHTMLDirectory

void TestRegressionWindow::setKHTMLDirectory()
{
	m_khtmlUrl = KFileDialog::getExistingDirectory();

	if(!m_khtmlUrl.isEmpty())
	{
		const char *subdirs[] = { "css", "dom", "xml", "html" }; // That's enough ;-)
		for(int i = 0; i <= 3; i++)
		{
			QFileInfo sourceDir(m_khtmlUrl.path() + "/" + subdirs[i]);	//krazy:exclude=duoblequote_chars DOM demands chars
			if(!sourceDir.exists() || !sourceDir.isDir())
			{
				KMessageBox::error(0, i18n("Please choose a valid 'khtml/' build directory."));

				m_khtmlUrl = KUrl();
				break;
			}
		}

		// Remember directory...
		KConfig config("testregressiongui", KConfig::SimpleConfig);
		KConfigGroup grp = config.group("<default>");
		grp.writePathEntry("KHTMLDirectory", m_khtmlUrl.path());

		if(!m_testsUrl.isEmpty() && !m_khtmlUrl.isEmpty())
			m_ui.actionRun_tests->setEnabled(true);
	}
}
开发者ID:vasi,项目名称:kdelibs,代码行数:28,代码来源:test_regression_gui_window.cpp

示例7: save

void KTimerJob::save( KConfig *cfg, const QString& grp )
{
	KConfigGroup groupcfg = cfg->group(grp);
    groupcfg.writeEntry( "Delay", d->delay );
    groupcfg.writePathEntry( "Command", d->command );
    groupcfg.writeEntry( "Loop", d->loop );
    groupcfg.writeEntry( "OneInstance", d->oneInstance );
    groupcfg.writeEntry( "State", (int)d->state );
}
开发者ID:KDE,项目名称:ktimer,代码行数:9,代码来源:ktimer.cpp

示例8: saveProperties

void KompareShell::saveProperties(KConfigGroup &config)
{
	// The 'config' object points to the session managed
	// config file.  Anything you write here will be available
	// later when this app is restored
	if ( m_mode == Kompare::ComparingFiles )
	{
		config.writeEntry( "Mode", "ComparingFiles" );
		config.writePathEntry( "SourceUrl", m_sourceURL.url() );
		config.writePathEntry( "DestinationUrl", m_destinationURL.url() );
	}
	else if ( m_mode == Kompare::ShowingDiff )
	{
		config.writeEntry( "Mode", "ShowingDiff" );
		config.writePathEntry( "DiffUrl", m_diffURL.url() );
	}

	viewPart()->saveProperties( config.config() );
}
开发者ID:ChunHungLiu,项目名称:kompare,代码行数:19,代码来源:kompare_shell.cpp

示例9: saveProperties

void Workspace::saveProperties( KConfigGroup& cfg )
{
  QStringList list;
  for(int i =0; i< mSheetList.size(); i++)
    if ( !mSheetList.at(i)->fileName().isEmpty() )
      list.append( mSheetList.at(i)->fileName() );

  cfg.writePathEntry( "SelectedSheets", list );
  cfg.writeEntry( "currentSheet", currentIndex() );
}
开发者ID:fluxer,项目名称:kde-workspace,代码行数:10,代码来源:Workspace.cpp

示例10: saveProperties

void CervisiaShell::saveProperties(KConfigGroup & config)
{
    // Save current working directory (if part was created)
    if( m_part )
    {
        config.writePathEntry("Current Directory", m_part->url().path());

        // write to disk
        config.sync();
    }
}
开发者ID:sdoerner,项目名称:cervisia-conversion,代码行数:11,代码来源:cervisiashell.cpp

示例11: apply

void BasicTab::apply()
{
    if (_menuEntryInfo)
    {
        _menuEntryInfo->setDirty();
        _menuEntryInfo->setCaption(_nameEdit->text());
        _menuEntryInfo->setDescription(_descriptionEdit->text());
        _menuEntryInfo->setIcon(_iconButton->icon());

        KDesktopFile *df = _menuEntryInfo->desktopFile();
        KConfigGroup dg = df->desktopGroup();
        dg.writeEntry("Comment", _commentEdit->text());
        if (_systrayCB->isChecked())
          dg.writeEntry("Exec", _execEdit->lineEdit()->text().prepend("ksystraycmd "));
        else
          dg.writeEntry("Exec", _execEdit->lineEdit()->text());

        dg.writePathEntry("Path", _pathEdit->lineEdit()->text());

        if (_terminalCB->isChecked())
            dg.writeEntry("Terminal", 1);
        else
            dg.writeEntry("Terminal", 0);

        dg.writeEntry("TerminalOptions", _termOptEdit->text());
        dg.writeEntry("X-KDE-SubstituteUID", _uidCB->isChecked());
        dg.writeEntry("X-KDE-Username", _uidEdit->text());
        dg.writeEntry("StartupNotify", _launchCB->isChecked());
        dg.writeEntry( "NoDisplay", _hiddenEntryCB->isChecked() );

        QStringList onlyShowIn = df->desktopGroup().readXdgListEntry("OnlyShowIn");
        /* the exact semantics of this checkbox are unclear if there is more than just KDE in the list...
         * For example: - The list is "Gnome;", the user enables "Only show in KDE" - should we remove Gnome?
         *              - The list is "Gnome;KDE;", the user unchecks the box - should we keep Gnome?
         */
        if ( _onlyShowInKdeCB->isChecked() && !onlyShowIn.contains("KDE"))
            onlyShowIn << "KDE";
        else if ( !_onlyShowInKdeCB->isChecked() && onlyShowIn.contains("KDE"))
            onlyShowIn.removeAll("KDE");
        if (onlyShowIn.isEmpty())
            dg.deleteEntry("OnlyShowIn");
        else
            dg.writeXdgListEntry("OnlyShowIn", onlyShowIn);
    }
    else
    {
        _menuFolderInfo->setCaption(_nameEdit->text());
        _menuFolderInfo->setGenericName(_descriptionEdit->text());
        _menuFolderInfo->setComment(_commentEdit->text());
        _menuFolderInfo->setIcon(_iconButton->icon());
    }
}
开发者ID:fluxer,项目名称:kde-workspace,代码行数:52,代码来源:basictab.cpp

示例12: save

// only saves the cache for the given list of items to prevent the cache
// from growing forever.
void KonqPixmapProvider::save( KConfigGroup& kc, const QString& key,
                               const QStringList& items )
{
    QStringList list;
    QStringList::const_iterator itEnd = items.end();
    for (QStringList::const_iterator it = items.begin(); it != itEnd; ++it) {
        QMap<KUrl,QString>::const_iterator mit = iconMap.constFind( KUrl(*it) );
        if ( mit != iconMap.constEnd() ) {
            list.append( mit.key().url() );
            list.append( mit.value() );
        }
    }
    kc.writePathEntry( key, list );
}
开发者ID:blue-shell,项目名称:folderview,代码行数:16,代码来源:konqpixmapprovider.cpp

示例13: switch

void K3b::ImageWritingDialog::saveSettings( KConfigGroup c )
{
    d->writingModeWidget->saveConfig( c ),
        c.writeEntry( "simulate", d->checkDummy->isChecked() );
    c.writeEntry( "multisession", d->checkNoFix->isChecked() );
    c.writeEntry( "on_the_fly", !d->checkCacheImage->isChecked() );
    d->dataModeWidget->saveConfig(c);

    c.writeEntry( "verify_data", d->checkVerify->isChecked() );

    d->writerSelectionWidget->saveConfig( c );

    c.writePathEntry( "image path", d->imagePath() );

    c.writeEntry( "copies", d->spinCopies->value() );

    QString imageType;
    if( d->comboImageType->currentIndex() == 0 )
        imageType = "auto";
    else {
        switch( d->imageTypeSelectionMap[d->comboImageType->currentIndex()] ) {
        case IMAGE_ISO:
            imageType = "iso9660";
            break;
        case IMAGE_CUE_BIN:
            imageType = "cue-bin";
            break;
        case IMAGE_AUDIO_CUE:
            imageType = "audio-cue";
            break;
        case IMAGE_CDRECORD_CLONE:
            imageType = "cdrecord-clone";
            break;
        case IMAGE_CDRDAO_TOC:
            imageType = "cdrdao-toc";
            break;
        }
    }
    c.writeEntry( "image type", imageType );

    if( d->tempDirSelectionWidget->isEnabled() )
        d->tempDirSelectionWidget->saveConfig();
}
开发者ID:franhaufer,项目名称:k3b,代码行数:43,代码来源:k3bimagewritingdialog.cpp

示例14: saveLocation

QString ExportManager::saveLocation() const
{
    KSharedConfigPtr config = KSharedConfig::openConfig(QStringLiteral("spectaclerc"));
    KConfigGroup generalConfig = KConfigGroup(config, "General");

    QString savePath = generalConfig.readPathEntry(
                "default-save-location", QStandardPaths::writableLocation(QStandardPaths::PicturesLocation));
    if (savePath.isEmpty() || savePath.isNull()) {
        savePath = QDir::homePath();
    }
    savePath = QDir::cleanPath(savePath);

    QDir savePathDir(savePath);
    if (!(savePathDir.exists())) {
        savePathDir.mkpath(QStringLiteral("."));
        generalConfig.writePathEntry("last-saved-to", savePath);
    }

    return savePath;
}
开发者ID:KDE,项目名称:spectacle,代码行数:20,代码来源:ExportManager.cpp

示例15: writeSanitizeRulesTo

/**
 * This function used to write configured rules to a given \c KConfigGroup.
 * It happens on `kate` start and on sanitize rules export.
 * 
 * \param grp a group to write rules to
 *
 * \todo Use smth more human readable to export sanitize rules? XML?
 */
void PluginConfiguration::writeSanitizeRulesTo(KConfigGroup& grp)
{
    // Transform sanitize rules into a serializable list of strings
    QStringList rules;
    for (auto&& rule : sanitizeRules())
    {
        auto r = rule.first.pattern();
        if (!rule.first.isValid())                          // Ignore invalid regular expressions
        {
            kWarning() << "Ignore invalid sanitize regex: " << r;
            continue;
        }
        if (r.isEmpty())                                    // Ignore rules w/ empty find part
        {
            kWarning() << "Ignore invalid sanitize rule: " << rule.second;
            continue;
        }
        if (!rule.second.isEmpty())
            r += SANITIZE_RULE_SEPARATOR + rule.second;
        rules << r;
    }
    grp.writePathEntry(SANITIZE_RULES_ITEM, rules);
}
开发者ID:zaufi,项目名称:kate-cpp-helper-plugin,代码行数:31,代码来源:plugin_configuration.cpp


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