summaryrefslogtreecommitdiffstats
path: root/ksirc/puke/ppushbt.cpp
blob: 346abcd345de5010a8553fbf0caa14ae4b62b41f (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#include "ppushbt.h"
#include <stdio.h>


PObject *
PPushButton::createWidget(CreateArgs &ca)
{
  PPushButton *pb = new PPushButton(ca.parent);
  TQPushButton *qb;
  if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE)
    qb = new TQPushButton((TQWidget *) ca.parent->widget());
  else
    qb = new TQPushButton(0L);
  pb->setWidget(qb);
  pb->setWidgetId(ca.pwI);
  return pb;
}


PPushButton::PPushButton(PObject *parent)
  : PButton(parent)
{
  //  kdDebug(5008) << "PLineEdit PLineEdit called" << endl;
  button = 0;
  setWidget(button);
}

PPushButton::~PPushButton()
{
  //  kdDebug(5008) << "PLineEdit: in destructor" << endl;
/*  delete widget();     // Delete the frame
  button=0;          // Set it to 0
  setWidget(button); // Now set all widget() calls to 0.
  */
}

void PPushButton::messageHandler(int fd, PukeMessage *pm)
{
//  PukeMessage pmRet;
  switch(pm->iCommand){
  default:
    PButton::messageHandler(fd, pm);
  }
}

void PPushButton::setWidget(TQObject *_qb)
{
  if(_qb != 0 && _qb->inherits("TQPushButton") == FALSE)
  {
     errorInvalidSet(_qb);
     return;
  }

  button = (TQPushButton *) _qb;
  if(_qb != 0){
  }
  PButton::setWidget(_qb);

}


TQPushButton *PPushButton::widget()
{
  return button;
}



#include "ppushbt.moc"