42 lines
669 B
C++
42 lines
669 B
C++
#ifndef MAPTOOLS_H
|
|
#define MAPTOOLS_H
|
|
|
|
#include <QObject>
|
|
#include <QHash>
|
|
|
|
class MapTool;
|
|
class MapToolPan;
|
|
class MapToolSpectral;
|
|
class Mapcavas;
|
|
|
|
class MapTools : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
enum Tool
|
|
{
|
|
Pan,
|
|
Spectral,
|
|
};
|
|
|
|
MapTools(QObject* parent = nullptr);
|
|
~MapTools();
|
|
|
|
MapToolPan* mapToolPan() const;
|
|
MapToolSpectral* mapToolSpectral() const;
|
|
|
|
MapTool* mapTool(Tool tool) const;
|
|
|
|
MapTool* activeTool() const;
|
|
void setActiveTool(MapTool* tool);
|
|
|
|
void setMapcavas(Mapcavas* canvas);
|
|
|
|
private:
|
|
QHash<Tool, MapTool*> m_tools;
|
|
MapTool* m_activeTool = nullptr;
|
|
};
|
|
|
|
#endif // MAPTOOLS_H
|