fix tricky regression noticed by Vyacheslav Tokarev on Google Reader.
[kdelibs.git] / kparts / browserinterface.h
blob03f26649a821a43f03dc675a6e40c11d1a66f2d8
1 /* This file is part of the KDE project
2 Copyright (C) 2001 Simon Hausmann <hausmann@kde.org>
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
20 #ifndef KPARTS_BROWSERINTERFACE_H
21 #define KPARTS_BROWSERINTERFACE_H
23 #include <QtCore/QObject>
24 #include <QtCore/QVariant>
26 #include <kparts/kparts_export.h>
28 namespace KParts
31 /**
32 * The purpose of this interface is to allow a direct communication between
33 * a KPart and the hosting browser shell (for example Konqueror) . A
34 * shell implementing this interface can propagate it to embedded kpart
35 * components by using the setBrowserInterface call of the part's
36 * KParts::BrowserExtension object.
38 * This interface looks not very rich, but the main functionality is
39 * implemented using the callMethod method for part->shell
40 * communication and using Qt properties for allowing a part to
41 * to explicitly query information from the shell.
43 * Konqueror in particular, as 'reference' implementation, provides
44 * the following functionality through this interface:
46 * Qt properties:
47 * Q_PROPERTY( uint historyLength READ historyLength );
49 * Callable methods:
50 * void goHistory( int );
53 class KPARTS_EXPORT BrowserInterface : public QObject
55 Q_OBJECT
56 public:
57 explicit BrowserInterface( QObject *parent );
58 virtual ~BrowserInterface();
60 /**
61 * Perform a dynamic invocation of a method in the BrowserInterface
62 * implementation. Methods are to be implemented as simple Qt slots.
63 * You should only include the method name, and not the signature,
64 * in the name argument.
66 void callMethod( const char *name, const QVariant &argument );
71 #endif