本文整理汇总了C++中TDEConfig::writeEntry方法的典型用法代码示例。如果您正苦于以下问题:C++ TDEConfig::writeEntry方法的具体用法?C++ TDEConfig::writeEntry怎么用?C++ TDEConfig::writeEntry使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TDEConfig
的用法示例。
在下文中一共展示了TDEConfig::writeEntry方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: saveSettings
void KMMainView::saveSettings()
{
TDEConfig *conf = KMFactory::self()->printConfig();
conf->setGroup("General");
conf->writeEntry("ViewType",(int)m_printerview->viewType());
conf->writeEntry("Orientation",(int)orientation());
conf->writeEntry("ViewToolBar",((TDEToggleAction*)m_actions->action("view_toolbar"))->isChecked());
conf->writeEntry("ViewMenuBar",static_cast<TDEToggleAction*>( m_actions->action("view_menubar") )->isChecked());
conf->writeEntry("ViewPrinterInfos",((TDEToggleAction*)m_actions->action("view_printerinfos"))->isChecked());
conf->sync();
}
示例2: savePrefs
/** Save the application mPrefs. */
void kweather::savePrefs(){
kdDebug(12004) << "Saving Prefs..." << endl;
TDEConfig *kcConfig = config();
kcConfig->setGroup("General Options");
kcConfig->writeEntry("logging", logOn);
kcConfig->writeEntry("report_location", reportLocation);
kcConfig->writeEntry("smallview_mode", mViewMode);
kcConfig->writePathEntry("log_file_name", fileName );
kcConfig->sync();
}
示例3: setNoProxyFor
void KSaveIOConfig::setNoProxyFor( const TQString& _noproxy )
{
TDEConfig* cfg = config ();
cfg->setGroup( "Proxy Settings" );
cfg->writeEntry( "NoProxyFor", _noproxy );
cfg->sync();
}
示例4: setProxyAuthMode
void KSaveIOConfig::setProxyAuthMode(KProtocolManager::ProxyAuthMode mode)
{
TDEConfig* cfg = config ();
cfg->setGroup( "Proxy Settings" );
cfg->writeEntry( "AuthMode", static_cast<int>(mode) );
cfg->sync();
}
示例5: setUseReverseProxy
void KSaveIOConfig::setUseReverseProxy( bool mode )
{
TDEConfig* cfg = config ();
cfg->setGroup( "Proxy Settings" );
cfg->writeEntry("ReversedException", mode);
cfg->sync();
}
示例6: setPersistentConnections
void KSaveIOConfig::setPersistentConnections( bool enable )
{
TDEConfig* cfg = config ();
cfg->setGroup( TQString() );
cfg->writeEntry( "PersistentConnections", enable );
cfg->sync();
}
示例7: setCacheControl
void KSaveIOConfig::setCacheControl(TDEIO::CacheControl policy)
{
TDEConfig* cfg = http_config ();
TQString tmp = TDEIO::getCacheControlString(policy);
cfg->writeEntry("cache", tmp);
cfg->sync();
}
示例8: setProxyConnectTimeout
void KSaveIOConfig::setProxyConnectTimeout( int _timeout )
{
TDEConfig* cfg = config ();
cfg->setGroup( TQString() );
cfg->writeEntry("ProxyConnectTimeout", TQMAX(MIN_TIMEOUT_VALUE,_timeout));
cfg->sync();
}
示例9: setAutoResume
void KSaveIOConfig::setAutoResume( bool _mode )
{
TDEConfig* cfg = config ();
cfg->setGroup( TQString() );
cfg->writeEntry( "AutoResume", _mode );
cfg->sync();
}
示例10: setMinimumKeepSize
void KSaveIOConfig::setMinimumKeepSize( int _size )
{
TDEConfig* cfg = config ();
cfg->setGroup( TQString() );
cfg->writeEntry( "MinimumKeepSize", _size );
cfg->sync();
}
示例11: setMarkPartial
void KSaveIOConfig::setMarkPartial( bool _mode )
{
TDEConfig* cfg = config ();
cfg->setGroup( TQString() );
cfg->writeEntry( "MarkPartial", _mode );
cfg->sync();
}
示例12: it
main(int argc, char ** argv)
{
TDECmdLineArgs::init(argc, argv, "test", description, version);
TDEApplication app;
TDEConfig * cfg = kapp->config();
TQDict<char> dict;
dict.insert("Blah", "Arse");
dict.insert("Blah", "Smack");
dict.insert("Blah", "Monkey");
TQDictIterator<char> it(dict);
TQString key = "TestConfigItem";
for (; it.current(); ++it) {
cerr << "Before saving: " << endl;
cerr << "key : \"" << key << "\"" << endl;
cerr << "val : \"" << it.current() << "\"" << endl;
debug("got back [%s]",cfg->writeEntry(key, it.current()));
// debug("got back [%s]",s.data());
cerr << "After saving: " << endl;
cerr << "key : \"" << key << "\"" << endl;
cerr << "val : \"" << it.current() << "\"" << endl;
cerr << endl;
}
}
示例13: setProxyConfigScript
void KSaveIOConfig::setProxyConfigScript( const TQString& _url )
{
TDEConfig* cfg = config ();
cfg->setGroup( "Proxy Settings" );
cfg->writeEntry( "Proxy Config Script", _url );
cfg->sync();
}
示例14: setProxyFor
void KSaveIOConfig::setProxyFor( const TQString& protocol,
const TQString& _proxy )
{
TDEConfig* cfg = config ();
cfg->setGroup( "Proxy Settings" );
cfg->writeEntry( protocol.lower() + "Proxy", _proxy );
cfg->sync();
}
示例15: save
void TDELocaleConfigNumber::save()
{
// temperary use of our locale as the global locale
TDELocale *lsave = TDEGlobal::_locale;
TDEGlobal::_locale = m_locale;
TDEConfig *config = TDEGlobal::config();
TDEConfigGroupSaver saver(config, "Locale");
KSimpleConfig ent(locate("locale",
TQString::fromLatin1("l10n/%1/entry.desktop")
.arg(m_locale->country())), true);
ent.setGroup("KCM Locale");
TQString str;
str = ent.readEntry("DecimalSymbol",
TQString::fromLatin1("."));
config->deleteEntry("DecimalSymbol", false, true);
if (str != m_locale->decimalSymbol())
config->writeEntry("DecimalSymbol",
m_locale->decimalSymbol(), true, true);
str = ent.readEntry("ThousandsSeparator",
TQString::fromLatin1(","));
config->deleteEntry("ThousandsSeparator", false, true);
str.replace(TQString::fromLatin1("$0"), TQString());
if (str != m_locale->thousandsSeparator())
config->writeEntry("ThousandsSeparator",
TQString::fromLatin1("$0%1$0")
.arg(m_locale->thousandsSeparator()), true, true);
str = ent.readEntry("PositiveSign");
config->deleteEntry("PositiveSign", false, true);
if (str != m_locale->positiveSign())
config->writeEntry("PositiveSign", m_locale->positiveSign(), true, true);
str = ent.readEntry("NegativeSign", TQString::fromLatin1("-"));
config->deleteEntry("NegativeSign", false, true);
if (str != m_locale->negativeSign())
config->writeEntry("NegativeSign", m_locale->negativeSign(), true, true);
// restore the old global locale
TDEGlobal::_locale = lsave;
}