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.
77 lines
1.5 KiB
77 lines
1.5 KiB
#include "ptablevw.h"
|
|
|
|
|
|
PObject *
|
|
PTableView::createWidget(CreateArgs &ca)
|
|
{
|
|
qWarning("Table View is abstract class, cannot create an object from it!!!");
|
|
PTableView *pt = new PTableView(ca.tqparent);
|
|
pt->setWidget(0);
|
|
pt->setWidgetId(ca.pwI);
|
|
return pt;
|
|
}
|
|
|
|
|
|
PTableView::PTableView(PObject *tqparent)
|
|
: PFrame(tqparent)
|
|
{
|
|
// kdDebug(5008) << "PTableView PTableView called" << endl;
|
|
tbl = 0;
|
|
setWidget(tbl);
|
|
}
|
|
|
|
PTableView::~PTableView()
|
|
{
|
|
// don't delete the widget since none acutally exists.
|
|
// delete widget(); // Delete the frame
|
|
// tbl=0; // Set it to 0
|
|
// setWidget(tbl); // Now set all widget() calls to 0.
|
|
}
|
|
|
|
void PTableView::messageHandler(int fd, PukeMessage *pm)
|
|
{
|
|
// PukeMessage pmRet;
|
|
switch(pm->iCommand){
|
|
/*
|
|
case PUKE_LINED_SET_MAXLENGTH:
|
|
if(widget() == 0){
|
|
kdDebug(5008) << "PTableView: No Widget set" << endl;
|
|
return;
|
|
}
|
|
widget()->setMaxLength(pm->iArg);
|
|
pmRet.iCommand = - pm->iCommand;
|
|
pmRet.iWinId = - pm->iWinId;
|
|
pmRet.iArg = widget()->maxLength();
|
|
emit outputMessage(fd, &pmRet);
|
|
break;
|
|
*/
|
|
default:
|
|
PFrame::messageHandler(fd, pm);
|
|
}
|
|
}
|
|
|
|
void PTableView::setWidget(TQObject *_tbv)
|
|
{
|
|
if(_tbv != 0 && _tbv->inherits(TQGRIDVIEW_OBJECT_NAME_STRING) == FALSE)
|
|
{
|
|
errorInvalidSet(_tbv);
|
|
return;
|
|
}
|
|
|
|
tbl = (TQGridView *) _tbv;
|
|
if(tbl != 0){
|
|
}
|
|
PFrame::setWidget(_tbv);
|
|
|
|
}
|
|
|
|
|
|
TQGridView *PTableView::widget()
|
|
{
|
|
return tbl;
|
|
}
|
|
|
|
|
|
#include "ptablevw.moc"
|
|
|