本文整理汇总了C++中TDEConfig::setGroup方法的典型用法代码示例。如果您正苦于以下问题:C++ TDEConfig::setGroup方法的具体用法?C++ TDEConfig::setGroup怎么用?C++ TDEConfig::setGroup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TDEConfig
的用法示例。
在下文中一共展示了TDEConfig::setGroup方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadMisc
void KCMStyle::loadMisc( TDEConfig& config )
{
// TDE's Part via TDEConfig
config.setGroup("Toolbar style");
cbHoverButtons->setChecked(config.readBoolEntry("Highlighting", true));
cbTransparentToolbars->setChecked(config.readBoolEntry("TransparentMoving", true));
TQString tbIcon = config.readEntry("IconText", "IconOnly");
if (tbIcon == "TextOnly")
comboToolbarIcons->setCurrentItem(1);
else if (tbIcon == "IconTextRight")
comboToolbarIcons->setCurrentItem(2);
else if (tbIcon == "IconTextBottom")
comboToolbarIcons->setCurrentItem(3);
else
comboToolbarIcons->setCurrentItem(0);
config.setGroup("KDE");
cbIconsOnButtons->setChecked(config.readBoolEntry("ShowIconsOnPushButtons", false));
cbEnableTooltips->setChecked(!config.readBoolEntry("EffectNoTooltip", false));
cbTearOffHandles->setChecked(config.readBoolEntry("InsertTearOffHandle", false));
TQSettings settings;
cbScrollablePopupMenus->setChecked(settings.readBoolEntry("/TDEStyle/Settings/ScrollablePopupMenus", false));
cbAutoHideAccelerators->setChecked(settings.readBoolEntry("/TDEStyle/Settings/AutoHideAccelerators", false));
cbMenuAltKeyNavigation->setChecked(settings.readBoolEntry("/TDEStyle/Settings/MenuAltKeyNavigation", true));
m_popupMenuDelay->setValue(settings.readNumEntry("/TDEStyle/Settings/PopupMenuDelay", 250));
m_bToolbarsDirty = false;
}
示例2: cfg_write
void Existing_window_condition::cfg_write( TDEConfig& cfg_P ) const
{
base::cfg_write( cfg_P );
TQString save_cfg_group = cfg_P.group();
cfg_P.setGroup( save_cfg_group + "Window" );
window()->cfg_write( cfg_P );
cfg_P.setGroup( save_cfg_group );
cfg_P.writeEntry( "Type", "EXISTING_WINDOW" ); // overwrites value set in base::cfg_write()
}
示例3: Condition
Existing_window_condition::Existing_window_condition( TDEConfig& cfg_P, Condition_list_base* parent_P )
: Condition( cfg_P, parent_P )
{
TQString save_cfg_group = cfg_P.group();
cfg_P.setGroup( save_cfg_group + "Window" );
_window = new Windowdef_list( cfg_P );
cfg_P.setGroup( save_cfg_group );
init();
set_match();
}
示例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: setAutoResume
void KSaveIOConfig::setAutoResume( bool _mode )
{
TDEConfig* cfg = config ();
cfg->setGroup( TQString() );
cfg->writeEntry( "AutoResume", _mode );
cfg->sync();
}
示例7: setMinimumKeepSize
void KSaveIOConfig::setMinimumKeepSize( int _size )
{
TDEConfig* cfg = config ();
cfg->setGroup( TQString() );
cfg->writeEntry( "MinimumKeepSize", _size );
cfg->sync();
}
示例8: setMarkPartial
void KSaveIOConfig::setMarkPartial( bool _mode )
{
TDEConfig* cfg = config ();
cfg->setGroup( TQString() );
cfg->writeEntry( "MarkPartial", _mode );
cfg->sync();
}
示例9: mThemeDir
ObjKsTheme::ObjKsTheme( const TQString& theme )
:mActiveTheme (theme), mThemeDir("/"), mThemeConfig (0L), mThemePrefix( "Themes/" ), d(0)
{
// Get Xinerama config.
TDEConfig *config = kapp->config();
config->setGroup( "Xinerama" );
TQDesktopWidget *desktop = kapp->desktop();
mXineramaScreen = config->readNumEntry("KSplashScreen", desktop->primaryScreen());
// For Xinerama, let's put the mouse on the first head. Otherwise it could appear anywhere!
if (desktop->isVirtualDesktop() && mXineramaScreen != -2)
{
TQRect rect = desktop->screenGeometry( mXineramaScreen );
if (!rect.contains(TQCursor::pos()))
TQCursor::setPos(rect.center());
}
// Does the active theme exist?
if( !loadThemeRc( mActiveTheme, false ) )
if( !loadLocalConfig( mActiveTheme, false ) )
if( !loadThemeRc( "Default", false ) )
loadLocalConfig( "Default", true ); //force: we need some defaults
loadCmdLineArgs(TDECmdLineArgs::parsedArgs());
mThemePrefix += ( mActiveTheme + "/" );
}
示例10: setNoProxyFor
void KSaveIOConfig::setNoProxyFor( const TQString& _noproxy )
{
TDEConfig* cfg = config ();
cfg->setGroup( "Proxy Settings" );
cfg->writeEntry( "NoProxyFor", _noproxy );
cfg->sync();
}
示例11: setPersistentConnections
void KSaveIOConfig::setPersistentConnections( bool enable )
{
TDEConfig* cfg = config ();
cfg->setGroup( TQString() );
cfg->writeEntry( "PersistentConnections", enable );
cfg->sync();
}
示例12: setProxyConnectTimeout
void KSaveIOConfig::setProxyConnectTimeout( int _timeout )
{
TDEConfig* cfg = config ();
cfg->setGroup( TQString() );
cfg->writeEntry("ProxyConnectTimeout", TQMAX(MIN_TIMEOUT_VALUE,_timeout));
cfg->sync();
}
示例13: setProxyConfigScript
void KSaveIOConfig::setProxyConfigScript( const TQString& _url )
{
TDEConfig* cfg = config ();
cfg->setGroup( "Proxy Settings" );
cfg->writeEntry( "Proxy Config Script", _url );
cfg->sync();
}
示例14: setURL
void KfindTabWidget::setURL( const KURL & url )
{
TDEConfig *conf = TDEGlobal::config();
conf->setGroup("History");
m_url = url;
TQStringList sl = conf->readPathListEntry("Directories");
dirBox->clear(); // make sure there is no old Stuff in there
if(!sl.isEmpty()) {
dirBox->insertStringList(sl);
// If the _searchPath already exists in the list we do not
// want to add it again
int indx = sl.findIndex(m_url.prettyURL());
if(indx == -1)
dirBox->insertItem(m_url.prettyURL(), 0); // make it the first one
else
dirBox->setCurrentItem(indx);
}
else {
TQDir m_dir("/lib");
dirBox ->insertItem( m_url.prettyURL() );
dirBox ->insertItem( "file:" + TQDir::homeDirPath() );
dirBox ->insertItem( "file:/" );
dirBox ->insertItem( "file:/usr" );
if (m_dir.exists())
dirBox ->insertItem( "file:/lib" );
dirBox ->insertItem( "file:/home" );
dirBox ->insertItem( "file:/etc" );
dirBox ->insertItem( "file:/var" );
dirBox ->insertItem( "file:/mnt" );
}
}
示例15: init_keyboard
void KeyboardConfig::init_keyboard()
{
TDEConfig *config = new TDEConfig("kcminputrc", true); // Read-only, no globals
config->setGroup("Keyboard");
XKeyboardState kbd;
XKeyboardControl kbdc;
XGetKeyboardControl(kapp->getDisplay(), &kbd);
bool key = config->readBoolEntry("KeyboardRepeating", true);
kbdc.key_click_percent = config->readNumEntry("ClickVolume", kbd.key_click_percent);
kbdc.auto_repeat_mode = (key ? AutoRepeatModeOn : AutoRepeatModeOff);
XChangeKeyboardControl(kapp->getDisplay(),
KBKeyClickPercent | KBAutoRepeatMode,
&kbdc);
if( key ) {
int delay_ = config->readNumEntry("RepeatDelay", 500);
double rate_ = config->readDoubleNumEntry("RepeatRate", 30);
set_repeatrate(delay_, rate_);
}
int numlockState = config->readNumEntry( "NumLock", 2 );
if( numlockState != 2 )
numlockx_change_numlock_state( numlockState == 0 );
delete config;
}