40 lines
862 B
C++
40 lines
862 B
C++
/**
|
||
*\file selectorManager.h
|
||
*
|
||
*\brief 所有的selector管理类,采用单例模式
|
||
* 每个cavas实例一个selector,根据具体要实现的内容进行创建和选择
|
||
*\author by 20241113
|
||
*/
|
||
|
||
#ifndef SELECTORMANAGER_H
|
||
#define SELECTORMANAGER_H
|
||
|
||
#include <QObject>
|
||
#include "baseSelector.h"
|
||
#include "global.h"
|
||
|
||
|
||
class SelectorManager : public QObject
|
||
{
|
||
Q_OBJECT
|
||
|
||
public:
|
||
SelectorManager(QObject *parent = 0);
|
||
~SelectorManager();
|
||
|
||
public:
|
||
void setWorkingSelector(SelectorType s) { m_curSelector=s; }
|
||
BaseSelector* getWorkingSelector(); //根据操作方式获取selector
|
||
|
||
void setDrawGraphicsItem(GraphicsItemType);
|
||
|
||
public slots:
|
||
void onSignal_setWorkingSelector(SelectorType);
|
||
|
||
private:
|
||
SelectorType m_curSelector;
|
||
QVector<BaseSelector*> m_vecSelectors;
|
||
};
|
||
|
||
#endif
|