Updraft  1.0
Open source glider flight visualisation tool.
Updraft::MapLayerInterface Class Reference

An interface to a map layer that is used by plugins. More...

#include <maplayerinterface.h>

Inheritance diagram for Updraft::MapLayerInterface:

List of all members.

Public Member Functions

virtual ~MapLayerInterface ()
virtual void connectSignalChecked (const QObject *receiver, const char *method)=0
 Connects to a signal checked(bool, MapLayerInterface*): map layer is selected / diselected in the left panel.
virtual void connectSignalContextMenuRequested (const QObject *receiver, const char *method)=0
 Connects to a signal contextMenuRequested(QPoint, MapLayerInterface*)
virtual void connectSlotSetVisibility (const QObject *sender, const char *method)=0
 Connects to a slot setVisibility(bool) -- map layer sets the visibility to the layer in the scene graph.
virtual void connectCheckedToVisibility ()=0
 Automatically connects the signal whether the map is selected / deselected in the menu to the setVisibility slot, so that the map enables / disabled it's visibility.
virtual void setId (const QByteArray &id)=0
 Set the identifier of this map layer.
virtual void setTitle (const QString &title)=0
 Change the title of this map layer.
virtual void setChecked (bool value)=0
 Check or uncheck the tree view checkbox.
virtual void setCheckable (bool value)=0
 Allows to disable the check box.
virtual void setVisibility (bool value)=0
 Sets visibility to the layer.
virtual bool isVisible ()=0
virtual void setFilePath (const QString &path)=0
 Deleting imported files.
virtual QAction * getDeleteAction ()=0
 Return a QAction that will delete the file selected by setFilePath.

Protected Member Functions

virtual void emitChecked (bool value)=0
virtual void emitContextMenuRequested (const QPoint &pos)=0
virtual QByteArray getId ()=0
 Return the identifier of the layer.
virtual void addToScene (Core::MapLayerGroup *group)=0
 Add the map layer to the osg group of the map layer group.
virtual void removeFromScene (Core::MapLayerGroup *group)=0
 Remove the layer from the osg group of the map layer group.
virtual QTreeWidgetItem * getTreeItem ()=0
 Return the tree widget item corresponding to this map layer.
virtual QByteArray saveState ()=0
 Save state of the map layer and possibly its children.
virtual bool restoreState (const QByteArray &state)=0
 Restore the previsously saved state.
virtual void inserted (Core::MapLayerGroup *parent)=0
 Notify the map layer that it was inserted into a group.
virtual void setDisabled (bool disabled)=0

Friends

class Core::MapLayerGroup
class Core::MainWindow

Detailed Description

An interface to a map layer that is used by plugins.

More about map layers

See also:
class MapLayer.

Constructor & Destructor Documentation

virtual Updraft::MapLayerInterface::~MapLayerInterface ( ) [inline, virtual]

Member Function Documentation

virtual void Updraft::MapLayerInterface::addToScene ( Core::MapLayerGroup group) [protected, pure virtual]

Add the map layer to the osg group of the map layer group.

Implemented in Updraft::Core::MapLayerGroup, and Updraft::Core::NodeMapLayer.

Automatically connects the signal whether the map is selected / deselected in the menu to the setVisibility slot, so that the map enables / disabled it's visibility.

Implemented in Updraft::Core::MapLayer.

virtual void Updraft::MapLayerInterface::connectSignalChecked ( const QObject *  receiver,
const char *  method 
) [pure virtual]

Connects to a signal checked(bool, MapLayerInterface*): map layer is selected / diselected in the left panel.

See also:
QObject::connect()

Implemented in Updraft::Core::MapLayer.

virtual void Updraft::MapLayerInterface::connectSignalContextMenuRequested ( const QObject *  receiver,
const char *  method 
) [pure virtual]

Connects to a signal contextMenuRequested(QPoint, MapLayerInterface*)

See also:
QObject::connect()

Implemented in Updraft::Core::MapLayer.

virtual void Updraft::MapLayerInterface::connectSlotSetVisibility ( const QObject *  sender,
const char *  method 
) [pure virtual]

Connects to a slot setVisibility(bool) -- map layer sets the visibility to the layer in the scene graph.

See also:
QObject::connect()

Implemented in Updraft::Core::MapLayer.

virtual void Updraft::MapLayerInterface::emitChecked ( bool  value) [protected, pure virtual]

Implemented in Updraft::Core::MapLayer.

virtual void Updraft::MapLayerInterface::emitContextMenuRequested ( const QPoint &  pos) [protected, pure virtual]

Implemented in Updraft::Core::MapLayer.

virtual QAction* Updraft::MapLayerInterface::getDeleteAction ( ) [pure virtual]

Return a QAction that will delete the file selected by setFilePath.

Used for deleting imported files. Only makes sense after setFilePath was called. The action's triggered() signal deletes the selected file and this map layer group. For a single map layer, the same QAction is returned every time.

Implemented in Updraft::Core::MapLayer.

virtual QByteArray Updraft::MapLayerInterface::getId ( ) [protected, pure virtual]

Return the identifier of the layer.

See also:
setId();

Implemented in Updraft::Core::MapLayer.

virtual QTreeWidgetItem* Updraft::MapLayerInterface::getTreeItem ( ) [protected, pure virtual]

Return the tree widget item corresponding to this map layer.

Implemented in Updraft::Core::MapLayer.

virtual void Updraft::MapLayerInterface::inserted ( Core::MapLayerGroup parent) [protected, pure virtual]

Notify the map layer that it was inserted into a group.

Implemented in Updraft::Core::MapLayerGroup, and Updraft::Core::MapLayer.

virtual void Updraft::MapLayerInterface::removeFromScene ( Core::MapLayerGroup group) [protected, pure virtual]

Remove the layer from the osg group of the map layer group.

Implemented in Updraft::Core::MapLayerGroup, and Updraft::Core::NodeMapLayer.

virtual bool Updraft::MapLayerInterface::restoreState ( const QByteArray &  state) [protected, pure virtual]

Restore the previsously saved state.

Returns:
success flag.
See also:
saveState()

Implemented in Updraft::Core::MapLayer, and Updraft::Core::MapLayerGroup.

virtual QByteArray Updraft::MapLayerInterface::saveState ( ) [protected, pure virtual]

Save state of the map layer and possibly its children.

See also:
Updraft::Core::MapLayerGroup::saveState()

Implemented in Updraft::Core::MapLayer, and Updraft::Core::MapLayerGroup.

virtual void Updraft::MapLayerInterface::setCheckable ( bool  value) [pure virtual]

Allows to disable the check box.

Implemented in Updraft::Core::MapLayer.

virtual void Updraft::MapLayerInterface::setChecked ( bool  value) [pure virtual]

Check or uncheck the tree view checkbox.

Implemented in Updraft::Core::MapLayer.

virtual void Updraft::MapLayerInterface::setDisabled ( bool  disabled) [protected, pure virtual]
virtual void Updraft::MapLayerInterface::setFilePath ( const QString &  path) [pure virtual]

Deleting imported files.

Sets the path used by getDeleteAction.

Implemented in Updraft::Core::MapLayer.

virtual void Updraft::MapLayerInterface::setId ( const QByteArray &  id) [pure virtual]

Set the identifier of this map layer.

Identifiers default to the map title encoded to local 8 bit encoding, however when the title may change (during runtime or between start ups) or when the id contains characters that are not representable in local encoding, a fixed id must be added manually. Ids only need to be unique between direct descendants of a group.

Implemented in Updraft::Core::MapLayer.

virtual void Updraft::MapLayerInterface::setTitle ( const QString &  title) [pure virtual]

Change the title of this map layer.

If you use setTitle, then you should also be using setId().

Implemented in Updraft::Core::MapLayer.

virtual void Updraft::MapLayerInterface::setVisibility ( bool  value) [pure virtual]

Sets visibility to the layer.

Implemented in Updraft::Core::MapLayer, Updraft::Core::MapLayerGroup, and Updraft::Core::NodeMapLayer.


Friends And Related Function Documentation

friend class Core::MainWindow [friend]
friend class Core::MapLayerGroup [friend]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines