- make the KCMs services
- use KGenericFactory (the construction code could be cleaned up some more) svn path=/trunk/KDE/kdebase/workspace/; revision=564554icc-effect-5.14.5
parent
37150cabc5
commit
ec2b5dff3c
|
@ -18,8 +18,9 @@ install(TARGETS kcm_kwinoptions DESTINATION ${PLUGIN_INSTALL_DIR} )
|
||||||
|
|
||||||
########### install files ###############
|
########### install files ###############
|
||||||
|
|
||||||
install( FILES kwinoptions.desktop DESTINATION ${XDG_APPS_DIR} )
|
install( FILES kwinoptions.desktop kwinactions.desktop kwinadvanced.desktop
|
||||||
install( FILES kwinactions.desktop kwinadvanced.desktop kwinfocus.desktop kwinmoving.desktop kwintranslucency.desktop DESTINATION ${APPLNK_INSTALL_DIR}/.hidden )
|
kwinfocus.desktop kwinmoving.desktop kwintranslucency.desktop
|
||||||
|
DESTINATION ${SERVICES_INSTALL_DIR})
|
||||||
|
|
||||||
kde4_install_icons( ${ICON_INSTALL_DIR} crystalsvg )
|
kde4_install_icons( ${ICON_INSTALL_DIR} crystalsvg )
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Encoding=UTF-8
|
Encoding=UTF-8
|
||||||
Icon=kcmkwm
|
Icon=kcmkwm
|
||||||
Type=Application
|
Type=Service
|
||||||
|
ServiceTypes=KCModule
|
||||||
Exec=kcmshell kwinactions
|
Exec=kcmshell kwinactions
|
||||||
DocPath=kcontrol/windowmanagement/index.html#action-actions
|
DocPath=kcontrol/windowmanagement/index.html#action-actions
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Encoding=UTF-8
|
Encoding=UTF-8
|
||||||
Icon=kcmkwm
|
Icon=kcmkwm
|
||||||
Type=Application
|
Type=Service
|
||||||
|
ServiceTypes=KCModule
|
||||||
Exec=kcmshell kwinadvanced
|
Exec=kcmshell kwinadvanced
|
||||||
DocPath=kcontrol/windowmanagement/index.html#action-advanced
|
DocPath=kcontrol/windowmanagement/index.html#action-advanced
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Encoding=UTF-8
|
Encoding=UTF-8
|
||||||
Icon=kcmkwm
|
Icon=kcmkwm
|
||||||
Type=Application
|
Type=Service
|
||||||
|
ServiceTypes=KCModule
|
||||||
Exec=kcmshell kwinfocus
|
Exec=kcmshell kwinfocus
|
||||||
DocPath=kcontrol/windowmanagement/index.html#action-focus
|
DocPath=kcontrol/windowmanagement/index.html#action-focus
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Encoding=UTF-8
|
Encoding=UTF-8
|
||||||
Icon=kcmkwm
|
Icon=kcmkwm
|
||||||
Type=Application
|
Type=Service
|
||||||
|
ServiceTypes=KCModule
|
||||||
Exec=kcmshell kwinmoving
|
Exec=kcmshell kwinmoving
|
||||||
DocPath=kcontrol/windowmanagement/index.html#action-moving
|
DocPath=kcontrol/windowmanagement/index.html#action-moving
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Encoding=UTF-8
|
Encoding=UTF-8
|
||||||
Icon=kcmkwm
|
Icon=kcmkwm
|
||||||
Type=Application
|
Type=Service
|
||||||
|
ServiceTypes=KCModule
|
||||||
Exec=kcmshell kwinoptions
|
Exec=kcmshell kwinoptions
|
||||||
DocPath=kcontrol/windowmanagement/index.html
|
DocPath=kcontrol/windowmanagement/index.html
|
||||||
|
|
||||||
X-KDE-Library=kwinoptions
|
X-KDE-Library=kwinoptions
|
||||||
X-KDE-FactoryName=kwinoptions
|
X-KDE-FactoryName=kwinoptions
|
||||||
|
X-KDE-ParentApp=kcontrol
|
||||||
|
|
||||||
Name=Window Behavior
|
Name=Window Behavior
|
||||||
Name[fr]=Comportement des fenêtres
|
Name[fr]=Comportement des fenêtres
|
||||||
|
@ -19,4 +21,3 @@ Comment[x-test]=xxConfigure the window behaviorxx
|
||||||
Keywords=focus,placement,window behavior,animation,raise,auto raise,windows,frame,titlebar,doubleclick
|
Keywords=focus,placement,window behavior,animation,raise,auto raise,windows,frame,titlebar,doubleclick
|
||||||
Keywords[fr]=focus,gestion du focus,fenêtre,placement des fenêtres,comportement des fenêtres,animation,fenêtres,barre de titre,double clic,souris,boutons de la souris,dessus,dessous,raise,auto raise
|
Keywords[fr]=focus,gestion du focus,fenêtre,placement des fenêtres,comportement des fenêtres,animation,fenêtres,barre de titre,double clic,souris,boutons de la souris,dessus,dessous,raise,auto raise
|
||||||
Keywords[x-test]=xxfocus,placement,window behavior,animation,raise,auto raise,windows,frame,titlebar,doubleclickxx
|
Keywords[x-test]=xxfocus,placement,window behavior,animation,raise,auto raise,windows,frame,titlebar,doubleclickxx
|
||||||
Categories=Qt;KDE;X-KDE-settings-desktop;
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Encoding=UTF-8
|
Encoding=UTF-8
|
||||||
Icon=kcmkwm
|
Icon=kcmkwm
|
||||||
Type=Application
|
Type=Service
|
||||||
|
ServiceTypes=KCModule
|
||||||
Exec=kcmshell kwintranslucency
|
Exec=kcmshell kwintranslucency
|
||||||
DocPath=kcontrol/windowmanagement/index.html#action-translucency
|
DocPath=kcontrol/windowmanagement/index.html#action-translucency
|
||||||
|
|
||||||
|
|
|
@ -45,46 +45,51 @@ inline KInstance *inst() {
|
||||||
return _kcmkwm;
|
return _kcmkwm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class KFocusConfigStandalone : public KFocusConfig
|
||||||
extern "C"
|
|
||||||
{
|
{
|
||||||
KDE_EXPORT KCModule *create_kwinfocus(QWidget *parent, const char *name)
|
public:
|
||||||
{
|
KFocusConfigStandalone(QWidget* parent, const QStringList &)
|
||||||
KConfig *c = new KConfig("kwinrc", false, true);
|
: KFocusConfig(true, new KConfig("kwinrc", false, true), inst(), parent)
|
||||||
return new KFocusConfig(true, c, inst(), parent);
|
{}
|
||||||
}
|
};
|
||||||
|
typedef KGenericFactory<KFocusConfigStandalone> KFocusConfigFactory;
|
||||||
|
K_EXPORT_COMPONENT_FACTORY(kwinfocus, KFocusConfigFactory)
|
||||||
|
|
||||||
KDE_EXPORT KCModule *create_kwinactions(QWidget *parent, const char *name)
|
class KMovingConfigStandalone : public KMovingConfig
|
||||||
{
|
{
|
||||||
return new KActionsOptions( inst(), parent);
|
public:
|
||||||
}
|
KMovingConfigStandalone(QWidget* parent, const QStringList &)
|
||||||
|
: KMovingConfig(true, new KConfig("kwinrc", false, true), inst(), parent)
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
typedef KGenericFactory<KMovingConfigStandalone> KMovingConfigFactory;
|
||||||
|
K_EXPORT_COMPONENT_FACTORY(kwinmoving, KMovingConfigFactory)
|
||||||
|
|
||||||
KDE_EXPORT KCModule *create_kwinmoving(QWidget *parent, const char *name)
|
class KAdvancedConfigStandalone : public KAdvancedConfig
|
||||||
{
|
{
|
||||||
KConfig *c = new KConfig("kwinrc", false, true);
|
public:
|
||||||
return new KMovingConfig(true, c, inst(), parent);
|
KAdvancedConfigStandalone(QWidget* parent, const QStringList &)
|
||||||
}
|
: KAdvancedConfig(true, new KConfig("kwinrc", false, true), inst(), parent)
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
typedef KGenericFactory<KAdvancedConfigStandalone> KAdvancedConfigFactory;
|
||||||
|
K_EXPORT_COMPONENT_FACTORY(kwinadvanced, KAdvancedConfigFactory)
|
||||||
|
|
||||||
KDE_EXPORT KCModule *create_kwinadvanced(QWidget *parent, const char *name)
|
class KTranslucencyConfigStandalone : public KTranslucencyConfig
|
||||||
{
|
{
|
||||||
KConfig *c = new KConfig("kwinrc", false, true);
|
public:
|
||||||
return new KAdvancedConfig(true, c, inst(), parent);
|
KTranslucencyConfigStandalone(QWidget* parent, const QStringList &)
|
||||||
}
|
: KTranslucencyConfig(true, new KConfig("kwinrc", false, true), inst(), parent)
|
||||||
|
{}
|
||||||
KDE_EXPORT KCModule *create_kwintranslucency(QWidget *parent, const char *name)
|
};
|
||||||
{
|
typedef KGenericFactory<KTranslucencyConfigStandalone> KTranslucencyConfigFactory;
|
||||||
KConfig *c = new KConfig("kwinrc", false, true);
|
K_EXPORT_COMPONENT_FACTORY(kwintranslucency, KTranslucencyConfigFactory)
|
||||||
return new KTranslucencyConfig(true, c, inst(), parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
KDE_EXPORT KCModule *create_kwinoptions ( QWidget *parent, const char* name)
|
typedef KGenericFactory<KWinOptions> KWinOptionsFactory;
|
||||||
{
|
K_EXPORT_COMPONENT_FACTORY(kwinoptions, KWinOptionsFactory)
|
||||||
return new KWinOptions( inst(), parent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
KWinOptions::KWinOptions(KInstance *inst, QWidget *parent)
|
KWinOptions::KWinOptions(QWidget *parent, const QStringList &)
|
||||||
: KCModule(inst, parent)
|
: KCModule(inst(), parent)
|
||||||
{
|
{
|
||||||
mConfig = new KConfig("kwinrc", false, true);
|
mConfig = new KConfig("kwinrc", false, true);
|
||||||
|
|
||||||
|
@ -92,37 +97,37 @@ KWinOptions::KWinOptions(KInstance *inst, QWidget *parent)
|
||||||
tab = new QTabWidget(this);
|
tab = new QTabWidget(this);
|
||||||
layout->addWidget(tab);
|
layout->addWidget(tab);
|
||||||
|
|
||||||
mFocus = new KFocusConfig(false, mConfig, inst, this);
|
mFocus = new KFocusConfig(false, mConfig, instance(), this);
|
||||||
mFocus->setObjectName("KWin Focus Config");
|
mFocus->setObjectName("KWin Focus Config");
|
||||||
mFocus->layout()->setMargin( KDialog::marginHint() );
|
mFocus->layout()->setMargin( KDialog::marginHint() );
|
||||||
tab->addTab(mFocus, i18n("&Focus"));
|
tab->addTab(mFocus, i18n("&Focus"));
|
||||||
connect(mFocus, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
|
connect(mFocus, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
|
||||||
|
|
||||||
mTitleBarActions = new KTitleBarActionsConfig(false, mConfig, inst, this);
|
mTitleBarActions = new KTitleBarActionsConfig(false, mConfig, instance(), this);
|
||||||
mTitleBarActions->setObjectName("KWin TitleBar Actions");
|
mTitleBarActions->setObjectName("KWin TitleBar Actions");
|
||||||
mTitleBarActions->layout()->setMargin( KDialog::marginHint() );
|
mTitleBarActions->layout()->setMargin( KDialog::marginHint() );
|
||||||
tab->addTab(mTitleBarActions, i18n("&Titlebar Actions"));
|
tab->addTab(mTitleBarActions, i18n("&Titlebar Actions"));
|
||||||
connect(mTitleBarActions, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
|
connect(mTitleBarActions, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
|
||||||
|
|
||||||
mWindowActions = new KWindowActionsConfig(false, mConfig, inst, this);
|
mWindowActions = new KWindowActionsConfig(false, mConfig, instance(), this);
|
||||||
mWindowActions->setObjectName("KWin Window Actions");
|
mWindowActions->setObjectName("KWin Window Actions");
|
||||||
mWindowActions->layout()->setMargin( KDialog::marginHint() );
|
mWindowActions->layout()->setMargin( KDialog::marginHint() );
|
||||||
tab->addTab(mWindowActions, i18n("Window Actio&ns"));
|
tab->addTab(mWindowActions, i18n("Window Actio&ns"));
|
||||||
connect(mWindowActions, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
|
connect(mWindowActions, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
|
||||||
|
|
||||||
mMoving = new KMovingConfig(false, mConfig, inst, this);
|
mMoving = new KMovingConfig(false, mConfig, instance(), this);
|
||||||
mMoving->setObjectName("KWin Moving");
|
mMoving->setObjectName("KWin Moving");
|
||||||
mMoving->layout()->setMargin( KDialog::marginHint() );
|
mMoving->layout()->setMargin( KDialog::marginHint() );
|
||||||
tab->addTab(mMoving, i18n("&Moving"));
|
tab->addTab(mMoving, i18n("&Moving"));
|
||||||
connect(mMoving, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
|
connect(mMoving, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
|
||||||
|
|
||||||
mAdvanced = new KAdvancedConfig(false, mConfig, inst, this);
|
mAdvanced = new KAdvancedConfig(false, mConfig, instance(), this);
|
||||||
mAdvanced->setObjectName("KWin Advanced");
|
mAdvanced->setObjectName("KWin Advanced");
|
||||||
mAdvanced->layout()->setMargin( KDialog::marginHint() );
|
mAdvanced->layout()->setMargin( KDialog::marginHint() );
|
||||||
tab->addTab(mAdvanced, i18n("Ad&vanced"));
|
tab->addTab(mAdvanced, i18n("Ad&vanced"));
|
||||||
connect(mAdvanced, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
|
connect(mAdvanced, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
|
||||||
|
|
||||||
mTranslucency = new KTranslucencyConfig(false, mConfig, inst, this);
|
mTranslucency = new KTranslucencyConfig(false, mConfig, instance(), this);
|
||||||
mTranslucency->setObjectName("KWin Translucency");
|
mTranslucency->setObjectName("KWin Translucency");
|
||||||
mTranslucency->layout()->setMargin( KDialog::marginHint() );
|
mTranslucency->layout()->setMargin( KDialog::marginHint() );
|
||||||
tab->addTab(mTranslucency, i18n("&Translucency"));
|
tab->addTab(mTranslucency, i18n("&Translucency"));
|
||||||
|
@ -209,9 +214,11 @@ void KWinOptions::moduleChanged(bool state)
|
||||||
emit KCModule::changed(state);
|
emit KCModule::changed(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef KGenericFactory<KActionsOptions> KActionsOptionsFactory;
|
||||||
|
K_EXPORT_COMPONENT_FACTORY(kwinactions, KActionsOptionsFactory)
|
||||||
|
|
||||||
KActionsOptions::KActionsOptions(KInstance *inst, QWidget *parent)
|
KActionsOptions::KActionsOptions(QWidget *parent, const QStringList &)
|
||||||
: KCModule(inst, parent)
|
: KCModule(inst(), parent)
|
||||||
{
|
{
|
||||||
mConfig = new KConfig("kwinrc", false, true);
|
mConfig = new KConfig("kwinrc", false, true);
|
||||||
|
|
||||||
|
@ -219,13 +226,13 @@ KActionsOptions::KActionsOptions(KInstance *inst, QWidget *parent)
|
||||||
tab = new QTabWidget(this);
|
tab = new QTabWidget(this);
|
||||||
layout->addWidget(tab);
|
layout->addWidget(tab);
|
||||||
|
|
||||||
mTitleBarActions = new KTitleBarActionsConfig(false, mConfig, inst, this);
|
mTitleBarActions = new KTitleBarActionsConfig(false, mConfig, instance(), this);
|
||||||
mTitleBarActions->setObjectName("KWin TitleBar Actions");
|
mTitleBarActions->setObjectName("KWin TitleBar Actions");
|
||||||
mTitleBarActions->layout()->setMargin( KDialog::marginHint() );
|
mTitleBarActions->layout()->setMargin( KDialog::marginHint() );
|
||||||
tab->addTab(mTitleBarActions, i18n("&Titlebar Actions"));
|
tab->addTab(mTitleBarActions, i18n("&Titlebar Actions"));
|
||||||
connect(mTitleBarActions, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
|
connect(mTitleBarActions, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
|
||||||
|
|
||||||
mWindowActions = new KWindowActionsConfig(false, mConfig, inst, this);
|
mWindowActions = new KWindowActionsConfig(false, mConfig, instance(), this);
|
||||||
mWindowActions->setObjectName("KWin Window Actions");
|
mWindowActions->setObjectName("KWin Window Actions");
|
||||||
mWindowActions->layout()->setMargin( KDialog::marginHint() );
|
mWindowActions->layout()->setMargin( KDialog::marginHint() );
|
||||||
tab->addTab(mWindowActions, i18n("Window Actio&ns"));
|
tab->addTab(mWindowActions, i18n("Window Actio&ns"));
|
||||||
|
|
|
@ -34,6 +34,7 @@ class KTitleBarActionsConfig;
|
||||||
class KWindowActionsConfig;
|
class KWindowActionsConfig;
|
||||||
class KAdvancedConfig;
|
class KAdvancedConfig;
|
||||||
class KTranslucencyConfig;
|
class KTranslucencyConfig;
|
||||||
|
class QStringList;
|
||||||
|
|
||||||
class KWinOptions : public KCModule
|
class KWinOptions : public KCModule
|
||||||
{
|
{
|
||||||
|
@ -41,7 +42,7 @@ class KWinOptions : public KCModule
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
KWinOptions(KInstance *inst, QWidget *parent);
|
KWinOptions(QWidget *parent, const QStringList &args);
|
||||||
virtual ~KWinOptions();
|
virtual ~KWinOptions();
|
||||||
|
|
||||||
void load();
|
void load();
|
||||||
|
@ -75,7 +76,7 @@ class KActionsOptions : public KCModule
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
KActionsOptions(KInstance *inst, QWidget *parent);
|
KActionsOptions(QWidget *parent, const QStringList &args);
|
||||||
virtual ~KActionsOptions();
|
virtual ~KActionsOptions();
|
||||||
|
|
||||||
void load();
|
void load();
|
||||||
|
|
Loading…
Reference in New Issue