summaryrefslogtreecommitdiffstats
path: root/ksirc/puke/pwidget.h
blob: 294203b2e4c3a086c52b18838a8f834d28411fd2 (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
#ifndef PWIDGET_H
#define PWIDGET_H

class PWidget;

#include <tqobject.h>
#include <tqwidget.h>
#include "pobject.h"
#include "pmessage.h"

class PWidget : public PObject
{
  Q_OBJECT
  TQ_OBJECT
 public:
  PWidget(PObject *tqparent = 0);
  virtual ~PWidget();

  // Init and setup code
  static PObject *createWidget(CreateArgs &ca);

  virtual void messageHandler(int fd, PukeMessage *pm);

  virtual void setWidget(TQObject *w = 0x0);
  virtual TQWidget *widget();

 protected:
  bool eventFilter(TQObject *o, TQEvent *e);

 private:
  TQWidget *w;

  void (PWidget::*eventList[20])(TQObject *, TQEvent *);

  void eventNone(TQObject *, TQEvent *);
  void eventTimer(TQObject *, TQEvent *);
  void eventMouse(TQObject *, TQEvent *);
  void eventKey(TQObject *, TQEvent *);
  void eventFocus(TQObject *, TQEvent *);
  void eventPaint(TQObject *, TQEvent *);
  void eventMove(TQObject *, TQEvent *);
  void eventResize(TQObject *, TQEvent *);

};

#endif