Files
HPPA/HPPA/MapTools.h
tangchao0503 1c7780eb14 完成maptool的功能:
1、工具在工具栏中的状态管理;
2、工具在mapcavas中的图标管理;
3、工具在多tab切换时的管理;
4、MapToolSpectral添加十字叉,显示点击位置;
2026-03-13 14:52:47 +08:00

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