Commit 33923a8e authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

pamhyr: Rename Network, Geometry and BC files.

Showing with 38 additions and 34 deletions
+38 -34
......@@ -358,7 +358,9 @@ class Reach:
for i, data in enumerate(list_header[ind]):
d[profile_header[i]] = data
prof = ProfileXYZ(**d, reach=self)
prof = ProfileXYZ(
**d, reach=self, status=self._status
)
prof.import_points(profile)
self._profiles.append(prof)
self._update_profile_numbers()
......
......@@ -43,7 +43,7 @@ class RiverReach(Edge):
status = status
)
self._reach = Reach(self)
self._reach = Reach(status=self._status, parent=self)
@property
def reach(self):
......@@ -52,6 +52,7 @@ class RiverReach(Edge):
class River(Graph):
def __init__(self, status=None):
print(status)
super(River, self).__init__(status=status)
# Replace Node and Edge ctor by custom ctor
......
......@@ -9,9 +9,9 @@ class SavedStatus(object):
return self._saved
def save(self):
print(" * save")
# print(" * save")
self._saved = True
def modified(self):
print(" * modified ...")
# print(" * modified ...")
self._saved = False
......@@ -15,16 +15,16 @@ from PyQt5.QtWidgets import (
QComboBox,
)
from View.BoundaryCondition.BCUndoCommand import (
SetNameCommand, SetNodeCommand, SetTypeCommand,
AddCommand, DelCommand, SortCommand,
MoveCommand, PasteCommand, DuplicateCommand,
)
from Model.BoundaryCondition.BoundaryConditionTypes import (
NotDefined, PonctualContribution,
TimeOverZ, TimeOverDebit, ZOverDebit
)
from View.BoundaryCondition.UndoCommand import (
SetNameCommand, SetNodeCommand, SetTypeCommand,
AddCommand, DelCommand, SortCommand,
MoveCommand, PasteCommand, DuplicateCommand,
)
from View.BoundaryCondition.translate import *
_translate = QCoreApplication.translate
......
......@@ -22,17 +22,17 @@ from PyQt5.QtWidgets import (
QComboBox, QVBoxLayout, QHeaderView, QTabWidget,
)
from View.BoundaryCondition.BCUndoCommand import (
SetNameCommand, SetNodeCommand, SetTypeCommand,
AddCommand, DelCommand, SortCommand,
MoveCommand, PasteCommand, DuplicateCommand,
)
from Model.BoundaryCondition.BoundaryConditionTypes import (
NotDefined, PonctualContribution,
TimeOverZ, TimeOverDebit, ZOverDebit
)
from View.BoundaryCondition.UndoCommand import (
SetNameCommand, SetNodeCommand, SetTypeCommand,
AddCommand, DelCommand, SortCommand,
MoveCommand, PasteCommand, DuplicateCommand,
)
from View.BoundaryCondition.Table import (
TableModel, ComboBoxDelegate
)
......
......@@ -18,7 +18,7 @@ from PyQt5.QtCore import (
from Model.Geometry.PointXYZ import PointXYZ
from Model.Geometry.ProfileXYZ import ProfileXYZ
from View.Geometry.Profile.ProfileUndoCommand import *
from View.Geometry.Profile.UndoCommand import *
_translate = QCoreApplication.translate
......
......@@ -18,12 +18,13 @@ from PyQt5.QtWidgets import (
QUndoStack, QShortcut,
)
from Model.Geometry.Reach import Reach
from Model.Geometry.ProfileXYZ import ProfileXYZ
from View.ASubWindow import WindowToolKit
from View.Geometry.Profile.mainwindow_ui_profile import Ui_MainWindow
from View.Geometry.Profile.Plot import Plot
from View.Geometry.Profile.qtableview_profile import *
from Model.Geometry.Reach import Reach
from Model.Geometry.ProfileXYZ import ProfileXYZ
from View.Geometry.Profile.Table import *
_translate = QCoreApplication.translate
......
......@@ -19,7 +19,7 @@ from PyQt5.QtWidgets import (
from Model.Geometry import Reach
from Model.Geometry.ProfileXYZ import ProfileXYZ
from View.Geometry.ReachUndoCommand import *
from View.Geometry.UndoCommand import *
_translate = QCoreApplication.translate
......
File moved
......@@ -27,8 +27,8 @@ from View.Geometry.PlotAC import PlotAC
from View.ASubWindow import WindowToolKit
from View.Geometry.mainwindow_ui_reach import Ui_MainWindow
from View.Geometry.qtableview_reach import *
from View.Geometry.Profile.ProfileWindow import ProfileWindow
from View.Geometry.Table import *
from View.Geometry.Profile.Window import ProfileWindow
_translate = QCoreApplication.translate
......
......@@ -20,9 +20,9 @@ from View.DummyWindow import DummyWindow
from View.Main.ConfigureWindow import ConfigureWindow
from View.Main.NewStudyWindow import NewStudyWindow
from View.Main.AboutWindow import AboutWindow
from View.Network.NetworkWindow import NetworkWindow
from View.Geometry.GeometryWindow import GeometryWindow
from View.BoundaryCondition.BoundaryConditionWindow import BoundaryConditionWindow
from View.Network.Window import NetworkWindow
from View.Geometry.Window import GeometryWindow
from View.BoundaryCondition.Window import BoundaryConditionWindow
from View.LateralContribution.Window import LateralContributionWindow
from Model.Study import Study
......
File moved
# -*- coding: utf-8 -*-
from Model.River import RiverNode, RiverReach, River
from View.ASubWindow import ASubMainWindow
from View.Network.GraphWidget import GraphWidget
from View.Network.TableModel import (
GraphTableModel, ComboBoxDelegate, TrueFalseComboBoxDelegate,
)
from PyQt5.QtCore import (
Qt, QRect, QVariant, QAbstractTableModel, pyqtSlot, pyqtSignal,
QEvent,
......@@ -19,6 +11,14 @@ from PyQt5.QtWidgets import (
QApplication, QToolBar, QAction,
)
from Model.River import RiverNode, RiverReach, River
from View.ASubWindow import ASubMainWindow
from View.Network.GraphWidget import GraphWidget
from View.Network.Table import (
GraphTableModel, ComboBoxDelegate, TrueFalseComboBoxDelegate,
)
class NetworkWindow(ASubMainWindow):
def __init__(self, model=None, title="River network", parent=None):
super(NetworkWindow, self).__init__(name=title, ui="Network", parent=parent)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment