2007-01-02 16:40:22 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2007 by Pino Toscano <pino@kde.org> *
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#ifndef _OKULAR_GUIINTERFACE_H_
|
|
|
|
#define _OKULAR_GUIINTERFACE_H_
|
|
|
|
|
2007-01-03 14:30:48 +00:00
|
|
|
#include <okular/core/okular_export.h>
|
2007-01-02 16:40:22 +00:00
|
|
|
|
2007-04-22 10:39:31 +00:00
|
|
|
#include <QtCore/QObject>
|
|
|
|
|
2007-08-28 23:17:00 +00:00
|
|
|
#include <kxmlguiclient.h>
|
2007-01-02 16:40:22 +00:00
|
|
|
|
|
|
|
namespace Okular {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @short Abstract interface for user interface control
|
|
|
|
*
|
|
|
|
* This interface defines an way to interact with the Okular user interface,
|
2007-01-02 17:25:26 +00:00
|
|
|
* e.g. adding actions in the menus.
|
|
|
|
*
|
|
|
|
* How to use it in a custom Generator:
|
|
|
|
* @code
|
|
|
|
class MyGenerator : public Okular::Generator, public Okular::GuiInterface
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
Q_INTERFACES( Okular::GuiInterface )
|
|
|
|
|
|
|
|
...
|
|
|
|
};
|
|
|
|
* @endcode
|
|
|
|
* and - of course - implementing its methods.
|
2007-01-02 16:40:22 +00:00
|
|
|
*/
|
2007-08-28 23:17:00 +00:00
|
|
|
class OKULAR_EXPORT GuiInterface : protected KXMLGUIClient
|
2007-01-02 16:40:22 +00:00
|
|
|
{
|
|
|
|
public:
|
2007-01-02 17:25:26 +00:00
|
|
|
/**
|
|
|
|
* Destroys the gui interface.
|
|
|
|
*/
|
2007-01-02 16:40:22 +00:00
|
|
|
virtual ~GuiInterface() {}
|
|
|
|
|
2007-01-02 17:25:26 +00:00
|
|
|
/**
|
2007-08-28 23:17:00 +00:00
|
|
|
* This method requests the XML GUI Client provided by the interface.
|
2007-01-02 17:25:26 +00:00
|
|
|
*/
|
2007-08-28 23:17:00 +00:00
|
|
|
KXMLGUIClient* guiClient() { return this; }
|
2007-01-02 16:40:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Q_DECLARE_INTERFACE( Okular::GuiInterface, "org.kde.okular.GuiInterface/0.1" )
|
|
|
|
|
|
|
|
#endif
|