All check buttons will be disabled when no device found.
[KFingerManager.git] / src / FingerManagerWindow.h
blob182045990c4092d2c0c309597f63c16aba36010e
1 #ifndef FINGERMANAGERWINDOW_H_
2 #define FINGERMANAGERWINDOW_H_
4 #include <QObject>
5 #include <KDialog>
6 #include <KSeparator>
7 #include <QCheckBox>
8 #include <QWidget>
9 #include <QImage>
10 #include <QLabel>
11 #include <QButtonGroup>
12 #include <QComboBox>
13 #include <QHBoxLayout>
14 #include <QVBoxLayout>
15 #include <KConfig>
16 #include <KCModule>
17 #include <QGroupBox>
18 #include <KAboutData>
19 #include <KUser>
21 #include "FMDbusConn.h"
23 #define MAX_FINGERS 10
25 typedef struct {
26 int x;
27 int y;
28 } pos;
30 class FingerManagerWindow : public KCModule {
32 Q_OBJECT
34 private slots:
35 void fingerSelected(int finger);
36 void deviceChanged(int idx);
37 void deleteAll();
38 private:
39 KAboutData *about;
40 QLabel *handsLabel;
41 QButtonGroup *btng;
42 QWidget *handsPanel;
43 QCheckBox *fingers[MAX_FINGERS];
44 QComboBox *devices;
45 KConfig *settings;
46 QHBoxLayout *handsLayout;
47 QVBoxLayout *mainPanelLayout;
48 QVBoxLayout *mainLayout;
49 QHBoxLayout *devicesLayout;
50 KPushButton *deleteAllBtn;
51 QLabel *deviceLabel;
52 KSeparator *separator;
53 QGroupBox *box;
54 FMDbusConn *dbc;
55 QString login;
56 KUser *user;
58 QCheckBox* createCheckBox(int idx, int x, int y);
59 void initComponents();
60 void loadConfig(KConfig *config);
61 void retranslate();
62 void processFingers(QStringList fngrs);
63 void enableAllFingers(bool enable);
64 public:
65 FingerManagerWindow(QWidget *parent, const QVariantList &);
66 ~FingerManagerWindow();
69 #endif /*FINGERMANAGERWINDOW_H_*/