code format
This commit is contained in:
@@ -1,52 +1,53 @@
|
||||
/*
|
||||
QAD - Qt ADvanced
|
||||
QAD - Qt ADvanced
|
||||
|
||||
Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru
|
||||
Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef BLOCKBASE_H
|
||||
#define BLOCKBASE_H
|
||||
|
||||
#include <QGraphicsView>
|
||||
#include <QGraphicsScene>
|
||||
#include "qad_blockview_export.h"
|
||||
#include "qad_types.h"
|
||||
|
||||
#include <QGraphicsEllipseItem>
|
||||
#include <QGraphicsItem>
|
||||
#include <QGraphicsObject>
|
||||
#include <QGraphicsEllipseItem>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsSceneHoverEvent>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QGraphicsView>
|
||||
#include <QStack>
|
||||
#include "qad_types.h"
|
||||
#include "qad_blockview_export.h"
|
||||
|
||||
|
||||
static const int _blockitem_current_version_ = 1;
|
||||
|
||||
|
||||
enum BlockviewItemData {
|
||||
bvidSelected = 1000, // bool
|
||||
bvidType , // BlockviewItemType
|
||||
bvidItemPos , // QPointF
|
||||
bvidDecorText , // QString src text for QGraphicsSimpleTextItem
|
||||
bvidMoveParent , // bool flag for move parent
|
||||
bvidVisualizeSelection , // bool flag for visualize selection
|
||||
bvidItemSelection , // bool BlockItem selection
|
||||
bvidTmpItem , // bool item is temporary, ignore
|
||||
bvidBlockDecor , // bool item is BlockItem decor
|
||||
bvidDTHandle , // bool
|
||||
bvidCorrectMove , // bool
|
||||
bvidSelected = 1000, // bool
|
||||
bvidType, // BlockviewItemType
|
||||
bvidItemPos, // QPointF
|
||||
bvidDecorText, // QString src text for QGraphicsSimpleTextItem
|
||||
bvidMoveParent, // bool flag for move parent
|
||||
bvidVisualizeSelection, // bool flag for visualize selection
|
||||
bvidItemSelection, // bool BlockItem selection
|
||||
bvidTmpItem, // bool item is temporary, ignore
|
||||
bvidBlockDecor, // bool item is BlockItem decor
|
||||
bvidDTHandle, // bool
|
||||
bvidCorrectMove, // bool
|
||||
};
|
||||
|
||||
enum BlockviewItemType {
|
||||
@@ -57,16 +58,15 @@ enum BlockviewItemType {
|
||||
bvitDecor,
|
||||
};
|
||||
|
||||
QAD_BLOCKVIEW_EXPORT QDataStream & operator <<(QDataStream & s, const QGraphicsItem * item);
|
||||
QAD_BLOCKVIEW_EXPORT QDataStream & operator >>(QDataStream & s, QGraphicsItem *& item);
|
||||
QAD_BLOCKVIEW_EXPORT QDataStream & operator<<(QDataStream & s, const QGraphicsItem * item);
|
||||
QAD_BLOCKVIEW_EXPORT QDataStream & operator>>(QDataStream & s, QGraphicsItem *& item);
|
||||
|
||||
|
||||
class QAD_BLOCKVIEW_EXPORT BlockItemBase: public QObject
|
||||
{
|
||||
class QAD_BLOCKVIEW_EXPORT BlockItemBase: public QObject {
|
||||
Q_OBJECT
|
||||
Q_ENUMS(Action)
|
||||
|
||||
public:
|
||||
|
||||
enum Action {
|
||||
BlockAdd = 1,
|
||||
BlockMove,
|
||||
@@ -82,7 +82,6 @@ public:
|
||||
BusSegmentRemove,
|
||||
Paste
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
#endif // BLOCKBASE_H
|
||||
|
||||
Reference in New Issue
Block a user