1
/********************************************************************
2
KWin - the KDE window manager
3
This file is part of the KDE project.
5
Copyright (C) 2009 Martin Gräßlin <kde@martin-graesslin.com>
7
This program is free software; you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation; either version 2 of the License, or
10
(at your option) any later version.
12
This program is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
17
You should have received a copy of the GNU General Public License
18
along with this program. If not, see <http://www.gnu.org/licenses/>.
19
*********************************************************************/
25
#include <ksharedconfig.h>
26
#include "tabboxconfig.h"
30
class KShortcutsEditor;
31
class KActionCollection;
43
class KWinTabBoxConfigForm : public QWidget, public Ui::KWinTabBoxConfigForm
48
explicit KWinTabBoxConfigForm(QWidget* parent);
51
class KWinTabBoxConfig : public KCModule
56
explicit KWinTabBoxConfig(QWidget* parent, const QVariantList& args);
62
virtual void defaults();
65
void slotEffectSelectionChanged(int index);
66
void slotAboutEffectClicked();
67
void slotConfigureEffectClicked();
68
void slotConfigureLayoutClicked();
69
void slotLayoutChanged();
70
void slotEffectSelectionChangedAlternative(int index);
71
void slotAboutEffectClickedAlternative();
72
void slotConfigureEffectClickedAlternative();
73
void slotConfigureLayoutClickedAlternative();
74
void slotLayoutChangedAlternative();
77
void updateUiFromConfig(KWinTabBoxConfigForm* ui, const TabBox::TabBoxConfig& config);
78
void updateConfigFromUi(const KWinTabBoxConfigForm* ui, TabBox::TabBoxConfig& config);
79
void loadConfig(const KConfigGroup& config, KWin::TabBox::TabBoxConfig& tabBoxConfig);
80
void saveConfig(KConfigGroup& config, const KWin::TabBox::TabBoxConfig& tabBoxConfig);
81
void effectSelectionChanged(KWinTabBoxConfigForm* ui, int index);
82
void aboutEffectClicked(KWinTabBoxConfigForm* ui);
83
void configureEffectClicked(KWinTabBoxConfigForm* ui);
86
KWinTabBoxConfigForm* m_primaryTabBoxUi;
87
KWinTabBoxConfigForm* m_alternativeTabBoxUi;
88
KSharedConfigPtr m_config;
89
KActionCollection* m_actionCollection;
90
KShortcutsEditor* m_editor;
91
TabBox::TabBoxConfig m_tabBoxConfig;
92
TabBox::TabBoxConfig m_tabBoxAlternativeConfig;
93
TabBox::LayoutConfig* m_configForm;
95
bool effectEnabled(const QString& effect, const KConfigGroup& cfg) const;