diff options
author | Blaine | 2020-06-02 23:34:38 +0530 |
---|---|---|
committer | Blaine | 2020-06-02 23:34:38 +0530 |
commit | 7ae4201c7539820108e991ff7df1a710e1387c13 (patch) | |
tree | ca122103eaa3c9fae7a9aedcca03a3c9036c50f5 /src/main | |
parent | 9a005e618c793f27b344688dcd7a000436c454c8 (diff) | |
parent | eed83d5a458ecfb189ba637981a36a1c787fe7f2 (diff) | |
download | Chemical-PFD-7ae4201c7539820108e991ff7df1a710e1387c13.tar.gz Chemical-PFD-7ae4201c7539820108e991ff7df1a710e1387c13.tar.bz2 Chemical-PFD-7ae4201c7539820108e991ff7df1a710e1387c13.zip |
Merge branch 'merge'
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/python/shapes/shapes.py | 26 | ||||
-rw-r--r-- | src/main/python/utils/undo.py | 1 |
2 files changed, 27 insertions, 0 deletions
diff --git a/src/main/python/shapes/shapes.py b/src/main/python/shapes/shapes.py index 210d68e..9f7113c 100644 --- a/src/main/python/shapes/shapes.py +++ b/src/main/python/shapes/shapes.py @@ -6,9 +6,15 @@ from PyQt5.QtWidgets import QLineEdit, QGraphicsItem, QGraphicsEllipseItem, QGra from PyQt5.QtGui import QPen, QColor, QFont, QCursor, QPainterPath, QPainter, QDrag, QBrush, QImage, QTransform from PyQt5.QtCore import Qt, QRectF, QPointF, QSizeF, QEvent, QMimeData, QFile, QIODevice, QRect +<<<<<<< HEAD from line import Line +======= +from .line import Line + +from utils.app import fileImporter +>>>>>>> merge # resourceManager = ApplicationContext() @@ -226,7 +232,11 @@ class LineGripItem(GripItem): startPoint = endPoint = self.parentItem().mapToScene(self.pos()) self.tempLine = Line(startPoint, endPoint) self.tempLine.setStartGripItem(self) +<<<<<<< HEAD self.scene().addItem(self.tempLine) +======= + self.scene().addItemPlus(self.tempLine) +>>>>>>> merge super().mousePressEvent(mouseEvent) def mouseMoveEvent(self, mouseEvent): @@ -298,12 +308,22 @@ class NodeItem(QGraphicsSvgItem): def __init__(self, unitOperationType, parent=None): QGraphicsSvgItem.__init__(self, parent) self.m_type = unitOperationType +<<<<<<< HEAD self.m_renderer = QSvgRenderer("svg/" + unitOperationType + ".svg") +======= + # self.m_renderer = QSvgRenderer("svg/" + unitOperationType + ".svg") + # self.m_renderer = QSvgRenderer(fileImporter(f'svg/{unitOperationType}.svg')) + self.m_renderer = QSvgRenderer(fileImporter(f'svg/ellipse.svg')) +>>>>>>> merge # self.m_renderer = QSvgRenderer(resourceManager.get_resource(f'toolbar/{unitOperationType}.svg')) self.setSharedRenderer(self.m_renderer) # set initial size of item self.width = 100 +<<<<<<< HEAD self.height = 150 +======= + self.height = 100 +>>>>>>> merge self.rect = QRectF(-self.width / 2, -self.height / 2, self.width, self.height) # set graphical settings for this item self.setFlags(QGraphicsSvgItem.ItemIsMovable | @@ -315,6 +335,12 @@ class NodeItem(QGraphicsSvgItem): self.lineGripItems = [] self.sizeGripItems = [] +<<<<<<< HEAD +======= + def advance(self, int): + print (int) + +>>>>>>> merge def boundingRect(self): """Overrides QGraphicsSvgItem's boundingRect() virtual public function and returns a valid bounding diff --git a/src/main/python/utils/undo.py b/src/main/python/utils/undo.py index cf539e7..4a9f3dd 100644 --- a/src/main/python/utils/undo.py +++ b/src/main/python/utils/undo.py @@ -36,6 +36,7 @@ class addCommand(QUndoCommand): self.scene.addItem(self.diagramItem) self.diagramItem.setPos(self.itemPos) self.scene.clearSelection() + # print(self.diagramItem) self.scene.update() class deleteCommand(QUndoCommand): |