summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/ButtonPrefs.h
blob: 9af04e1079a404bc40b57556fdd9d09b28112136 (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
/****************************************************************************
** Form interface generated from reading ui file 'Prefs.ui'
**
** Created: Tue Feb 11 23:53:32 2003
**      by:  The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#ifndef __BUTTON_PREFS_H
#define __BUTTON_PREFS_H

#include <qvariant.h>
#include <qwidget.h>
#include <qtabdialog.h>
#include <qtabwidget.h>
#include <qspinbox.h>
#include <qcheckbox.h>
#include <qlineedit.h>

#define USECOMBO

#ifdef USECOMBO
#include <qcombobox.h>
#else
#include <qpe/menubutton.h>
#endif

#include "orkey.h"

class QVBoxLayout; 
class QHBoxLayout; 
class QGridLayout; 
//class QCheckBox;
class QLabel;
//class QSpinBox;
class QListViewItem;

class QListView;
class QListViewItem;

class CButtonPrefs : public QWidget
{
  Q_OBJECT

  QMap<orKey, int> *kmap;
  QMap<orKey, QListViewItem*> listmap;
  QListView* lb;
  void keyPressEvent(QKeyEvent* e);
#ifdef USECOMBO
    void populate(QComboBox*);
#else
    void populate(MenuButton*);
#endif

#ifdef USECOMBO
    QComboBox *action;
#else
    MenuButton *action;
#endif
    QSpinBox* debounce;
 signals:
    void Closed();
 private slots:
     void slotClosed() { emit Closed(); }

public:

    CButtonPrefs( QMap<orKey, int>*, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
    ~CButtonPrefs();
    int Debounce() { return debounce->value(); }
    void Debounce(int v) { debounce->setValue(v); }
    void mapkey(Qt::ButtonState st, int key);
    void mapkey(Qt::ButtonState st, int key, int _fn);
 private slots:
    void erasemapping();
};
#endif // CPREFS_H