summaryrefslogtreecommitdiffstats
path: root/kwin/kcmkwin/kwinoptions/mouse.h
blob: 24b2d40303ae3df6d9467e469f53368ee45f7d58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
/*
 * mouse.h
 *
 * Copyright (c) 1998 Matthias Ettrich <ettrich@kde.org>
 *
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */

#ifndef __KKWMMOUSECONFIG_H__
#define __KKWMMOUSECONFIG_H__

class KConfig;

#include <qwidget.h>
#include <kcmodule.h>
#include <qcombobox.h>
#include <qtooltip.h>


class ToolTipComboBox: public QComboBox
{
  Q_OBJECT
    
public:
  ToolTipComboBox(QWidget * owner, char const * const * toolTips_)
    : QComboBox(owner)
    , toolTips(toolTips_) {}

public slots:
  void changed() {QToolTip::add( this, i18n(toolTips[currentItem()]) );}

protected:
  char const * const * toolTips;
};



class KTitleBarActionsConfig : public KCModule
{
  Q_OBJECT

public:

  KTitleBarActionsConfig( bool _standAlone, KConfig *_config, QWidget *parent=0, const char* name=0 );
  ~KTitleBarActionsConfig( );

  void load();
  void save();
  void defaults();

public slots:
	void changed() { emit KCModule::changed(true); }

private:
  QComboBox* coTiDbl;

  QComboBox* coTiAct1;
  QComboBox* coTiAct2;
  QComboBox* coTiAct3;
  QComboBox* coTiAct4;  
  QComboBox* coTiInAct1;
  QComboBox* coTiInAct2;
  QComboBox* coTiInAct3;

  ToolTipComboBox * coMax[3];

  KConfig *config;
  bool standAlone;

  const char* functionTiDbl(int);
  const char* functionTiAc(int);
  const char* functionTiWAc(int);  
  const char* functionTiInAc(int);
  const char* functionMax(int);

  void setComboText(QComboBox* combo, const char* text);
  const char* fixup( const char* s );

private slots:
  void paletteChanged();

};

class KWindowActionsConfig : public KCModule
{
  Q_OBJECT

public:

  KWindowActionsConfig( bool _standAlone, KConfig *_config, QWidget *parent=0, const char* name=0 );
  ~KWindowActionsConfig( );

  void load();
  void save();
  void defaults();

public slots:
	void changed() { emit KCModule::changed(true); }

private:
  QComboBox* coWin1;
  QComboBox* coWin2;
  QComboBox* coWin3;

  QComboBox* coAllKey;
  QComboBox* coAll1;
  QComboBox* coAll2;
  QComboBox* coAll3;
  QComboBox* coAllW;

  KConfig *config;
  bool standAlone;

  const char* functionWin(int);
  const char* functionAllKey(int);
  const char* functionAll(int);
  const char* functionAllW(int);

  void setComboText(QComboBox* combo, const char* text);
  const char* fixup( const char* s );
};

#endif