summaryrefslogtreecommitdiffstats
path: root/ksirc/puke/pwidget.h
blob: bc8fb4e9292c2d86abd9fcf781e9ffe1f4a326a4 (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 *parent = 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