You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
1.3 KiB
71 lines
1.3 KiB
#include "ppushbt.h"
|
|
#include <stdio.h>
|
|
|
|
|
|
PObject *
|
|
PPushButton::createWidget(CreateArgs &ca)
|
|
{
|
|
PPushButton *pb = new PPushButton(ca.tqparent);
|
|
TQPushButton *qb;
|
|
if(ca.tqparent != 0 && ca.tqparent->widget()->isWidgetType() == TRUE)
|
|
qb = new TQPushButton((TQWidget *) ca.tqparent->widget());
|
|
else
|
|
qb = new TQPushButton(0L);
|
|
pb->setWidget(qb);
|
|
pb->setWidgetId(ca.pwI);
|
|
return pb;
|
|
}
|
|
|
|
|
|
PPushButton::PPushButton(PObject *tqparent)
|
|
: PButton(tqparent)
|
|
{
|
|
// 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_OBJECT_NAME_STRING) == FALSE)
|
|
{
|
|
errorInvalidSet(_qb);
|
|
return;
|
|
}
|
|
|
|
button = (TQPushButton *) _qb;
|
|
if(_qb != 0){
|
|
}
|
|
PButton::setWidget(_qb);
|
|
|
|
}
|
|
|
|
|
|
TQPushButton *PPushButton::widget()
|
|
{
|
|
return button;
|
|
}
|
|
|
|
|
|
|
|
#include "ppushbt.moc"
|
|
|