summaryrefslogtreecommitdiff
path: root/noncore/applets/zkbapplet/applet/zkbwidget.h
blob: 13906c03e4ac9cb1a3186f4c1a11d9496c0e8901 (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
#ifndef ZKBWIDGET_H
#define ZKBWIDGET_H

#include <qwidget.h>
#include <qlabel.h>
#include <qpopupmenu.h>
#include <qpixmap.h>
#include <qcopchannel_qws.h>

#include "zkb.h"

class ZkbWidget : public QLabel {
Q_OBJECT

public:
    ZkbWidget(QWidget* parent);
    ~ZkbWidget();
    static int position();

protected:
    QLabel* label;
    Keymap* keymap;
    QPopupMenu* labels;
    QCopChannel* channel;
    int w, h;
    QPixmap disabled;

    bool loadKeymap();
    void mouseReleaseEvent(QMouseEvent*);

protected slots:
    void stateChanged(const QString&);
    void labelChanged(int id);
    void signalReceived(const QCString& msg, const QByteArray& data);
    void reload();
};
#endif