Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/GridCal/Gui/Main/icons_rc.py
  • Loading branch information
SanPen committed Apr 8, 2024
2 parents 09e29aa + a895a02 commit 6e8e389
Show file tree
Hide file tree
Showing 142 changed files with 37,459 additions and 30,539 deletions.
280 changes: 143 additions & 137 deletions .idea/workspace.xml

Large diffs are not rendered by default.

Binary file modified Grids_and_profiles/grids/GB reduced network.gridcal
Binary file not shown.
Binary file modified Grids_and_profiles/grids/Texas 2000 + VSC.gridcal
Binary file not shown.
2 changes: 1 addition & 1 deletion doc/auto_document_models.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
from typing import Dict
import pandas as pd
# from pytablewriter import RstSimpleTableWriter
from pytablewriter import RstSimpleTableWriter
from GridCalEngine.IO.cim.cgmes.cgmes_circuit import CgmesCircuit
from GridCalEngine.IO.raw.devices.psse_circuit import PsseCircuit
from GridCalEngine.Devices.multi_circuit import MultiCircuit
Expand Down
5,836 changes: 5,836 additions & 0 deletions doc/rst_source/other_data_models.rst

Large diffs are not rendered by default.

Binary file modified pics/GridCal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pics/GridCal4_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
189 changes: 189 additions & 0 deletions pics/GridCal5_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pics/GridCal_banner1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pics/GridCal_black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pics/GridCal_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
from __future__ import annotations
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Union
import numpy as np
from PySide6.QtCore import Qt
from PySide6.QtGui import QIcon, QPixmap
from PySide6.QtWidgets import QMenu, QLabel, QDoubleSpinBox, QPushButton, QVBoxLayout, QComboBox, QDialog, QGraphicsScene
from GridCal.Gui.GuiFunctions import get_list_model
from GridCal.Gui.Diagrams.BusBranchEditorWidget.terminal_item import TerminalItem
from GridCal.Gui.GuiFunctions import get_list_model, add_menu_entry
from GridCal.Gui.Diagrams.DiagramEditorWidget.terminal_item import BarTerminalItem, RoundTerminalItem
from GridCalEngine.Devices.Branches.line import SequenceLineType, OverheadLineType, UndergroundLineType
from GridCalEngine.Devices.Branches.dc_line import DcLine
from GridCalEngine.enumerations import DeviceType
from GridCal.Gui.Diagrams.BusBranchEditorWidget.Branches.line_graphics_template import LineGraphicTemplateItem
from GridCal.Gui.Diagrams.DiagramEditorWidget.Branches.line_graphics_template import LineGraphicTemplateItem

if TYPE_CHECKING: # Only imports the below statements during type checking
from GridCal.Gui.Diagrams.BusBranchEditorWidget import BusBranchEditorWidget
from GridCal.Gui.Diagrams.DiagramEditorWidget.diagram_editor_widget import DiagramEditorWidget


class DcLineEditor(QDialog):
Expand Down Expand Up @@ -230,9 +230,9 @@ def load_template_btn_click(self):
class DcLineGraphicItem(LineGraphicTemplateItem):

def __init__(self,
from_port: TerminalItem,
to_port: TerminalItem,
editor: BusBranchEditorWidget,
from_port: Union[BarTerminalItem, RoundTerminalItem],
to_port: Union[BarTerminalItem, RoundTerminalItem],
editor: DiagramEditorWidget,
width=5, api_object: DcLine = None):
"""
Expand Down Expand Up @@ -264,6 +264,13 @@ def contextMenuEvent(self, event):
pe.setChecked(self.api_object.active)
pe.triggered.connect(self.enable_disable_toggle)

add_menu_entry(menu=menu,
text="Draw labels",
icon_path="",
function_ptr=self.enable_disable_label_drawing,
checkeable=True,
checked_value=self.draw_labels)

ra3 = menu.addAction('Editor')
edit_icon = QIcon()
edit_icon.addPixmap(QPixmap(":/Icons/icons/edit.svg"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,24 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
from __future__ import annotations
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Union
from PySide6.QtGui import QIcon, QPixmap
from PySide6.QtWidgets import QMenu
from GridCal.Gui.Diagrams.BusBranchEditorWidget.terminal_item import TerminalItem
from GridCal.Gui.GuiFunctions import add_menu_entry
from GridCal.Gui.Diagrams.DiagramEditorWidget.terminal_item import BarTerminalItem, RoundTerminalItem
from GridCal.Gui.Diagrams.DiagramEditorWidget.Branches.line_graphics_template import LineGraphicTemplateItem
from GridCalEngine.Devices.Branches.hvdc_line import HvdcLine
from GridCal.Gui.Diagrams.BusBranchEditorWidget.Branches.line_graphics_template import LineGraphicTemplateItem

if TYPE_CHECKING: # Only imports the below statements during type checking
from GridCal.Gui.Diagrams.BusBranchEditorWidget import BusBranchEditorWidget
from GridCal.Gui.Diagrams.DiagramEditorWidget.diagram_editor_widget import DiagramEditorWidget


class HvdcGraphicItem(LineGraphicTemplateItem):

def __init__(self,
from_port: TerminalItem,
to_port: TerminalItem,
editor: BusBranchEditorWidget,
from_port: Union[BarTerminalItem, RoundTerminalItem],
to_port: Union[BarTerminalItem, RoundTerminalItem],
editor: DiagramEditorWidget,
width=5,
api_object: HvdcLine = None):
"""
Expand Down Expand Up @@ -64,6 +65,13 @@ def contextMenuEvent(self, event):
pe.setChecked(self.api_object.active)
pe.triggered.connect(self.enable_disable_toggle)

add_menu_entry(menu=menu,
text="Draw labels",
icon_path="",
function_ptr=self.enable_disable_label_drawing,
checkeable=True,
checked_value=self.draw_labels)

# pe2 = menu.addAction('Convert to Multi-terminal')
# pe2.triggered.connect(self.convert_to_multi_terminal)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@
from PySide6.QtCore import Qt, QRectF
from PySide6.QtGui import QPen, QIcon, QPixmap, QBrush
from PySide6.QtWidgets import QMenu, QGraphicsRectItem, QGraphicsSceneContextMenuEvent
from GridCal.Gui.Diagrams.BusBranchEditorWidget.terminal_item import TerminalItem
from GridCal.Gui.Diagrams.BusBranchEditorWidget.Branches.line_editor import LineEditor
from GridCal.Gui.GuiFunctions import add_menu_entry
from GridCal.Gui.Diagrams.DiagramEditorWidget.terminal_item import BarTerminalItem, RoundTerminalItem
from GridCal.Gui.Diagrams.DiagramEditorWidget.Branches.line_editor import LineEditor
from GridCal.Gui.messages import yes_no_question, warning_msg
from GridCal.Gui.Diagrams.BusBranchEditorWidget.Branches.line_graphics_template import LineGraphicTemplateItem
from GridCal.Gui.Diagrams.DiagramEditorWidget.Branches.line_graphics_template import LineGraphicTemplateItem
from GridCalEngine.Devices.Branches.line import Line, SequenceLineType
from GridCalEngine.enumerations import DeviceType

if TYPE_CHECKING: # Only imports the below statements during type checking
from GridCal.Gui.Diagrams.BusBranchEditorWidget import BusBranchEditorWidget
from GridCal.Gui.Diagrams.DiagramEditorWidget.diagram_editor_widget import DiagramEditorWidget


class LineGraphicItem(LineGraphicTemplateItem):
Expand All @@ -36,9 +37,9 @@ class LineGraphicItem(LineGraphicTemplateItem):
"""

def __init__(self,
from_port: TerminalItem,
to_port: Union[TerminalItem, None],
editor: BusBranchEditorWidget,
from_port: Union[BarTerminalItem, RoundTerminalItem],
to_port: Union[BarTerminalItem, RoundTerminalItem, None],
editor: DiagramEditorWidget,
width=5,
api_object: Line = None):
"""
Expand Down Expand Up @@ -123,6 +124,12 @@ def contextMenuEvent(self, event: QGraphicsSceneContextMenuEvent):
pe.setChecked(self.api_object.active)
pe.triggered.connect(self.enable_disable_toggle)

add_menu_entry(menu=menu,
text="Draw labels",
function_ptr=self.enable_disable_label_drawing,
checkeable=True,
checked_value=self.draw_labels)

ra3 = menu.addAction('Editor')
edit_icon = QIcon()
edit_icon.addPixmap(QPixmap(":/Icons/icons/edit.svg"))
Expand Down
Loading

0 comments on commit 6e8e389

Please sign in to comment.