1 /***************************************************************************
2 * Copyright (C) 2007 by Pino Toscano <pino@kde.org> *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 ***************************************************************************/
10 #ifndef _OKULAR_GUIINTERFACE_H_
11 #define _OKULAR_GUIINTERFACE_H_
13 #include <okular/core/okular_export.h>
15 #include <QtCore/QObject>
17 #include <kxmlguiclient.h>
22 * @short Abstract interface for user interface control
24 * This interface defines an way to interact with the Okular user interface,
25 * e.g. adding actions in the menus.
27 * How to use it in a custom Generator:
29 class MyGenerator : public Okular::Generator, public Okular::GuiInterface
32 Q_INTERFACES( Okular::GuiInterface )
37 * and - of course - implementing its methods.
39 class OKULAR_EXPORT GuiInterface
: protected KXMLGUIClient
43 * Destroys the gui interface.
45 virtual ~GuiInterface() {}
48 * This method requests the XML GUI Client provided by the interface.
50 KXMLGUIClient
* guiClient() { return this; }
55 Q_DECLARE_INTERFACE( Okular::GuiInterface
, "org.kde.okular.GuiInterface/0.1" )