summaryrefslogtreecommitdiffstats
path: root/kcontrol/input/touchpad.h
blob: 088f7164aa366fcd1a87dcdaf77002c731bf07c1 (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
/*******************************************************************************
 tdecm_touchpad
 A touchpad module for the TDE Control Centre

 Copyright © 2024 Mavridis Philippe <[email protected]>

 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 3 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, see <https://www.gnu.org/licenses/>.

*******************************************************************************/

#ifndef __TOUCHPAD_H__
#define __TOUCHPAD_H__

// TDE
#include <tdecmodule.h>
#include <tdelocale.h>

// Macros
#define OPTION_NOT_SUPPORTED I18N_NOOP("This option is not compatible with the currently used driver")
#define DISABLE_UNSUPPORTED_OPTION(optionWidget) \
    optionWidget->setEnabled(false); \
    TQToolTip::add(optionWidget, i18n(OPTION_NOT_SUPPORTED));

// Forward definitions
class TQTabWidget;
class TQButtonGroup;
class TQGroupBox;
class TQCheckBox;
class TQComboBox;
class TQSlider;
class TQLabel;
class TQFrame;
class TDEConfig;
class TouchpadSettings;
struct Touchpad;


/******************************* TouchpadConfig *******************************/
class TouchpadConfig : public TDECModule
{
    TQ_OBJECT

    public:
        TouchpadConfig(TQWidget *parent, const char *name);
        ~TouchpadConfig();

        void load();
        void load(bool useDefaults);
        void save();
        void defaults();

        Touchpad touchpad();

    protected:
        void initWidgets();

    protected slots:
        void updateWidgetStates();

    private:
        TouchpadSettings *d_settings;

        TQTabWidget *m_container;
        TQLabel *m_error;
        TQCheckBox *m_enabled;

        TQGroupBox *m_behaviour;
        TQCheckBox *m_offWhileTyping, *m_leftHanded, *m_mbEmulation;

        TQGroupBox *m_speed;
        TQSlider *m_accel;
        TQCheckBox *m_accelAdaptive;

        TQGroupBox *m_tapping;
        TQCheckBox *m_tapClick, *m_tapDrag, *m_tapDragLock;
        TQComboBox *m_tapMapping;

        TQGroupBox *m_scrolling;
        TQCheckBox *m_horScroll, *m_verScroll, *m_naturalScroll,
                   *m_horNaturalScroll, *m_verNaturalScroll;

        TQFrame *m_naturalScrollDirections;

        TQButtonGroup *m_scrollMethods;
};

#endif // __TOUCHPAD_H__