summaryrefslogtreecommitdiff
path: root/noncore/applets/zkbapplet/zkbwidget.h
blob: a9435632ff11dfbe5942e1a6bbba077bfe9357cd (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
#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();

	QSize sizeHint() const;

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