DiagramDesigner/diagramCavas/include/diagramEditor/diagramEditorStructContainer.h

28 lines
871 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#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