28 lines
871 B
C++
28 lines
871 B
C++
#ifndef DIAGRAMEDITORSTRUCTCONTAINER_H
|
||
#define DIAGRAMEDITORSTRUCTCONTAINER_H
|
||
|
||
//组态划分后结构的容器,可包含分段母线及间隔、独立间隔、变压器等,以确定组态图空间结构
|
||
#include <QObject>
|
||
#include <QVector2D>
|
||
#include "global.h"
|
||
|
||
class DiagramEditorBaseBlock;
|
||
|
||
class DiagramEditorStructContainer : public QObject
|
||
{
|
||
Q_OBJECT
|
||
public:
|
||
DiagramEditorStructContainer(QObject *parent = 0);
|
||
virtual ~DiagramEditorStructContainer();
|
||
public:
|
||
bool insertBlock(int,DiagramEditorBaseBlock*);
|
||
auto& getBlockMap() {return _mapBlocks;}
|
||
void setId(const QString& s) {sId = s;}
|
||
QString getId() {return sId;}
|
||
private:
|
||
QString sId;
|
||
QMap<int,QList<DiagramEditorBaseBlock*>> _mapBlocks; //容器中包含的对象列表,<pos,listBlocks> pos当前容器中的位置:0上,1中上,2中下,3下
|
||
};
|
||
|
||
#endif
|