Updraft  1.0
Open source glider flight visualisation tool.
maplayerinterface.h
Go to the documentation of this file.
00001 #ifndef UPDRAFT_SRC_MAPLAYERINTERFACE_H_
00002 #define UPDRAFT_SRC_MAPLAYERINTERFACE_H_
00003 
00004 class QObject;
00005 class QTreeWidgetItem;
00006 class QPoint;
00007 class QAction;
00008 class QString;
00009 
00010 namespace Updraft {
00011 
00012 namespace Core {
00013   class MapLayerGroup;
00014   class MainWindow;
00015 }
00016 
00019 class MapLayerInterface {
00020  public:
00021   virtual ~MapLayerInterface() {}
00022 
00026   virtual void connectSignalChecked(const QObject* receiver,
00027     const char *method) = 0;
00028 
00031   virtual void connectSignalContextMenuRequested(const QObject* receiver,
00032     const char* method) = 0;
00033 
00037   virtual void connectSlotSetVisibility(const QObject* sender,
00038     const char *method) = 0;
00039 
00044   virtual void connectCheckedToVisibility() = 0;
00045 
00053   virtual void setId(const QByteArray& id) = 0;
00054 
00057   virtual void setTitle(const QString& title) = 0;
00058 
00060   virtual void setChecked(bool value) = 0;
00061 
00063   virtual void setCheckable(bool value) = 0;
00064 
00066   virtual void setVisibility(bool value) = 0;
00067 
00070 
00072   virtual void setFilePath(const QString& path) = 0;
00073 
00081   virtual QAction* getDeleteAction() = 0;
00082 
00084 
00085   virtual bool isVisible() = 0;
00086 
00087   friend class Core::MapLayerGroup;
00088   friend class Core::MainWindow;
00089 
00090  protected:
00091   virtual void emitChecked(bool value) = 0;
00092   virtual void emitContextMenuRequested(const QPoint& pos) = 0;
00093 
00096   virtual QByteArray getId() = 0;
00097 
00099   virtual void addToScene(Core::MapLayerGroup *group) = 0;
00100 
00102   virtual void removeFromScene(Core::MapLayerGroup *group) = 0;
00103 
00105   virtual QTreeWidgetItem* getTreeItem() = 0;
00106   
00109   virtual QByteArray saveState() = 0;
00110 
00114   virtual bool restoreState(const QByteArray &state) = 0;
00115 
00117   virtual void inserted(Core::MapLayerGroup* parent) = 0;
00118   virtual void setDisabled(bool disabled) = 0;
00119 };
00120 
00121 }  // End namespace Updraft
00122 
00123 #endif  // UPDRAFT_SRC_MAPLAYERINTERFACE_H_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines