Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
# Conflicts:
#	.idea/workspace.xml
  • Loading branch information
SanPen committed Mar 17, 2024
2 parents 26674ef + c421d72 commit f61f713
Show file tree
Hide file tree
Showing 38 changed files with 30,142 additions and 26,504 deletions.
2 changes: 1 addition & 1 deletion src/GridCal/Gui/LoadDesigner/icons_rc.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Resource object code (Python 3)
# Created by: object code
# Created by: The Resource Compiler for Qt version 6.5.1
# Created by: The Resource Compiler for Qt version 6.5.3
# WARNING! All changes made in this file will be lost!

from PySide6 import QtCore
Expand Down
17 changes: 15 additions & 2 deletions src/GridCal/Gui/LoadDesigner/load_designer.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@

# This file is part of GridCal
#
# GridCal is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GridCal 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GridCal. If not, see <http://www.gnu.org/licenses/>.
import sys
import numpy as np
import pandas as pd
from datetime import timedelta
from PySide6.QtWidgets import QApplication
from PySide6 import QtCore, QtWidgets

from GridCal.Gui.LoadDesigner.gui import Ui_Dialog
from GridCal.Gui.LoadDesigner.load_designer_ui import Ui_Dialog


class LoadPointsModel(QtCore.QAbstractTableModel):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-

################################################################################
## Form generated from reading UI file 'gui.ui'
## Form generated from reading UI file 'load_designer_ui.ui'
##
## Created by: Qt User Interface Compiler version 6.5.1
## Created by: Qt User Interface Compiler version 6.5.3
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/GridCal/Gui/LoadDesigner/update_gui_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@

if __name__ == '__main__':
convert_resource_file(source='icons.qrc')
for f in ['gui.ui']:
convert_ui_file(source=f)
for f in ['load_designer_ui.ui']:
convert_ui_file(source=f)
2 changes: 1 addition & 1 deletion src/GridCal/Gui/Main/ConsoleLog.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
################################################################################
## Form generated from reading UI file 'ConsoleLog.ui'
##
## Created by: Qt User Interface Compiler version 6.6.1
## Created by: Qt User Interface Compiler version 6.5.3
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
Expand Down
244 changes: 127 additions & 117 deletions src/GridCal/Gui/Main/MainWindow.py

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions src/GridCal/Gui/Main/MainWindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -8802,6 +8802,7 @@ QProgressBar::chunk{
<addaction name="actionProcess_topology"/>
<addaction name="actionFuse_devices"/>
<addaction name="actionre_index_time"/>
<addaction name="actionScale"/>
<addaction name="separator"/>
<addaction name="actionLaunch_data_analysis_tool"/>
<addaction name="actionFix_generators_active_based_on_the_power"/>
Expand Down Expand Up @@ -9930,6 +9931,18 @@ QProgressBar::chunk{
<string>Select buses by country</string>
</property>
</action>
<action name="actionScale">
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/Icons/icons/scale.svg</normaloff>:/Icons/icons/scale.svg</iconset>
</property>
<property name="text">
<string>Scale</string>
</property>
<property name="toolTip">
<string>Scale the system load and or generation</string>
</property>
</action>
</widget>
<resources>
<include location="icons.qrc"/>
Expand Down
10 changes: 10 additions & 0 deletions src/GridCal/Gui/Main/SubClasses/Model/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from GridCal.Gui.TowerBuilder.LineBuilderDialogue import TowerBuilderGUI
from GridCal.Gui.GeneralDialogues import LogsDialogue
from GridCal.Gui.BusBranchEditorWidget.bus_branch_editor_widget import BusBranchEditorWidget
from GridCal.Gui.SystemScaler.system_scaler import SystemScaler


class ObjectsTableMain(DiagramsMain):
Expand Down Expand Up @@ -74,6 +75,7 @@ def __init__(self, parent=None):
# menu trigger
self.ui.actionDelete_inconsistencies.triggered.connect(self.delete_inconsistencies)
self.ui.actionClean_database.triggered.connect(self.clean_database)
self.ui.actionScale.triggered.connect(self.scale)

# tree click
self.ui.dataStructuresTreeView.clicked.connect(self.view_objects_data)
Expand Down Expand Up @@ -1003,3 +1005,11 @@ def clean_database(self):
if len(logger) > 0:
dlg = LogsDialogue('DB clean logger', logger)
dlg.exec()

def scale(self):
"""
Show the system scaler window
The scaler window may modify the circuit
"""
system_scaler_window = SystemScaler(grid=self.circuit, parent=self)
system_scaler_window.exec()
1 change: 1 addition & 0 deletions src/GridCal/Gui/Main/icons.qrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<RCC>
<qresource prefix="Icons">
<file>icons/scale.svg</file>
<file>icons/time_series set.svg</file>
<file>icons/time_series span.svg</file>
<file>icons/time_series.svg</file>
Expand Down
59 changes: 59 additions & 0 deletions src/GridCal/Gui/Main/icons/scale.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f61f713

Please sign in to comment.