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

« back to all changes in this revision

Viewing changes to kwin/kcmkwin/kwinoptions/mouse.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
 * mouse.h
 
3
 *
 
4
 * Copyright (c) 1998 Matthias Ettrich <ettrich@kde.org>
 
5
 *
 
6
 *
 
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.
 
11
 *
 
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.
 
16
 *
 
17
 *  You should have received a copy of the GNU General Public License
 
18
 *  along with this program; if not, write to the Free Software
 
19
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
20
 */
 
21
 
 
22
#ifndef __KKWMMOUSECONFIG_H__
 
23
#define __KKWMMOUSECONFIG_H__
 
24
 
 
25
class KConfig;
 
26
 
 
27
#include <kcmodule.h>
 
28
#include <KComboBox>
 
29
#include <klocale.h>
 
30
 
 
31
 
 
32
class ToolTipComboBox: public KComboBox
 
33
{
 
34
    Q_OBJECT
 
35
 
 
36
public:
 
37
    ToolTipComboBox(QWidget * owner, char const * const * toolTips_)
 
38
        : KComboBox(owner)
 
39
        , toolTips(toolTips_) {}
 
40
 
 
41
public slots:
 
42
    void changed() {
 
43
        this->setToolTip(i18n(toolTips[currentIndex()]));
 
44
    }
 
45
 
 
46
protected:
 
47
    char const * const * toolTips;
 
48
};
 
49
 
 
50
 
 
51
 
 
52
class KTitleBarActionsConfig : public KCModule
 
53
{
 
54
    Q_OBJECT
 
55
 
 
56
public:
 
57
 
 
58
    KTitleBarActionsConfig(bool _standAlone, KConfig *_config, const KComponentData &inst, QWidget *parent);
 
59
    ~KTitleBarActionsConfig();
 
60
 
 
61
    void load();
 
62
    void save();
 
63
    void defaults();
 
64
 
 
65
protected:
 
66
    void showEvent(QShowEvent *ev);
 
67
 
 
68
public slots:
 
69
    void changed() {
 
70
        emit KCModule::changed(true);
 
71
    }
 
72
 
 
73
private:
 
74
    KComboBox* coTiDbl;
 
75
 
 
76
    KComboBox* coTiAct1;
 
77
    KComboBox* coTiAct2;
 
78
    KComboBox* coTiAct3;
 
79
    KComboBox* coTiAct4;
 
80
    KComboBox* coTiInAct1;
 
81
    KComboBox* coTiInAct2;
 
82
    KComboBox* coTiInAct3;
 
83
 
 
84
    ToolTipComboBox * coMax[3];
 
85
 
 
86
    KConfig *config;
 
87
    bool standAlone;
 
88
 
 
89
    const char* functionTiDbl(int);
 
90
    const char* functionTiAc(int);
 
91
    const char* functionTiWAc(int);
 
92
    const char* functionTiInAc(int);
 
93
    const char* functionMax(int);
 
94
 
 
95
    void setComboText(KComboBox* combo, const char* text);
 
96
    const char* fixup(const char* s);
 
97
 
 
98
private slots:
 
99
    void paletteChanged();
 
100
 
 
101
};
 
102
 
 
103
class KWindowActionsConfig : public KCModule
 
104
{
 
105
    Q_OBJECT
 
106
 
 
107
public:
 
108
 
 
109
    KWindowActionsConfig(bool _standAlone, KConfig *_config, const KComponentData &inst, QWidget *parent);
 
110
    ~KWindowActionsConfig();
 
111
 
 
112
    void load();
 
113
    void save();
 
114
    void defaults();
 
115
 
 
116
protected:
 
117
    void showEvent(QShowEvent *ev);
 
118
 
 
119
public slots:
 
120
    void changed() {
 
121
        emit KCModule::changed(true);
 
122
    }
 
123
 
 
124
private:
 
125
    KComboBox* coWin1;
 
126
    KComboBox* coWin2;
 
127
    KComboBox* coWin3;
 
128
    KComboBox* coWinWheel;
 
129
 
 
130
    KComboBox* coAllKey;
 
131
    KComboBox* coAll1;
 
132
    KComboBox* coAll2;
 
133
    KComboBox* coAll3;
 
134
    KComboBox* coAllW;
 
135
 
 
136
    KConfig *config;
 
137
    bool standAlone;
 
138
 
 
139
    const char* functionWin(int);
 
140
    const char* functionWinWheel(int);
 
141
    const char* functionAllKey(int);
 
142
    const char* functionAll(int);
 
143
    const char* functionAllW(int);
 
144
 
 
145
    void setComboText(KComboBox* combo, const char* text);
 
146
    const char* fixup(const char* s);
 
147
};
 
148
 
 
149
#endif
 
150