TDE core libraries
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.

browserinterface.cpp 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #include "browserinterface.h"
  2. #include <tqmetaobject.h>
  3. #include <config.h>
  4. #include <tqucomextra_p.h>
  5. using namespace KParts;
  6. BrowserInterface::BrowserInterface( TQObject *parent, const char *name )
  7. : TQObject( parent, name )
  8. {
  9. }
  10. BrowserInterface::~BrowserInterface()
  11. {
  12. }
  13. void BrowserInterface::callMethod( const char *name, const TQVariant &argument )
  14. {
  15. int slot = metaObject()->findSlot( name );
  16. if ( slot == -1 )
  17. return;
  18. TQUObject o[ 2 ];
  19. TQStringList strLst;
  20. uint i;
  21. switch ( argument.type() )
  22. {
  23. case TQVariant::Invalid:
  24. break;
  25. case TQVariant::String:
  26. static_TQUType_TQString.set( o + 1, argument.toString() );
  27. break;
  28. case TQVariant::StringList:
  29. strLst = argument.toStringList();
  30. static_TQUType_ptr.set( o + 1, &strLst );
  31. break;
  32. case TQVariant::Int:
  33. static_TQUType_int.set( o + 1, argument.toInt() );
  34. break;
  35. case TQVariant::UInt:
  36. i = argument.toUInt();
  37. static_TQUType_ptr.set( o + 1, &i );
  38. break;
  39. case TQVariant::Bool:
  40. static_TQUType_bool.set( o + 1, argument.toBool() );
  41. break;
  42. default: return;
  43. }
  44. tqt_invoke( slot, o );
  45. }
  46. #include "browserinterface.moc"