~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to kwin/kcmkwin/kwindecoration/kwindecoration.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    This is the new kwindecoration kcontrol module
 
3
 
 
4
    Copyright (c) 2001
 
5
        Karol Szwed <gallium@kde.org>
 
6
        http://gallium.n3.net/
 
7
    Copyright 2009, 2010 Martin Gräßlin <kde@martin-graesslin.com>
 
8
 
 
9
    Supports new kwin configuration plugins, and titlebar button position
 
10
    modification via dnd interface.
 
11
 
 
12
    Based on original "kwintheme" (Window Borders)
 
13
    Copyright (C) 2001 Rik Hemsley (rikkus) <rik@kde.org>
 
14
 
 
15
    This program is free software; you can redistribute it and/or modify
 
16
    it under the terms of the GNU General Public License as published by
 
17
    the Free Software Foundation; either version 2 of the License, or
 
18
    (at your option) any later version.
 
19
 
 
20
    This program is distributed in the hope that it will be useful,
 
21
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
22
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
23
    GNU General Public License for more details.
 
24
 
 
25
    You should have received a copy of the GNU General Public License
 
26
    along with this program; if not, write to the Free Software
 
27
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
28
 
 
29
*/
 
30
 
 
31
#ifndef KWINDECORATION_H
 
32
#define KWINDECORATION_H
 
33
 
 
34
#include <kcmodule.h>
 
35
#include <kconfig.h>
 
36
 
 
37
#include <kdecoration.h>
 
38
 
 
39
#include "ui_decoration.h"
 
40
 
 
41
class QSortFilterProxyModel;
 
42
namespace KWin
 
43
{
 
44
 
 
45
class DecorationModel;
 
46
 
 
47
class KWinDecorationForm : public QWidget, public Ui::KWinDecorationForm
 
48
{
 
49
    Q_OBJECT
 
50
 
 
51
public:
 
52
    explicit KWinDecorationForm(QWidget* parent);
 
53
};
 
54
 
 
55
class KWinDecorationModule : public KCModule, public KDecorationDefines
 
56
{
 
57
    Q_OBJECT
 
58
 
 
59
public:
 
60
    KWinDecorationModule(QWidget* parent, const QVariantList &);
 
61
    ~KWinDecorationModule();
 
62
 
 
63
    virtual void load();
 
64
    virtual void save();
 
65
    virtual void defaults();
 
66
 
 
67
    QString quickHelp() const;
 
68
 
 
69
signals:
 
70
    void pluginLoad(const KConfigGroup& conf);
 
71
    void pluginSave(KConfigGroup &conf);
 
72
    void pluginDefaults();
 
73
 
 
74
protected slots:
 
75
    // Allows us to turn "save" on
 
76
    void slotSelectionChanged();
 
77
    void slotConfigureButtons();
 
78
    void slotGHNSClicked();
 
79
    void slotConfigureDecoration();
 
80
 
 
81
private:
 
82
    void readConfig(const KConfigGroup& conf);
 
83
    void writeConfig(KConfigGroup &conf);
 
84
 
 
85
    KSharedConfigPtr kwinConfig;
 
86
 
 
87
    KWinDecorationForm* m_ui;
 
88
    bool m_showTooltips;
 
89
    bool m_customPositions;
 
90
    QString m_leftButtons;
 
91
    QString m_rightButtons;
 
92
 
 
93
    DecorationModel* m_model;
 
94
    QSortFilterProxyModel* m_proxyModel;
 
95
    bool m_configLoaded;
 
96
};
 
97
 
 
98
} //namespace
 
99
 
 
100
#endif