27 lines
739 B
C
27 lines
739 B
C
|
|
#ifndef COMPONENTICONMANAGER_H
|
||
|
|
#define COMPONENTICONMANAGER_H
|
||
|
|
|
||
|
|
#include <QObject>
|
||
|
|
#include "global.h"
|
||
|
|
#include "export.hpp"
|
||
|
|
/****图标管理类
|
||
|
|
* 对各种状态图标的管理
|
||
|
|
*****/
|
||
|
|
|
||
|
|
class DIAGRAM_DESIGNER_PUBLIC ComponentIconManager : public QObject
|
||
|
|
{
|
||
|
|
Q_OBJECT
|
||
|
|
public:
|
||
|
|
explicit ComponentIconManager(QObject *parent = nullptr);
|
||
|
|
~ComponentIconManager();
|
||
|
|
static ComponentIconManager& instance();
|
||
|
|
public:
|
||
|
|
void initialData();
|
||
|
|
void addIcon(QString tpe,DiagramMode mode,VariantIcon varIcon,QString iconPath);
|
||
|
|
QString getIconPath(QString tpe,DiagramMode mode,VariantIcon varIcon);
|
||
|
|
private:
|
||
|
|
QMap<QString,QMap<DiagramMode,QMap<VariantIcon,QString>>> _mapIcon;
|
||
|
|
bool _init;
|
||
|
|
};
|
||
|
|
#endif // COMPONENTICONMANAGER_H
|