/usr/include/marble/RenderPlugin.h is in libmarble-dev 4:4.8.2-0ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | //
// This file is part of the Marble Virtual Globe.
//
// This program is free software licensed under the GNU LGPL. You can
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
// Copyright 2008 Torsten Rahn <tackat@kde.org>
// Copyright 2008 Inge Wallin <inge@lysator.liu.se>
//
#ifndef MARBLE_RENDERPLUGIN_H
#define MARBLE_RENDERPLUGIN_H
#include <QtCore/QObject>
#include <QtCore/QString>
#include <QtCore/Qt>
#include <QtGui/QStandardItem>
#include "RenderPluginInterface.h"
#include "marble_export.h"
class QAction;
class QActionGroup;
class QStandardItem;
namespace Marble
{
class RenderPluginPrivate;
class MarbleModel;
/**
* @short The abstract class that creates a renderable Item.
*
*/
class MARBLE_EXPORT RenderPlugin : public QObject, public RenderPluginInterface
{
Q_OBJECT
public:
/**
* This enum contains the data roles for the QStandardItem that is returned by item().
* TODO: This should get moved into PluginInterface.h
*/
enum ItemDataRole {
NameId = Qt::UserRole + 2, // a QString
AboutDialogAvailable, // a bool
ConfigurationDialogAvailable, // a bool
BackendTypes // a QStringList
};
enum RenderType {
Unknown,
Online
};
RenderPlugin();
virtual ~RenderPlugin();
const MarbleModel* marbleModel() const;
void setMarbleModel( const MarbleModel* );
QAction *action() const;
/**
*This method is used by the main window to get all of the actions that this
*plugin defines. There is no guarantee where the main window will place the
*actions but it will generally be in a Menu. The returned QList should
*also contain all of the actions returned by @see toolbarActions().
*@return A QList of grouped actions
*/
virtual QList<QActionGroup*>* actionGroups() const;
/**
*This method returns a subset of the actions returned by @see actions() which
*are intended to be placed in a more prominent place such as a toolbar above
*the Marble Widget. You are not guaranteed that they will be in an actual
*toolbar but they will be visible and discoverable
*@return A QList of grouped toolbar actions
*/
virtual QList<QActionGroup*>* toolbarActionGroups() const;
QStandardItem *item();
void applyItemState();
void retrieveItemState();
bool enabled() const;
bool visible() const;
/**
* Function for getting a pointer to the about dialog of the plugin.
*
* @return: The about dialog or, if no about dialog exists, 0.
*/
virtual QDialog *aboutDialog();
/**
* Function for getting a pointer to the configuration dialog of the plugin.
*
* @return: The configuration dialog or, if no configuration dialog exists, 0.
*/
virtual QDialog *configDialog();
/**
* @return: The settings of the item.
*/
virtual QHash<QString,QVariant> settings() const;
/**
* Set the settings of the item.
*/
virtual void setSettings( QHash<QString,QVariant> settings );
/**
* Function for returning the type of plugin this is for.
* This affects where in the menu tree the action() is placed.
*
* @return: The type of render plugin this is.
*/
virtual RenderType renderType() const;
public Q_SLOTS:
void setEnabled( bool enabled );
void setVisible( bool visible );
void restoreDefaultSettings();
Q_SIGNALS:
/**
* This signal is emitted if the visibility is changed with setVisible.
*/
void visibilityChanged( QString nameId, bool visible );
void enabledChanged( bool enable );
/**
* This signal is emitted if the settings of the RenderPlugin changed.
*/
void settingsChanged( QString nameId );
/**
* This signal is emitted if the actions that the plugin supports change in
* any way
*/
void actionGroupsChanged();
/**
* This signal is emitted if an update of the view is needed. If available with the
* @p dirtyRegion which is the region the view will change in. If dirtyRegion.isEmpty() returns
* true, the whole viewport has to be repainted.
*/
void repaintNeeded( QRegion dirtyRegion = QRegion() );
protected:
bool eventFilter( QObject *, QEvent * );
private:
Q_DISABLE_COPY( RenderPlugin )
RenderPluginPrivate * const d;
};
#define MARBLE_PLUGIN(T) public:\
virtual RenderPlugin* newInstance() { return new T(); }
}
#endif
|