Commit 678a019d authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

network: Add window ui.

Showing with 222 additions and 5 deletions
+222 -5
...@@ -13,6 +13,7 @@ from view.ListedSubWindow import ListedSubWindow ...@@ -13,6 +13,7 @@ from view.ListedSubWindow import ListedSubWindow
from view.DummyWindow import DummyWindow from view.DummyWindow import DummyWindow
from view.ConfigureWindow import ConfigureWindow from view.ConfigureWindow import ConfigureWindow
from view.NewStudyWindow import NewStudyWindow from view.NewStudyWindow import NewStudyWindow
from view.NetworkWindow import NetworkWindow
from view.AboutWindow import AboutWindow from view.AboutWindow import AboutWindow
from model.Study import Study from model.Study import Study
...@@ -98,7 +99,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow): ...@@ -98,7 +99,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow):
"action_toolBar_kill_solver": self.open_dummy, "action_toolBar_kill_solver": self.open_dummy,
"action_toolBar_listing": self.open_dummy, "action_toolBar_listing": self.open_dummy,
## Current actions ## 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_geometry": lambda: self.open_dummy("Geomerty"),
"action_toolBar_maillage": lambda: self.open_dummy("Maillage"), "action_toolBar_maillage": lambda: self.open_dummy("Maillage"),
"action_toolBar_run_mailleur": lambda: self.open_dummy("Lancement mailleur externe"), "action_toolBar_run_mailleur": lambda: self.open_dummy("Lancement mailleur externe"),
...@@ -266,6 +267,15 @@ class ApplicationWindow(QMainWindow, ListedSubWindow): ...@@ -266,6 +267,15 @@ class ApplicationWindow(QMainWindow, ListedSubWindow):
self.new_study = NewStudyWindow(study=self.model, parent=self) self.new_study = NewStudyWindow(study=self.model, parent=self)
self.new_study.show() 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 ! # TODO: Delete me !
############### ###############
...@@ -278,7 +288,3 @@ class ApplicationWindow(QMainWindow, ListedSubWindow): ...@@ -278,7 +288,3 @@ class ApplicationWindow(QMainWindow, ListedSubWindow):
parent=self parent=self
) )
self.dummy.show() self.dummy.show()
self.set_model([1,2,3])
def dummy_model(self):
self.set_model([1,2,3])
# -*- 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)
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Dialog</class>
<widget class="QDialog" name="Dialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>990</width>
<height>690</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>690</x>
<y>450</y>
<width>291</width>
<height>230</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QPushButton" name="pushButton_11">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normaloff>ressources/gtk-sort-descending.png</normaloff>ressources/gtk-sort-descending.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_12">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normaloff>ressources/go-up2.png</normaloff>ressources/go-up2.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_13">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normaloff>ressources/go-down1.png</normaloff>ressources/go-down1.png</iconset>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QTableView" name="tableView_3"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="layoutWidget_2">
<property name="geometry">
<rect>
<x>10</x>
<y>450</y>
<width>671</width>
<height>230</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QPushButton" name="pushButton_14">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normaloff>ressources/gtk-sort-descending.png</normaloff>ressources/gtk-sort-descending.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_15">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normaloff>ressources/go-up2.png</normaloff>ressources/go-up2.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_16">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normaloff>ressources/go-down1.png</normaloff>ressources/go-down1.png</iconset>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QTableView" name="tableView_4"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="layoutWidget_3">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>971</width>
<height>431</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QPushButton" name="pushButton_19">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normaloff>ressources/gtk_add.png</normaloff>ressources/gtk_add.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_20">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normaloff>ressources/gtk-remove.png</normaloff>ressources/gtk-remove.png</iconset>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QGraphicsView" name="graphicsView_2"/>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections/>
</ui>
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