ui.gitems package¶
Submodules¶
ui.gitems.blink module¶
ui.gitems.diagram_view module¶
- class ui.gitems.diagram_view.DiagramView(diagram_uid, parent=None)¶
Bases:
QGraphicsItem
Represents some diagram view in edited diagram background
- ZVALUE = -9¶
- boundingRect()¶
Redefination of standart boundingRect function, that return boun rect
- paint(painter, option, widget)¶
Redefination of standart paint function, that paint object from shape file
- release_view()¶
ui.gitems.init_area module¶
ui.gitems.line module¶
- class ui.gitems.line.Line(line_data, parent=None, tmp=False)¶
Bases:
QGraphicsLineItem
Represents a join of nodes in the diagram
- DASH_PATTERN = [10, 5]¶
- DASH_PATTERN_BOLD = [5, 2.5]¶
- MOVE_ZVALUE = 10¶
- STANDART_ZVALUE = 110¶
- TMP_ZVALUE = 0¶
- deselect()¶
set unselected and repaint line
- mousePressEvent(event)¶
Standart mouse event
- mouseReleaseEvent(event)¶
Standart mouse event
- move_line(new_state=None)¶
Move line
- paint(painter, option, widget)¶
Redefinition of standard paint function
- refresh_line()¶
Refresh line after point changes
- release_line()¶
- select()¶
set selected and repaint line
- set_tmp()¶
set style and z
- set_width()¶
Set line width according to actual zoom
- property shape_data¶
- shift_line(shift, new_state=None)¶
shift line
- state¶
Item state
- update_color()¶
Update color to actual color
- update_geometry()¶
Update geometry according to actual zoom
ui.gitems.mash module¶
ui.gitems.point module¶
- class ui.gitems.point.Point(point_data, parent=None, tmp=False)¶
Bases:
QGraphicsEllipseItem
Represents a block in the diagram
- MOVE_ZVALUE = 20¶
- POINT_BOLD_SIZE = 6¶
- POINT_SIZE = 4¶
- STANDART_ZVALUE = 120¶
- TMP_ZVALUE = 1¶
- deselect()¶
set unselected and repaint point
- mousePressEvent(event)¶
Standart mouse event
- mouseReleaseEvent(event)¶
Standart mouse event
- move_point(pos=None, new_state=None, ungrab=True)¶
Move point to new pos and move all affected lines
- paint(painter, option, widget)¶
Redefinition of standard paint function
- release_point()¶
- select()¶
set selected and repaint point
- set_size()¶
Set point size according to actual zoom
- set_tmp()¶
set style and z
- property shape_data¶
- shift_point(shift, new_state=None, ungrab=True)¶
Move point to new pos and move all affected lines
- state¶
Item state
- update_color()¶
Update color to actual color
- update_geometry()¶
Update geometry according to actual zoom
- white_brush = <PyQt5.QtGui.QBrush object>¶
ui.gitems.polygon module¶
- class ui.gitems.polygon.Polygon(polygon_data, parent=None)¶
Bases:
QGraphicsPolygonItem
Represents a join of nodes in the diagram
- DEFAUT_COLOR = '#f0f0e8'¶
- MIN_ZVALUE = -999¶
- deselect()¶
set unselected and repaint polygon
- mousePressEvent(event)¶
Standart mouse event
- mouseReleaseEvent(event)¶
Standart mouse event
- paint(painter, option, widget)¶
Redefinition of standard paint function
- refresh_polygon()¶
reload polygon.spolygon.gtpolygon
- release_polygon()¶
- select()¶
set selected and repaint polygon
- property shape_data¶
- state¶
Item state
- update_brush()¶
- update_color()¶
Update color to actual color
- update_depth()¶
Check and set polygon depth
- update_geometry()¶
Update geometry according to actual zoom
ui.gitems.shp_background module¶
- class ui.gitems.shp_background.ShpBackground(shp, color, parent=None)¶
Bases:
QGraphicsItem
Represents a shp file diagram background
- ZVALUE = -10¶
- boundingRect()¶
Redefination of standart boundingRect function, that return boun rect
- color¶
shape file objects data color
- paint(painter, option, widget)¶
Redefination of standart paint function, that paint object from shape file
- release_background()¶
- shp¶
shape file objects data
ui.gitems.states module¶
- class ui.gitems.states.ItemStates(value)¶
Bases:
IntEnum
Item states
- added = 3¶
- moved = 2¶
- selected = 1¶
- standart = 0¶
- ui.gitems.states.get_state_color(state)¶
return color for set state