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


C++ TDEConfig::writeEntry方法代码示例

本文整理汇总了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();
}
开发者ID:Fat-Zer,项目名称:tdelibs,代码行数:11,代码来源:kmmainview.cpp

示例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();
}
开发者ID:Fat-Zer,项目名称:tdetoys,代码行数:12,代码来源:kweather.cpp

示例3: setNoProxyFor

void KSaveIOConfig::setNoProxyFor( const TQString& _noproxy )
{
  TDEConfig* cfg = config ();
  cfg->setGroup( "Proxy Settings" );
  cfg->writeEntry( "NoProxyFor", _noproxy );
  cfg->sync();
}
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:7,代码来源:ksaveioconfig.cpp

示例4: setProxyAuthMode

void KSaveIOConfig::setProxyAuthMode(KProtocolManager::ProxyAuthMode mode)
{
  TDEConfig* cfg = config ();
  cfg->setGroup( "Proxy Settings" );
  cfg->writeEntry( "AuthMode", static_cast<int>(mode) );
  cfg->sync();
}
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:7,代码来源:ksaveioconfig.cpp

示例5: setUseReverseProxy

void KSaveIOConfig::setUseReverseProxy( bool mode )
{
  TDEConfig* cfg = config ();
  cfg->setGroup( "Proxy Settings" );
  cfg->writeEntry("ReversedException", mode);
  cfg->sync();
}
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:7,代码来源:ksaveioconfig.cpp

示例6: setPersistentConnections

void KSaveIOConfig::setPersistentConnections( bool enable )
{
  TDEConfig* cfg = config ();
  cfg->setGroup( TQString() );
  cfg->writeEntry( "PersistentConnections", enable );
  cfg->sync();
}
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:7,代码来源:ksaveioconfig.cpp

示例7: setCacheControl

void KSaveIOConfig::setCacheControl(TDEIO::CacheControl policy)
{
  TDEConfig* cfg = http_config ();
  TQString tmp = TDEIO::getCacheControlString(policy);
  cfg->writeEntry("cache", tmp);
  cfg->sync();
}
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:7,代码来源:ksaveioconfig.cpp

示例8: setProxyConnectTimeout

void KSaveIOConfig::setProxyConnectTimeout( int _timeout )
{
  TDEConfig* cfg = config ();
  cfg->setGroup( TQString() );
  cfg->writeEntry("ProxyConnectTimeout", TQMAX(MIN_TIMEOUT_VALUE,_timeout));
  cfg->sync();
}
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:7,代码来源:ksaveioconfig.cpp

示例9: setAutoResume

void KSaveIOConfig::setAutoResume( bool _mode )
{
  TDEConfig* cfg = config ();
  cfg->setGroup( TQString() );
  cfg->writeEntry( "AutoResume", _mode );
  cfg->sync();
}
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:7,代码来源:ksaveioconfig.cpp

示例10: setMinimumKeepSize

void KSaveIOConfig::setMinimumKeepSize( int _size )
{
  TDEConfig* cfg = config ();
  cfg->setGroup( TQString() );
  cfg->writeEntry( "MinimumKeepSize", _size );
  cfg->sync();
}
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:7,代码来源:ksaveioconfig.cpp

示例11: setMarkPartial

void KSaveIOConfig::setMarkPartial( bool _mode )
{
  TDEConfig* cfg = config ();
  cfg->setGroup( TQString() );
  cfg->writeEntry( "MarkPartial", _mode );
  cfg->sync();
}
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:7,代码来源:ksaveioconfig.cpp

示例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;
 }
}
开发者ID:Fat-Zer,项目名称:tdeutils,代码行数:33,代码来源:tdeconftest.cpp

示例13: setProxyConfigScript

void KSaveIOConfig::setProxyConfigScript( const TQString& _url )
{
  TDEConfig* cfg = config ();
  cfg->setGroup( "Proxy Settings" );
  cfg->writeEntry( "Proxy Config Script", _url );
  cfg->sync();
}
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:7,代码来源:ksaveioconfig.cpp

示例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();
}
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:8,代码来源:ksaveioconfig.cpp

示例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;
}
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:45,代码来源:localenum.cpp


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