File indexing completed on 2024-04-21 03:49:54

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2008 Torsten Rahn <tackat@kde.org>
0004 // SPDX-FileCopyrightText: 2008 Inge Wallin <inge@lysator.liu.se>
0005 //
0006 
0007 #ifndef MARBLE_RENDERPLUGININTERFACE_H
0008 #define MARBLE_RENDERPLUGININTERFACE_H
0009 
0010 #include "PluginInterface.h"
0011 #include "LayerInterface.h"
0012 
0013 class QStringList;
0014 
0015 namespace Marble
0016 {
0017 
0018 class RenderPlugin;
0019 
0020 /**
0021  * @short The class that specifies the Marble layer interface of a plugin.
0022  *
0023  */
0024 
0025 class RenderPluginInterface: public PluginInterface, public LayerInterface
0026 {
0027  public:
0028     ~RenderPluginInterface() override;
0029 
0030     virtual void initialize() = 0;
0031 
0032     virtual bool isInitialized() const = 0;
0033 
0034     /**
0035      * @brief Returns the name(s) of the backend that the plugin can render
0036      *
0037      * This method should return the name of the backend that the plugin
0038      * can render. The string has to be the same one that is given
0039      * for the attribute in the layer element of the DGML file that
0040      * backend is able to process.
0041      * Examples to replace available default backends would be "vector" or
0042      * "texture". To provide a completely new kind of functionality please
0043      * choose your own unique string.
0044      */
0045     virtual QStringList backendTypes() const = 0;
0046 
0047     /**
0048      * @brief Return how the plugin settings should be used.
0049      *
0050      * FIXME: Document this
0051      *
0052      * Possible Values:
0053      * "ALWAYS"            -- the plugin renders at the preferred position
0054      *                        no matter what got specified in the DGML file.
0055      * "SPECIFIED"         -- renders only in case it got specified in the
0056      *                        DGML file.
0057      * "SPECIFIED_ALWAYS"  -- In case it got specified in the DGML file
0058      *                        render according to the specification
0059      *                        otherwise choose the preferred position
0060      */
0061     virtual QString renderPolicy() const = 0;
0062 };
0063 
0064 }
0065 
0066 Q_DECLARE_INTERFACE( Marble::RenderPluginInterface, "org.kde.Marble.RenderPluginInterface/1.09" )
0067 
0068 #endif