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.h 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef __browserinterface_h__
  2. #define __browserinterface_h__
  3. #include <tqobject.h>
  4. #include <tqvariant.h>
  5. #include <tdelibs_export.h>
  6. namespace KParts
  7. {
  8. /**
  9. * The purpose of this interface is to allow a direct communication between
  10. * a KPart and the hosting browser shell (for example Konqueror) . A
  11. * shell implementing this interface can propagate it to embedded kpart
  12. * components by using the setBrowserInterface call of the part's
  13. * KParts::BrowserExtension object.
  14. *
  15. * This interface looks not very rich, but the main functionality is
  16. * implemented using the callMethod method for part->shell
  17. * communication and using Qt properties for allowing a part to
  18. * to explicitly query information from the shell.
  19. *
  20. * Konqueror in particular, as 'reference' implementation, provides
  21. * the following functionality through this interface:
  22. *
  23. * Qt properties:
  24. * <code>
  25. * TQ_PROPERTY( uint historyLength READ historyLength );
  26. * </code>
  27. *
  28. * Callable methods:
  29. * <code>
  30. * void goHistory( int );
  31. * </code>
  32. *
  33. */
  34. class TDEPARTS_EXPORT BrowserInterface : public TQObject
  35. {
  36. Q_OBJECT
  37. public:
  38. BrowserInterface( TQObject *parent, const char *name = 0 );
  39. virtual ~BrowserInterface();
  40. /**
  41. * Perform a dynamic invocation of a method in the BrowserInterface
  42. * implementation. Methods are to be implemented as simple Qt slots.
  43. */
  44. void callMethod( const char *name, const TQVariant &argument );
  45. };
  46. }
  47. #endif