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


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

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: setResponseTimeout

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

示例6: 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

示例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: 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

示例9: 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

示例10: 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

示例11: accept

void KasPrefsDialog::accept()
{
   TDEConfig *conf = kasbar->config();
   if ( conf ) {
       kasbar->writeConfig( conf );

       conf->setGroup("Layout");
       // TODO: This needs to be made independent of the gui and moved to kastasker
       conf->writeEntry( "MaxBoxes", maxBoxesSpin->value() );

       conf->sync();
   }

   TQDialog::accept();
}
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:15,代码来源:kasprefsdlg.cpp

示例12: saveContainerConfig

void ExtensionManager::saveContainerConfig()
{
//    kdDebug(1210) << "ExtensionManager::saveContainerConfig()" << endl;

    TDEConfig *config = TDEGlobal::config();

    // build the extension list
    TQStringList elist;
    ExtensionList::iterator itEnd = _containers.end();
    for (ExtensionList::iterator it = _containers.begin(); it != itEnd; ++it)
    {
        elist.append((*it)->extensionId());
    }

    // write extension list
    config->setGroup("General");
    config->writeEntry("Extensions2", elist);

    config->sync();
}
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:20,代码来源:extensionmanager.cpp

示例13: main

 int main( int argc, char **argv )
{
  TDEApplication app( argc, argv, "TDEFontDialogTest" );

  TDEConfig aConfig;
  aConfig.setGroup( "TDEFontDialog-test" );

  app.setFont(TQFont("Helvetica",12));

  //  TQFont font = TQFont("Times",18,TQFont::Bold);

  TQFont font = aConfig.readFontEntry( "Chosen" );
  int nRet = TDEFontDialog::getFont(font);
  int flags;
  nRet = TDEFontDialog::getFontDiff(font, flags);
  aConfig.writeEntry( "Chosen", font, true );

  aConfig.sync();
  return nRet;
}
开发者ID:Fat-Zer,项目名称:tdelibs,代码行数:20,代码来源:tdefontdialogtest.cpp

示例14: migrateMenubar

void ExtensionManager::migrateMenubar()
{
    // lame, lame, lame.
    // the menubar applet was just plunked into kicker and not much
    // thought was put into how it should be used. great idea, but no
    // integration. >:-(
    // so now we have to check to see if we HAVE another extension that
    // will have a menubar in it, and if so, abort creating one of our
    // own.
    //
    // the reason i didn't do this as a tdeconfig_update script is that
    // most people don't use this feature, so no reason to penalize
    // everyone, and moreover the user may added this to their main
    // panel, meaning kickerrc itself would have to be vastly modified
    // with lots of complications. not work it IMHO.

    TDEConfig* config = TDEGlobal::config();
    config->setGroup("General");

    if (config->readBoolEntry("CheckedForMenubar", false))
    {
        return;
    }

    if (!locate("config", "kicker_menubarpanelrc").isEmpty())
    {
        // don't overwrite/override something that's already there
        return;
    }

    TQStringList elist = config->readListEntry("Extensions2");
    TQStringList::iterator itEnd = elist.end();
    for (TQStringList::iterator it = elist.begin(); it !=  elist.end(); ++it)
    {
        TQString extensionId(*it);

        if (extensionId.find("Extension") == -1)
        {
            continue;
        }

        // is there a config group for this extension?
        if (!config->hasGroup(extensionId))
        {
            continue;
        }

        config->setGroup(extensionId);
        TQString extension = config->readPathEntry("ConfigFile");
        TDEConfig extensionConfig(locate("config", extension));
        extensionConfig.setGroup("General");

        if (extensionConfig.hasKey("Applets2"))
        {
            TQStringList containers = extensionConfig.readListEntry("Applets2");
            TQStringList::iterator cit = containers.begin();
            TQStringList::iterator citEnd = containers.end();
            for (; cit != citEnd; ++cit)
            {
                TQString appletId(*cit);

                // is there a config group for this applet?
                if (!extensionConfig.hasGroup(appletId))
                {
                    continue;
                }

                TDEConfigGroup group(&extensionConfig, appletId.latin1());
                TQString appletType = appletId.left(appletId.findRev('_'));

                if (appletType == "Applet")
                {
                    TQString appletFile = group.readPathEntry("DesktopFile");
                    if (appletFile.find("menuapplet.desktop") != -1)
                    {
                        TQString menubarConfig = locate("config", extension);
                        TDEIO::NetAccess::copy(menubarConfig,
                                             locateLocal("config",
                                             "kicker_menubarpanelrc"), 0);
                        elist.remove(it);
                        config->setGroup("General");
                        config->writeEntry("Extensions2", elist);
                        config->writeEntry("CheckedForMenubar", true);
                        config->sync();
                        return;
                    }
                }
            }
        }
    }

    config->setGroup("General");
    config->writeEntry("CheckedForMenubar", true);
}
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:94,代码来源:extensionmanager.cpp

示例15: setUseCache

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


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