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.
59 lines
1.3 KiB
59 lines
1.3 KiB
15 years ago
|
|
||
|
#include "browserinterface.h"
|
||
|
|
||
15 years ago
|
#include <tqmetaobject.h>
|
||
15 years ago
|
|
||
|
#include <config.h>
|
||
14 years ago
|
#include <tqucomextra_p.h>
|
||
15 years ago
|
|
||
|
using namespace KParts;
|
||
|
|
||
15 years ago
|
BrowserInterface::BrowserInterface( TQObject *parent, const char *name )
|
||
|
: TQObject( parent, name )
|
||
15 years ago
|
{
|
||
|
}
|
||
|
|
||
|
BrowserInterface::~BrowserInterface()
|
||
|
{
|
||
|
}
|
||
|
|
||
15 years ago
|
void BrowserInterface::callMethod( const char *name, const TQVariant &argument )
|
||
15 years ago
|
{
|
||
13 years ago
|
int slot = metaObject()->findSlot( name );
|
||
15 years ago
|
|
||
|
if ( slot == -1 )
|
||
|
return;
|
||
|
|
||
14 years ago
|
TQUObject o[ 2 ];
|
||
15 years ago
|
TQStringList strLst;
|
||
15 years ago
|
uint i;
|
||
|
|
||
|
switch ( argument.type() )
|
||
|
{
|
||
15 years ago
|
case TQVariant::Invalid:
|
||
15 years ago
|
break;
|
||
15 years ago
|
case TQVariant::String:
|
||
14 years ago
|
static_TQUType_TQString.set( o + 1, argument.toString() );
|
||
15 years ago
|
break;
|
||
15 years ago
|
case TQVariant::StringList:
|
||
15 years ago
|
strLst = argument.toStringList();
|
||
14 years ago
|
static_TQUType_ptr.set( o + 1, &strLst );
|
||
15 years ago
|
break;
|
||
15 years ago
|
case TQVariant::Int:
|
||
14 years ago
|
static_TQUType_int.set( o + 1, argument.toInt() );
|
||
15 years ago
|
break;
|
||
15 years ago
|
case TQVariant::UInt:
|
||
15 years ago
|
i = argument.toUInt();
|
||
14 years ago
|
static_TQUType_ptr.set( o + 1, &i );
|
||
15 years ago
|
break;
|
||
15 years ago
|
case TQVariant::Bool:
|
||
14 years ago
|
static_TQUType_bool.set( o + 1, argument.toBool() );
|
||
15 years ago
|
break;
|
||
|
default: return;
|
||
|
}
|
||
|
|
||
13 years ago
|
tqt_invoke( slot, o );
|
||
15 years ago
|
}
|
||
|
|
||
|
#include "browserinterface.moc"
|