diff --git a/src/view/MainWindow.py b/src/view/MainWindow.py index 0e1e032b..62423bad 100644 --- a/src/view/MainWindow.py +++ b/src/view/MainWindow.py @@ -13,6 +13,7 @@ from view.ListedSubWindow import ListedSubWindow from view.DummyWindow import DummyWindow from view.ConfigureWindow import ConfigureWindow from view.NewStudyWindow import NewStudyWindow +from view.NetworkWindow import NetworkWindow from view.AboutWindow import AboutWindow from model.Study import Study @@ -98,7 +99,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow): "action_toolBar_kill_solver": self.open_dummy, "action_toolBar_listing": self.open_dummy, ## Current actions - "action_toolBar_network": lambda: self.open_dummy("Network"), + "action_toolBar_network": self.open_network, "action_toolBar_geometry": lambda: self.open_dummy("Geomerty"), "action_toolBar_maillage": lambda: self.open_dummy("Maillage"), "action_toolBar_run_mailleur": lambda: self.open_dummy("Lancement mailleur externe"), @@ -266,6 +267,15 @@ class ApplicationWindow(QMainWindow, ListedSubWindow): self.new_study = NewStudyWindow(study=self.model, parent=self) self.new_study.show() + def open_network(self): + """Open network dialog + + Returns: + Nothing + """ + if not self.model is None: + self.network = NetworkWindow(parent=self) + self.network.show() # TODO: Delete me ! ############### @@ -278,7 +288,3 @@ class ApplicationWindow(QMainWindow, ListedSubWindow): parent=self ) self.dummy.show() - self.set_model([1,2,3]) - - def dummy_model(self): - self.set_model([1,2,3]) diff --git a/src/view/NetworkWindow.py b/src/view/NetworkWindow.py new file mode 100644 index 00000000..83cf8ec9 --- /dev/null +++ b/src/view/NetworkWindow.py @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- + +from view.ASubWindow import ASubWindow + +class NetworkWindow(ASubWindow): + def __init__(self, title="Network", parent=None): + super(NetworkWindow, self).__init__(name=title, ui="Network", parent=parent) + self.ui.setWindowTitle(title) diff --git a/src/view/ui/Network.ui b/src/view/ui/Network.ui new file mode 100644 index 00000000..e1cb5be8 --- /dev/null +++ b/src/view/ui/Network.ui @@ -0,0 +1,203 @@ + + + Dialog + + + + 0 + 0 + 990 + 690 + + + + Dialog + + + + + 690 + 450 + 291 + 230 + + + + + + + + + + + + + ressources/gtk-sort-descending.pngressources/gtk-sort-descending.png + + + + + + + + + + + ressources/go-up2.pngressources/go-up2.png + + + + + + + + + + + ressources/go-down1.pngressources/go-down1.png + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + 10 + 450 + 671 + 230 + + + + + + + + + + + + + ressources/gtk-sort-descending.pngressources/gtk-sort-descending.png + + + + + + + + + + + ressources/go-up2.pngressources/go-up2.png + + + + + + + + + + + ressources/go-down1.pngressources/go-down1.png + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + 10 + 10 + 971 + 431 + + + + + + + + + + + + + ressources/gtk_add.pngressources/gtk_add.png + + + + + + + + + + + ressources/gtk-remove.pngressources/gtk-remove.png + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + +