Skip to content

Commit

Permalink
Merged from devel (5.1.25)
Browse files Browse the repository at this point in the history
  • Loading branch information
SanPen committed Sep 9, 2024
1 parent e237522 commit 24e068e
Show file tree
Hide file tree
Showing 35 changed files with 2,822 additions and 2,392 deletions.
851 changes: 423 additions & 428 deletions .idea/workspace.xml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions doc/auto_document_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def get_gridcal_data_frames():
obj_dict = get_objects_dictionary()

circuit = MultiCircuit()
d = circuit.objects_with_profiles.copy()
d = circuit.template_objects_dict.copy()
categories = {elm.device_type.value: cat for cat, elms in d.items() for elm in elms}
for obj_type_name, obj in obj_dict.items():

Expand All @@ -90,7 +90,7 @@ def get_gridcal_data_frames_per_category():
obj_dict = get_objects_dictionary()

circuit = MultiCircuit()
d = circuit.objects_with_profiles.copy()
d = circuit.template_objects_dict.copy()
categories = {elm.device_type.value: cat for cat, elms in d.items() for elm in elms}

for obj_type_name, obj in obj_dict.items():
Expand Down
2 changes: 1 addition & 1 deletion src/GridCal/Gui/Analysis/AnalysisDialogue.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(self, circuit: MultiCircuit = None):
# set the circuit
self.circuit = circuit

self.object_types = [dev.device_type.value for dev in circuit.get_objects_with_profiles_list()]
self.object_types = [dev.device_type.value for dev in circuit.get_template_objects_list()]

# declare logs
self.log = GridErrorLog()
Expand Down
186 changes: 96 additions & 90 deletions src/GridCal/Gui/CoordinatesInput/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,55 +16,19 @@
QImage, QKeySequence, QLinearGradient, QPainter,
QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QCheckBox, QComboBox, QDialog,
QFormLayout, QFrame, QGridLayout, QHBoxLayout,
QHeaderView, QPushButton, QRadioButton, QSizePolicy,
QSpacerItem, QSplitter, QTableView, QVBoxLayout,
QWidget)
QFrame, QGridLayout, QHeaderView, QLabel,
QPushButton, QRadioButton, QSizePolicy, QSpacerItem,
QSplitter, QTableView, QVBoxLayout, QWidget)
from .icons_rc import *

class Ui_Dialog(object):
def setupUi(self, Dialog):
if not Dialog.objectName():
Dialog.setObjectName(u"Dialog")
Dialog.resize(769, 420)
Dialog.resize(853, 420)
self.verticalLayout = QVBoxLayout(Dialog)
self.verticalLayout.setObjectName(u"verticalLayout")
self.verticalLayout.setContentsMargins(-1, 0, -1, 9)
self.frame = QFrame(Dialog)
self.frame.setObjectName(u"frame")
self.frame.setMaximumSize(QSize(16777215, 40))
self.frame.setFrameShape(QFrame.NoFrame)
self.frame.setFrameShadow(QFrame.Raised)
self.horizontalLayout_5 = QHBoxLayout(self.frame)
self.horizontalLayout_5.setSpacing(1)
self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
self.horizontalLayout_5.setContentsMargins(0, 0, 0, 0)
self.open_button = QPushButton(self.frame)
self.open_button.setObjectName(u"open_button")
self.open_button.setMinimumSize(QSize(0, 0))
icon = QIcon()
icon.addFile(u":/Icons/icons/import_profiles.svg", QSize(), QIcon.Normal, QIcon.Off)
self.open_button.setIcon(icon)
self.open_button.setIconSize(QSize(24, 24))

self.horizontalLayout_5.addWidget(self.open_button)

self.refreshButton = QPushButton(self.frame)
self.refreshButton.setObjectName(u"refreshButton")
icon1 = QIcon()
icon1.addFile(u":/Icons/icons/transform.svg", QSize(), QIcon.Normal, QIcon.Off)
self.refreshButton.setIcon(icon1)
self.refreshButton.setIconSize(QSize(24, 24))

self.horizontalLayout_5.addWidget(self.refreshButton)

self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)

self.horizontalLayout_5.addItem(self.horizontalSpacer_2)


self.verticalLayout.addWidget(self.frame)

self.splitter = QSplitter(Dialog)
self.splitter.setObjectName(u"splitter")
self.splitter.setOrientation(Qt.Horizontal)
Expand All @@ -79,83 +43,118 @@ def setupUi(self, Dialog):
self.frame_2.setObjectName(u"frame_2")
self.frame_2.setFrameShape(QFrame.NoFrame)
self.frame_2.setFrameShadow(QFrame.Raised)
self.formLayout = QFormLayout(self.frame_2)
self.formLayout.setObjectName(u"formLayout")
self.formLayout.setContentsMargins(-1, 0, -1, -1)
self.xComboBox = QComboBox(self.frame_2)
self.xComboBox.setObjectName(u"xComboBox")
self.gridLayout_2 = QGridLayout(self.frame_2)
self.gridLayout_2.setObjectName(u"gridLayout_2")
self.gridLayout_2.setVerticalSpacing(2)
self.gridLayout_2.setContentsMargins(-1, 0, -1, 0)
self.nameComboBox = QComboBox(self.frame_2)
self.nameComboBox.setObjectName(u"nameComboBox")

self.formLayout.setWidget(2, QFormLayout.FieldRole, self.xComboBox)
self.gridLayout_2.addWidget(self.nameComboBox, 5, 1, 1, 2)

self.yComboBox = QComboBox(self.frame_2)
self.yComboBox.setObjectName(u"yComboBox")
self.longitudeCheckBox = QCheckBox(self.frame_2)
self.longitudeCheckBox.setObjectName(u"longitudeCheckBox")

self.formLayout.setWidget(3, QFormLayout.FieldRole, self.yComboBox)
self.gridLayout_2.addWidget(self.longitudeCheckBox, 15, 0, 2, 1)

self.latitudeComboBox = QComboBox(self.frame_2)
self.latitudeComboBox.setObjectName(u"latitudeComboBox")

self.formLayout.setWidget(4, QFormLayout.FieldRole, self.latitudeComboBox)
self.gridLayout_2.addWidget(self.latitudeComboBox, 14, 1, 1, 2)

self.open_button = QPushButton(self.frame_2)
self.open_button.setObjectName(u"open_button")
icon = QIcon()
icon.addFile(u":/Icons/icons/import_profiles.svg", QSize(), QIcon.Normal, QIcon.Off)
self.open_button.setIcon(icon)

self.gridLayout_2.addWidget(self.open_button, 2, 0, 1, 1)

self.longitudeComboBox = QComboBox(self.frame_2)
self.longitudeComboBox.setObjectName(u"longitudeComboBox")

self.formLayout.setWidget(5, QFormLayout.FieldRole, self.longitudeComboBox)
self.gridLayout_2.addWidget(self.longitudeComboBox, 16, 1, 1, 2)

self.xCheckBox = QCheckBox(self.frame_2)
self.xCheckBox.setObjectName(u"xCheckBox")
self.nameRadioButton = QRadioButton(self.frame_2)
self.nameRadioButton.setObjectName(u"nameRadioButton")
self.nameRadioButton.setChecked(True)

self.gridLayout_2.addWidget(self.nameRadioButton, 5, 0, 1, 1)

self.label_4 = QLabel(self.frame_2)
self.label_4.setObjectName(u"label_4")

self.gridLayout_2.addWidget(self.label_4, 7, 0, 1, 1)

self.codeComboBox = QComboBox(self.frame_2)
self.codeComboBox.setObjectName(u"codeComboBox")

self.formLayout.setWidget(2, QFormLayout.LabelRole, self.xCheckBox)
self.gridLayout_2.addWidget(self.codeComboBox, 6, 1, 1, 2)

self.yCheckBox = QCheckBox(self.frame_2)
self.yCheckBox.setObjectName(u"yCheckBox")

self.formLayout.setWidget(3, QFormLayout.LabelRole, self.yCheckBox)
self.gridLayout_2.addWidget(self.yCheckBox, 11, 0, 2, 1)

self.latitudeCheckBox = QCheckBox(self.frame_2)
self.latitudeCheckBox.setObjectName(u"latitudeCheckBox")
self.xComboBox = QComboBox(self.frame_2)
self.xComboBox.setObjectName(u"xComboBox")

self.formLayout.setWidget(4, QFormLayout.LabelRole, self.latitudeCheckBox)
self.gridLayout_2.addWidget(self.xComboBox, 10, 1, 1, 2)

self.longitudeCheckBox = QCheckBox(self.frame_2)
self.longitudeCheckBox.setObjectName(u"longitudeCheckBox")
self.label_2 = QLabel(self.frame_2)
self.label_2.setObjectName(u"label_2")

self.formLayout.setWidget(5, QFormLayout.LabelRole, self.longitudeCheckBox)
self.gridLayout_2.addWidget(self.label_2, 3, 0, 1, 1)

self.nameRadioButton = QRadioButton(self.frame_2)
self.nameRadioButton.setObjectName(u"nameRadioButton")
self.nameRadioButton.setChecked(True)
self.yComboBox = QComboBox(self.frame_2)
self.yComboBox.setObjectName(u"yComboBox")

self.gridLayout_2.addWidget(self.yComboBox, 12, 1, 1, 2)

self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)

self.formLayout.setWidget(0, QFormLayout.LabelRole, self.nameRadioButton)
self.gridLayout_2.addItem(self.verticalSpacer, 17, 0, 1, 3)

self.codeRadioButton = QRadioButton(self.frame_2)
self.codeRadioButton.setObjectName(u"codeRadioButton")

self.formLayout.setWidget(1, QFormLayout.LabelRole, self.codeRadioButton)
self.gridLayout_2.addWidget(self.codeRadioButton, 6, 0, 1, 1)

self.nameComboBox = QComboBox(self.frame_2)
self.nameComboBox.setObjectName(u"nameComboBox")
self.latitudeCheckBox = QCheckBox(self.frame_2)
self.latitudeCheckBox.setObjectName(u"latitudeCheckBox")

self.formLayout.setWidget(0, QFormLayout.FieldRole, self.nameComboBox)
self.gridLayout_2.addWidget(self.latitudeCheckBox, 13, 0, 2, 1)

self.codeComboBox = QComboBox(self.frame_2)
self.codeComboBox.setObjectName(u"codeComboBox")
self.xCheckBox = QCheckBox(self.frame_2)
self.xCheckBox.setObjectName(u"xCheckBox")

self.formLayout.setWidget(1, QFormLayout.FieldRole, self.codeComboBox)
self.gridLayout_2.addWidget(self.xCheckBox, 9, 0, 2, 1)

self.label_3 = QLabel(self.frame_2)
self.label_3.setObjectName(u"label_3")

self.verticalLayout_2.addWidget(self.frame_2)
self.gridLayout_2.addWidget(self.label_3, 4, 0, 1, 3)

self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.label = QLabel(self.frame_2)
self.label.setObjectName(u"label")

self.verticalLayout_2.addItem(self.verticalSpacer)
self.gridLayout_2.addWidget(self.label, 1, 0, 1, 1)

self.label_5 = QLabel(self.frame_2)
self.label_5.setObjectName(u"label_5")

self.gridLayout_2.addWidget(self.label_5, 8, 0, 1, 3)


self.verticalLayout_2.addWidget(self.frame_2)

self.splitter.addWidget(self.frame_4)
self.frame_6 = QFrame(self.splitter)
self.frame_6.setObjectName(u"frame_6")
self.frame_6.setFrameShape(QFrame.NoFrame)
self.frame_6.setFrameShadow(QFrame.Raised)
self.verticalLayout_3 = QVBoxLayout(self.frame_6)
self.verticalLayout_3.setSpacing(2)
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
self.verticalLayout_3.setContentsMargins(0, 0, 0, 0)
self.assignation_table = QTableView(self.frame_6)
Expand All @@ -169,19 +168,27 @@ def setupUi(self, Dialog):
self.frame_9.setFrameShadow(QFrame.Raised)
self.gridLayout = QGridLayout(self.frame_9)
self.gridLayout.setObjectName(u"gridLayout")
self.gridLayout.setContentsMargins(0, -1, 0, 0)
self.gridLayout.setContentsMargins(0, 0, 0, 0)
self.horizontalSpacer_3 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)

self.gridLayout.addItem(self.horizontalSpacer_3, 0, 1, 1, 1)

self.acceptButton = QPushButton(self.frame_9)
self.acceptButton.setObjectName(u"acceptButton")
icon2 = QIcon()
icon2.addFile(u":/Icons/icons/gear.svg", QSize(), QIcon.Normal, QIcon.Off)
self.acceptButton.setIcon(icon2)
icon1 = QIcon()
icon1.addFile(u":/Icons/icons/gear.svg", QSize(), QIcon.Normal, QIcon.Off)
self.acceptButton.setIcon(icon1)

self.gridLayout.addWidget(self.acceptButton, 0, 2, 1, 1)

self.refreshButton = QPushButton(self.frame_9)
self.refreshButton.setObjectName(u"refreshButton")
icon2 = QIcon()
icon2.addFile(u":/Icons/icons/transform.svg", QSize(), QIcon.Normal, QIcon.Off)
self.refreshButton.setIcon(icon2)

self.gridLayout.addWidget(self.refreshButton, 0, 0, 1, 1)


self.verticalLayout_3.addWidget(self.frame_9)

Expand All @@ -197,26 +204,25 @@ def setupUi(self, Dialog):

def retranslateUi(self, Dialog):
Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"Dialog", None))
#if QT_CONFIG(tooltip)
self.open_button.setToolTip(QCoreApplication.translate("Dialog", u"Import file", None))
#endif // QT_CONFIG(tooltip)
self.open_button.setText("")
#if QT_CONFIG(tooltip)
self.refreshButton.setToolTip(QCoreApplication.translate("Dialog", u"Refresh assignation table", None))
#endif // QT_CONFIG(tooltip)
self.refreshButton.setText("")
self.xCheckBox.setText(QCoreApplication.translate("Dialog", u"Bus x position", None))
self.yCheckBox.setText(QCoreApplication.translate("Dialog", u"Bus y position", None))
self.latitudeCheckBox.setText(QCoreApplication.translate("Dialog", u"Bus latitude", None))
self.longitudeCheckBox.setText(QCoreApplication.translate("Dialog", u"Bus longitude", None))
self.open_button.setText(QCoreApplication.translate("Dialog", u"Load file", None))
self.nameRadioButton.setText(QCoreApplication.translate("Dialog", u"Name", None))
self.label_4.setText("")
self.yCheckBox.setText(QCoreApplication.translate("Dialog", u"Bus y position", None))
self.label_2.setText("")
self.codeRadioButton.setText(QCoreApplication.translate("Dialog", u"Code", None))
self.latitudeCheckBox.setText(QCoreApplication.translate("Dialog", u"Bus latitude", None))
self.xCheckBox.setText(QCoreApplication.translate("Dialog", u"Bus x position", None))
self.label_3.setText(QCoreApplication.translate("Dialog", u"Match mathod:", None))
self.label.setText("")
self.label_5.setText(QCoreApplication.translate("Dialog", u"Assigning magnitudes", None))
#if QT_CONFIG(tooltip)
self.acceptButton.setToolTip(QCoreApplication.translate("Dialog", u"Do it!", None))
#endif // QT_CONFIG(tooltip)
#if QT_CONFIG(statustip)
self.acceptButton.setStatusTip("")
#endif // QT_CONFIG(statustip)
self.acceptButton.setText(QCoreApplication.translate("Dialog", u"Accept", None))
self.refreshButton.setText(QCoreApplication.translate("Dialog", u"Match", None))
# retranslateUi

Loading

0 comments on commit 24e068e

Please sign in to comment.