diff options
-rw-r--r-- | Bin_Phase_env.py | 10 | ||||
-rw-r--r-- | ComponentSelector.py | 70 | ||||
-rw-r--r-- | DockWidgets/DockWidget.py (renamed from dockWidget.py) | 100 | ||||
-rw-r--r-- | DockWidgets/DockWidget.txt (renamed from DockWidget.txt) | 0 | ||||
-rw-r--r-- | DockWidgets/DockWidget.ui (renamed from dockWidget.ui) | 0 | ||||
-rw-r--r-- | DockWidgets/DockWidgetCompoundSeparator.py (renamed from DockWidgetCompoundSeparator.py) | 26 | ||||
-rw-r--r-- | DockWidgets/DockWidgetCompoundSeparator.ui (renamed from DockWidgetCompoundSeparator.ui) | 0 | ||||
-rw-r--r-- | DockWidgets/DockWidgetDistillationColumn.py (renamed from DockWidgetDistillationColumn.py) | 26 | ||||
-rw-r--r-- | DockWidgets/DockWidgetDistillationColumn.ui (renamed from DockWidgetDistillationColumn.ui) | 0 | ||||
-rw-r--r-- | DockWidgets/DockWidgetFlash.py (renamed from DockWidgetFlash.py) | 22 | ||||
-rw-r--r-- | DockWidgets/DockWidgetFlash.ui (renamed from DockWidgetFlash.ui) | 0 | ||||
-rw-r--r-- | DockWidgets/DockWidgetMaterialStream.py (renamed from DockWidgetMaterialStream.py) | 94 | ||||
-rw-r--r-- | DockWidgets/DockWidgetMaterialStream.ui (renamed from DockWidgetMaterialStream.ui) | 0 | ||||
-rw-r--r-- | DockWidgets/DockWidgetMixer.py (renamed from DockWidgetMixer.py) | 22 | ||||
-rw-r--r-- | DockWidgets/DockWidgetMixer.ui (renamed from DockWidgetMixer.ui) | 0 | ||||
-rw-r--r-- | DockWidgets/DockWidgetShortcutColumn.py (renamed from DockWidgetShortcutColumn.py) | 30 | ||||
-rw-r--r-- | DockWidgets/DockWidgetShortcutColumn.ui (renamed from DockWidgetShortcutColumn.ui) | 0 | ||||
-rw-r--r-- | DockWidgets/DockWidgetSplitter.py (renamed from DockWidgetSplitter.py) | 22 | ||||
-rw-r--r-- | DockWidgets/DockWidgetSplitter.ui (renamed from DockWidgetSplitter.ui) | 0 | ||||
-rw-r--r-- | DockWidgets/__pycache__/DockWidget.cpython-36.pyc | bin | 0 -> 6111 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-36.pyc | bin | 0 -> 3163 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-36.pyc | bin | 0 -> 4180 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetFlash.cpython-36.pyc | bin | 0 -> 2889 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-36.pyc | bin | 0 -> 8766 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetMixer.cpython-36.pyc | bin | 0 -> 2206 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-36.pyc | bin | 0 -> 3358 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetSplitter.cpython-36.pyc | bin | 0 -> 2740 bytes | |||
-rw-r--r-- | Graphics.py | 341 | ||||
-rw-r--r-- | OMChem/Flowsheet.py | 108 | ||||
-rw-r--r-- | Streams.py | 108 | ||||
-rw-r--r-- | Undo.dat | bin | 11013 -> 4784 bytes | |||
-rw-r--r-- | UnitOperations.py | 164 | ||||
-rw-r--r-- | class_diagram.pdf | bin | 0 -> 12397 bytes | |||
-rw-r--r-- | container.py | 137 | ||||
-rw-r--r-- | main.ui | 1072 | ||||
-rw-r--r-- | main2.ui | 415 | ||||
-rw-r--r-- | main3.ui | 2112 | ||||
-rw-r--r-- | mainApp.py | 159 | ||||
-rw-r--r-- | resDockWidget.py | 92 | ||||
-rw-r--r-- | svg/Centrifugal Pump.svg | 104 | ||||
-rw-r--r-- | svg/Cooler.svg | 84 | ||||
-rw-r--r-- | svg/Heater.svg | 101 | ||||
-rw-r--r-- | svg/Pump.svg | 86 | ||||
-rw-r--r-- | umlet.uxf | 873 |
44 files changed, 2541 insertions, 3837 deletions
diff --git a/Bin_Phase_env.py b/Bin_Phase_env.py index b9228b2..a63ba1c 100644 --- a/Bin_Phase_env.py +++ b/Bin_Phase_env.py @@ -19,13 +19,13 @@ import pyqtgraph.exporters ui_dialog,_ = loadUiType('Binary_Phase_Env.ui') -class Bin_Phase_env(QWidget,ui_dialog): +class BinPhaseEnv(QWidget,ui_dialog): def __init__(self,comp): QWidget.__init__(self) self.setupUi(self) self.comp = comp - self.compunds = self.comp.getComp() + self.compunds = self.comp.get_compounds() for i in self.compunds: self.comboBox.addItem(str(i)) @@ -218,7 +218,7 @@ class Bin_Phase_env(QWidget,ui_dialog): view_box = plt.plotItem.vb self.tool_tip = "" - def pressEvent(evt): + def press_event(evt): #print("HELLO") a = 10 pos = evt @@ -253,8 +253,8 @@ class Bin_Phase_env(QWidget,ui_dialog): else: i.setToolTip(self.tool_tip) # print(items) - #proxy = pg.SignalProxy(plt.scene().sigMouseMoved, rateLimit = 60, slot = pressEvent) - plt.scene().sigMouseMoved.connect(pressEvent) + #proxy = pg.SignalProxy(plt.scene().sigMouseMoved, rateLimit = 60, slot = press_event) + plt.scene().sigMouseMoved.connect(press_event) plt.scene().sigMouseHover.connect(entered) #c1.setAcceptHoverEvents(True) #c2.setAcceptHoverEvents(True) diff --git a/ComponentSelector.py b/ComponentSelector.py index 4860c4c..64ca167 100644 --- a/ComponentSelector.py +++ b/ComponentSelector.py @@ -17,14 +17,14 @@ class ComponentSelector(QDialog,ui_dialog): self.setupUi(self) - self.Dict1=dict()#empty dictionary which will store the obj and its compound + self.dict1=dict()#empty dictionary which will store the obj and its compound #self.DB1=#instance of Database class in Database.py module self.instance=[ChemsepDatabase()] #list of all the instances self.lines=[] for i in self.instance: x=i.get_comp_name_list() - self.Dict1[i]=x + self.dict1[i]=x self.lines+=x print(self.lines) @@ -32,7 +32,7 @@ class ComponentSelector(QDialog,ui_dialog): #self.DB1_list=self.DB1.get_comp_name_list() #storingchemsep #database compound list in DB1_list - #self.Dict1[self.DB1]=self.DB1_list #storing the list as a value and the db as key in dictionary + #self.dict1[self.DB1]=self.DB1_list #storing the list as a value and the db as key in dictionary #self.lines=self.DB1_list #combined list of all the edited compounds self.model = QStringListModel() @@ -45,11 +45,11 @@ class ComponentSelector(QDialog,ui_dialog): #QCompleter completes the text written in lineedit self.lineEdit.setCompleter(self.completer) - self.compoundSelectButton.clicked.connect(self.compoundSelection) + self.compoundSelectButton.clicked.connect(self.compound_selection) self.compoundSelectButton.setAutoDefault(False) self.pushButton.clicked.connect(self.accept) self.pushButton_2.clicked.connect(self.cancel) - self.pushButton_3.clicked.connect(self.removeItems) + self.pushButton_3.clicked.connect(self.remove_items) def final_list(self,*list_name): self.list_final=[] @@ -58,7 +58,7 @@ class ComponentSelector(QDialog,ui_dialog): self.list_final+=i return (self.list_final) - def isCompSelected(self): + def is_compound_selected(self): if not compound_selected: return False else: @@ -74,8 +74,8 @@ class ComponentSelector(QDialog,ui_dialog): #of the corresponding database def get_object(self,component): - for ele in self.Dict1: - values=self.Dict1[ele] + for ele in self.dict1: + values=self.dict1[ele] for ind in values: if ind ==component: return(ele) @@ -86,10 +86,7 @@ class ComponentSelector(QDialog,ui_dialog): self.temp_comp= component.replace(removing_attrib,'') return(self.temp_comp) - - - def compoundSelection(self): - + def compound_selection(self): self.comp = self.lineEdit.text() #gets entered text if self.comp in self.lines: #matches with the db self.obj=self.get_object(self.comp) #obj will store the key of the dictionary @@ -108,49 +105,52 @@ class ComponentSelector(QDialog,ui_dialog): print(compound_selected) self.CAS=self.obj.get_value(self.comp,'CAS') - self.Name=self.comp - self.MolecularFormula=self.obj.get_value(self.comp,'Smiles') - self.MolecularWeight=self.obj.get_value(self.comp,'MolecularWeight') + self.name=self.comp + self.molecular_formula=self.obj.get_value(self.comp,'Smiles') + self.molecular_weight=self.obj.get_value(self.comp,'MolecularWeight') - Dict={'CAS':self.CAS,'Name':self.Name,'Molecular Formula':self.MolecularFormula,'Molecular Weight':self.MolecularWeight} + dict={'CAS':self.CAS,'Name':self.name,'Molecular Formula':self.molecular_formula,'Molecular Weight':self.molecular_weight} #converted everything to a dictionary which will be passes to addtable #function as a parameter. - print(Dict) - self.addToTable(Dict) + print(dict) + self.add_to_table(dict) else: - self.Show_Error() + self.show_error() @staticmethod - def setCompounds(compounds): + def set_compounds(compounds): #compound_selected = compounds for i in compounds: compound_selected.append(i) - def addToTable(self,a): + def add_to_table(self,a): try: - rowPosition = self.tableWidget.rowCount() - self.tableWidget.insertRow(rowPosition) - self.tableWidget.setItem(rowPosition , 0, QTableWidgetItem(str(a['CAS']))) - self.tableWidget.setItem(rowPosition , 1, QTableWidgetItem(str(a['Name']))) - self.tableWidget.setItem(rowPosition , 2, QTableWidgetItem(str(a['Molecular Formula']))) - self.tableWidget.setItem(rowPosition , 3, QTableWidgetItem(str(a['Molecular Weight']))) + row_position = self.tableWidget.rowCount() + self.tableWidget.insertRow(row_position) + self.tableWidget.setItem(row_position , 0, QTableWidgetItem(str(a['CAS']))) + self.tableWidget.setItem(row_position , 1, QTableWidgetItem(str(a['Name']))) + self.tableWidget.setItem(row_position , 2, QTableWidgetItem(str(a['Molecular Formula']))) + self.tableWidget.setItem(row_position , 3, QTableWidgetItem(str(a['Molecular Weight']))) except Exception as e: exc_type, exc_obj, exc_tb = sys.exc_info() fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1] print(exc_type, fname, exc_tb.tb_lineno) - def addCompToList(self,comp): # which list? + def add_compounds_to_list(self,comp): # which list? self.item = QListWidgetItem() self.item.setText(comp) self.listWidget.addItem(self.item) - def removeItems(self): - item = self.tableWidget.item(self.tableWidget.currentRow(),1).text() - self.tableWidget.removeRow(self.tableWidget.currentRow()) - - compound_selected.remove(item) + def remove_items(self): + try: + item = self.tableWidget.item(self.tableWidget.currentRow(),1).text() + self.tableWidget.removeRow(self.tableWidget.currentRow()) + + compound_selected.remove(item) + except Exception as e: + print(e) - def Show_Error(self): + def show_error(self): QMessageBox.about(self, 'Important', "Selected Compound is not Available") def cancel(self): @@ -158,7 +158,7 @@ class ComponentSelector(QDialog,ui_dialog): self.tableWidget.setRowCount(0) self.reject() - def getComp(self): + def get_compounds(self): return compound_selected def final_mo(self): diff --git a/dockWidget.py b/DockWidgets/DockWidget.py index 8eeff51..6fc7731 100644 --- a/dockWidget.py +++ b/DockWidgets/DockWidget.py @@ -8,7 +8,7 @@ from ComponentSelector import * from collections import defaultdict from Graphics import * -ui_dialog,_ = loadUiType('DockWidget.ui') +ui_dialog,_ = loadUiType('DockWidgets/DockWidget.ui') class DockWidget(QDockWidget,ui_dialog): @@ -19,33 +19,33 @@ class DockWidget(QDockWidget,ui_dialog): self.name=name self.obj=obj self.type = comptype - self.inputdict = {} + self.input_dict = {} self.x_pclist = [] self.modes() - self.comboBox.currentIndexChanged.connect(self.modeSelection) + self.comboBox.currentIndexChanged.connect(self.mode_selection) - print("constructor ", self.inputdict) + print("constructor ", self.input_dict) self.pushButton_2.clicked.connect(self.param) self.dict = {} - self.nameType = None + self.name_type = None self.container = container # input data tab def modes(self): - modesList = self.obj.modesList - if(modesList): - for j in modesList: + modes_list = self.obj.modes_list + if(modes_list): + for j in modes_list: self.comboBox.addItem(str(self.obj.variables[j]['name'])) - self.modeSelection() + self.mode_selection() else: self.comboBox.setDisabled(True) - self.inputdict= {} - self.inputdict = self.obj.paramgetter() - self.inputparamslist() + self.input_dict= {} + self.input_dict = self.obj.param_getter() + self.input_params_list() - def modeSelection(self): - self.inputdict= {} + def mode_selection(self): + self.input_dict= {} for i in reversed(range(self.formLayout.count())): self.formLayout.removeRow(i) print(self.comboBox.currentText()) @@ -53,17 +53,17 @@ class DockWidget(QDockWidget,ui_dialog): if self.obj.variables[i]['name'] == self.comboBox.currentText(): currentText = i break - self.inputdict = self.obj.paramgetter(currentText) - print('mode selection ', self.inputdict) - self.inputparamslist() + self.input_dict = self.obj.param_getter(currentText) + print('mode selection ', self.input_dict) + self.input_params_list() - def inputparamslist(self): + def input_params_list(self): try: - print("inputparamslist ", self.inputdict) - for c,i in enumerate(self.inputdict): + print("input_params_list ", self.input_dict) + for c,i in enumerate(self.input_dict): if i == None: continue - if(i=="thermoPackage"): + if(i=="thermo_package"): print("thermo1") combo = QComboBox() self.lines = [line.rstrip('\n') for line in open('thermopackage.txt')] @@ -76,7 +76,7 @@ class DockWidget(QDockWidget,ui_dialog): lay.addWidget(combo, 0, 1, alignment=Qt.AlignCenter) lay.addWidget(QLabel(''), 0, 2, alignment = Qt.AlignCenter) self.formLayout.addRow(lay) - self.inputdict[i] = combo + self.input_dict[i] = combo print("thermo") elif(i=="Ctype"): combo = QComboBox() @@ -89,7 +89,7 @@ class DockWidget(QDockWidget,ui_dialog): lay.addWidget(combo, 0, 1, alignment=Qt.AlignCenter) lay.addWidget(QLabel(''), 0, 2, alignment = Qt.AlignCenter) self.formLayout.addRow(lay) - self.inputdict[i] = combo + self.input_dict[i] = combo elif(i=="x_pc"): noc = len(compound_selected) print(noc) @@ -98,7 +98,7 @@ class DockWidget(QDockWidget,ui_dialog): lay = QGridLayout() for j in range(noc): l = QLineEdit() - self.inputdict[i] = "x_pc" + self.input_dict[i] = "x_pc" lay.addWidget(QLabel(str(compound_selected[j])+":"),j,0, alignment=Qt.AlignLeft) lay.addWidget(l,j,1, alignment=Qt.AlignCenter) lay.addWidget(QLabel(self.obj.variables[i]['unit']),j,2, alignment=Qt.AlignCenter) @@ -111,8 +111,8 @@ class DockWidget(QDockWidget,ui_dialog): if i == None: continue l = QLineEdit() - if self.inputdict[i] != None: - l.setText(str(self.inputdict[i])) + if self.input_dict[i] != None: + l.setText(str(self.input_dict[i])) print('before lay') lay = QGridLayout() lay.addWidget(QLabel(self.obj.variables[i]['name']+":"),0,0, alignment=Qt.AlignLeft) #self.obj.variables[i]['name'] @@ -124,33 +124,33 @@ class DockWidget(QDockWidget,ui_dialog): lay.addWidget(QLabel('mol/s'),0,2, alignment=Qt.AlignCenter) print('after all') self.formLayout.addRow(lay) - self.inputdict[i] = l + self.input_dict[i] = l except Exception as e: print(e) - def Show_Error(self): + def show_error(self): QMessageBox.about(self, 'Important', "Please fill all fields with data") def param(self): try: self.dict={} - print("param.inputdict ", self.inputdict) - for i in self.inputdict: - if (self.inputdict[i] == None): + print("param.input_dict ", self.input_dict) + for i in self.input_dict: + if (self.input_dict[i] == None): continue - if(i=="thermoPackage"): - if (self.inputdict[i].currentText()): - self.dict[i] = self.inputdict[i].currentText() + if(i=="thermo_package"): + if (self.input_dict[i].currentText()): + self.dict[i] = self.input_dict[i].currentText() else: - self.Show_Error() + self.show_error() break elif(i=="Ctype"): - if (self.inputdict[i].currentText()): - self.dict[i] = self.inputdict[i].currentText() + if (self.input_dict[i].currentText()): + self.dict[i] = self.input_dict[i].currentText() else: - self.Show_Error() + self.show_error() break elif(i =="x_pc"): l=[] @@ -161,44 +161,44 @@ class DockWidget(QDockWidget,ui_dialog): l.append(mol_frac.text()) total_moles += float(l[-1]) else: - self.Show_Error() + self.show_error() break for c in range(len(compound_selected)): mf.append(str(float(l[c])/total_moles)) self.x_pclist[c].setText(mf[-1]) self.dict[i] = ",".join(mf) elif(i == 'Pout' and self.obj.type == 'Mixer' or i == '' or i == 'HKey' or i == 'LKey'): - self.dict[i] = self.inputdict[i].currentText() + self.dict[i] = self.input_dict[i].currentText() else: - print(self.inputdict[i], i, self.obj.type) - if (self.inputdict[i].text()): - self.dict[i] = self.inputdict[i].text() + print(self.input_dict[i], i, self.obj.type) + if (self.input_dict[i].text()): + self.dict[i] = self.input_dict[i].text() else: - print(self.inputdict[i].text()) - self.Show_Error() + print(self.input_dict[i].text()) + self.show_error() break print("param ", self.dict) - self.obj.paramsetter(self.dict) + self.obj.param_setter(self.dict) self.hide() except Exception as e: print(e) @staticmethod - def showResult(lst): + def show_result(lst): #DockWidget1.flag = True for i in lst: - i.resultsCategory(i.name) + i.results_category(i.name) #i.show() # result data tab - def resultsCategory(self,name): + def results_category(self,name): flag = True try: print("Under result category name ", name) result=self.container.result - obj = self.container.fetchObject(name) + obj = self.container.fetch_object(name) self.tableWidget.setRowCount(0) variKeys = list(obj.variables.keys()) print(variKeys) diff --git a/DockWidget.txt b/DockWidgets/DockWidget.txt index b14eef8..b14eef8 100644 --- a/DockWidget.txt +++ b/DockWidgets/DockWidget.txt diff --git a/dockWidget.ui b/DockWidgets/DockWidget.ui index 5851d71..5851d71 100644 --- a/dockWidget.ui +++ b/DockWidgets/DockWidget.ui diff --git a/DockWidgetCompoundSeparator.py b/DockWidgets/DockWidgetCompoundSeparator.py index 24cdbc7..1818290 100644 --- a/DockWidgetCompoundSeparator.py +++ b/DockWidgets/DockWidgetCompoundSeparator.py @@ -8,7 +8,7 @@ from ComponentSelector import * from collections import defaultdict from Graphics import * -ui_dialog,_ = loadUiType('DockWidgetCompoundSeparator.ui') +ui_dialog,_ = loadUiType('DockWidgets/DockWidgetCompoundSeparator.ui') class DockWidgetCompoundSeparator(QDockWidget,ui_dialog): @@ -19,15 +19,15 @@ class DockWidgetCompoundSeparator(QDockWidget,ui_dialog): self.name=name self.obj=obj self.type = comptype - self.inputdict = [] + self.input_dict = [] - print("constructor ", self.inputdict) - self.inputparamslist() + print("constructor ", self.input_dict) + self.input_params_list() self.dict = [] - def inputparamslist(self): + def input_params_list(self): try: - print("inputparamslist ", self.inputdict) + print("input_params_list ", self.input_dict) if self.type == 'CompoundSeparator': # self.gridLayout = QGridLayout() @@ -70,29 +70,29 @@ class DockWidgetCompoundSeparator(QDockWidget,ui_dialog): self.gridLayout.addWidget(calculationGroupBox,0,0) self.gridLayout.addWidget(btn,1,0) - self.inputdict = lst + self.input_dict = lst except Exception as e: print(e) - def Show_Error(self): + def show_error(self): QMessageBox.about(self, 'Important', "Please fill all fields with data") def param(self): try: self.dict=[] - print("param.inputdict ", self.inputdict) + print("param.input_dict ", self.input_dict) - self.dict = [self.inputdict[0].isChecked(), self.inputdict[1].isChecked()] + self.dict = [self.input_dict[0].isChecked(), self.input_dict[1].isChecked()] j = 2 for i in range(len(self.obj.compounds)): print(j+i) - self.dict.append(self.inputdict[j+i].currentText()) - self.dict.append(self.inputdict[j+i+1].text()) + self.dict.append(self.input_dict[j+i].currentText()) + self.dict.append(self.input_dict[j+i+1].text()) j += 1 print("param ", self.dict) - self.obj.paramsetter(self.dict) + self.obj.param_setter(self.dict) self.hide() except Exception as e: diff --git a/DockWidgetCompoundSeparator.ui b/DockWidgets/DockWidgetCompoundSeparator.ui index 2d9a4b2..2d9a4b2 100644 --- a/DockWidgetCompoundSeparator.ui +++ b/DockWidgets/DockWidgetCompoundSeparator.ui diff --git a/DockWidgetDistillationColumn.py b/DockWidgets/DockWidgetDistillationColumn.py index ca2da9c..65e9932 100644 --- a/DockWidgetDistillationColumn.py +++ b/DockWidgets/DockWidgetDistillationColumn.py @@ -8,7 +8,7 @@ from ComponentSelector import * from collections import defaultdict from Graphics import * -ui_dialog,_ = loadUiType('DockWidgetDistillationColumn.ui') +ui_dialog,_ = loadUiType('DockWidgets/DockWidgetDistillationColumn.ui') class DockWidgetDistillationColumn(QDockWidget,ui_dialog): @@ -19,19 +19,19 @@ class DockWidgetDistillationColumn(QDockWidget,ui_dialog): self.name=name self.obj=obj self.type = comptype - self.inputdict = [] - print("constructor ", self.inputdict) + self.input_dict = [] + print("constructor ", self.input_dict) self.pushButton_2.clicked.connect(self.param) self.dict = [] - self.inputparamslist() - self.nameType = None + self.input_params_list() + self.name_type = None self.container = container # input data tab - def inputparamslist(self): + def input_params_list(self): try: - print("inputparamslist ", self.inputdict) + print("input_params_list ", self.input_dict) # tab 1 self.l1.setText(self.obj.variables['Nt']['name']+":") @@ -72,7 +72,7 @@ class DockWidgetDistillationColumn(QDockWidget,ui_dialog): self.cb4.setDisabled(True) self.cb3.currentIndexChanged.connect(self.fun3) - self.inputdict = [self.le1, self.le2, self.le3, self.cb5, self.le5, self.cb1, self.cb2, self.le6, self.le7, self.cb3, self.cb4, self.le8] + self.input_dict = [self.le1, self.le2, self.le3, self.cb5, self.le5, self.cb1, self.cb2, self.le6, self.le7, self.cb3, self.cb4, self.le8] except Exception as e: print(e) @@ -95,13 +95,13 @@ class DockWidgetDistillationColumn(QDockWidget,ui_dialog): def param(self): try: self.dict= [] - print("param.inputdict ", self.inputdict) - self.dict = [self.inputdict[0].text(),self.inputdict[1].text(), self.inputdict[2].text(), self.inputdict[3].currentText(), - self.inputdict[4].text(), self.inputdict[5].currentText(), self.inputdict[6].currentText(), self.inputdict[7].text(), - self.inputdict[8].text(), self.inputdict[9].currentText(), self.inputdict[10].currentText(), self.inputdict[11].text()] + print("param.input_dict ", self.input_dict) + self.dict = [self.input_dict[0].text(),self.input_dict[1].text(), self.input_dict[2].text(), self.input_dict[3].currentText(), + self.input_dict[4].text(), self.input_dict[5].currentText(), self.input_dict[6].currentText(), self.input_dict[7].text(), + self.input_dict[8].text(), self.input_dict[9].currentText(), self.input_dict[10].currentText(), self.input_dict[11].text()] print("param ", self.dict) - self.obj.paramsetter(self.dict) + self.obj.param_setter(self.dict) self.hide() except Exception as e: diff --git a/DockWidgetDistillationColumn.ui b/DockWidgets/DockWidgetDistillationColumn.ui index 0cb1043..0cb1043 100644 --- a/DockWidgetDistillationColumn.ui +++ b/DockWidgets/DockWidgetDistillationColumn.ui diff --git a/DockWidgetFlash.py b/DockWidgets/DockWidgetFlash.py index f0fa511..6098b27 100644 --- a/DockWidgetFlash.py +++ b/DockWidgets/DockWidgetFlash.py @@ -8,7 +8,7 @@ from ComponentSelector import * from collections import defaultdict from Graphics import * -ui_dialog,_ = loadUiType('DockWidgetFlash.ui') +ui_dialog,_ = loadUiType('DockWidgets/DockWidgetFlash.ui') class DockWidgetFlash(QDockWidget,ui_dialog): @@ -19,15 +19,15 @@ class DockWidgetFlash(QDockWidget,ui_dialog): self.name=name self.obj=obj self.type = comptype - self.inputdict = [] - print("constructor ", self.inputdict) - self.inputparamslist() + self.input_dict = [] + print("constructor ", self.input_dict) + self.input_params_list() self.btn.clicked.connect(self.param) self.dict = [] - def inputparamslist(self): + def input_params_list(self): try: - print("inputparamslist ", self.inputdict) + print("input_params_list ", self.input_dict) self.l1.setText(self.obj.variables['thermoPackage']['name']+":") self.lines = [line.rstrip('\n') for line in open('thermopackage.txt')] @@ -43,7 +43,7 @@ class DockWidgetFlash(QDockWidget,ui_dialog): self.u3.setText(self.obj.variables['Pdef']['unit']) self.check2.toggled.connect(self.fun) - self.inputdict = [self.cb1, self.check1, self.le2, self.check2, self.le3] + self.input_dict = [self.cb1, self.check1, self.le2, self.check2, self.le3] except Exception as e: print(e) @@ -58,16 +58,16 @@ class DockWidgetFlash(QDockWidget,ui_dialog): else: self.le3.setDisabled(True) - def Show_Error(self): + def show_error(self): QMessageBox.about(self, 'Important', "Please fill all fields with data") def param(self): try: self.dict={} - print("param.inputdict ", self.inputdict) - self.dict = [self.inputdict[0].currentText(),self.inputdict[1].isChecked(), float(self.inputdict[2].text()), self.inputdict[3].isChecked(), float(self.inputdict[4].text())] + print("param.input_dict ", self.input_dict) + self.dict = [self.input_dict[0].currentText(),self.input_dict[1].isChecked(), float(self.input_dict[2].text()), self.input_dict[3].isChecked(), float(self.input_dict[4].text())] print("param ", self.dict) - self.obj.paramsetter(self.dict) + self.obj.param_setter(self.dict) self.hide() except Exception as e: diff --git a/DockWidgetFlash.ui b/DockWidgets/DockWidgetFlash.ui index c781aa6..c781aa6 100644 --- a/DockWidgetFlash.ui +++ b/DockWidgets/DockWidgetFlash.ui diff --git a/DockWidgetMaterialStream.py b/DockWidgets/DockWidgetMaterialStream.py index 5fd6261..78959fc 100644 --- a/DockWidgetMaterialStream.py +++ b/DockWidgets/DockWidgetMaterialStream.py @@ -8,7 +8,7 @@ from ComponentSelector import * from collections import defaultdict from Graphics import * -ui_dialog,_ = loadUiType('DockWidgetMaterialStream.ui') +ui_dialog,_ = loadUiType('DockWidgets/DockWidgetMaterialStream.ui') class DockWidgetMaterialStream(QDockWidget,ui_dialog): @@ -19,16 +19,16 @@ class DockWidgetMaterialStream(QDockWidget,ui_dialog): self.name=name self.obj=obj self.type = comptype - self.inputdict = {} + self.input_dict = {} self.x_pclist = [] self.modes() - self.comboBox.currentIndexChanged.connect(self.modeSelection) + self.comboBox.currentIndexChanged.connect(self.mode_selection) - print("constructor ", self.inputdict) + print("constructor ", self.input_dict) self.pushButton_2.clicked.connect(self.param) self.dict = {} - self.nameType = None + self.name_type = None self.container = container header = QTreeWidgetItem(['Compound','Value','Unit']) @@ -49,28 +49,28 @@ class DockWidgetMaterialStream(QDockWidget,ui_dialog): # input data tab def modes(self): - modesList = self.obj.modesList - if(modesList): - for j in modesList: + modes_list = self.obj.modes_list + if(modes_list): + for j in modes_list: self.comboBox.addItem(str(j)) - self.modeSelection() + self.mode_selection() else: - self.inputdict= {} - self.inputdict = self.obj.paramgetter() - self.inputparamslist() + self.input_dict= {} + self.input_dict = self.obj.param_getter() + self.input_params_list() - def modeSelection(self): - self.inputdict= {} + def mode_selection(self): + self.input_dict= {} for i in reversed(range(self.formLayout.count())): self.formLayout.removeRow(i) - self.inputdict = self.obj.paramgetter(self.comboBox.currentText()) - self.inputparamslist() + self.input_dict = self.obj.param_getter(self.comboBox.currentText()) + self.input_params_list() - def inputparamslist(self): + def input_params_list(self): try: - print("inputparamslist ", self.inputdict) - for c,i in enumerate(self.inputdict): - if(i=="thermoPackage"): + print("input_params_list ", self.input_dict) + for c,i in enumerate(self.input_dict): + if(i=="thermo_package"): print("thermo1") combo = QComboBox() self.lines = [line.rstrip('\n') for line in open('thermopackage.txt')] @@ -81,7 +81,7 @@ class DockWidgetMaterialStream(QDockWidget,ui_dialog): lay.addWidget(QLabel(i+":"), 0,0, alignment=Qt.AlignLeft) lay.addWidget(combo, 0, 1, alignment=Qt.AlignRight) self.formLayout.addRow(lay) - self.inputdict[i] = combo + self.input_dict[i] = combo print("thermo") elif(i=="condType"): combo = QComboBox() @@ -92,7 +92,7 @@ class DockWidgetMaterialStream(QDockWidget,ui_dialog): lay.addWidget(QLabel("Condensor Type :"+":"), 0, 0, alignment=Qt.AlignLeft) lay.addWidget(combo, 0, 1, alignment=Qt.AlignCenter) self.formLayout.addRow(lay) - self.inputdict[i] = combo + self.input_dict[i] = combo elif(i=="x_pc"): noc = len(compound_selected) print(noc) @@ -102,9 +102,9 @@ class DockWidgetMaterialStream(QDockWidget,ui_dialog): lay = QGridLayout() for j in range(noc): l = QLineEdit() - if self.inputdict[i] != '': + if self.input_dict[i] != '': l.setText(str(self.obj.variables[compound_selected[j]]['value'])) - self.inputdict[i] = "x_pc" + self.input_dict[i] = "x_pc" lay.addWidget(QLabel(str(compound_selected[j])+":"),j,0, alignment=Qt.AlignLeft) lay.addWidget(l,j,1, alignment=Qt.AlignCenter) self.x_pclist.append(l) @@ -114,8 +114,8 @@ class DockWidgetMaterialStream(QDockWidget,ui_dialog): else: print("elseloop") l = QLineEdit() - if self.inputdict[i] != None: - l.setText(str(self.inputdict[i])) + if self.input_dict[i] != None: + l.setText(str(self.input_dict[i])) lay = QGridLayout() lay.addWidget(QLabel(i+":"),0,0, alignment=Qt.AlignLeft) lay.addWidget(l,0,1, alignment=Qt.AlignCenter) @@ -124,31 +124,31 @@ class DockWidgetMaterialStream(QDockWidget,ui_dialog): else: lay.addWidget(QLabel("mol/s"),0,2, alignment=Qt.AlignCenter) self.formLayout.addRow(lay) - self.inputdict[i] = l + self.input_dict[i] = l except Exception as e: print(e) - def Show_Error(self): + def show_error(self): QMessageBox.about(self, 'Important', "Please fill all fields with data") def param(self): try: self.dict={} - print("param.inputdict ", self.inputdict) - for i in self.inputdict: - if(i=="thermoPackage"): - if (self.inputdict[i].currentText()): - self.dict[i] = self.inputdict[i].currentText() + print("param.input_dict ", self.input_dict) + for i in self.input_dict: + if(i=="thermo_package"): + if (self.input_dict[i].currentText()): + self.dict[i] = self.input_dict[i].currentText() else: - self.Show_Error() + self.show_error() break elif(i=="condType"): - if (self.inputdict[i].currentText()): - self.dict[i] = self.inputdict[i].currentText() + if (self.input_dict[i].currentText()): + self.dict[i] = self.input_dict[i].currentText() else: - self.Show_Error() + self.show_error() break elif(i =="x_pc"): l=[] @@ -159,7 +159,7 @@ class DockWidgetMaterialStream(QDockWidget,ui_dialog): l.append(mol_frac.text()) total_moles += float(l[-1]) else: - self.Show_Error() + self.show_error() break for c in range(len(compound_selected)): mf.append(str(float(l[c])/total_moles)) @@ -167,15 +167,15 @@ class DockWidgetMaterialStream(QDockWidget,ui_dialog): self.x_pclist[c].setText(mf[-1]) self.dict[i] = ",".join(mf) else: - if (self.inputdict[i].text()): - self.dict[i] = self.inputdict[i].text() + if (self.input_dict[i].text()): + self.dict[i] = self.input_dict[i].text() else: - print(self.inputdict[i].text()) - self.Show_Error() + print(self.input_dict[i].text()) + self.show_error() break print("param ", self.dict) - self.obj.paramsetter(self.dict) + self.obj.param_setter(self.dict) self.hide() except Exception as e: @@ -183,19 +183,19 @@ class DockWidgetMaterialStream(QDockWidget,ui_dialog): @staticmethod - def showResult(lst): + def show_result(lst): #DockWidget1.flag = True for i in lst: - i.resultsCategory(i.name) + i.results_category(i.name) #i.show() # result data tab - def resultsCategory(self,name): + def results_category(self,name): flag = True try: print("Under result category name ", name) result=self.container.result - obj = self.container.fetchObject(name) + obj = self.container.fetch_object(name) d = {"Mole Fraction":"x_pc", "Mass Fraction":"xm_pc", "Mole Flow":"F_pc", "Mass Flow":"Fm_pc"} lst = list(d.keys()) diff --git a/DockWidgetMaterialStream.ui b/DockWidgets/DockWidgetMaterialStream.ui index 8995ba6..8995ba6 100644 --- a/DockWidgetMaterialStream.ui +++ b/DockWidgets/DockWidgetMaterialStream.ui diff --git a/DockWidgetMixer.py b/DockWidgets/DockWidgetMixer.py index 8a00dcd..47fc2c7 100644 --- a/DockWidgetMixer.py +++ b/DockWidgets/DockWidgetMixer.py @@ -8,7 +8,7 @@ from ComponentSelector import * from collections import defaultdict from Graphics import * -ui_dialog,_ = loadUiType('DockWidgetMixer.ui') +ui_dialog,_ = loadUiType('DockWidgets/DockWidgetMixer.ui') class DockWidgetMixer(QDockWidget,ui_dialog): @@ -19,17 +19,17 @@ class DockWidgetMixer(QDockWidget,ui_dialog): self.name=name self.obj=obj self.type = comptype - self.inputdict = [] + self.input_dict = [] self.x_pclist = [] - print("constructor ", self.inputdict) - self.inputparamslist() + print("constructor ", self.input_dict) + self.input_params_list() self.btn.clicked.connect(self.param) self.dict = {} # input data tab - def inputparamslist(self): + def input_params_list(self): try: - print("inputparamslist ", self.inputdict) + print("input_params_list ", self.input_dict) self.l1.setText(self.obj.variables['NOI']['name']+":") self.le1.setText(str(self.obj.variables['NOI']['value'])) @@ -40,21 +40,21 @@ class DockWidgetMixer(QDockWidget,ui_dialog): self.l2.setText(self.obj.variables['Pout']['name']+":") - self.inputdict = [self.le1, self.cb2] + self.input_dict = [self.le1, self.cb2] except Exception as e: print(e) - def Show_Error(self): + def show_error(self): QMessageBox.about(self, 'Important', "Please fill all fields with data") def param(self): try: self.dict={} - print("param.inputdict ", self.inputdict) - self.dict = [int(self.inputdict[0].text()),self.inputdict[1].currentText()] + print("param.input_dict ", self.input_dict) + self.dict = [int(self.input_dict[0].text()),self.input_dict[1].currentText()] print("param ", self.dict) - self.obj.paramsetter(self.dict) + self.obj.param_setter(self.dict) self.hide() except Exception as e: diff --git a/DockWidgetMixer.ui b/DockWidgets/DockWidgetMixer.ui index e039490..e039490 100644 --- a/DockWidgetMixer.ui +++ b/DockWidgets/DockWidgetMixer.ui diff --git a/DockWidgetShortcutColumn.py b/DockWidgets/DockWidgetShortcutColumn.py index 570cdd1..af81441 100644 --- a/DockWidgetShortcutColumn.py +++ b/DockWidgets/DockWidgetShortcutColumn.py @@ -8,7 +8,7 @@ from ComponentSelector import * from collections import defaultdict from Graphics import * -ui_dialog,_ = loadUiType('DockWidgetShortcutColumn.ui') +ui_dialog,_ = loadUiType('DockWidgets/DockWidgetShortcutColumn.ui') class DockWidgetShortcutColumn(QDockWidget,ui_dialog): @@ -19,19 +19,19 @@ class DockWidgetShortcutColumn(QDockWidget,ui_dialog): self.name=name self.obj=obj self.type = comptype - self.inputdict = [] - print("constructor ", self.inputdict) - self.inputparamslist() + self.input_dict = [] + print("constructor ", self.input_dict) + self.input_params_list() self.btn.clicked.connect(self.param) self.dict = [] - self.nameType = None + self.name_type = None self.container = container # input data tab - def inputparamslist(self): + def input_params_list(self): try: - print("inputparamslist ", self.inputdict) + print("input_params_list ", self.input_dict) self.l1.setText(self.obj.variables['HKey']['name']+":") print(self.obj.compounds) @@ -62,23 +62,23 @@ class DockWidgetShortcutColumn(QDockWidget,ui_dialog): self.l8.setText(self.obj.variables['RR']['name']+":") self.le8.setText(str(self.obj.variables['RR']['value'])) - self.inputdict = [self.cb1, self.cb2, self.le3, self.le4, self.cb5, self.le6, self.le7, self.le8] + self.input_dict = [self.cb1, self.cb2, self.le3, self.le4, self.cb5, self.le6, self.le7, self.le8] except Exception as e: print(e) - def Show_Error(self): + def show_error(self): QMessageBox.about(self, 'Important', "Please fill all fields with data") def param(self): try: self.dict=[] - print("param.inputdict ", self.inputdict) - self.dict = [self.inputdict[0].currentText(),self.inputdict[1].currentText(),float(self.inputdict[2].text()), float(self.inputdict[3].text()), - self.inputdict[4].currentText(), float(self.inputdict[5].text()), float(self.inputdict[6].text()), float(self.inputdict[7].text())] + print("param.input_dict ", self.input_dict) + self.dict = [self.input_dict[0].currentText(),self.input_dict[1].currentText(),float(self.input_dict[2].text()), float(self.input_dict[3].text()), + self.input_dict[4].currentText(), float(self.input_dict[5].text()), float(self.input_dict[6].text()), float(self.input_dict[7].text())] print("param ", self.dict) - self.obj.paramsetter(self.dict) + self.obj.param_setter(self.dict) self.hide() except Exception as e: @@ -86,12 +86,12 @@ class DockWidgetShortcutColumn(QDockWidget,ui_dialog): @staticmethod - def showResult(lst): + def show_result(lst): #DockWidget1.flag = True for i in lst: i.resultsCategory(i.name) #i.show() # result data tab - def resultsCategory(self,name): + def results_category(self,name): pass
\ No newline at end of file diff --git a/DockWidgetShortcutColumn.ui b/DockWidgets/DockWidgetShortcutColumn.ui index c66e699..c66e699 100644 --- a/DockWidgetShortcutColumn.ui +++ b/DockWidgets/DockWidgetShortcutColumn.ui diff --git a/DockWidgetSplitter.py b/DockWidgets/DockWidgetSplitter.py index 9327e16..262bd45 100644 --- a/DockWidgetSplitter.py +++ b/DockWidgets/DockWidgetSplitter.py @@ -8,7 +8,7 @@ from ComponentSelector import * from collections import defaultdict from Graphics import * -ui_dialog,_ = loadUiType('DockWidgetSplitter.ui') +ui_dialog,_ = loadUiType('DockWidgets/DockWidgetSplitter.ui') class DockWidgetSplitter(QDockWidget,ui_dialog): @@ -19,16 +19,16 @@ class DockWidgetSplitter(QDockWidget,ui_dialog): self.name=name self.obj=obj self.type = comptype - self.inputdict = [] - print("constructor ", self.inputdict) - self.inputparamslist() + self.input_dict = [] + print("constructor ", self.input_dict) + self.input_params_list() self.btn.clicked.connect(self.param) self.dict = {} # input data tab - def inputparamslist(self): + def input_params_list(self): try: - print("inputparamslist ", self.inputdict) + print("input_params_list ", self.input_dict) self.l1.setText(self.obj.variables['NOO']['name']+":") self.le1.setText(str(self.obj.variables['NOO']['value'])) @@ -46,7 +46,7 @@ class DockWidgetSplitter(QDockWidget,ui_dialog): self.cb2.currentIndexChanged.connect(self.fun) - self.inputdict = [self.le1, self.cb2, self.le3, self.le4] + self.input_dict = [self.le1, self.cb2, self.le3, self.le4] except Exception as e: print(e) @@ -62,16 +62,16 @@ class DockWidgetSplitter(QDockWidget,ui_dialog): self.u3.setText('') self.u4.setText('') - def Show_Error(self): + def show_error(self): QMessageBox.about(self, 'Important', "Please fill all fields with data") def param(self): try: self.dict={} - print("param.inputdict ", self.inputdict) - self.dict = [int(self.inputdict[0].text()),self.inputdict[1].currentText(), float(self.inputdict[2].text()), float(self.inputdict[3].text())] + print("param.input_dict ", self.input_dict) + self.dict = [int(self.input_dict[0].text()),self.input_dict[1].currentText(), float(self.input_dict[2].text()), float(self.input_dict[3].text())] print("param ", self.dict) - self.obj.paramsetter(self.dict) + self.obj.param_setter(self.dict) self.hide() except Exception as e: diff --git a/DockWidgetSplitter.ui b/DockWidgets/DockWidgetSplitter.ui index 02a865e..02a865e 100644 --- a/DockWidgetSplitter.ui +++ b/DockWidgets/DockWidgetSplitter.ui diff --git a/DockWidgets/__pycache__/DockWidget.cpython-36.pyc b/DockWidgets/__pycache__/DockWidget.cpython-36.pyc Binary files differnew file mode 100644 index 0000000..1d47765 --- /dev/null +++ b/DockWidgets/__pycache__/DockWidget.cpython-36.pyc diff --git a/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-36.pyc b/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-36.pyc Binary files differnew file mode 100644 index 0000000..1101a8e --- /dev/null +++ b/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-36.pyc diff --git a/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-36.pyc b/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-36.pyc Binary files differnew file mode 100644 index 0000000..ec04f1f --- /dev/null +++ b/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-36.pyc diff --git a/DockWidgets/__pycache__/DockWidgetFlash.cpython-36.pyc b/DockWidgets/__pycache__/DockWidgetFlash.cpython-36.pyc Binary files differnew file mode 100644 index 0000000..387b27b --- /dev/null +++ b/DockWidgets/__pycache__/DockWidgetFlash.cpython-36.pyc diff --git a/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-36.pyc b/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-36.pyc Binary files differnew file mode 100644 index 0000000..90799f7 --- /dev/null +++ b/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-36.pyc diff --git a/DockWidgets/__pycache__/DockWidgetMixer.cpython-36.pyc b/DockWidgets/__pycache__/DockWidgetMixer.cpython-36.pyc Binary files differnew file mode 100644 index 0000000..f3fd8b1 --- /dev/null +++ b/DockWidgets/__pycache__/DockWidgetMixer.cpython-36.pyc diff --git a/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-36.pyc b/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-36.pyc Binary files differnew file mode 100644 index 0000000..a56884a --- /dev/null +++ b/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-36.pyc diff --git a/DockWidgets/__pycache__/DockWidgetSplitter.cpython-36.pyc b/DockWidgets/__pycache__/DockWidgetSplitter.cpython-36.pyc Binary files differnew file mode 100644 index 0000000..b0983a0 --- /dev/null +++ b/DockWidgets/__pycache__/DockWidgetSplitter.cpython-36.pyc diff --git a/Graphics.py b/Graphics.py index 07dd43e..861b2f0 100644 --- a/Graphics.py +++ b/Graphics.py @@ -10,21 +10,19 @@ from PyQt5.QtGui import QTextDocument ,QTextCursor ,QTextCharFormat ,QFont ,QPix from PyQt5.uic import loadUiType from PyQt5.QtCore import Qt from PyQt5.QtWidgets import QGraphicsProxyWidget, QGraphicsObject, QGraphicsEllipseItem ,QGraphicsPixmapItem,QApplication, QGraphicsView, QGraphicsScene, QHBoxLayout, QWidget, QLabel -from PyQt5.QtGui import QBrush ,QTransform ,QMouseEvent +from PyQt5.QtGui import QBrush ,QTransform ,QMouseEvent, QIcon import PyQt5.QtGui as QtGui import PyQt5.QtCore as QtCore import PyQt5.QtWidgets as QtWidgets from ComponentSelector import * -from DockWidget import * -from DockWidgetMaterialStream import * -from DockWidgetDistillationColumn import * -from DockWidgetShortcutColumn import * -from DockWidgetMixer import * -from DockWidgetSplitter import * -from DockWidgetFlash import * -from DockWidgetCompoundSeparator import * - - +from DockWidgets.DockWidget import * +from DockWidgets.DockWidgetMaterialStream import * +from DockWidgets.DockWidgetDistillationColumn import * +from DockWidgets.DockWidgetShortcutColumn import * +from DockWidgets.DockWidgetMixer import * +from DockWidgets.DockWidgetSplitter import * +from DockWidgets.DockWidgetFlash import * +from DockWidgets.DockWidgetCompoundSeparator import * import datetime @@ -35,83 +33,98 @@ from UnitOperations import * class Graphics(QDialog, QtWidgets.QGraphicsItem): - def __init__(self, unitOp): + def __init__(self, unit_operations, graphicsView): QDialog.__init__(self) QtWidgets.QGraphicsItem.__init__(self) self.scene = QGraphicsScene() self.scene.setItemIndexMethod(QGraphicsScene.BspTreeIndex) + self.graphicsView = graphicsView self.pos = None - self.unitOp = unitOp + self.unit_operations = unit_operations - def getScene(self): + def get_scene(self): return self.scene - def getComponentSelector(self): + def get_component_selector(self): return ComponentSelector(self) - def createNodeItem(self,unitOpr, container, graphicsView): - return NodeItem(unitOpr, container, graphicsView) + def create_node_item(self,unit_operation, container): + print("in create node item function") + return NodeItem(unit_operation, container, self.graphicsView) - def boundingRect(self): - return QtCore.QRectF(self.rect) + # def boundingRect(self): + # return QtCore.QRectF(self.rect) - def loadCanvas(self, obj): + def load_canvas(self, obj, container): stm = ['MaterialStream','EngStm'] - + print('in load canvas') compounds = obj[-1] obj.pop() - ComponentSelector.setCompounds(compounds) + ComponentSelector.set_compounds(compounds) for i in obj: - if(i in self.unitOp): + print("in for loop", i) + if(i in self.unit_operations): pass else: - self.unitOp.append(i) - new_box = self.createNodeItem(i, self.grphicsView) + self.unit_operations.append(i) + print(self.unit_operations) + new_box = self.create_node_item(i, container) + print('after createing node item') new_box.setPos(i.pos.toPoint().x(), i.pos.toPoint().y()) self.scene.addItem(new_box) for i in obj: + print('in i obj line') if i.type == "MaterialStream": - eval(i.type).counter += 1 + print('in i obj line in if') + # print(eval(i.type)) + # eval(i.type).counter += 1 + # print(eval(i.type).counter) elif i.type not in stm: - eval(i.type).counter += 1 - ip = i.InputStms - op = i.OutputStms + print('in i obj line in else') + ip = i.input_stms + op = i.output_stms + print(ip) + print(op) + # print(eval(i.type)) + # eval(i.type).counter += 1 + # print(eval(i.type).counter) for j in ip: - pointA = NodeItem.getInstances(j.name) - pointB = NodeItem.getInstances(i.name) - rect = pointA.Output[0].boundingRect() + print('in j in ip') + pointA = NodeItem.get_instances(j.name) + pointB = NodeItem.get_instances(i.name) + rect = pointA.output[0].boundingRect() pointAA = QtCore.QPointF(rect.x() + rect.width()/2, rect.y() + rect.height()/2) - pointAA = pointA.Output[0].mapToScene(pointAA) - rectB = pointB.Input[0].boundingRect() + pointAA = pointA.output[0].mapToScene(pointAA) + rectB = pointB.input[0].boundingRect() pointBB = QtCore.QPointF(rectB.x() + rectB.width()/2, rectB.y() + rectB.height()/2) - pointBB = pointB.Input[0].mapToScene(pointBB) + pointBB = pointB.input[0].mapToScene(pointBB) self.new_line = NodeLine(pointAA, pointBB, 'in') - self.new_line.source = pointA.Output[0] - self.new_line.target = pointB.Input[0] - pointA.Output[0].outLines.append(self.new_line) - pointB.Input[0].inLines.append(self.new_line) - pointA.Output[0].otherLine = self.new_line - pointB.Input[0].otherLine = self.new_line + self.new_line.source = pointA.output[0] + self.new_line.target = pointB.input[0] + pointA.output[0].out_lines.append(self.new_line) + pointB.input[0].in_lines.append(self.new_line) + pointA.output[0].other_line = self.new_line + pointB.input[0].other_line = self.new_line self.scene.addItem(self.new_line) self.new_line.updatePath() for k in op: - pointA = NodeItem.getInstances(i.name) - pointB = NodeItem.getInstances(k.name) - rect = pointA.Output[0].boundingRect() + pointA = NodeItem.get_instances(i.name) + pointB = NodeItem.get_instances(k.name) + rect = pointA.output[0].boundingRect() pointAA = QtCore.QPointF(rect.x() + rect.width()/2, rect.y() + rect.height()/2) - pointAA = pointA.Output[0].mapToScene(pointAA) - rectB = pointB.Input[0].boundingRect() + pointAA = pointA.output[0].mapToScene(pointAA) + rectB = pointB.input[0].boundingRect() pointBB = QtCore.QPointF(rectB.x() + rectB.width()/2, rectB.y() + rectB.height()/2) - pointBB = pointB.Input[0].mapToScene(pointBB) + pointBB = pointB.input[0].mapToScene(pointBB) self.new_line = NodeLine(pointAA, pointBB, 'out') - self.new_line.source = pointA.Output[0] - self.new_line.target = pointB.Input[0] - pointA.Output[0].outLines.append(self.new_line) - pointB.Input[0].inLines.append(self.new_line) - pointA.Output[0].otherLine = self.new_line - pointB.Input[0].otherLine = self.new_line + self.new_line.source = pointA.output[0] + self.new_line.target = pointB.input[0] + pointA.output[0].out_lines.append(self.new_line) + pointB.input[0].in_lines.append(self.new_line) + pointA.output[0].other_line = self.new_line + pointB.input[0].other_line = self.new_line self.scene.addItem(self.new_line) self.new_line.updatePath() @@ -271,8 +284,9 @@ class NodeSocket(QtWidgets.QGraphicsItem): self.rect = rect self.type = socketType self.parent=parent - self.newLine=None - self.otherLine=None + self.setAcceptHoverEvents(True) + self.new_line=None + self.other_line=None # Brush. self.brush = QtGui.QBrush() @@ -285,8 +299,8 @@ class NodeSocket(QtWidgets.QGraphicsItem): self.pen.setColor(QtGui.QColor(0,70,70,255)) #20,20,20,255 # Lines. - self.outLines = [] - self.inLines = [] + self.out_lines = [] + self.in_lines = [] def shape(self): path = QtGui.QPainterPath() @@ -310,17 +324,17 @@ class NodeSocket(QtWidgets.QGraphicsItem): pointA = QtCore.QPointF(rect.x() + rect.width()/2, rect.y() + rect.height()/2) pointA = self.mapToScene(pointA) pointB = self.mapToScene(event.pos()) - self.newLine = NodeLine(pointA, pointB ,'op') - self.outLines.append(self.newLine) - self.scene().addItem(self.newLine) + self.new_line = NodeLine(pointA, pointB ,'op') + self.out_lines.append(self.new_line) + self.scene().addItem(self.new_line) elif self.type == 'in': rect = self.boundingRect() pointA = self.mapToScene(event.pos()) pointB = QtCore.QPointF(rect.x() + rect.width()/2, rect.y() + rect.height()/2) pointB = self.mapToScene(pointB) - self.newLine = NodeLine(pointA, pointB, 'in') - self.inLines.append(self.newLine) - self.scene().addItem(self.newLine) + self.new_line = NodeLine(pointA, pointB, 'in') + self.in_lines.append(self.new_line) + self.scene().addItem(self.new_line) else: super(NodeSocket, self).mousePressEvent(event) @@ -328,14 +342,14 @@ class NodeSocket(QtWidgets.QGraphicsItem): if self.type == 'op': pointB = self.mapToScene(event.pos()) - self.newLine.pointB = pointB - if self.otherLine: - self.otherLine.pointB=pointB + self.new_line.pointB = pointB + if self.other_line: + self.other_line.pointB=pointB elif self.type == 'in': pointA = self.mapToScene(event.pos()) - self.newLine.pointA = pointA - if self.otherLine: - self.otherLine.pointA=pointA + self.new_line.pointA = pointA + if self.other_line: + self.other_line.pointA=pointA else: super(NodeSocket, self).mouseMoveEvent(event) @@ -345,52 +359,52 @@ class NodeSocket(QtWidgets.QGraphicsItem): item = self.scene().itemAt(event.scenePos().toPoint(),QtGui.QTransform()) stm = ['MaterialStream','EngStm'] - item.otherLine=self.newLine + item.other_line=self.new_line if (self.type == 'op') and (item.type == 'in'): - self.newLine.source = self - self.newLine.target = item - item.inLines.append(self.newLine) - self.newLine.pointB = item.getCenter() - if self.newLine.source.parent.obj.type not in stm: - self.newLine.source.parent.obj.add_connection(0,self.newLine.target.parent.obj) - if self.newLine.target.parent.obj.type not in stm: - self.newLine.target.parent.obj.add_connection(1,self.newLine.source.parent.obj) # Input stream if flag is 1 + self.new_line.source = self + self.new_line.target = item + item.in_lines.append(self.new_line) + self.new_line.pointB = item.get_center() + if self.new_line.source.parent.obj.type not in stm: + self.new_line.source.parent.obj.add_connection(0,self.new_line.target.parent.obj) + if self.new_line.target.parent.obj.type not in stm: + self.new_line.target.parent.obj.add_connection(1,self.new_line.source.parent.obj) # Input stream if flag is 1 elif (self.type =='in') and (item.type == 'op'): - self.newLine.source = item - self.newLine.target = self - item.outLines.append(self.newLine) - self.newLine.pointA = item.getCenter() - if self.newLine.source.parent.obj.type not in stm: - self.newLine.source.parent.obj.add_connection(0,self.newLine.target.parent.obj) - if self.newLine.target.parent.obj.type not in stm: - self.newLine.target.parent.obj.add_connection(1,self.newLine.source.parent.obj) + self.new_line.source = item + self.new_line.target = self + item.out_lines.append(self.new_line) + self.new_line.pointA = item.get_center() + if self.new_line.source.parent.obj.type not in stm: + self.new_line.source.parent.obj.add_connection(0,self.new_line.target.parent.obj) + if self.new_line.target.parent.obj.type not in stm: + self.new_line.target.parent.obj.add_connection(1,self.new_line.source.parent.obj) else: - self.scene().removeItem(self.newLine) - if(self.newLine in self.inLines): - self.inLines.remove(self.newLine) - if(self.newLine in self.outLines): - self.outLines.remove(self.newLine) - del self.newLine + self.scene().removeItem(self.new_line) + if(self.new_line in self.in_lines): + self.in_lines.remove(self.new_line) + if(self.new_line in self.out_lines): + self.out_lines.remove(self.new_line) + del self.new_line super(NodeSocket, self).mouseReleaseEvent(event) try: - data = container.get_last_list('Undo') + data = Container.get_last_list('Undo') comp_selected = data[-1] data.remove(comp_selected) for i in range(len(data)): - if data[i].name == self.newLine.source.parent.obj.name: - data[i] = self.newLine.source.parent.obj - elif data[i].name == self.newLine.target.parent.obj.name: - data[i] = self.newLine.target.parent.obj + if data[i].name == self.new_line.source.parent.obj.name: + data[i] = self.new_line.source.parent.obj + elif data[i].name == self.new_line.target.parent.obj.name: + data[i] = self.new_line.target.parent.obj data.append(comp_selected) - container.PUSH('Undo', data) + Container.push('Undo', data) except Exception as e: print(e) - def getCenter(self): + def get_center(self): rect = self.boundingRect() center = QtCore.QPointF(rect.x() + rect.width()/2, rect.y() + rect.height()/2) center = self.mapToScene(center) @@ -408,36 +422,37 @@ class NodeSocket(QtWidgets.QGraphicsItem): # all created node items will be put inside this list # it is used for recreating the node lines by returning the node item object based on unit operation object's name lst = [] -dockWidgetLst = [] +dock_widget_lst = [] stack = [] class NodeItem(QtWidgets.QGraphicsItem): @staticmethod - def getInstances(namee): + def get_instances(namee): for i in lst: if i.name == namee: return i @staticmethod - def getDockWidget(): - return dockWidgetLst + def get_dock_widget(): + return dock_widget_lst - def __init__(self,unitOpr, container, graphicsView): + def __init__(self,unit_operation, container, graphicsView): l = ['Splitter','Mixer', 'DistillationColumn', 'Flash', 'CompoundSeparator', 'ShortcutColumn'] stm = ['MaterialStream', 'EnergyStream'] super(NodeItem, self).__init__() - - self.obj = unitOpr + print("in node item") + self.obj = unit_operation self.container = container self.graphicsView = graphicsView self.name = self.obj.name self.type = self.obj.type + print('Before obj.modes_list') - if (self.obj.modesList): + if (self.obj.modes_list): default_tooltip = f"{self.name}\n\n" - default_tooltip_dict = self.obj.paramgetter(self.obj.modesList[0]) + default_tooltip_dict = self.obj.param_getter(self.obj.modes_list[0]) for i, j in default_tooltip_dict.items(): if j is not None: default_tooltip = default_tooltip + f" {i} : {j}\n" @@ -445,7 +460,7 @@ class NodeItem(QtWidgets.QGraphicsItem): self.nin = self.obj.no_of_inputs self.nop = self.obj.no_of_outputs - + print('Before mixer') if self.obj.type == 'Mixer': text, ok = QInputDialog.getText(self.container.graphicsView, 'Mixer', 'Enter number of input:') if ok and text: @@ -459,27 +474,30 @@ class NodeItem(QtWidgets.QGraphicsItem): self.obj.no_of_outputs = self.nop self.obj.variables['NOO']['value'] = self.nop - self.dockWidget = None + self.dock_widget = None lst.append(self) - + print("before DockWidget") if self.obj.type in l: - self.dockWidget = eval("DockWidget"+self.obj.type)(self.obj.name,self.obj.type,self.obj,self.container) + self.dock_widget = eval("DockWidget"+self.obj.type)(self.obj.name,self.obj.type,self.obj,self.container) elif self.obj.type in stm: - self.dockWidget = eval("DockWidget"+self.obj.type)(self.obj.name,self.obj.type,self.obj,self.container) + self.dock_widget = eval("DockWidget"+self.obj.type)(self.obj.name,self.obj.type,self.obj,self.container) else: - self.dockWidget = DockWidget(self.obj.name,self.obj.type,self.obj,self.container) - - dockWidgetLst.append(self.dockWidget) - self.mainwindow= findMainWindow(self) - self.dockWidget.setFixedWidth(360) - self.dockWidget.setFixedHeight(640) - self.dockWidget.DockWidgetFeature(QDockWidget.AllDockWidgetFeatures) - self.mainwindow.addDockWidget(Qt.LeftDockWidgetArea, self.dockWidget) - self.dockWidget.hide() + self.dock_widget = DockWidget(self.obj.name,self.obj.type,self.obj,self.container) + print('in dockwidget') + dock_widget_lst.append(self.dock_widget) + self.main_window= findMainWindow(self) + self.dock_widget.setFixedWidth(360) + self.dock_widget.setFixedHeight(640) + self.dock_widget.DockWidgetFeature(QDockWidget.AllDockWidgetFeatures) + self.main_window.addDockWidget(Qt.LeftDockWidgetArea, self.dock_widget) + self.dock_widget.hide() + print("after dockwidget") self.pic=QtGui.QPixmap("Icons/"+self.type+".png") + # self.pic = QIcon("svg/Cooler.svg") self.rect = QtCore.QRect(0,0,self.pic.width(),self.pic.height()) + # self.rect = QtCore.QRect(0,0,100,100) self.text = QGraphicsTextItem(self) f = QFont() f.setPointSize(8) @@ -502,13 +520,15 @@ class NodeItem(QtWidgets.QGraphicsItem): self.pen.setWidth(1) self.pen.setColor(QtGui.QColor(20,20,20,255)) - self.selPen = QtGui.QPen() - self.selPen.setStyle(QtCore.Qt.SolidLine) - self.selPen.setWidth(1) - self.selPen.setColor(QtGui.QColor(220,220,220,255)) + self.sel_pen = QtGui.QPen() + self.sel_pen.setStyle(QtCore.Qt.SolidLine) + self.sel_pen.setWidth(1) + self.sel_pen.setColor(QtGui.QColor(220,220,220,255)) # initializing the node sockets - self.Input , self.Output = self.initializeSockets(self.type) + self.input , self.output = self.initialize_sockets(self.type) + + print('after ndoe item') def shape(self): path = QtGui.QPainterPath() @@ -520,51 +540,52 @@ class NodeItem(QtWidgets.QGraphicsItem): def paint(self, painter, option, widget): if self.isSelected(): - painter.setPen(self.selPen) + painter.setPen(self.sel_pen) painter.drawRect(QtCore.QRectF(self.rect)) else: painter.setPen(self.pen) - painter.drawPixmap(self.rect,self.pic) - - def initializeSockets(self,type): + # painter.drawPixmap(self.rect,self.pic) + painter.drawPixmap(self.rect, self.pic.pixmap(QSize(1000,1000))) + + def initialize_sockets(self,type): print("inside initialization") if(self.type=="Flash" or self.type=="CompoundSeparator"): - Input = [NodeSocket(QtCore.QRect(5,(self.rect.height()*x/(self.nin+1)-2),4,4), self, 'in') for x in range(1,self.nin+1) ] - Output = [NodeSocket(QtCore.QRect(self.rect.width()-9,(self.rect.height()*x*1/(self.nop+1)),4,4), self, 'op') for x in range(1,self.nop+1)] - return Input,Output + input = [NodeSocket(QtCore.QRect(5,(self.rect.height()*x/(self.nin+1)-2),4,4), self, 'in') for x in range(1,self.nin+1) ] + output = [NodeSocket(QtCore.QRect(self.rect.width()-9,(self.rect.height()*x*1/(self.nop+1)),4,4), self, 'op') for x in range(1,self.nop+1)] + return input,output elif(self.type=="AdiabaticCompressor" or self.type=="AdiabaticExpander" or self.type =="Mixer" or self.type =="Splitter" or self.type =="Valve" ): - Input = [NodeSocket(QtCore.QRect(-2.5,(self.rect.height()*x/(self.nin+1))-2,4,4), self, 'in') for x in range(1,self.nin+1) ] - Output = [NodeSocket(QtCore.QRect(self.rect.width()-2.5,(self.rect.height()*x/(self.nop+1))-2,4,4), self, 'op') for x in range(1,self.nop+1)] - return Input,Output + input = [NodeSocket(QtCore.QRect(-2.5,(self.rect.height()*x/(self.nin+1))-2,4,4), self, 'in') for x in range(1,self.nin+1) ] + output = [NodeSocket(QtCore.QRect(self.rect.width()-2.5,(self.rect.height()*x/(self.nop+1))-2,4,4), self, 'op') for x in range(1,self.nop+1)] + return input,output elif(self.type=="Cooler" or self.type=="Heater"): - Input = [NodeSocket(QtCore.QRect(3.5,(self.rect.height()*x/(self.nin+1))-2,4,4), self, 'in') for x in range(1,self.nin+1) ] - Output = [NodeSocket(QtCore.QRect(self.rect.width()-8.0,(self.rect.height()*x/(self.nop+1))-2,4,4), self, 'op') for x in range(1,self.nop+1)] - return Input,Output + input = [NodeSocket(QtCore.QRect(3.5,(self.rect.height()*x/(self.nin+1))-2,4,4), self, 'in') for x in range(1,self.nin+1) ] + output = [NodeSocket(QtCore.QRect(self.rect.width()-8.0,(self.rect.height()*x/(self.nop+1))-2,4,4), self, 'op') for x in range(1,self.nop+1)] + return input,output elif(self.type=="Pump"): - Input = [NodeSocket(QtCore.QRect(-2.5,(self.rect.height()*x/(self.nin+1))-7, 4,4), self, 'in') for x in range(1,self.nin+1) ] - Output = [NodeSocket(QtCore.QRect(self.rect.width()-2.5,-1.5,4,4), self, 'op') for x in range(1,self.nop+1)] - return Input,Output + input = [NodeSocket(QtCore.QRect(-2.5,(self.rect.height()*x/(self.nin+1))-7, 4,4), self, 'in') for x in range(1,self.nin+1) ] + output = [NodeSocket(QtCore.QRect(self.rect.width()-2.5,-1.5,4,4), self, 'op') for x in range(1,self.nop+1)] + return input,output elif(self.type=="DistillationColumn" or self.type=="ShortcutColumn"): - Input = [NodeSocket(QtCore.QRect(-2.5,(self.rect.height()*x/(self.nin+1)),5,5), self, 'in') for x in range(1,self.nin+1) ] - Output = [NodeSocket(QtCore.QRect(self.rect.width()-5.5,(self.rect.height()*1.44*x/(self.nop+1))-55,5,5), self, 'op') for x in range(1,self.nop+1)] - return Input,Output + input = [NodeSocket(QtCore.QRect(-2.5,(self.rect.height()*x/(self.nin+1)),5,5), self, 'in') for x in range(1,self.nin+1) ] + output = [NodeSocket(QtCore.QRect(self.rect.width()-5.5,(self.rect.height()*1.44*x/(self.nop+1))-55,5,5), self, 'op') for x in range(1,self.nop+1)] + return input,output elif(self.type=="MaterialStream"): - Input = [NodeSocket(QtCore.QRect(-2.5,(self.rect.height()*x/(self.nin+1)-2),4,4), self, 'in') for x in range(1,self.nin+1) ] - Output = [NodeSocket(QtCore.QRect(self.rect.width()-2.5,(self.rect.height()*x/(self.nin+1)-2),4,4), self, 'op') for x in range(1,self.nop+1)] - return Input,Output + input = [NodeSocket(QtCore.QRect(-2.5,(self.rect.height()*x/(self.nin+1)-2),4,4), self, 'in') for x in range(1,self.nin+1) ] + output = [NodeSocket(QtCore.QRect(self.rect.width()-2.5,(self.rect.height()*x/(self.nin+1)-2),4,4), self, 'op') for x in range(1,self.nop+1)] + return input,output def mouseMoveEvent(self, event): super(NodeItem, self).mouseMoveEvent(event) - for output in self.Output: - for line in output.outLines: - line.pointA = line.source.getCenter() - line.pointB = line.target.getCenter() - for input in self.Input: - for line in input.inLines: - line.pointA = line.source.getCenter() - line.pointB = line.target.getCenter() + for op in self.output: + for line in op.out_lines: + line.pointA = line.source.get_center() + line.pointB = line.target.get_center() + for ip in self.input: + for line in ip.in_lines: + line.pointA = line.source.get_center() + line.pointB = line.target.get_center() self.pos = event.scenePos() - self.obj.setPos(self.pos) + self.obj.set_pos(self.pos) #print(self.name, self.pos) def mouseDoubleClickEvent(self, event): @@ -573,8 +594,8 @@ class NodeItem(QtWidgets.QGraphicsItem): if len(stack): print(stack) stack[-1].hide() - self.dockWidget.show() - stack.append(self.dockWidget) + self.dock_widget.show() + stack.append(self.dock_widget) self.graphicsView.setInteractive(True) diff --git a/OMChem/Flowsheet.py b/OMChem/Flowsheet.py index 25143ce..ab271af 100644 --- a/OMChem/Flowsheet.py +++ b/OMChem/Flowsheet.py @@ -9,7 +9,7 @@ class Flowsheet(): def __init__(self): self.sim_name = 'Simulator' self.sim_method = '' - self.UnitOpn = [] + self.unit_operations = [] self.data = [] self.compounds = [] self.interface = '' @@ -19,7 +19,7 @@ class Flowsheet(): self.Flomo_path = os.path.join(self.sim_dir_path,'Flowsheet.mo') self.eqn_mos_path = os.path.join(self.sim_dir_path,'simulateEQN.mos') self.sm_mos_path = os.path.join(self.sim_dir_path,'simulateSM.mos') - self.resdata = [] + self.result_data = [] self.stdout=None self.stderr=None @@ -37,17 +37,17 @@ class Flowsheet(): print("The OpenModelica compiler is missing in the System path please install it" ) raise - def add_UnitOpn(self,unitop): - self.UnitOpn.append(unitop) + def add_unit_operations(self,unitop): + self.unit_operations.append(unitop) - def remove_UnitOpn(self,unitop): - self.UnitOpn.remove(unitop) + def remove_unit_operations(self,unitop): + self.unit_operations.remove(unitop) - def add_comp_list(self,C): + def add_compound_list(self,C): self.compounds = C - def send_for_simulationEqn(self): - self.resdata = [] + def send_for_simulation_Eqn(self): + self.result_data = [] self.omc_path = self.get_omc_path() print(self.omc_path) @@ -69,18 +69,18 @@ class Flowsheet(): csvpath = os.path.join(self.sim_dir_path,'Flowsheet_res.csv') print("csvPath",csvpath) with open (csvpath,'r') as resultFile: - self.resdata = [] + self.result_data = [] print("opened") csvreader = csv.reader(resultFile,delimiter=',') for row in csvreader: print("124125") - self.resdata.append(row) - print(self.resdata) - #self.ExtData() + self.result_data.append(row) + print(self.result_data) + #self.ext_data() - def send_for_simulationSM(self,unitop): + def send_for_simulation_SM(self,unitop): - self.resdata = [] + self.result_data = [] self.omc_path = self.get_omc_path() os.chdir(self.sim_dir_path) #os.system(self.omc_path + ' -s ' + unitop.name+'.mos') @@ -90,28 +90,28 @@ class Flowsheet(): #print(s) print("############### StdOut ################") print(stdout) - self.resdata = [] + self.result_data = [] print('Simulating '+unitop.name+'...') csvpath = os.path.join(self.sim_dir_path,unitop.name+'_res.csv') with open(csvpath,'r') as resultFile: csvreader = csv.reader(resultFile,delimiter=',') for row in csvreader: - self.resdata.append(row) - self.ExtData() + self.result_data.append(row) + self.ext_data() - def ExtData(self): - for unit in self.UnitOpn: + def ext_data(self): + for unit in self.unit_operations: if unit[0].type == 'MaterialStream': for key, value in unit[0].Prop.items(): - propertyname = unit[0].name + '.' + key - if propertyname in self.resdata[0]: - ind = self.resdata[0].index(propertyname) - resultval = str(self.resdata[-1][ind]) + property_name = unit[0].name + '.' + key + if property_name in self.result_data[0]: + ind = self.result_data[0].index(property_name) + resultval = str(self.result_data[-1][ind]) #resultval = str(omc.sendExpression("val("+unit.name+ "." + value + ", 0.5)")) print(resultval) unit[0].Prop[key] = resultval - def simulateEQN(self): + def simulate_EQN(self): self.data = [] print("##################################################") print("##################################################") @@ -123,7 +123,7 @@ class Flowsheet(): lcase = c.lower() self.data.append("parameter database." + ucase +' '+ ucase + "; \n") - for unitop in self.UnitOpn: + for unitop in self.unit_operations: if unitop.type != 'MaterialStream': self.data.append(unitop.OM_Flowsheet_Initialize()) else: @@ -134,13 +134,13 @@ class Flowsheet(): self.outlist = [] self.stm = ['MaterialStream','EngStm'] - for unitop in self.UnitOpn: + for unitop in self.unit_operations: if unitop.type not in self.stm: - for j in unitop.OutputStms: + for j in unitop.output_stms: self.outlist.append(j) print(j.name) - for unitop in self.UnitOpn: + for unitop in self.unit_operations: if unitop not in self.outlist: if unitop.type == 'MaterialStream': @@ -163,14 +163,14 @@ class Flowsheet(): print('Initiating Simulation in Equation Oriented Mode') - self.send_for_simulationEqn() + self.send_for_simulation_Eqn() - def simulateSM(self,ip,op): + def simulate_SM(self,ip,op): print("ip op = ", ip, op) self.sim_method = 'SM' self.data = [] - self.resdata = [] + self.result_data = [] self.unit = [] self.csvlist = [] print("op list",op) @@ -204,8 +204,8 @@ class Flowsheet(): os.chdir(self.root_dir) self.data = [] if unitop.type not in ['MaterialStream','EngStm']: - inpstms = unitop.InputStms - outstms = unitop.OutputStms + inpstms = unitop.input_stms + outstms = unitop.output_stms try: engstms = unitop.EngStms @@ -267,7 +267,7 @@ class Flowsheet(): mosFile.write("simulate("+unitop.name.lower()+", outputFormat=\"csv\", stopTime=1.0, numberOfIntervals=1);\n") print("Initiating simulation in Sequential Modular Mode") - #self.resdata = [] + #self.result_data = [] self.omc_path = self.get_omc_path() os.chdir(self.sim_dir_path) #os.system(self.omc_path + ' -s ' + unitop[0].name.lower()+"SEQ"+'.mos') @@ -290,43 +290,43 @@ class Flowsheet(): with open(csvpath,'r') as resultFile: csvreader = csv.reader(resultFile,delimiter=',') for row in csvreader: - self.resdata.append(row) + self.result_data.append(row) os.chdir(self.root_dir) if type(inpstms) is list: for stm in inpstms: for key,value in stm.Prop.items(): - propertyname = stm.name + '.' + key - if propertyname in self.resdata[0]: - ind = self.resdata[0].index(propertyname) - resultval = str(self.resdata[-1][ind]) + property_name = stm.name + '.' + key + if property_name in self.result_data[0]: + ind = self.result_data[0].index(property_name) + resultval = str(self.result_data[-1][ind]) stm.Prop[key] = resultval #print("input",stm.Prop[key]) else: for key, value in inpstms.Prop.items(): - propertyname = inpstms.name + '.' + key - if propertyname in self.resdata[0]: - ind = self.resdata[0].index(propertyname) - resultval = str(self.resdata[-1][ind]) + property_name = inpstms.name + '.' + key + if property_name in self.result_data[0]: + ind = self.result_data[0].index(property_name) + resultval = str(self.result_data[-1][ind]) inpstms.Prop[key] = resultval #print("input",inpstms.Prop[key]) if type(outstms) is list: for stm in outstms: for key, value in stm.Prop.items(): - propertyname = stm.name + '.' + key - if propertyname in self.resdata[0]: - ind = self.resdata[0].index(propertyname) - resultval = str(self.resdata[-1][ind]) + property_name = stm.name + '.' + key + if property_name in self.result_data[0]: + ind = self.result_data[0].index(property_name) + resultval = str(self.result_data[-1][ind]) stm.Prop[key] = resultval print("output key:",key,"value:",stm.Prop[key]) else: for key, value in outstms.Prop.items(): - propertyname = outstms.name + '.' + key - if propertyname in self.resdata[0]: - ind = self.resdata[0].index(propertyname) - resultval = str(self.resdata[-1][ind]) + property_name = outstms.name + '.' + key + if property_name in self.result_data[0]: + ind = self.result_data[0].index(property_name) + resultval = str(self.result_data[-1][ind]) outstms.Prop[key] = resultval print("output key:",key,"value:",outstms.Prop[key]) @@ -334,8 +334,8 @@ class Flowsheet(): os.chdir(self.sim_dir_path) dffinal = pd.concat(self.dataframes,axis=1) dffinal.to_csv('FlowsheetSEQ.csv',index=False) - self.resdata.clear() + self.result_data.clear() with open(os.path.join(self.sim_dir_path+'/FlowsheetSEQ.csv'),'r') as resultFile: csvreader = csv.reader(resultFile,delimiter=',') for row in csvreader: - self.resdata.append(row) + self.result_data.append(row) @@ -6,19 +6,19 @@ from collections import defaultdict class MaterialStream(): counter = 1 - def __init__(self, CompNames = []): + def __init__(self, compound_names = []): self.name = 'MaterialStream' + str(MaterialStream.counter) self.type = 'MaterialStream' - self.CompNames = CompNames + self.compound_names = compound_names self.count = MaterialStream.counter - self.thermoPackage ="RaoultsLaw" + self.thermo_package ="RaoultsLaw" self.mode1 = "P" self.mode2 = "T" - self.mode1val = "" - self.mode2val = "" + self.mode1_val = "" + self.mode2_val = "" self.OM_data_init = '' self.OM_data_eqn = '' self.no_of_inputs = 1 @@ -27,9 +27,9 @@ class MaterialStream(): self.y = 2500-30 self.pos = QPointF(self.x, self.y) MaterialStream.counter+=1 - self.startDict = {} - self.eqnDict = {} - self.modesList = ["PT","PH","PVF","TVF","PS"] + self.start_dict = {} + self.eqn_dict = {} + self.modes_list = ["PT","PH","PVF","TVF","PS"] self.variables = { 'P' : {'name':'Pressure', 'value':101325, 'unit':'Pa'}, # {'Pa':1, 'mmHg':0, 'N/m^2':0}}, @@ -54,10 +54,10 @@ class MaterialStream(): 'F_pc' : {'name':'Mole Flow', 'value':100, 'unit':'mol/s'}, 'Fm_pc' : {'name':'Mass Flow', 'value':None, 'unit':'g/s'}, } - self.initVariables() + self.init_variables() - def initVariables(self): - for i, val in enumerate(self.CompNames): + def init_variables(self): + for i, val in enumerate(self.compound_names): self.variables['x_pc[1,'+ str(i+1)+']'] = {'name':val + ' Mixture Mole Fraction', 'value':None, 'unit':'mol/s'} self.variables['xm_pc[1,'+ str(i+1)+']'] = {'name':val + ' Mixture Mass Fraction', 'value':None, 'unit':'g/s'} self.variables['F_pc[1,'+ str(i+1)+']'] = {'name':val + ' Mixture Mole Flow', 'value':None, 'unit':'mol/s'} @@ -73,46 +73,46 @@ class MaterialStream(): self.variables['F_pc[3,'+ str(i+1)+']'] = {'name':[val + ' Vapour Mole Flow'], 'value':None, 'unit':'mol/s'} self.variables['Fm_pc[3,'+ str(i+1)+']'] = {'name':[val + ' Vapour Mass Flow'], 'value':None, 'unit':'g/s'} - for i in self.CompNames: + for i in self.compound_names: self.variables[i] = {'value':''} - def paramgetter(self,mode): + def param_getter(self,mode): dict = {} if(mode=="PT"): self.mode1 = 'P' self.mode2 = 'T' dict = {self.mode1:self.variables['P']['value'], self.mode2:self.variables['T']['value'], - "MolFlow":self.variables['F_pc']['value'],"x_pc":self.variables['x_pc']['value'], "thermoPackage":self.thermoPackage} + "MolFlow":self.variables['F_pc']['value'],"x_pc":self.variables['x_pc']['value'], "thermo_package":self.thermo_package} elif(mode=="PH"): self.mode1 = 'P' self.mode2 = 'H_p[1]' dict = {self.mode1:self.variables['P']['value'], self.mode2:self.variables['H_p[1]']['value'], - "MolFlow":self.variables['F_pc']['value'], "x_pc":self.variables['x_pc']['value'], "thermoPackage":self.thermoPackage} + "MolFlow":self.variables['F_pc']['value'], "x_pc":self.variables['x_pc']['value'], "thermo_package":self.thermo_package} elif(mode=="PVF"): self.mode1 = 'P' self.mode2 = 'xvap' dict = {self.mode1:self.variables['P']['value'], self.mode2:self.variables['xvap']['value'], - "MolFlow":self.variables['F_pc']['value'], "x_pc":self.variables['x_pc']['value'], "thermoPackage":self.thermoPackage} + "MolFlow":self.variables['F_pc']['value'], "x_pc":self.variables['x_pc']['value'], "thermo_package":self.thermo_package} elif(mode=="TVF"): self.mode1 = 'T' self.mode2 = 'xvap' dict = {self.mode1:self.variables['T']['value'], self.mode2:self.variables['xvap']['value'], - "MolFlow":self.variables['F_pc']['value'], "x_pc":self.variables['x_pc']['value'], "thermoPackage":self.thermoPackage} + "MolFlow":self.variables['F_pc']['value'], "x_pc":self.variables['x_pc']['value'], "thermo_package":self.thermo_package} elif(mode=="PS"): self.mode1 = 'P' self.mode2 = 'S_p[1]' dict = {self.mode1:self.variables['P']['value'], self.mode2: self.variables['S_p[1]']['value'], - "MolFlow":self.variables['F_pc']['value'], "x_pc":self.variables['x_pc']['value'], "thermoPackage":self.thermoPackage} + "MolFlow":self.variables['F_pc']['value'], "x_pc":self.variables['x_pc']['value'], "thermo_package":self.thermo_package} return dict - def paramsetter(self,dict): + def param_setter(self,dict): print("inside paramsetter ", dict) self.variables['x_pc']['value'] = dict['x_pc'].split(",") - self.thermoPackage = dict['thermoPackage'] + self.thermo_package = dict['thermo_package'] self.variables['F_p[1]']['value'] = dict['MolFlow'] print("inside") # self.Prop[self.mode2] = dict[self.mode2] @@ -122,7 +122,7 @@ class MaterialStream(): print(self.variables) print(self.variables['x_pc']['value']) - for i in range(len(self.CompNames)): + for i in range(len(self.compound_names)): print('####### x_pc #########\n',self.variables['x_pc']['value'][i]) print('x_pc') if self.variables['x_pc']['value'][i]: @@ -141,7 +141,7 @@ class MaterialStream(): self.variables['Fm_pc[1,'+str(i+1)+']']['value'] = None print('first for') print('secnod for') - for i in range(0,len(self.CompNames)): + for i in range(0,len(self.compound_names)): self.variables['x_pc[2,'+str(i+1)+']']['value'] = None self.variables['xm_pc[2,'+str(i+1)+']']['value'] = None self.variables['F_pc[2,'+str(i+1)+']']['value'] = None @@ -152,12 +152,12 @@ class MaterialStream(): self.variables['F_pc[3,'+str(i+1)+']']['value'] = None self.variables['Fm_pc[3,'+str(i+1)+']']['value'] = None - def setPos(self,pos): + def set_pos(self,pos): self.pos = pos - def GetMinEqnValues(self): + def get_min_eqn_values(self): x_pclist = [] - for i in range(0,len(self.CompNames)): + for i in range(0,len(self.compound_names)): #print(self.Prop['x_pc[1,'+str(i+1)+']']) #x_pclist.append(self.Prop['x_pc[1,'+str(i+1)+']']) x_pclist.append(self.variables['x_pc[1,'+str(i+1)+']']['value']) @@ -175,13 +175,13 @@ class MaterialStream(): x_pcstr = x_pcstr.replace('"','') ''' if self.variables[self.mode1]['value']: - self.eqnDict[self.mode1] = self.variables[self.mode1]['value'] + self.eqn_dict[self.mode1] = self.variables[self.mode1]['value'] if self.variables[self.mode2]['value']: - self.eqnDict[self.mode2] = self.variables[self.mode2]['value'] + self.eqn_dict[self.mode2] = self.variables[self.mode2]['value'] if self.variables['x_pc']['value']: - self.eqnDict['x_pc[1,:]'] = x_pc + self.eqn_dict['x_pc[1,:]'] = x_pc if self.variables['F_pc']['value']: - self.eqnDict['F_p[1]'] = self.variables['F_pc']['value'] + self.eqn_dict['F_p[1]'] = self.variables['F_pc']['value'] print("##############$GetMinVEqnValuesStart$##################") print("P:",self.variables[self.mode1]['value']) @@ -190,66 +190,66 @@ class MaterialStream(): print("F_p",self.variables['F_p[1]']['value']) print("##############$GetMinVEqnValuesEnd$##################") - def GetStartValues(self): + def get_start_values(self): try: if self.variables[self.mode1]['value']: - self.startDict[self.mode1] = self.variables[self.mode1]['value'] + self.start_dict[self.mode1] = self.variables[self.mode1]['value'] if self.variables[self.mode2]['value']: - self.startDict[self.mode2] = self.variables[self.mode2]['value'] + self.start_dict[self.mode2] = self.variables[self.mode2]['value'] if self.variables['x_pc[2,1]']['value'] != None: x_pcarr = [] for i in range(1,4): cmf = [] - for j in range(1,len(self.CompNames)+1): + for j in range(1,len(self.compound_names)+1): cmf.append(str(self.variables['x_pc['+str(i)+','+str(j)+']']['value'])) x_pcarr.append(cmf) x_pcstr = json.dumps(x_pcarr) x_pcstr = x_pcstr.replace('[','{') x_pcstr = x_pcstr.replace(']','}') x_pcstr = x_pcstr.replace('"','') - self.startDict['x_pc'] = x_pcstr + self.start_dict['x_pc'] = x_pcstr if self.variables['xm_pc[2,1]']['value'] != None: xm_pcarr = [] for i in range(1,4): cmf = [] - for j in range(1,len(self.CompNames)+1): + for j in range(1,len(self.compound_names)+1): cmf.append(str(self.variables['xm_pc['+str(i)+','+str(j)+']']['value'])) xm_pcarr.append(cmf) xm_pcstr = json.dumps(x_pcarr) xm_pcstr = xm_pcstr.replace('[','{') xm_pcstr = xm_pcstr.replace(']','}') xm_pcstr = xm_pcstr.replace('"','') - self.startDict['xm_pc'] = xm_pcstr + self.start_dict['xm_pc'] = xm_pcstr if self.variables['Fm_pc[2,1]']['value'] != None: Fm_pcarr = [] for i in range(1,4): cmf = [] - for j in range(1,len(self.CompNames)+1): + for j in range(1,len(self.compound_names)+1): cmf.append(str(self.variables['Fm_pc['+str(i)+','+str(j)+']']['value'])) Fm_pcarr.append(cmf) Fm_pcstr = json.dumps(x_pcarr) Fm_pcstr = Fm_pcstr.replace('[','{') Fm_pcstr = Fm_pcstr.replace(']','}') Fm_pcstr = Fm_pcstr.replace('"','') - self.startDict['Fm_pc'] = Fm_pcstr + self.start_dict['Fm_pc'] = Fm_pcstr if self.variables['F_pc[2,1]']['value'] != None: F_pcarr = [] for i in range(1,4): cmf = [] - for j in range(1,len(self.CompNames)+1): + for j in range(1,len(self.compound_names)+1): cmf.append(str(self.variables['F_pc['+str(i)+','+str(j)+']']['value'])) F_pcarr.append(cmf) F_pcstr = json.dumps(F_pcarr) F_pcstr = F_pcstr.replace('[','{') F_pcstr = F_pcstr.replace(']','}') F_pcstr = F_pcstr.replace('"','') - self.startDict['F_pc'] = F_pcstr + self.start_dict['F_pc'] = F_pcstr if self.variables['MW_p[2]']['value'] != None: MW_pArr = [] @@ -259,7 +259,7 @@ class MaterialStream(): MW_pStr = MW_pStr.replace('[','{') MW_pStr = MW_pStr.replace(']','}') MW_pStr = MW_pStr.replace('"','') - self.startDict['MW_p'] = MW_pStr + self.start_dict['MW_p'] = MW_pStr if self.variables['F_p[2]']['value'] != None: F_pArr = [] @@ -269,7 +269,7 @@ class MaterialStream(): F_pStr = F_pStr.replace('[','{') F_pStr = F_pStr.replace(']','}') F_pStr = F_pStr.replace('"','') - self.startDict['F_p'] = F_pStr + self.start_dict['F_p'] = F_pStr if self.variables['Cp_p[2]']['value'] != None: Cp_pArr = [] @@ -279,7 +279,7 @@ class MaterialStream(): Cp_pStr = Cp_pStr.replace('[','{') Cp_pStr = Cp_pStr.replace(']','}') Cp_pStr = Cp_pStr.replace('"','') - self.startDict['Cp_p'] = Cp_pStr + self.start_dict['Cp_p'] = Cp_pStr if self.variables['H_p[2]']['value'] != None: H_pArr = [] @@ -289,7 +289,7 @@ class MaterialStream(): H_pStr = H_pStr.replace('[','{') H_pStr = H_pStr.replace(']','}') H_pStr = H_pStr.replace('"','') - self.startDict['H_p'] = H_pStr + self.start_dict['H_p'] = H_pStr if self.variables['S_p[2]']['value'] != None: @@ -300,7 +300,7 @@ class MaterialStream(): S_pStr = S_pStr.replace('[','{') S_pStr = S_pStr.replace(']','}') S_pStr = S_pStr.replace('"','') - self.startDict['S_p'] = S_pStr + self.start_dict['S_p'] = S_pStr if self.variables['Fm_p[2]']['value'] != None: Fm_pArr = [] @@ -310,7 +310,7 @@ class MaterialStream(): Fm_pStr = Fm_pStr.replace('[','{') Fm_pStr = Fm_pStr.replace(']','}') Fm_pStr = Fm_pStr.replace('"','') - self.startDict['Fm_p'] = Fm_pStr + self.start_dict['Fm_p'] = Fm_pStr except Exception as e: exc_type, exc_obj, exc_tb = sys.exc_info() @@ -322,10 +322,10 @@ class MaterialStream(): self.OM_data_init = '' self.OM_data_init = self.OM_data_init + ("model ms"+str(self.count)+"\n") self.OM_data_init = self.OM_data_init + ("extends Simulator.Streams.MaterialStream;\n" ) - self.OM_data_init = self.OM_data_init + ("extends Simulator.Files.ThermodynamicPackages."+self.thermoPackage+";\n") + self.OM_data_init = self.OM_data_init + ("extends Simulator.Files.ThermodynamicPackages."+self.thermo_package+";\n") self.OM_data_init = self.OM_data_init + ("end ms"+str(self.count)+";\n") comp_count = len(addedcomp) - # self.GetStartValues() + # self.get_start_values() #self.OM_data_init = "Simulator.Streams.Mat_Stm_RL " + self.name +"(Nc = " + str(comp_count) self.OM_data_init = self.OM_data_init + "ms"+str(self.count) +" " + self.name +"(Nc = " + str(comp_count) @@ -333,7 +333,7 @@ class MaterialStream(): C = str(addedcomp).strip('[').strip(']') C = C.replace("'","") self.OM_data_init = self.OM_data_init + C + "}," - #for key, value in self.startDict.items(): + #for key, value in self.start_dict.items(): # self.OM_data_init = self.OM_data_init + key + '(start = ' + str(value) + '),' self.OM_data_init = self.OM_data_init[:-1] self.OM_data_init = self.OM_data_init + ');\n' @@ -344,14 +344,14 @@ class MaterialStream(): self.OM_data_eqn = '' self.comp_count = len(addedcomp) if method == 'Eqn': - self.eqnDict = {} - self.GetMinEqnValues() + self.eqn_dict = {} + self.get_min_eqn_values() if method == 'SM': - self.eqnDict = {} - self.GetMinEqnValues() + self.eqn_dict = {} + self.get_min_eqn_values() #self.GetEquationValues() #self.GetEquationValues() - for key,value in self.eqnDict.items(): + for key,value in self.eqn_dict.items(): self.OM_data_eqn = self.OM_data_eqn + self.name + '.'+ key + ' = ' + str(value) + ';\n' return self.OM_data_eqn Binary files differdiff --git a/UnitOperations.py b/UnitOperations.py index 9591dc2..0b3f664 100644 --- a/UnitOperations.py +++ b/UnitOperations.py @@ -18,12 +18,12 @@ class UnitOperation(): def __init__(self): self.OM_data_eqn = '' self.OM_data_init = '' - self.InputStms = [] - self.OutputStms = [] + self.input_stms = [] + self.output_stms = [] self.compounds = compound_selected self.name = '' self.mode = None - self.modeVal = None + self.mode_val = None self.type = '' self.no_of_inputs = 1 self.no_of_outputs = 1 @@ -32,18 +32,18 @@ class UnitOperation(): self.pos = QPointF(self.x, self.y) self.count = UnitOperation.counter self.variables = {} - self.modesList = [] + self.modes_list = [] self.parameters = [] self.extra = [] - self.ForNaming = [] + self.for_naming = [] self.multidict = [] - self.ThermoPackReq = False - self.thermoPackage = None + self.thermo_pack_req = False + self.thermo_package = None - def paramgetter(self,mode=None): + def param_getter(self,mode=None): params = {} - if mode == None and self.modesList: - self.mode = self.modesList[0] + if mode == None and self.modes_list: + self.mode = self.modes_list[0] else: self.mode = mode params[self.mode] = None @@ -52,8 +52,8 @@ class UnitOperation(): return params - def paramsetter(self,params): - print("paramsetter ", params) + def param_setter(self,params): + print("param_setter ", params) for k,v in params.items(): print(k,v) if k != self.mode: @@ -61,57 +61,57 @@ class UnitOperation(): self.variables[k]['value'] = v else: self.variables[k]['value'] = v - self.modeVal = params[self.mode] + self.mode_val = params[self.mode] print(self.variables) def add_connection(self,flag,UnitOpr): if flag==1: # Input stream if flag is 1 print("INPUT CONNECTION") - self.InputStms.append(UnitOpr) + self.input_stms.append(UnitOpr) else : print("OUTPUT CONNECTION") - self.OutputStms.append(UnitOpr) + self.output_stms.append(UnitOpr) - def setPos(self,pos): + def set_pos(self,pos): self.pos = pos def OM_Flowsheet_Initialize(self): self.OM_data_init = '' - if(self.ThermoPackReq): + if(self.thermo_pack_req): if len(self.extra)>1: for i in range(len(self.extra)): latest = '' for j in range(self.extra[i]): if self.extra[i][j]!='.': latest += self.extra[i][j] - self.ForNaming[i] = latest + self.for_naming[i] = latest - if(self.ThermoPackReq): + if(self.thermo_pack_req): if len(self.extra)==1: for i in self.extra: self.OM_data_init += ('model '+i+str(self.counter)+'\n') self.OM_data_init += ('extends Simulator.UnitOperations.'+i+';\n') - self.OM_data_init += ('extends Simulator.Files.ThermodynamicPackages.'+self.thermoPackage+';\n') + self.OM_data_init += ('extends Simulator.Files.ThermodynamicPackages.'+self.thermo_package+';\n') self.OM_data_init += ('end '+i+str(self.counter)+';\n') self.OM_data_init += i+str(self.counter) + ' ' + self.name + '(Nc = ' + str(len(self.compounds)) else: for i in range(len(self.extra)): if i!=(len(self.extra)-1): - self.OM_data_init += ('model '+self.ForNaming[i]+str(self.counter)+'\n') + self.OM_data_init += ('model '+self.for_naming[i]+str(self.counter)+'\n') self.OM_data_init += ('extends Simulator.UnitOperations.'+self.extra[i]+';\n') - self.OM_data_init += ('extends Simulator.Files.ThermodynamicPackages.'+self.thermoPackage+';\n') - self.OM_data_init += ('end '+self.ForNaming[i]+str(self.counter)+';\n') + self.OM_data_init += ('extends Simulator.Files.ThermodynamicPackages.'+self.thermo_package+';\n') + self.OM_data_init += ('end '+self.for_naming[i]+str(self.counter)+';\n') else: - self.OM_data_init += ('model '+self.ForNaming[i]+str(self.counter)+'\n') + self.OM_data_init += ('model '+self.for_naming[i]+str(self.counter)+'\n') self.OM_data_init += ('extends Simulator.UnitOperations.'+self.extra[i]+';\n') for j in range(len(self.extra)-1): - self.OM_data_init += (self.ForNaming[j] + str(self.counter) +' ' + self.ForNaming[j] + '#' + self.multidict[j] + ';\n') + self.OM_data_init += (self.for_naming[j] + str(self.counter) +' ' + self.for_naming[j] + '#' + self.multidict[j] + ';\n') - self.OM_data_init += ('end '+self.ForNaming[i]+str(self.counter)+';\n') + self.OM_data_init += ('end '+self.for_naming[i]+str(self.counter)+';\n') - self.OM_data_init += self.ForNaming[i] + str(self.counter) + ' ' + self.ForNaming + '(Nc = ' + str(len(self.compounds)) + self.OM_data_init += self.for_naming[i] + str(self.counter) + ' ' + self.for_naming + '(Nc = ' + str(len(self.compounds)) C = str(self.compounds).strip('[').strip(']') C = C.replace("'", "") @@ -138,24 +138,24 @@ class UnitOperation(): def OM_Flowsheet_Equation(self): self.OM_data_eqn = '' - if len(self.InputStms)>1: + if len(self.input_stms)>1: strcount = 1 - for strm in self.InputStms: + for strm in self.input_stms: self.OM_data_eqn += ('connect(' + strm.name + '.Out,' + self.name + '.In[' + str(strcount) + ']);\n') strcount += 1 else: - self.OM_data_eqn += ('connect(' + self.name + '.In,' + self.InputStms[0].name + '.Out);\n') + self.OM_data_eqn += ('connect(' + self.name + '.In,' + self.input_stms[0].name + '.Out);\n') - if len(self.OutputStms)>1: + if len(self.output_stms)>1: strcount = 1 - for strm in self.OutputStms: + for strm in self.output_stms: self.OM_data_eqn += ('connect(' + strm.name + '.In,' + self.name + '.Out[' + str(strcount) + ']);\n') strcount += 1 else: - self.OM_data_eqn += ('connect(' + self.name + '.Out,' + self.OutputStms[0].name + '.In);\n') + self.OM_data_eqn += ('connect(' + self.name + '.Out,' + self.output_stms[0].name + '.In);\n') if self.mode: - self.OM_data_eqn += (self.name + '.' + self.mode + '=' + self.modeVal + ';\n') + self.OM_data_eqn += (self.name + '.' + self.mode + '=' + self.mode_val + ';\n') return self.OM_data_eqn @@ -166,8 +166,8 @@ class ShortcutColumn(UnitOperation): self.type = 'ShortcutColumn' self.no_of_inputs = 1 self.no_of_outputs = 2 - self.InputStms = None - self.OutputStms = None + self.input_stms = None + self.output_stms = None self.EngStm1 = EngStm(name='EngStm1'+self.name) self.EngStm2 = EngStm(name='EngStm2'+self.name) self.count = ShortcutColumn.counter @@ -181,14 +181,14 @@ class ShortcutColumn(UnitOperation): 'HKey_x_pc' : {'name':'Heavy Key Mole Fraction', 'value':0.01, 'unit':'mol/s'}, 'LKey_x_pc' : {'name':'Light Key Mole Fraction', 'value':0.01, 'unit':'mol/s'}, 'Ctype' : {'name':'Condensor Type', 'value':None, 'unit':''}, - 'thermoPackage' : {'name':'Thermo Package', 'value':'Raoults_Law', 'unit':''}, + 'thermo_package' : {'name':'Thermo Package', 'value':'Raoults_Law', 'unit':''}, 'Pcond' : {'name':'Condensor Pressure', 'value':101325, 'unit':'Pa'}, 'Preb' : {'name':'Reboiler Pressure', 'value':101325, 'unit':'Pa'}, 'RR' : {'name':'Reflux Ratio', 'value':1.5, 'unit':''}, } - def paramsetter(self,params): - print("paramsetter ", params) + def param_setter(self,params): + print("param_setter ", params) self.variables['HKey']['value'] = params[0] self.variables['LKey']['value'] = params[1] self.variables['HKey_x_pc']['value'] = params[2] @@ -214,12 +214,12 @@ class DistillationColumn(UnitOperation): self.EngStm2 = EngStm(name='EngStm2'+self.name) self.count = DistillationColumn.counter - self.InputStms = None - self.OutputStms = None - # self.modesList = ['RR', 'Nout', 'T'] - self.modesList = [] + self.input_stms = None + self.output_stms = None + # self.modes_list = ['RR', 'Nout', 'T'] + self.modes_list = [] self.parameters = [''] - #self.parameters = ['Nt', 'InT_s', 'In_s', 'thermoPackage', 'Ctype', 'Pcond', 'Preb'] + #self.parameters = ['Nt', 'InT_s', 'In_s', 'thermo_package', 'Ctype', 'Pcond', 'Preb'] self.Cspec_list = ['Reflux Ratio','Product Molar Flow (mol/s)', 'Temperature (K)', 'Compound Molar Fraction', 'Compound Molar Flow (mol/s)'] self.Rspec_list = ['Product Molar Flow (mol/s)', 'Temperature (K)', 'Compound Molar Fraction', 'Compound Molar Flow (mol/s)'] @@ -231,15 +231,15 @@ class DistillationColumn(UnitOperation): 'Nt' : {'name':'No of Stages', 'value':12, 'unit':''}, 'InT_s' : {'name':'No of Feed Stages', 'value':None, 'unit':''}, 'In_s' : {'name':'No of Feeds', 'value':None, 'unit':''}, - 'thermoPackage' : {'name':'Thermo Package', 'value':'Raoults_Law', 'unit':''}, + 'thermo_package' : {'name':'Thermo Package', 'value':'Raoults_Law', 'unit':''}, 'Ctype' : {'name':'Condensor Type', 'value':'', 'unit':''}, 'Pcond' : {'name':'Condensor Pressure', 'value':101325, 'unit':'Pa'}, 'Preb' : {'name':'Reboiler Pressure', 'value':101325, 'unit':'Pa'}, 'C_Spec': {'name':'Condensor Specification', 'type':'Reflux Ratio', 'value':'', 'comp':'', 'unit':''}, 'R_Spec': {'name':'Reboiler Specification', 'type':'', 'value':'', 'comp':'', 'unit':''}, } - def paramsetter(self,params): - print("paramsetter ", params) + def param_setter(self,params): + print("param_setter ", params) self.variables['Nt']['value'] = params[0] self.variables['In_s']['value'] = params[1] self.variables['InT_s']['value'] = params[2] @@ -293,8 +293,8 @@ class CompoundSeparator(UnitOperation): # self.SepFact = json.dumps(self.variables['SepFact']['value']).replace('[','{').replace(']','}') # self.SepStrm = str(self.variables['SepStrm']['value']) # self.SepVal = json.dumps(self.variables['SepVal']['value']).replace('[','{').replace(']','}') - def paramsetter(self,params): - print("paramsetter ", params) + def param_setter(self,params): + print("param_setter ", params) if params[0]: self.variables['SepStrm']['value'] = 1 elif params[1]: @@ -314,21 +314,21 @@ class Flash(UnitOperation): self.type = 'Flash' self.no_of_inputs = 1 self.no_of_outputs = 2 - self.InputStms = None - self.OutputStms = None + self.input_stms = [] + self.output_stms = [] self.count = Flash.counter type(self).counter += 1 self.variables = { - 'thermoPackage' : {'name':'Thermo Package', 'value':None, 'unit':''}, + 'thermo_package' : {'name':'Thermo Package', 'value':None, 'unit':''}, 'BTdef' : {'name':'Separation Temperature Boolean', 'value':False, 'unit':''}, 'BPdef' : {'name':'Separation Pressure Boolean', 'value':False, 'unit':''}, 'Tdef' : {'name':'Separation Temperature', 'value':298.15, 'unit':'K'}, 'Pdef' : {'name':'Separation Pressure', 'value':101325, 'unit':'Pa'} } - def paramsetter(self,params): - print("paramsetter ", params) - self.variables['thermoPackage']['value'] = params[0] + def param_setter(self,params): + print("param_setter ", params) + self.variables['thermo_package']['value'] = params[0] self.variables['BTdef']['value'] = params[1] self.variables['Tdef']['value'] = params[2] self.variables['BPdef']['value'] = params[3] @@ -340,9 +340,9 @@ class Pump(UnitOperation): UnitOperation.__init__(self) self.name = name + str(Pump.counter) self.type = 'Pump' - self.InputStms = None - self.OutputStms = None - self.modesList = ['Pdel', 'Pout', 'Q'] #"enFlo" + self.input_stms = None + self.output_stms = None + self.modes_list = ['Pdel', 'Pout', 'Q'] #"enFlo" self.parameters = ['Eff'] type(self).counter += 1 @@ -358,9 +358,9 @@ class Valve(UnitOperation): UnitOperation.__init__(self) self.name = name + str(Valve.counter) self.type = 'Valve' - self.InputStms = None - self.OutputStms = None - self.modesList = ['Pdel', 'Pout'] + self.input_stms = None + self.output_stms = None + self.modes_list = ['Pdel', 'Pout'] type(self).counter += 1 self.variables = { @@ -375,7 +375,7 @@ class Splitter(UnitOperation): self.type = 'Splitter' self.no_of_outputs = 3 - # self.InputStms = None + # self.input_stms = None self.CalcType_modes = ['Split Ratios', 'Mole Flow Specs', 'Mass Flow Specs'] self.parameters = ['NOO', 'CalcType']#, 'SpecVal_s' @@ -390,8 +390,8 @@ class Splitter(UnitOperation): specval = self.variables['SpecVal_s']['value'] # [50,50] self.specval = json.dumps(specval).replace('[','{').replace(']','}') - def paramsetter(self,params): - print("paramsetter ", params) + def param_setter(self,params): + print("param_setter ", params) self.variables['NOO']['value'] = int(params[0]) self.variables['CalcType']['value'] = params[1] self.variables['SpecVal_s']['value'] = [float(params[2]), float(params[3])] @@ -411,18 +411,18 @@ class Mixer(UnitOperation): self.Pout_modes = ['Inlet Minimum', 'Inlet Average', 'Inlet Maximum'] self.parameters = ['NOI', 'Pout'] - # self.OutputStms = None + # self.output_stms = None type(self).counter += 1 self.variables = { 'NOI' : {'name':'Number of Input', 'value':6, 'unit':''}, 'Pout' : {'name':'Outlet Pressure', 'value':'Inlet_Average', 'unit':''}, } - def paramsetter(self, params): - print(self.InputStms, self.OutputStms) - self.OutputStms = [] - print(self.InputStms, self.OutputStms) - print("paramsetter ", params) + def param_setter(self, params): + print(self.input_stms, self.output_stms) + self.output_stms = [] + print(self.input_stms, self.output_stms) + print("param_setter ", params) self.variables['NOI']['value'] = int(params[0]) self.variables['Pout']['value'] = params[1] print(self.variables) @@ -436,10 +436,10 @@ class Heater(UnitOperation): self.type = 'Heater' self.no_of_inputs = 1 self.no_of_outputs = 1 - self.modesList = ['Q','Tout','xvapout','Tdel'] + self.modes_list = ['Q','Tout','xvapout','Tdel'] self.parameters = ['Pdel', 'Eff'] self.extra = None - self.ForNaming = None + self.for_naming = None type(self).counter += 1 self.variables = { @@ -459,9 +459,9 @@ class Cooler(UnitOperation): self.type = 'Cooler' self.no_of_inputs = 1 self.no_of_outputs = 1 - self.modesList = ['Q','Tout','Tdel','xvap'] + self.modes_list = ['Q','Tout','Tdel','xvap'] self.extra = None - self.ForNaming = None + self.for_naming = None self.parameters = ['Pdel', 'Eff'] type(self).counter += 1 @@ -482,11 +482,11 @@ class AdiabaticCompressor(UnitOperation): self.type = 'AdiabaticCompressor' self.no_of_inputs = 1 self.no_of_outputs = 1 - self.modesList = ["Pdel","Pout","Q"] + self.modes_list = ["Pdel","Pout","Q"] self.extra = ['AdiabaticCompressor'] - self.ForNaming = ['AdiabaticCompressor'] - self.ThermoPackReq = True - self.thermoPackage ="RaoultsLaw" + self.for_naming = ['AdiabaticCompressor'] + self.thermo_pack_req = True + self.thermo_package ="RaoultsLaw" self.parameters = ['Eff'] type(self).counter += 1 self.variables = { @@ -506,11 +506,11 @@ class AdiabaticExpander(UnitOperation): self.type = 'AdiabaticExpander' self.no_of_inputs = 1 self.no_of_outputs = 1 - self.modesList = ["Pdel","Pout","Q"] + self.modes_list = ["Pdel","Pout","Q"] self.extra = ['AdiabaticExpander'] - self.ForNaming = ['AdiabaticExpander'] - self.ThermoPackReq = True - self.thermoPackage ="RaoultsLaw" + self.for_naming = ['AdiabaticExpander'] + self.thermo_pack_req = True + self.thermo_package ="RaoultsLaw" self.parameters = ['Eff'] type(self).counter += 1 self.variables = { diff --git a/class_diagram.pdf b/class_diagram.pdf Binary files differnew file mode 100644 index 0000000..c2c1134 --- /dev/null +++ b/class_diagram.pdf diff --git a/container.py b/container.py index 6f9b0cd..14e3bf0 100644 --- a/container.py +++ b/container.py @@ -19,29 +19,30 @@ import sys from Graphics import * class Container(): - def __init__(self,msgbrowser): - self.unitOp = [] - self.thermoPackage = None + def __init__(self,msgbrowser, graphicsView): + self.unit_operations = [] + self.thermo_package = None self.compounds = None self.flowsheet = None self.conn = defaultdict(list) self.op=defaultdict(list) self.ip=defaultdict(list) self.msg = msgbrowser + self.graphicsView = graphicsView self.msg.setText("") self.opl=[] self.result=[] - self.graphics = Graphics(self.unitOp) - self.scene = self.graphics.getScene() + self.graphics = Graphics(self.unit_operations, self.graphicsView) + self.scene = self.graphics.get_scene() - def currentTime(self): + def current_time(self): now = datetime.datetime.now() time = str(now.hour) + ":" + str(now.minute) + ":" +str(now.second) return time # def updateConn(self,key,value): # self.conn[key].append(value) - # self.msg.append("<span style=\"color:blue\">["+str(self.currentTime())+"]<b> "+key.name+" </b> output is connected to input of<b> "+value.name +" </b></span>") + # self.msg.append("<span style=\"color:blue\">["+str(self.current_time())+"]<b> "+key.name+" </b> output is connected to input of<b> "+value.name +" </b></span>") # # def connection(self): # try: @@ -61,31 +62,31 @@ class Container(): # i.connect(InputStms=self.ip[i],OutputStms=self.op[i]) # # self.opl.append([self.op[i] for i in self.op]) - # self.opl=flatlist(flatlist(self.opl)) + # self.opl=flat_list(flat_list(self.opl)) # except Exception as e: # print(e) # @staticmethod # def addUnitOpObj(obj): - # self.unitOp.append(obj) + # self.unit_operations.append(obj) - def addUnitOp(self,obj, graphicsView): + def add_unit_operation(self, obj): box = None self.obj = obj - self.scene = self.graphics.getScene() - self.graphicsView = graphicsView - box = self.graphics.createNodeItem(self.obj, self, self.graphicsView) + self.scene = self.graphics.get_scene() + #self.graphicsView = graphicsView + box = self.graphics.create_node_item(self.obj, self) self.scene.addItem(box) box.setPos(2500-30, 2500-30) - if(obj in self.unitOp): + if(obj in self.unit_operations): pass else: - self.unitOp.append(obj) - data = self.unitOp[:] + self.unit_operations.append(obj) + data = self.unit_operations[:] data.append(compound_selected) - PUSH('Undo', data) - self.msg.append("<span style=\"color:blue\">["+str(self.currentTime())+"]<b> "+obj.name+" </b>is instantiated .""</span>") + push('Undo', data) + self.msg.append("<span style=\"color:blue\">["+str(self.current_time())+"]<b> "+obj.name+" </b>is instantiated .""</span>") ''' Deletes the selected item from the canvas and also the objects created for that type. @@ -93,58 +94,58 @@ class Container(): def delete(self,l): for item in l: self.scene.removeItem(item) - for i in dockWidgetLst: + for i in dock_widget_lst: if i.name == item.name: i.hide() del i break - for i in dockWidgetLst: + for i in dock_widget_lst: print(i.name) - print("delete ", dockWidgetLst) + print("delete ", dock_widget_lst) if hasattr(item,'Input'): - for x in item.Input: - if x.newLine: - self.scene.removeItem(x.newLine) - del x.newLine + for x in item.input: + if x.new_line: + self.scene.removeItem(x.new_line) + del x.new_line if x.otherLine: self.scene.removeItem(x.otherLine) del x.otherLine if hasattr(item,'Output'): - for x in item.Output: - if x.newLine: - self.scene.removeItem(x.newLine) - del x.newLine + for x in item.output: + if x.new_line: + self.scene.removeItem(x.new_line) + del x.new_line if x.otherLine: self.scene.removeItem(x.otherLine) del x.otherLine if hasattr(item,'obj'): - self.unitOp.remove(item.obj) + self.unit_operations.remove(item.obj) for k in list(self.conn): if item.obj==k: del self.conn[k] elif item.obj in self.conn[k]: self.conn[k].remove(item.obj) - self.msg.append("<span style=\"color:blue\">["+str(self.currentTime())+"]<b> "+item.obj.name+" </b>is deleted .""</span>") + self.msg.append("<span style=\"color:blue\">["+str(self.current_time())+"]<b> "+item.obj.name+" </b>is deleted .""</span>") del item.obj del item - CLEAN_FILE('Redo') - data = self.unitOp[:] + clean_file('Redo') + data = self.unit_operations[:] data.append(compound_selected) - PUSH('Undo', data) + push('Undo', data) - def fetchObject(self,name): - for i in self.unitOp: + def fetch_object(self,name): + for i in self.unit_operations: if(i.name==name): return i - def addCompounds(self,comp): + def add_aompounds(self,comp): self.compounds = comp - def add_thermoPackage(self,thermo): - self.thermoPackage = thermo + def add_thermo_package(self,thermo): + self.thermo_package = thermo - def msgBrowser(self): + def msg_browser(self): std = self.flowsheet.stdout.decode("utf-8") if(std): stdout = str(std) @@ -162,47 +163,47 @@ class Container(): print(mode) self.compounds = compound_selected self.flowsheet = Flowsheet() - self.flowsheet.add_comp_list(self.compounds) + self.flowsheet.add_compound_list(self.compounds) print("######## connection master#########\n",self.conn) - for i in self.unitOp : + for i in self.unit_operations : print("here",i) - self.flowsheet.add_UnitOpn(i) + self.flowsheet.add_unit_operations(i) if mode=='SM': - self.msg.append("<span>["+str(self.currentTime())+"] Simulating in <b>Sequential</b> mode ... </span>") - self.flowsheet.simulateSM(self.ip,self.op) - self.msgBrowser() - self.result=self.flowsheet.resdata + self.msg.append("<span>["+str(self.current_time())+"] Simulating in <b>Sequential</b> mode ... </span>") + self.flowsheet.simulate_SM(self.ip,self.op) + self.msg_browser() + self.result=self.flowsheet.result_data print("under SEQ mode simulation") elif mode=='EQN': - self.msg.append("<span>["+str(self.currentTime())+"] Simulating in <b>equation</b> mode ... </span>") - self.flowsheet.simulateEQN() - self.msgBrowser() - self.result=self.flowsheet.resdata + self.msg.append("<span>["+str(self.current_time())+"] Simulating in <b>equation</b> mode ... </span>") + self.flowsheet.simulate_EQN() + self.msg_browser() + self.result=self.flowsheet.result_data print("under Eqn mode simulation") - DockWidget.showResult(NodeItem.getDockWidget()) + DockWidget.show_result(NodeItem.get_dock_widget()) -def flatlist(lst): - flat_list=[] +def flat_list(lst): + flat_lst=[] for sublist in lst: for item in sublist: - flat_list.append(item) - return flat_list + flat_lst.append(item) + return flat_lst -def PUSH(fileName, data): - with open(f"{fileName}.dat", "ab") as obj: +def push(file_name, data): + with open(f"{file_name}.dat", "ab") as obj: pickle.dump(data, obj) -def CLEAN_FILE(fileName): - with open(f"{fileName}.dat", "wb") as clean: +def clean_file(file_name): + with open(f"{file_name}.dat", "wb") as clean: pass -def POP(fileName): +def pop(file_name): last_command = None - if os.stat(f"{fileName}.dat").st_size != 0: + if os.stat(f"{file_name}.dat").st_size != 0: commands = [] - with open(f"{fileName}.dat", "rb") as objs: + with open(f"{file_name}.dat", "rb") as objs: while True: try: command = pickle.load(objs) @@ -213,18 +214,18 @@ def POP(fileName): last_command = commands[-1] commands.remove(commands[-1]) if len(commands) != 0: - with open(f"{fileName}.dat", "wb") as updated_data: + with open(f"{file_name}.dat", "wb") as updated_data: for i in range(len(commands)): pickle.dump(commands[i], updated_data) else: - CLEAN_FILE(fileName) + clean_file(file_name) return last_command -def get_last_list(fileName): +def get_last_list(file_name): commands = [] - if os.stat(f"{fileName}.dat").st_size != 0: - with open(f"{fileName}.dat", "rb") as objs: + if os.stat(f"{file_name}.dat").st_size != 0: + with open(f"{file_name}.dat", "rb") as objs: while True: try: command = pickle.load(objs) @@ -155,8 +155,8 @@ <property name="title"> <string>File</string> </property> - <addaction name="actionNew_Flowsheet"/> - <addaction name="actionSave_2"/> + <addaction name="actionNew"/> + <addaction name="actionSave"/> <addaction name="actionOpen"/> </widget> <widget class="QMenu" name="menuEdit"> @@ -178,8 +178,8 @@ <property name="title"> <string>Simulation</string> </property> - <addaction name="actionEquation_oriented"/> - <addaction name="actionSequential_mode"/> + <addaction name="actionEquationOriented"/> + <addaction name="actionSequentialMode"/> <addaction name="separator"/> <addaction name="actionTerminate"/> </widget> @@ -187,7 +187,7 @@ <property name="title"> <string>Compounds</string> </property> - <addaction name="actionSelect_compounds"/> + <addaction name="actionSelectCompounds"/> </widget> <widget class="QMenu" name="menuHelp"> <property name="title"> @@ -199,7 +199,7 @@ <property name="title"> <string>Utility</string> </property> - <addaction name="actionBinary_Phase_Envelope"/> + <addaction name="actionBinaryPhaseEnvelope"/> </widget> <addaction name="menuFile"/> <addaction name="menuEdit"/> @@ -228,6 +228,13 @@ <height>524287</height> </size> </property> + <property name="font"> + <font> + <family>Microsoft JhengHei</family> + <weight>75</weight> + <bold>true</bold> + </font> + </property> <property name="windowTitle"> <string>Component Selector</string> </property> @@ -266,7 +273,7 @@ <property name="geometry"> <rect> <x>0</x> - <y>-246</y> + <y>0</y> <width>221</width> <height>956</height> </rect> @@ -294,7 +301,8 @@ </property> <property name="font"> <font> - <pointsize>18</pointsize> + <family>Microsoft JhengHei UI</family> + <pointsize>14</pointsize> <weight>75</weight> <bold>true</bold> </font> @@ -335,9 +343,11 @@ </property> <property name="font"> <font> - <family>Comic Sans MS</family> - <pointsize>11</pointsize> - <italic>true</italic> + <family>Microsoft JhengHei</family> + <pointsize>10</pointsize> + <weight>75</weight> + <italic>false</italic> + <bold>true</bold> </font> </property> <property name="acceptDrops"> @@ -347,7 +357,7 @@ <string notr="true">Text-align:left;</string> </property> <property name="text"> - <string>MaterialStream</string> + <string> MaterialStream</string> </property> <property name="icon"> <iconset> @@ -355,8 +365,8 @@ </property> <property name="iconSize"> <size> - <width>50</width> - <height>50</height> + <width>30</width> + <height>30</height> </size> </property> </widget> @@ -381,9 +391,425 @@ <height>16777215</height> </size> </property> + <property name="palette"> + <palette> + <active> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>73</red> + <green>36</green> + <blue>73</blue> + </color> + </brush> + </colorrole> + <colorrole role="Button"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>46</green> + <blue>46</blue> + </color> + </brush> + </colorrole> + <colorrole role="Light"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>69</green> + <blue>69</blue> + </color> + </brush> + </colorrole> + <colorrole role="Midlight"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>57</green> + <blue>57</blue> + </color> + </brush> + </colorrole> + <colorrole role="Dark"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>23</green> + <blue>23</blue> + </color> + </brush> + </colorrole> + <colorrole role="Mid"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>30</green> + <blue>30</blue> + </color> + </brush> + </colorrole> + <colorrole role="Text"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>73</red> + <green>36</green> + <blue>73</blue> + </color> + </brush> + </colorrole> + <colorrole role="BrightText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>255</red> + <green>255</green> + <blue>255</blue> + </color> + </brush> + </colorrole> + <colorrole role="ButtonText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>73</red> + <green>36</green> + <blue>73</blue> + </color> + </brush> + </colorrole> + <colorrole role="Base"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + <colorrole role="Window"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>46</green> + <blue>46</blue> + </color> + </brush> + </colorrole> + <colorrole role="Shadow"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + <colorrole role="AlternateBase"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>23</green> + <blue>23</blue> + </color> + </brush> + </colorrole> + <colorrole role="ToolTipBase"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>255</red> + <green>255</green> + <blue>220</blue> + </color> + </brush> + </colorrole> + <colorrole role="ToolTipText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + </active> + <inactive> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>73</red> + <green>36</green> + <blue>73</blue> + </color> + </brush> + </colorrole> + <colorrole role="Button"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>46</green> + <blue>46</blue> + </color> + </brush> + </colorrole> + <colorrole role="Light"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>69</green> + <blue>69</blue> + </color> + </brush> + </colorrole> + <colorrole role="Midlight"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>57</green> + <blue>57</blue> + </color> + </brush> + </colorrole> + <colorrole role="Dark"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>23</green> + <blue>23</blue> + </color> + </brush> + </colorrole> + <colorrole role="Mid"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>30</green> + <blue>30</blue> + </color> + </brush> + </colorrole> + <colorrole role="Text"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>73</red> + <green>36</green> + <blue>73</blue> + </color> + </brush> + </colorrole> + <colorrole role="BrightText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>255</red> + <green>255</green> + <blue>255</blue> + </color> + </brush> + </colorrole> + <colorrole role="ButtonText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>73</red> + <green>36</green> + <blue>73</blue> + </color> + </brush> + </colorrole> + <colorrole role="Base"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + <colorrole role="Window"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>46</green> + <blue>46</blue> + </color> + </brush> + </colorrole> + <colorrole role="Shadow"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + <colorrole role="AlternateBase"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>23</green> + <blue>23</blue> + </color> + </brush> + </colorrole> + <colorrole role="ToolTipBase"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>255</red> + <green>255</green> + <blue>220</blue> + </color> + </brush> + </colorrole> + <colorrole role="ToolTipText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + </inactive> + <disabled> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>73</red> + <green>36</green> + <blue>73</blue> + </color> + </brush> + </colorrole> + <colorrole role="Button"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>46</green> + <blue>46</blue> + </color> + </brush> + </colorrole> + <colorrole role="Light"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>69</green> + <blue>69</blue> + </color> + </brush> + </colorrole> + <colorrole role="Midlight"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>57</green> + <blue>57</blue> + </color> + </brush> + </colorrole> + <colorrole role="Dark"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>23</green> + <blue>23</blue> + </color> + </brush> + </colorrole> + <colorrole role="Mid"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>30</green> + <blue>30</blue> + </color> + </brush> + </colorrole> + <colorrole role="Text"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>73</red> + <green>36</green> + <blue>73</blue> + </color> + </brush> + </colorrole> + <colorrole role="BrightText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>255</red> + <green>255</green> + <blue>255</blue> + </color> + </brush> + </colorrole> + <colorrole role="ButtonText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>73</red> + <green>36</green> + <blue>73</blue> + </color> + </brush> + </colorrole> + <colorrole role="Base"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>46</green> + <blue>46</blue> + </color> + </brush> + </colorrole> + <colorrole role="Window"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>46</green> + <blue>46</blue> + </color> + </brush> + </colorrole> + <colorrole role="Shadow"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + <colorrole role="AlternateBase"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>46</green> + <blue>46</blue> + </color> + </brush> + </colorrole> + <colorrole role="ToolTipBase"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>255</red> + <green>255</green> + <blue>220</blue> + </color> + </brush> + </colorrole> + <colorrole role="ToolTipText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + </disabled> + </palette> + </property> <property name="font"> <font> - <pointsize>18</pointsize> + <family>Microsoft JhengHei UI</family> + <pointsize>14</pointsize> <weight>75</weight> <bold>true</bold> </font> @@ -424,15 +850,17 @@ </property> <property name="font"> <font> - <family>Comic Sans MS</family> - <pointsize>11</pointsize> + <family>Microsoft JhengHei</family> + <pointsize>10</pointsize> + <weight>75</weight> + <bold>true</bold> </font> </property> <property name="styleSheet"> <string notr="true">Text-align:left</string> </property> <property name="text"> - <string>Mixer</string> + <string> Mixer</string> </property> <property name="icon"> <iconset> @@ -440,8 +868,8 @@ </property> <property name="iconSize"> <size> - <width>50</width> - <height>50</height> + <width>30</width> + <height>30</height> </size> </property> </widget> @@ -468,15 +896,17 @@ </property> <property name="font"> <font> - <family>Comic Sans MS</family> - <pointsize>11</pointsize> + <family>Microsoft JhengHei</family> + <pointsize>10</pointsize> + <weight>75</weight> + <bold>true</bold> </font> </property> <property name="styleSheet"> <string notr="true">Text-align:left</string> </property> <property name="text"> - <string>Splitter</string> + <string> Splitter</string> </property> <property name="icon"> <iconset> @@ -484,8 +914,8 @@ </property> <property name="iconSize"> <size> - <width>50</width> - <height>50</height> + <width>30</width> + <height>30</height> </size> </property> </widget> @@ -510,9 +940,425 @@ <height>16777215</height> </size> </property> + <property name="palette"> + <palette> + <active> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>73</red> + <green>36</green> + <blue>73</blue> + </color> + </brush> + </colorrole> + <colorrole role="Button"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>70</green> + <blue>70</blue> + </color> + </brush> + </colorrole> + <colorrole role="Light"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>105</green> + <blue>105</blue> + </color> + </brush> + </colorrole> + <colorrole role="Midlight"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>87</green> + <blue>87</blue> + </color> + </brush> + </colorrole> + <colorrole role="Dark"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>35</green> + <blue>35</blue> + </color> + </brush> + </colorrole> + <colorrole role="Mid"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>46</green> + <blue>46</blue> + </color> + </brush> + </colorrole> + <colorrole role="Text"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>73</red> + <green>36</green> + <blue>73</blue> + </color> + </brush> + </colorrole> + <colorrole role="BrightText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>255</red> + <green>255</green> + <blue>255</blue> + </color> + </brush> + </colorrole> + <colorrole role="ButtonText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>73</red> + <green>36</green> + <blue>73</blue> + </color> + </brush> + </colorrole> + <colorrole role="Base"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + <colorrole role="Window"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>70</green> + <blue>70</blue> + </color> + </brush> + </colorrole> + <colorrole role="Shadow"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + <colorrole role="AlternateBase"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>35</green> + <blue>35</blue> + </color> + </brush> + </colorrole> + <colorrole role="ToolTipBase"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>255</red> + <green>255</green> + <blue>220</blue> + </color> + </brush> + </colorrole> + <colorrole role="ToolTipText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + </active> + <inactive> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>73</red> + <green>36</green> + <blue>73</blue> + </color> + </brush> + </colorrole> + <colorrole role="Button"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>70</green> + <blue>70</blue> + </color> + </brush> + </colorrole> + <colorrole role="Light"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>105</green> + <blue>105</blue> + </color> + </brush> + </colorrole> + <colorrole role="Midlight"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>87</green> + <blue>87</blue> + </color> + </brush> + </colorrole> + <colorrole role="Dark"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>35</green> + <blue>35</blue> + </color> + </brush> + </colorrole> + <colorrole role="Mid"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>46</green> + <blue>46</blue> + </color> + </brush> + </colorrole> + <colorrole role="Text"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>73</red> + <green>36</green> + <blue>73</blue> + </color> + </brush> + </colorrole> + <colorrole role="BrightText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>255</red> + <green>255</green> + <blue>255</blue> + </color> + </brush> + </colorrole> + <colorrole role="ButtonText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>73</red> + <green>36</green> + <blue>73</blue> + </color> + </brush> + </colorrole> + <colorrole role="Base"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + <colorrole role="Window"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>70</green> + <blue>70</blue> + </color> + </brush> + </colorrole> + <colorrole role="Shadow"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + <colorrole role="AlternateBase"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>35</green> + <blue>35</blue> + </color> + </brush> + </colorrole> + <colorrole role="ToolTipBase"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>255</red> + <green>255</green> + <blue>220</blue> + </color> + </brush> + </colorrole> + <colorrole role="ToolTipText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + </inactive> + <disabled> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>73</red> + <green>36</green> + <blue>73</blue> + </color> + </brush> + </colorrole> + <colorrole role="Button"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>70</green> + <blue>70</blue> + </color> + </brush> + </colorrole> + <colorrole role="Light"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>105</green> + <blue>105</blue> + </color> + </brush> + </colorrole> + <colorrole role="Midlight"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>87</green> + <blue>87</blue> + </color> + </brush> + </colorrole> + <colorrole role="Dark"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>35</green> + <blue>35</blue> + </color> + </brush> + </colorrole> + <colorrole role="Mid"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>46</green> + <blue>46</blue> + </color> + </brush> + </colorrole> + <colorrole role="Text"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>73</red> + <green>36</green> + <blue>73</blue> + </color> + </brush> + </colorrole> + <colorrole role="BrightText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>255</red> + <green>255</green> + <blue>255</blue> + </color> + </brush> + </colorrole> + <colorrole role="ButtonText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>73</red> + <green>36</green> + <blue>73</blue> + </color> + </brush> + </colorrole> + <colorrole role="Base"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>70</green> + <blue>70</blue> + </color> + </brush> + </colorrole> + <colorrole role="Window"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>70</green> + <blue>70</blue> + </color> + </brush> + </colorrole> + <colorrole role="Shadow"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + <colorrole role="AlternateBase"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>70</green> + <blue>70</blue> + </color> + </brush> + </colorrole> + <colorrole role="ToolTipBase"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>255</red> + <green>255</green> + <blue>220</blue> + </color> + </brush> + </colorrole> + <colorrole role="ToolTipText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + </disabled> + </palette> + </property> <property name="font"> <font> - <pointsize>18</pointsize> + <family>Microsoft JhengHei UI</family> + <pointsize>14</pointsize> <weight>75</weight> <bold>true</bold> </font> @@ -553,15 +1399,17 @@ </property> <property name="font"> <font> - <family>Comic Sans MS</family> - <pointsize>11</pointsize> + <family>Microsoft JhengHei</family> + <pointsize>10</pointsize> + <weight>75</weight> + <bold>true</bold> </font> </property> <property name="styleSheet"> <string notr="true">Text-align:left</string> </property> <property name="text"> - <string>Heater</string> + <string> Heater</string> </property> <property name="icon"> <iconset> @@ -569,10 +1417,19 @@ </property> <property name="iconSize"> <size> - <width>50</width> - <height>50</height> + <width>40</width> + <height>40</height> </size> </property> + <property name="autoDefault"> + <bool>false</bool> + </property> + <property name="default"> + <bool>false</bool> + </property> + <property name="flat"> + <bool>false</bool> + </property> </widget> </item> <item> @@ -597,15 +1454,17 @@ </property> <property name="font"> <font> - <family>Comic Sans MS</family> - <pointsize>11</pointsize> + <family>Microsoft JhengHei</family> + <pointsize>10</pointsize> + <weight>75</weight> + <bold>true</bold> </font> </property> <property name="styleSheet"> <string notr="true">Text-align:left</string> </property> <property name="text"> - <string>Cooler</string> + <string> Cooler</string> </property> <property name="icon"> <iconset> @@ -613,10 +1472,13 @@ </property> <property name="iconSize"> <size> - <width>50</width> - <height>50</height> + <width>40</width> + <height>40</height> </size> </property> + <property name="flat"> + <bool>false</bool> + </property> </widget> </item> <item> @@ -641,7 +1503,8 @@ </property> <property name="font"> <font> - <pointsize>18</pointsize> + <family>Microsoft JhengHei UI</family> + <pointsize>14</pointsize> <weight>75</weight> <bold>true</bold> </font> @@ -682,15 +1545,17 @@ </property> <property name="font"> <font> - <family>Comic Sans MS</family> - <pointsize>11</pointsize> + <family>Microsoft JhengHei</family> + <pointsize>10</pointsize> + <weight>75</weight> + <bold>true</bold> </font> </property> <property name="styleSheet"> <string notr="true">Text-align:left</string> </property> <property name="text"> - <string>Flash</string> + <string> Flash</string> </property> <property name="icon"> <iconset> @@ -698,8 +1563,8 @@ </property> <property name="iconSize"> <size> - <width>50</width> - <height>50</height> + <width>40</width> + <height>40</height> </size> </property> </widget> @@ -726,15 +1591,17 @@ </property> <property name="font"> <font> - <family>Comic Sans MS</family> - <pointsize>11</pointsize> + <family>Microsoft JhengHei</family> + <pointsize>10</pointsize> + <weight>75</weight> + <bold>true</bold> </font> </property> <property name="styleSheet"> <string notr="true">Text-align:left</string> </property> <property name="text"> - <string>Compound Seperator</string> + <string> Compound Seperator</string> </property> <property name="icon"> <iconset> @@ -742,8 +1609,8 @@ </property> <property name="iconSize"> <size> - <width>50</width> - <height>50</height> + <width>40</width> + <height>40</height> </size> </property> </widget> @@ -770,7 +1637,8 @@ </property> <property name="font"> <font> - <pointsize>15</pointsize> + <family>Microsoft JhengHei UI</family> + <pointsize>14</pointsize> <weight>75</weight> <bold>true</bold> </font> @@ -808,15 +1676,17 @@ </property> <property name="font"> <font> - <family>Comic Sans MS</family> - <pointsize>11</pointsize> + <family>Microsoft JhengHei</family> + <pointsize>10</pointsize> + <weight>75</weight> + <bold>true</bold> </font> </property> <property name="styleSheet"> <string notr="true">Text-align:left</string> </property> <property name="text"> - <string>Valve</string> + <string> Valve</string> </property> <property name="icon"> <iconset> @@ -824,8 +1694,8 @@ </property> <property name="iconSize"> <size> - <width>50</width> - <height>50</height> + <width>30</width> + <height>30</height> </size> </property> </widget> @@ -852,15 +1722,17 @@ </property> <property name="font"> <font> - <family>Comic Sans MS</family> - <pointsize>11</pointsize> + <family>Microsoft JhengHei</family> + <pointsize>10</pointsize> + <weight>75</weight> + <bold>true</bold> </font> </property> <property name="styleSheet"> <string notr="true">Text-align:left</string> </property> <property name="text"> - <string>Centrifugal Pump</string> + <string> Centrifugal Pump</string> </property> <property name="icon"> <iconset> @@ -868,8 +1740,8 @@ </property> <property name="iconSize"> <size> - <width>50</width> - <height>50</height> + <width>30</width> + <height>30</height> </size> </property> </widget> @@ -896,15 +1768,17 @@ </property> <property name="font"> <font> - <family>Comic Sans MS</family> - <pointsize>11</pointsize> + <family>Microsoft JhengHei</family> + <pointsize>10</pointsize> + <weight>75</weight> + <bold>true</bold> </font> </property> <property name="styleSheet"> <string notr="true">Text-align:left</string> </property> <property name="text"> - <string>Adiabatic Compressor</string> + <string> Adiabatic Compressor</string> </property> <property name="icon"> <iconset> @@ -912,8 +1786,8 @@ </property> <property name="iconSize"> <size> - <width>50</width> - <height>50</height> + <width>30</width> + <height>30</height> </size> </property> </widget> @@ -940,8 +1814,10 @@ </property> <property name="font"> <font> - <family>Comic Sans MS</family> - <pointsize>11</pointsize> + <family>Microsoft JhengHei</family> + <pointsize>10</pointsize> + <weight>75</weight> + <bold>true</bold> </font> </property> <property name="autoFillBackground"> @@ -951,7 +1827,7 @@ <string notr="true">Text-align:left</string> </property> <property name="text"> - <string>Adiabatic Expander</string> + <string> Adiabatic Expander</string> </property> <property name="icon"> <iconset> @@ -959,8 +1835,8 @@ </property> <property name="iconSize"> <size> - <width>50</width> - <height>50</height> + <width>30</width> + <height>30</height> </size> </property> </widget> @@ -987,7 +1863,8 @@ </property> <property name="font"> <font> - <pointsize>18</pointsize> + <family>Microsoft JhengHei UI</family> + <pointsize>14</pointsize> <weight>75</weight> <bold>true</bold> </font> @@ -1025,19 +1902,21 @@ </property> <property name="font"> <font> - <family>Comic Sans MS</family> - <pointsize>11</pointsize> + <family>Microsoft JhengHei</family> + <pointsize>10</pointsize> + <weight>75</weight> + <bold>true</bold> </font> </property> <property name="styleSheet"> <string notr="true">Text-align:left</string> </property> <property name="text"> - <string>Distillation Column</string> + <string> Distillation Column</string> </property> <property name="icon"> <iconset> - <normaloff>icons/DistillationColumn.png</normaloff>icons/DistillationColumn.png</iconset> + <normaloff>Icons/Column.png</normaloff>Icons/Column.png</iconset> </property> <property name="iconSize"> <size> @@ -1069,19 +1948,21 @@ </property> <property name="font"> <font> - <family>Comic Sans MS</family> - <pointsize>11</pointsize> + <family>Microsoft JhengHei</family> + <pointsize>10</pointsize> + <weight>75</weight> + <bold>true</bold> </font> </property> <property name="styleSheet"> <string notr="true">Text-align:left</string> </property> <property name="text"> - <string>Shortcut Column</string> + <string> Shortcut Column</string> </property> <property name="icon"> <iconset> - <normaloff>icons/ShortcutColumn.png</normaloff>icons/ShortcutColumn.png</iconset> + <normaloff>Icons/Column.png</normaloff>Icons/Column.png</iconset> </property> <property name="iconSize"> <size> @@ -1111,21 +1992,21 @@ <attribute name="toolBarBreak"> <bool>false</bool> </attribute> - <addaction name="actionNew_Flowsheet"/> + <addaction name="actionNew"/> <addaction name="separator"/> <addaction name="actionZoomIn"/> <addaction name="actionZoomOut"/> <addaction name="actionResetZoom"/> <addaction name="separator"/> - <addaction name="actionEquation_oriented"/> - <addaction name="actionSequential_mode"/> + <addaction name="actionEquationOriented"/> + <addaction name="actionSequentialMode"/> <addaction name="separator"/> - <addaction name="actionSelect_compounds"/> + <addaction name="actionSelectCompounds"/> </widget> <action name="actionZoomIn"> <property name="icon"> <iconset> - <normaloff>icons/zoomIn.png</normaloff>icons/zoomIn.png</iconset> + <normaloff>Icons/zoom_in.png</normaloff>Icons/zoom_in.png</iconset> </property> <property name="text"> <string>ZoomIn</string> @@ -1134,7 +2015,7 @@ <action name="actionZoomOut"> <property name="icon"> <iconset> - <normaloff>icons/zoomOut.png</normaloff>icons/zoomOut.png</iconset> + <normaloff>Icons/zoom_out.png</normaloff>Icons/zoom_out.png</iconset> </property> <property name="text"> <string>ZoomOut</string> @@ -1143,43 +2024,43 @@ <action name="actionResetZoom"> <property name="icon"> <iconset> - <normaloff>icons/zoomReset.png</normaloff>icons/zoomReset.png</iconset> + <normaloff>Icons/zoom_reset.png</normaloff>Icons/zoom_reset.png</iconset> </property> <property name="text"> <string>ResetZoom</string> </property> </action> - <action name="actionEquation_oriented"> + <action name="actionEquationOriented"> <property name="icon"> <iconset> - <normaloff>icons/Equation.png</normaloff>icons/Equation.png</iconset> + <normaloff>Icons/eq.png</normaloff>Icons/eq.png</iconset> </property> <property name="text"> <string>Equation oriented</string> </property> </action> - <action name="actionSequential_mode"> + <action name="actionSequentialMode"> <property name="icon"> <iconset> - <normaloff>icons/Sequential.png</normaloff>icons/Sequential.png</iconset> + <normaloff>Icons/sq.png</normaloff>Icons/sq.png</iconset> </property> <property name="text"> <string>Sequential mode</string> </property> </action> - <action name="actionSelect_compounds"> + <action name="actionSelectCompounds"> <property name="icon"> <iconset> - <normaloff>icons/compoundSelector.png</normaloff>icons/compoundSelector.png</iconset> + <normaloff>Icons/compound.png</normaloff>Icons/compound.png</iconset> </property> <property name="text"> <string>Select Compounds</string> </property> </action> - <action name="actionNew_Flowsheet"> + <action name="actionNew"> <property name="icon"> <iconset> - <normaloff>icons/new.svg</normaloff>icons/new.svg</iconset> + <normaloff>Icons/new.png</normaloff>Icons/new.png</iconset> </property> <property name="text"> <string>New</string> @@ -1192,11 +2073,6 @@ </action> <action name="actionSave"> <property name="text"> - <string>save</string> - </property> - </action> - <action name="actionSave_2"> - <property name="text"> <string>Save</string> </property> </action> @@ -1205,7 +2081,7 @@ <string>Open</string> </property> </action> - <action name="actionBinary_Phase_Envelope"> + <action name="actionBinaryPhaseEnvelope"> <property name="text"> <string>Binary Phase Envelope</string> </property> diff --git a/main2.ui b/main2.ui deleted file mode 100644 index 49b29e6..0000000 --- a/main2.ui +++ /dev/null @@ -1,415 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>MainWindow</class> - <widget class="QMainWindow" name="MainWindow"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>1068</width> - <height>829</height> - </rect> - </property> - <property name="windowTitle"> - <string>MainWindow</string> - </property> - <property name="windowIcon"> - <iconset> - <normaloff>icons/logo.png</normaloff>icons/logo.png</iconset> - </property> - <property name="iconSize"> - <size> - <width>24</width> - <height>24</height> - </size> - </property> - <widget class="QWidget" name="centralwidget"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Maximum" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <layout class="QGridLayout" name="gridLayout"> - <item row="0" column="0"> - <widget class="QGraphicsView" name="graphicsView"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>12</pointsize> - </font> - </property> - <property name="mouseTracking"> - <bool>true</bool> - </property> - <property name="acceptDrops"> - <bool>true</bool> - </property> - <property name="autoFillBackground"> - <bool>true</bool> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - <property name="verticalScrollBarPolicy"> - <enum>Qt::ScrollBarAsNeeded</enum> - </property> - <property name="horizontalScrollBarPolicy"> - <enum>Qt::ScrollBarAsNeeded</enum> - </property> - <property name="backgroundBrush"> - <brush brushstyle="NoBrush"> - <color alpha="255"> - <red>170</red> - <green>170</green> - <blue>127</blue> - </color> - </brush> - </property> - <property name="foregroundBrush"> - <brush brushstyle="NoBrush"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>0</blue> - </color> - </brush> - </property> - <property name="sceneRect"> - <rectf> - <x>0.000000000000000</x> - <y>0.000000000000000</y> - <width>5000.000000000000000</width> - <height>5000.000000000000000</height> - </rectf> - </property> - <property name="dragMode"> - <enum>QGraphicsView::RubberBandDrag</enum> - </property> - <property name="transformationAnchor"> - <enum>QGraphicsView::AnchorUnderMouse</enum> - </property> - <property name="resizeAnchor"> - <enum>QGraphicsView::AnchorUnderMouse</enum> - </property> - <property name="viewportUpdateMode"> - <enum>QGraphicsView::FullViewportUpdate</enum> - </property> - <property name="optimizationFlags"> - <set>QGraphicsView::DontClipPainter</set> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QDockWidget" name="dockWidget_2"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>109</width> - <height>150</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>524287</width> - <height>150</height> - </size> - </property> - <property name="allowedAreas"> - <set>Qt::BottomDockWidgetArea</set> - </property> - <property name="windowTitle"> - <string>Message Browser</string> - </property> - <widget class="QWidget" name="dockWidgetContents_2"> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <item> - <widget class="QTextEdit" name="textBrowser"/> - </item> - </layout> - </widget> - </widget> - </item> - </layout> - </widget> - <widget class="QMenuBar" name="menubar"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>1068</width> - <height>21</height> - </rect> - </property> - <widget class="QMenu" name="menuFile"> - <property name="title"> - <string>File</string> - </property> - <addaction name="actionNew_Flowsheet"/> - <addaction name="actionSave_2"/> - <addaction name="actionOpen"/> - </widget> - <widget class="QMenu" name="menuEdit"> - <property name="title"> - <string>Edit</string> - </property> - <addaction name="actionUndo"/> - <addaction name="actionRedo"/> - </widget> - <widget class="QMenu" name="menuView"> - <property name="title"> - <string>View</string> - </property> - <addaction name="actionZoomIn"/> - <addaction name="actionZoomOut"/> - <addaction name="actionResetZoom"/> - </widget> - <widget class="QMenu" name="menuSimulation"> - <property name="title"> - <string>Simulation</string> - </property> - <addaction name="actionEquation_oriented"/> - <addaction name="actionSequential_mode"/> - <addaction name="separator"/> - <addaction name="actionTerminate"/> - </widget> - <widget class="QMenu" name="menuComponds"> - <property name="title"> - <string>Compounds</string> - </property> - <addaction name="actionSelect_compounds"/> - </widget> - <widget class="QMenu" name="menuHelp"> - <property name="title"> - <string>Help</string> - </property> - <addaction name="actionHelp"/> - </widget> - <widget class="QMenu" name="menuUtility"> - <property name="title"> - <string>Utility</string> - </property> - <addaction name="actionBinary_Phase_Envelope"/> - </widget> - <addaction name="menuFile"/> - <addaction name="menuEdit"/> - <addaction name="menuView"/> - <addaction name="menuSimulation"/> - <addaction name="menuComponds"/> - <addaction name="menuHelp"/> - <addaction name="menuUtility"/> - </widget> - <widget class="QDockWidget" name="dockWidget"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>270</width> - <height>548</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>270</width> - <height>524287</height> - </size> - </property> - <property name="windowTitle"> - <string>Component Selector</string> - </property> - <attribute name="dockWidgetArea"> - <number>2</number> - </attribute> - <widget class="QWidget" name="dockWidgetContents"> - <layout class="QHBoxLayout" name="horizontalLayout_3"> - <item> - <widget class="QScrollArea" name="scrollArea"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>100</width> - <height>430</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>240</width> - <height>1000</height> - </size> - </property> - <property name="verticalScrollBarPolicy"> - <enum>Qt::ScrollBarAlwaysOn</enum> - </property> - <property name="widgetResizable"> - <bool>true</bool> - </property> - <widget class="QWidget" name="scrollAreaWidgetContents"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>221</width> - <height>732</height> - </rect> - </property> - <layout class="QVBoxLayout" name="verticalLayout_5"> - <item> - <layout class="QGridLayout" name="gl"/> - </item> - </layout> - </widget> - </widget> - </item> - </layout> - </widget> - </widget> - <widget class="QToolBar" name="toolBar"> - <property name="windowTitle"> - <string>toolBar</string> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - <attribute name="toolBarArea"> - <enum>TopToolBarArea</enum> - </attribute> - <attribute name="toolBarBreak"> - <bool>false</bool> - </attribute> - <addaction name="actionNew_Flowsheet"/> - <addaction name="separator"/> - <addaction name="actionZoomIn"/> - <addaction name="actionZoomOut"/> - <addaction name="actionResetZoom"/> - <addaction name="separator"/> - <addaction name="actionEquation_oriented"/> - <addaction name="actionSequential_mode"/> - <addaction name="separator"/> - <addaction name="actionSelect_compounds"/> - </widget> - <action name="actionZoomIn"> - <property name="icon"> - <iconset> - <normaloff>icons/zoomIn.png</normaloff>icons/zoomIn.png</iconset> - </property> - <property name="text"> - <string>ZoomIn</string> - </property> - </action> - <action name="actionZoomOut"> - <property name="icon"> - <iconset> - <normaloff>icons/zoomOut.png</normaloff>icons/zoomOut.png</iconset> - </property> - <property name="text"> - <string>ZoomOut</string> - </property> - </action> - <action name="actionResetZoom"> - <property name="icon"> - <iconset> - <normaloff>icons/zoomReset.png</normaloff>icons/zoomReset.png</iconset> - </property> - <property name="text"> - <string>ResetZoom</string> - </property> - </action> - <action name="actionEquation_oriented"> - <property name="icon"> - <iconset> - <normaloff>icons/Equation.png</normaloff>icons/Equation.png</iconset> - </property> - <property name="text"> - <string>Equation oriented</string> - </property> - </action> - <action name="actionSequential_mode"> - <property name="icon"> - <iconset> - <normaloff>icons/Sequential.png</normaloff>icons/Sequential.png</iconset> - </property> - <property name="text"> - <string>Sequential mode</string> - </property> - </action> - <action name="actionSelect_compounds"> - <property name="icon"> - <iconset> - <normaloff>icons/compoundSelector.png</normaloff>icons/compoundSelector.png</iconset> - </property> - <property name="text"> - <string>Select Compounds</string> - </property> - </action> - <action name="actionNew_Flowsheet"> - <property name="icon"> - <iconset> - <normaloff>icons/new.svg</normaloff>icons/new.svg</iconset> - </property> - <property name="text"> - <string>New</string> - </property> - </action> - <action name="actionHelp"> - <property name="text"> - <string>Help</string> - </property> - </action> - <action name="actionSave"> - <property name="text"> - <string>save</string> - </property> - </action> - <action name="actionSave_2"> - <property name="text"> - <string>Save</string> - </property> - </action> - <action name="actionOpen"> - <property name="text"> - <string>Open</string> - </property> - </action> - <action name="actionBinary_Phase_Envelope"> - <property name="text"> - <string>Binary Phase Envelope</string> - </property> - </action> - <action name="actionTerminate"> - <property name="text"> - <string>Terminate</string> - </property> - </action> - <action name="actionUndo"> - <property name="text"> - <string>Undo</string> - </property> - </action> - <action name="actionRedo"> - <property name="text"> - <string>Redo</string> - </property> - </action> - </widget> - <resources/> - <connections/> -</ui> diff --git a/main3.ui b/main3.ui deleted file mode 100644 index 9d30a8e..0000000 --- a/main3.ui +++ /dev/null @@ -1,2112 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>MainWindow</class> - <widget class="QMainWindow" name="MainWindow"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>1068</width> - <height>803</height> - </rect> - </property> - <property name="windowTitle"> - <string>MainWindow</string> - </property> - <property name="windowIcon"> - <iconset> - <normaloff>icons/logo.png</normaloff>icons/logo.png</iconset> - </property> - <property name="iconSize"> - <size> - <width>24</width> - <height>24</height> - </size> - </property> - <widget class="QWidget" name="centralwidget"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Maximum" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <layout class="QGridLayout" name="gridLayout"> - <item row="0" column="0"> - <widget class="QGraphicsView" name="graphicsView"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>12</pointsize> - </font> - </property> - <property name="mouseTracking"> - <bool>true</bool> - </property> - <property name="acceptDrops"> - <bool>true</bool> - </property> - <property name="autoFillBackground"> - <bool>true</bool> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - <property name="verticalScrollBarPolicy"> - <enum>Qt::ScrollBarAsNeeded</enum> - </property> - <property name="horizontalScrollBarPolicy"> - <enum>Qt::ScrollBarAsNeeded</enum> - </property> - <property name="backgroundBrush"> - <brush brushstyle="NoBrush"> - <color alpha="255"> - <red>170</red> - <green>170</green> - <blue>127</blue> - </color> - </brush> - </property> - <property name="foregroundBrush"> - <brush brushstyle="NoBrush"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>0</blue> - </color> - </brush> - </property> - <property name="sceneRect"> - <rectf> - <x>0.000000000000000</x> - <y>0.000000000000000</y> - <width>5000.000000000000000</width> - <height>5000.000000000000000</height> - </rectf> - </property> - <property name="dragMode"> - <enum>QGraphicsView::RubberBandDrag</enum> - </property> - <property name="transformationAnchor"> - <enum>QGraphicsView::AnchorUnderMouse</enum> - </property> - <property name="resizeAnchor"> - <enum>QGraphicsView::AnchorUnderMouse</enum> - </property> - <property name="viewportUpdateMode"> - <enum>QGraphicsView::FullViewportUpdate</enum> - </property> - <property name="optimizationFlags"> - <set>QGraphicsView::DontClipPainter</set> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QDockWidget" name="dockWidget_2"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>109</width> - <height>150</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>524287</width> - <height>150</height> - </size> - </property> - <property name="allowedAreas"> - <set>Qt::BottomDockWidgetArea</set> - </property> - <property name="windowTitle"> - <string>Message Browser</string> - </property> - <widget class="QWidget" name="dockWidgetContents_2"> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <item> - <widget class="QTextEdit" name="textBrowser"/> - </item> - </layout> - </widget> - </widget> - </item> - </layout> - </widget> - <widget class="QMenuBar" name="menubar"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>1068</width> - <height>21</height> - </rect> - </property> - <widget class="QMenu" name="menuFile"> - <property name="title"> - <string>File</string> - </property> - <addaction name="actionNew"/> - <addaction name="actionSave_2"/> - <addaction name="actionOpen"/> - </widget> - <widget class="QMenu" name="menuEdit"> - <property name="title"> - <string>Edit</string> - </property> - <addaction name="actionUndo"/> - <addaction name="actionRedo"/> - </widget> - <widget class="QMenu" name="menuView"> - <property name="title"> - <string>View</string> - </property> - <addaction name="actionZoomIn"/> - <addaction name="actionZoomOut"/> - <addaction name="actionResetZoom"/> - </widget> - <widget class="QMenu" name="menuSimulation"> - <property name="title"> - <string>Simulation</string> - </property> - <addaction name="actionEquation_oriented"/> - <addaction name="actionSequential_mode"/> - <addaction name="separator"/> - <addaction name="actionTerminate"/> - </widget> - <widget class="QMenu" name="menuComponds"> - <property name="title"> - <string>Compounds</string> - </property> - <addaction name="actionSelect_compounds"/> - </widget> - <widget class="QMenu" name="menuHelp"> - <property name="title"> - <string>Help</string> - </property> - <addaction name="actionHelp"/> - </widget> - <widget class="QMenu" name="menuUtility"> - <property name="title"> - <string>Utility</string> - </property> - <addaction name="actionBinary_Phase_Envelope"/> - </widget> - <addaction name="menuFile"/> - <addaction name="menuEdit"/> - <addaction name="menuView"/> - <addaction name="menuSimulation"/> - <addaction name="menuComponds"/> - <addaction name="menuHelp"/> - <addaction name="menuUtility"/> - </widget> - <widget class="QDockWidget" name="dockWidget"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>270</width> - <height>548</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>270</width> - <height>524287</height> - </size> - </property> - <property name="font"> - <font> - <family>Microsoft JhengHei</family> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="windowTitle"> - <string>Component Selector</string> - </property> - <attribute name="dockWidgetArea"> - <number>2</number> - </attribute> - <widget class="QWidget" name="dockWidgetContents"> - <layout class="QHBoxLayout" name="horizontalLayout_3"> - <item> - <widget class="QScrollArea" name="scrollArea"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>100</width> - <height>430</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>240</width> - <height>1000</height> - </size> - </property> - <property name="verticalScrollBarPolicy"> - <enum>Qt::ScrollBarAlwaysOn</enum> - </property> - <property name="widgetResizable"> - <bool>true</bool> - </property> - <widget class="QWidget" name="scrollAreaWidgetContents"> - <property name="geometry"> - <rect> - <x>0</x> - <y>-251</y> - <width>221</width> - <height>956</height> - </rect> - </property> - <layout class="QVBoxLayout" name="verticalLayout_5"> - <item> - <widget class="QLabel" name="label_2"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>30</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>200</width> - <height>16777215</height> - </size> - </property> - <property name="font"> - <font> - <family>Microsoft JhengHei UI</family> - <pointsize>14</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="layoutDirection"> - <enum>Qt::LeftToRight</enum> - </property> - <property name="styleSheet"> - <string notr="true">color:rgb(73,36,73,255)</string> - </property> - <property name="text"> - <string>Streams</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="pushButton"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>200</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <family>Microsoft JhengHei</family> - <pointsize>10</pointsize> - <weight>75</weight> - <italic>false</italic> - <bold>true</bold> - </font> - </property> - <property name="acceptDrops"> - <bool>true</bool> - </property> - <property name="styleSheet"> - <string notr="true">Text-align:left;</string> - </property> - <property name="text"> - <string> MaterialStream</string> - </property> - <property name="icon"> - <iconset> - <normaloff>icons/MaterialStream.png</normaloff>icons/MaterialStream.png</iconset> - </property> - <property name="iconSize"> - <size> - <width>30</width> - <height>30</height> - </size> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_3"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>30</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>200</width> - <height>16777215</height> - </size> - </property> - <property name="palette"> - <palette> - <active> - <colorrole role="WindowText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>73</red> - <green>36</green> - <blue>73</blue> - </color> - </brush> - </colorrole> - <colorrole role="Button"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>46</green> - <blue>46</blue> - </color> - </brush> - </colorrole> - <colorrole role="Light"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>69</green> - <blue>69</blue> - </color> - </brush> - </colorrole> - <colorrole role="Midlight"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>57</green> - <blue>57</blue> - </color> - </brush> - </colorrole> - <colorrole role="Dark"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>23</green> - <blue>23</blue> - </color> - </brush> - </colorrole> - <colorrole role="Mid"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>30</green> - <blue>30</blue> - </color> - </brush> - </colorrole> - <colorrole role="Text"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>73</red> - <green>36</green> - <blue>73</blue> - </color> - </brush> - </colorrole> - <colorrole role="BrightText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>255</blue> - </color> - </brush> - </colorrole> - <colorrole role="ButtonText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>73</red> - <green>36</green> - <blue>73</blue> - </color> - </brush> - </colorrole> - <colorrole role="Base"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>0</blue> - </color> - </brush> - </colorrole> - <colorrole role="Window"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>46</green> - <blue>46</blue> - </color> - </brush> - </colorrole> - <colorrole role="Shadow"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>0</blue> - </color> - </brush> - </colorrole> - <colorrole role="AlternateBase"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>23</green> - <blue>23</blue> - </color> - </brush> - </colorrole> - <colorrole role="ToolTipBase"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>220</blue> - </color> - </brush> - </colorrole> - <colorrole role="ToolTipText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>0</blue> - </color> - </brush> - </colorrole> - </active> - <inactive> - <colorrole role="WindowText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>73</red> - <green>36</green> - <blue>73</blue> - </color> - </brush> - </colorrole> - <colorrole role="Button"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>46</green> - <blue>46</blue> - </color> - </brush> - </colorrole> - <colorrole role="Light"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>69</green> - <blue>69</blue> - </color> - </brush> - </colorrole> - <colorrole role="Midlight"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>57</green> - <blue>57</blue> - </color> - </brush> - </colorrole> - <colorrole role="Dark"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>23</green> - <blue>23</blue> - </color> - </brush> - </colorrole> - <colorrole role="Mid"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>30</green> - <blue>30</blue> - </color> - </brush> - </colorrole> - <colorrole role="Text"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>73</red> - <green>36</green> - <blue>73</blue> - </color> - </brush> - </colorrole> - <colorrole role="BrightText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>255</blue> - </color> - </brush> - </colorrole> - <colorrole role="ButtonText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>73</red> - <green>36</green> - <blue>73</blue> - </color> - </brush> - </colorrole> - <colorrole role="Base"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>0</blue> - </color> - </brush> - </colorrole> - <colorrole role="Window"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>46</green> - <blue>46</blue> - </color> - </brush> - </colorrole> - <colorrole role="Shadow"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>0</blue> - </color> - </brush> - </colorrole> - <colorrole role="AlternateBase"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>23</green> - <blue>23</blue> - </color> - </brush> - </colorrole> - <colorrole role="ToolTipBase"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>220</blue> - </color> - </brush> - </colorrole> - <colorrole role="ToolTipText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>0</blue> - </color> - </brush> - </colorrole> - </inactive> - <disabled> - <colorrole role="WindowText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>73</red> - <green>36</green> - <blue>73</blue> - </color> - </brush> - </colorrole> - <colorrole role="Button"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>46</green> - <blue>46</blue> - </color> - </brush> - </colorrole> - <colorrole role="Light"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>69</green> - <blue>69</blue> - </color> - </brush> - </colorrole> - <colorrole role="Midlight"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>57</green> - <blue>57</blue> - </color> - </brush> - </colorrole> - <colorrole role="Dark"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>23</green> - <blue>23</blue> - </color> - </brush> - </colorrole> - <colorrole role="Mid"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>30</green> - <blue>30</blue> - </color> - </brush> - </colorrole> - <colorrole role="Text"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>73</red> - <green>36</green> - <blue>73</blue> - </color> - </brush> - </colorrole> - <colorrole role="BrightText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>255</blue> - </color> - </brush> - </colorrole> - <colorrole role="ButtonText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>73</red> - <green>36</green> - <blue>73</blue> - </color> - </brush> - </colorrole> - <colorrole role="Base"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>46</green> - <blue>46</blue> - </color> - </brush> - </colorrole> - <colorrole role="Window"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>46</green> - <blue>46</blue> - </color> - </brush> - </colorrole> - <colorrole role="Shadow"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>0</blue> - </color> - </brush> - </colorrole> - <colorrole role="AlternateBase"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>46</green> - <blue>46</blue> - </color> - </brush> - </colorrole> - <colorrole role="ToolTipBase"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>220</blue> - </color> - </brush> - </colorrole> - <colorrole role="ToolTipText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>0</blue> - </color> - </brush> - </colorrole> - </disabled> - </palette> - </property> - <property name="font"> - <font> - <family>Microsoft JhengHei UI</family> - <pointsize>14</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="layoutDirection"> - <enum>Qt::LeftToRight</enum> - </property> - <property name="styleSheet"> - <string notr="true">color:rgb(73,36,73,255)</string> - </property> - <property name="text"> - <string>Mixer/Splitter</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="pushButton_7"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>200</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <family>Microsoft JhengHei</family> - <pointsize>10</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="styleSheet"> - <string notr="true">Text-align:left</string> - </property> - <property name="text"> - <string> Mixer</string> - </property> - <property name="icon"> - <iconset> - <normaloff>icons/Mixer.png</normaloff>icons/Mixer.png</iconset> - </property> - <property name="iconSize"> - <size> - <width>30</width> - <height>30</height> - </size> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="pushButton_10"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>200</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <family>Microsoft JhengHei</family> - <pointsize>10</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="styleSheet"> - <string notr="true">Text-align:left</string> - </property> - <property name="text"> - <string> Splitter</string> - </property> - <property name="icon"> - <iconset> - <normaloff>icons/Splitter.png</normaloff>icons/Splitter.png</iconset> - </property> - <property name="iconSize"> - <size> - <width>30</width> - <height>30</height> - </size> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>30</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>200</width> - <height>16777215</height> - </size> - </property> - <property name="palette"> - <palette> - <active> - <colorrole role="WindowText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>73</red> - <green>36</green> - <blue>73</blue> - </color> - </brush> - </colorrole> - <colorrole role="Button"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>70</green> - <blue>70</blue> - </color> - </brush> - </colorrole> - <colorrole role="Light"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>105</green> - <blue>105</blue> - </color> - </brush> - </colorrole> - <colorrole role="Midlight"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>87</green> - <blue>87</blue> - </color> - </brush> - </colorrole> - <colorrole role="Dark"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>35</green> - <blue>35</blue> - </color> - </brush> - </colorrole> - <colorrole role="Mid"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>46</green> - <blue>46</blue> - </color> - </brush> - </colorrole> - <colorrole role="Text"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>73</red> - <green>36</green> - <blue>73</blue> - </color> - </brush> - </colorrole> - <colorrole role="BrightText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>255</blue> - </color> - </brush> - </colorrole> - <colorrole role="ButtonText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>73</red> - <green>36</green> - <blue>73</blue> - </color> - </brush> - </colorrole> - <colorrole role="Base"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>0</blue> - </color> - </brush> - </colorrole> - <colorrole role="Window"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>70</green> - <blue>70</blue> - </color> - </brush> - </colorrole> - <colorrole role="Shadow"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>0</blue> - </color> - </brush> - </colorrole> - <colorrole role="AlternateBase"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>35</green> - <blue>35</blue> - </color> - </brush> - </colorrole> - <colorrole role="ToolTipBase"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>220</blue> - </color> - </brush> - </colorrole> - <colorrole role="ToolTipText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>0</blue> - </color> - </brush> - </colorrole> - </active> - <inactive> - <colorrole role="WindowText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>73</red> - <green>36</green> - <blue>73</blue> - </color> - </brush> - </colorrole> - <colorrole role="Button"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>70</green> - <blue>70</blue> - </color> - </brush> - </colorrole> - <colorrole role="Light"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>105</green> - <blue>105</blue> - </color> - </brush> - </colorrole> - <colorrole role="Midlight"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>87</green> - <blue>87</blue> - </color> - </brush> - </colorrole> - <colorrole role="Dark"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>35</green> - <blue>35</blue> - </color> - </brush> - </colorrole> - <colorrole role="Mid"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>46</green> - <blue>46</blue> - </color> - </brush> - </colorrole> - <colorrole role="Text"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>73</red> - <green>36</green> - <blue>73</blue> - </color> - </brush> - </colorrole> - <colorrole role="BrightText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>255</blue> - </color> - </brush> - </colorrole> - <colorrole role="ButtonText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>73</red> - <green>36</green> - <blue>73</blue> - </color> - </brush> - </colorrole> - <colorrole role="Base"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>0</blue> - </color> - </brush> - </colorrole> - <colorrole role="Window"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>70</green> - <blue>70</blue> - </color> - </brush> - </colorrole> - <colorrole role="Shadow"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>0</blue> - </color> - </brush> - </colorrole> - <colorrole role="AlternateBase"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>35</green> - <blue>35</blue> - </color> - </brush> - </colorrole> - <colorrole role="ToolTipBase"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>220</blue> - </color> - </brush> - </colorrole> - <colorrole role="ToolTipText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>0</blue> - </color> - </brush> - </colorrole> - </inactive> - <disabled> - <colorrole role="WindowText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>73</red> - <green>36</green> - <blue>73</blue> - </color> - </brush> - </colorrole> - <colorrole role="Button"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>70</green> - <blue>70</blue> - </color> - </brush> - </colorrole> - <colorrole role="Light"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>105</green> - <blue>105</blue> - </color> - </brush> - </colorrole> - <colorrole role="Midlight"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>87</green> - <blue>87</blue> - </color> - </brush> - </colorrole> - <colorrole role="Dark"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>35</green> - <blue>35</blue> - </color> - </brush> - </colorrole> - <colorrole role="Mid"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>46</green> - <blue>46</blue> - </color> - </brush> - </colorrole> - <colorrole role="Text"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>73</red> - <green>36</green> - <blue>73</blue> - </color> - </brush> - </colorrole> - <colorrole role="BrightText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>255</blue> - </color> - </brush> - </colorrole> - <colorrole role="ButtonText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>73</red> - <green>36</green> - <blue>73</blue> - </color> - </brush> - </colorrole> - <colorrole role="Base"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>70</green> - <blue>70</blue> - </color> - </brush> - </colorrole> - <colorrole role="Window"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>70</green> - <blue>70</blue> - </color> - </brush> - </colorrole> - <colorrole role="Shadow"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>0</blue> - </color> - </brush> - </colorrole> - <colorrole role="AlternateBase"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>70</green> - <blue>70</blue> - </color> - </brush> - </colorrole> - <colorrole role="ToolTipBase"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>255</red> - <green>255</green> - <blue>220</blue> - </color> - </brush> - </colorrole> - <colorrole role="ToolTipText"> - <brush brushstyle="SolidPattern"> - <color alpha="255"> - <red>0</red> - <green>0</green> - <blue>0</blue> - </color> - </brush> - </colorrole> - </disabled> - </palette> - </property> - <property name="font"> - <font> - <family>Microsoft JhengHei UI</family> - <pointsize>14</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="layoutDirection"> - <enum>Qt::LeftToRight</enum> - </property> - <property name="styleSheet"> - <string notr="true">color:rgb(73,36,73,255)</string> - </property> - <property name="text"> - <string>Exchangers</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="pushButton_11"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>200</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <family>Microsoft JhengHei</family> - <pointsize>10</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="styleSheet"> - <string notr="true">Text-align:left</string> - </property> - <property name="text"> - <string> Heater</string> - </property> - <property name="icon"> - <iconset> - <normaloff>icons/Heater.png</normaloff>icons/Heater.png</iconset> - </property> - <property name="iconSize"> - <size> - <width>40</width> - <height>40</height> - </size> - </property> - <property name="autoDefault"> - <bool>false</bool> - </property> - <property name="default"> - <bool>false</bool> - </property> - <property name="flat"> - <bool>false</bool> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="pushButton_12"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>200</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <family>Microsoft JhengHei</family> - <pointsize>10</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="styleSheet"> - <string notr="true">Text-align:left</string> - </property> - <property name="text"> - <string> Cooler</string> - </property> - <property name="icon"> - <iconset> - <normaloff>icons/Cooler.png</normaloff>icons/Cooler.png</iconset> - </property> - <property name="iconSize"> - <size> - <width>40</width> - <height>40</height> - </size> - </property> - <property name="flat"> - <bool>false</bool> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_4"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>30</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>200</width> - <height>16777215</height> - </size> - </property> - <property name="font"> - <font> - <family>Microsoft JhengHei UI</family> - <pointsize>14</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="layoutDirection"> - <enum>Qt::LeftToRight</enum> - </property> - <property name="styleSheet"> - <string notr="true">color:rgb(73,36,73,255)</string> - </property> - <property name="text"> - <string>Separator</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="pushButton_9"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>200</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <family>Microsoft JhengHei</family> - <pointsize>10</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="styleSheet"> - <string notr="true">Text-align:left</string> - </property> - <property name="text"> - <string> Flash</string> - </property> - <property name="icon"> - <iconset> - <normaloff>icons/Flash.png</normaloff>icons/Flash.png</iconset> - </property> - <property name="iconSize"> - <size> - <width>40</width> - <height>40</height> - </size> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="pushButton_13"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>200</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <family>Microsoft JhengHei</family> - <pointsize>10</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="styleSheet"> - <string notr="true">Text-align:left</string> - </property> - <property name="text"> - <string> Compound Seperator</string> - </property> - <property name="icon"> - <iconset> - <normaloff>icons/CompoundSeparator.png</normaloff>icons/CompoundSeparator.png</iconset> - </property> - <property name="iconSize"> - <size> - <width>40</width> - <height>40</height> - </size> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_5"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>30</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>200</width> - <height>16777215</height> - </size> - </property> - <property name="font"> - <font> - <family>Microsoft JhengHei UI</family> - <pointsize>14</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="styleSheet"> - <string notr="true">color:rgb(73,36,73,255)</string> - </property> - <property name="text"> - <string>Pressure Changers</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="pushButton_25"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>200</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <family>Microsoft JhengHei</family> - <pointsize>10</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="styleSheet"> - <string notr="true">Text-align:left</string> - </property> - <property name="text"> - <string> Valve</string> - </property> - <property name="icon"> - <iconset> - <normaloff>icons/Valve.png</normaloff>icons/Valve.png</iconset> - </property> - <property name="iconSize"> - <size> - <width>30</width> - <height>30</height> - </size> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="pushButton_14"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>200</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <family>Microsoft JhengHei</family> - <pointsize>10</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="styleSheet"> - <string notr="true">Text-align:left</string> - </property> - <property name="text"> - <string> Centrifugal Pump</string> - </property> - <property name="icon"> - <iconset> - <normaloff>icons/Pump.png</normaloff>icons/Pump.png</iconset> - </property> - <property name="iconSize"> - <size> - <width>30</width> - <height>30</height> - </size> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="pushButton_15"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>200</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <family>Microsoft JhengHei</family> - <pointsize>10</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="styleSheet"> - <string notr="true">Text-align:left</string> - </property> - <property name="text"> - <string> Adiabatic Compressor</string> - </property> - <property name="icon"> - <iconset> - <normaloff>icons/AdiabaticCompressor.png</normaloff>icons/AdiabaticCompressor.png</iconset> - </property> - <property name="iconSize"> - <size> - <width>30</width> - <height>30</height> - </size> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="pushButton_16"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>200</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <family>Microsoft JhengHei</family> - <pointsize>10</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="autoFillBackground"> - <bool>false</bool> - </property> - <property name="styleSheet"> - <string notr="true">Text-align:left</string> - </property> - <property name="text"> - <string> Adiabatic Expander</string> - </property> - <property name="icon"> - <iconset> - <normaloff>icons/AdiabaticExpander.png</normaloff>icons/AdiabaticExpander.png</iconset> - </property> - <property name="iconSize"> - <size> - <width>30</width> - <height>30</height> - </size> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_6"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>30</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>200</width> - <height>16777215</height> - </size> - </property> - <property name="font"> - <font> - <family>Microsoft JhengHei UI</family> - <pointsize>14</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="styleSheet"> - <string notr="true">color:rgb(73,36,73,255)</string> - </property> - <property name="text"> - <string>Columns</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="pushButton_26"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>200</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <family>Microsoft JhengHei</family> - <pointsize>10</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="styleSheet"> - <string notr="true">Text-align:left</string> - </property> - <property name="text"> - <string> Distillation Column</string> - </property> - <property name="icon"> - <iconset> - <normaloff>Icons/Column.png</normaloff>Icons/Column.png</iconset> - </property> - <property name="iconSize"> - <size> - <width>50</width> - <height>50</height> - </size> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="pushButton_18"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>200</width> - <height>16777215</height> - </size> - </property> - <property name="font"> - <font> - <family>Microsoft JhengHei</family> - <pointsize>10</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="styleSheet"> - <string notr="true">Text-align:left</string> - </property> - <property name="text"> - <string> Shortcut Column</string> - </property> - <property name="icon"> - <iconset> - <normaloff>Icons/Column.png</normaloff>Icons/Column.png</iconset> - </property> - <property name="iconSize"> - <size> - <width>50</width> - <height>50</height> - </size> - </property> - </widget> - </item> - </layout> - </widget> - </widget> - </item> - </layout> - </widget> - </widget> - <widget class="QToolBar" name="toolBar"> - <property name="windowTitle"> - <string>toolBar</string> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - <attribute name="toolBarArea"> - <enum>TopToolBarArea</enum> - </attribute> - <attribute name="toolBarBreak"> - <bool>false</bool> - </attribute> - <addaction name="actionNew"/> - <addaction name="separator"/> - <addaction name="actionZoomIn"/> - <addaction name="actionZoomOut"/> - <addaction name="actionResetZoom"/> - <addaction name="separator"/> - <addaction name="actionEquation_oriented"/> - <addaction name="actionSequential_mode"/> - <addaction name="separator"/> - <addaction name="actionSelect_compounds"/> - </widget> - <action name="actionZoomIn"> - <property name="icon"> - <iconset> - <normaloff>Icons/zoom_in.png</normaloff>Icons/zoom_in.png</iconset> - </property> - <property name="text"> - <string>ZoomIn</string> - </property> - </action> - <action name="actionZoomOut"> - <property name="icon"> - <iconset> - <normaloff>Icons/zoom_out.png</normaloff>Icons/zoom_out.png</iconset> - </property> - <property name="text"> - <string>ZoomOut</string> - </property> - </action> - <action name="actionResetZoom"> - <property name="icon"> - <iconset> - <normaloff>Icons/zoom_reset.png</normaloff>Icons/zoom_reset.png</iconset> - </property> - <property name="text"> - <string>ResetZoom</string> - </property> - </action> - <action name="actionEquation_oriented"> - <property name="icon"> - <iconset> - <normaloff>Icons/eq.png</normaloff>Icons/eq.png</iconset> - </property> - <property name="text"> - <string>Equation oriented</string> - </property> - </action> - <action name="actionSequential_mode"> - <property name="icon"> - <iconset> - <normaloff>Icons/sq.png</normaloff>Icons/sq.png</iconset> - </property> - <property name="text"> - <string>Sequential mode</string> - </property> - </action> - <action name="actionSelect_compounds"> - <property name="icon"> - <iconset> - <normaloff>Icons/compound.png</normaloff>Icons/compound.png</iconset> - </property> - <property name="text"> - <string>Select Compounds</string> - </property> - </action> - <action name="actionNew"> - <property name="icon"> - <iconset> - <normaloff>Icons/new.png</normaloff>Icons/new.png</iconset> - </property> - <property name="text"> - <string>New</string> - </property> - </action> - <action name="actionHelp"> - <property name="text"> - <string>Help</string> - </property> - </action> - <action name="actionSave"> - <property name="text"> - <string>save</string> - </property> - </action> - <action name="actionSave_2"> - <property name="text"> - <string>Save</string> - </property> - </action> - <action name="actionOpen"> - <property name="text"> - <string>Open</string> - </property> - </action> - <action name="actionBinary_Phase_Envelope"> - <property name="text"> - <string>Binary Phase Envelope</string> - </property> - </action> - <action name="actionTerminate"> - <property name="text"> - <string>Terminate</string> - </property> - </action> - <action name="actionUndo"> - <property name="text"> - <string>Undo</string> - </property> - </action> - <action name="actionRedo"> - <property name="text"> - <string>Redo</string> - </property> - </action> - </widget> - <resources/> - <connections/> -</ui> @@ -27,7 +27,7 @@ import os import ctypes import sys -ui,_ = loadUiType('main3.ui') +ui,_ = loadUiType('main.ui') ''' MainApp class is responsible for all the main App Ui operations @@ -46,68 +46,66 @@ class MainApp(QMainWindow,ui): # self.setStyleSheet(style) # Initializing attributes - self.zoomcount = 0 + self.zoom_count = 0 self.thrd = None # Creating instances of classes for the main app - self.container = Container.Container(self.textBrowser) + self.container = Container.Container(self.textBrowser, self.graphicsView) self.comp = ComponentSelector(self) # Setting up interactive canvas - self.scene = self.container.graphics.getScene() ### + self.scene = self.container.graphics.get_scene() ### self.graphicsView.setScene(self.scene) self.graphicsView.setMouseTracking(True) - self.graphicsView.keyPressEvent=self.deleteCall + self.graphicsView.keyPressEvent=self.delete_call self.setDockNestingEnabled(True) self.setCorner(Qt.BottomRightCorner, Qt.RightDockWidgetArea) self.setCorner(Qt.BottomLeftCorner, Qt.LeftDockWidgetArea) self.addDockWidget(Qt.BottomDockWidgetArea,self.dockWidget_2) - # Calling initialisation functions - self.buttonHandler() - self.menuBar() + # Calling initialisation + self.menu_bar() + self.button_handler() self.comp.show() ''' MenuBar function handels all the all the operations of menu bar like new,zoom,comounds selector, simulation options. ''' - def menuBar(self): - self.actionSelect_compounds.triggered.connect(self.selectCompounds) - self.actionSelect_compounds.setShortcut('Ctrl+C') - self.actionZoomIn.triggered.connect(self.zoomIn) + def menu_bar(self): + self.actionSelectCompounds.triggered.connect(self.select_compounds) + self.actionSelectCompounds.setShortcut('Ctrl+C') + self.actionZoomIn.triggered.connect(self.zoom_in) self.actionZoomIn.setShortcut('Ctrl++') self.actionNew.triggered.connect(self.new) self.actionNew.setShortcut('Ctrl+N') - self.actionZoomOut.triggered.connect(self.zoomOut) + self.actionZoomOut.triggered.connect(self.zoom_out) self.actionZoomOut.setShortcut('Ctrl+-') - self.actionResetZoom.triggered.connect(self.zoomReset) + self.actionResetZoom.triggered.connect(self.zoom_reset) self.actionResetZoom.setShortcut('Ctrl+R') self.actionHelp.triggered.connect(self.help) self.actionHelp.setShortcut('Ctrl+H') - self.actionSequential_mode.triggered.connect(partial(self.simulate,'SM')) - self.actionSequential_mode.setShortcut('Ctrl+M') - self.actionEquation_oriented.triggered.connect(partial(self.simulate,'EQN')) - self.actionEquation_oriented.setShortcut('Ctrl+E') + self.actionSequentialMode.triggered.connect(partial(self.simulate,'SM')) + self.actionSequentialMode.setShortcut('Ctrl+M') + self.actionEquationOriented.triggered.connect(partial(self.simulate,'EQN')) + self.actionEquationOriented.setShortcut('Ctrl+E') self.actionUndo.triggered.connect(self.undo) self.actionUndo.setShortcut('Ctrl+Z') self.actionRedo.triggered.connect(self.redo) self.actionRedo.setShortcut('Ctrl+Y') - # self.actionUndo_2.triggered.connect(self.undoStack.undo) - # self.actionRedo.triggered.connect(self.undoStack.redo) - self.actionSave_2.triggered.connect(self.save) - self.actionSave_2.setShortcut('Ctrl+S') + self.actionSave.triggered.connect(self.save) + self.actionSave.setShortcut('Ctrl+S') self.actionOpen.triggered.connect(self.open) self.actionOpen.setShortcut('Ctrl+O') self.actionTerminate.triggered.connect(self.terminate) self.actionTerminate.setShortcut('Ctrl+T') - self.actionBinary_Phase_Envelope.triggered.connect(self.BinPhaseEnv) + self.actionBinaryPhaseEnvelope.triggered.connect(self.bin_phase_env) ''' Handles all the buttons of different components. ''' - def buttonHandler(self): + def button_handler(self): self.pushButton.clicked.connect(partial(self.component,'MaterialStream')) self.pushButton_7.clicked.connect(partial(self.component,'Mixer')) self.pushButton_14.clicked.connect(partial(self.component,'Pump')) @@ -133,27 +131,27 @@ class MainApp(QMainWindow,ui): msgBox.setStandardButtons(QMessageBox.Ok) msgBox.exec_() - def BinPhaseEnv(self): + def bin_phase_env(self): #compounds = self.comp.getComp() - if len(self.comp.getComp())<2: + if len(self.comp.get_compounds())<2: QMessageBox.about(self, 'Important', "Please select at least 2 Compounds first") self.comp.show() #compunds = self.comp.getComp() else: - self.bin_phase = Bin_Phase_env(self.comp) + self.bin_phase = BinPhaseEnv(self.comp) self.bin_phase.show() ''' Shows Compounds Selector Dialog ''' - def selectCompounds(self): + def select_compounds(self): self.comp.show() ''' - Returns currenttime in a required particular format + Returns current time in a required particular format ''' - def currentTime(self): + def current_time(self): now = datetime.datetime.now() time = str(now.hour) + ":" + str(now.minute) + ":" +str(now.second) return time @@ -176,7 +174,7 @@ class MainApp(QMainWindow,ui): self.container.flowsheet.process.terminate() print('____________________New process created for omc is terminated.____________________') res = ctypes.pythonapi.PyThreadState_SetAsyncExc(thread_id, ctypes.py_object(SystemExit)) - self.textBrowser.append("<span style=\"color:red\">["+str(self.currentTime())+"]<b> Terminating the simulation </b></span>") + self.textBrowser.append("<span style=\"color:red\">["+str(self.current_time())+"]<b> Terminating the simulation </b></span>") print('____________________Simulation thread terminated____________________') if res > 1: ctypes.pythonapi.PyThreadState_SetAsyncExc(thread_id, 0) @@ -185,40 +183,40 @@ class MainApp(QMainWindow,ui): ''' Resets the zoom level to default scaling ''' - def zoomReset(self): - if(self.zoomcount>0): - for i in range(self.zoomcount): + def zoom_reset(self): + if(self.zoom_count>0): + for i in range(self.zoom_count): self.zoomout() - elif(self.zoomcount<0): - for i in range(abs(self.zoomcount)): + elif(self.zoom_count<0): + for i in range(abs(self.zoom_count)): self.zoomin() ''' ZoomOut the canvas ''' - def zoomOut(self): + def zoom_out(self): self.graphicsView.scale(1.0/1.15,1.0/1.15) - self.zoomcount -=1 + self.zoom_count -=1 ''' ZoomIn the canvas ''' - def zoomIn(self): + def zoom_in(self): self.graphicsView.scale(1.15,1.15) - self.zoomcount +=1 + self.zoom_count +=1 ''' Instantiate a NodeItem object for selected type of component and added that on canvas/flowsheeting area. ''' - def component(self,unitOpType): - if(self.comp.isCompSelected()): - self.type = unitOpType + def component(self,unit_operation_type): + if(self.comp.is_compound_selected()): + self.type = unit_operation_type if(self.type=="MaterialStream"): - self.obj = MaterialStream(CompNames=compound_selected) + self.obj = MaterialStream(compound_names = compound_selected) else: self.obj = eval(self.type)() - self.container.addUnitOp(self.obj, self.graphicsView) + self.container.add_unit_operation(self.obj) else: QMessageBox.about(self, 'Important', "Please Select Compounds first") @@ -230,13 +228,13 @@ class MainApp(QMainWindow,ui): def new(self): self.undo_redo_helper() self.comp.tableWidget.setRowCount(0) - self.textBrowser.append("<span>[" + str(self.currentTime()) + "] <b>New</b> flowsheet is created ... </span>") - dockWidgetLst.clear() + self.textBrowser.append("<span>[" + str(self.current_time()) + "] <b>New</b> flowsheet is created ... </span>") + dock_widget_lst.clear() ''' Handels all the operations which will happen when delete button is pressed. ''' - def deleteCall(self,event): + def delete_call(self,event): try: if event.key() == QtCore.Qt.Key_Delete: l=self.scene.selectedItems() @@ -250,19 +248,19 @@ class MainApp(QMainWindow,ui): It helps by clearing screen and loading the objects by undo redo methods ''' def undo_redo_helper(self): - for i in self.container.unitOp: + for i in self.container.unit_operations: type(i).counter = 1 del self.container - for i in dockWidgetLst: + for i in dock_widget_lst: i.hide() del i lst.clear() - self.container = Container.Container(self.textBrowser) + self.container = Container.Container(self.textBrowser, self.graphicsView) compound_selected.clear() - self.scene = self.container.graphics.getScene() + self.scene = self.container.graphics.get_scene() self.graphicsView.setScene(self.scene) self.graphicsView.setMouseTracking(True) - self.graphicsView.keyPressEvent=self.deleteCall + self.graphicsView.keyPressEvent=self.delete_call @@ -270,14 +268,14 @@ class MainApp(QMainWindow,ui): Function for undo ''' def undo(self): - redo_data = POP('Undo') + redo_data = pop('Undo') if redo_data is not None: - PUSH('Redo', redo_data) + push('Redo', redo_data) undo_data = get_last_list('Undo') messages = self.textBrowser.toPlainText() try: self.undo_redo_helper() - self.container.graphics.loadCanvas(undo_data) + self.container.graphics.load_canvas(undo_data, self.container) self.textBrowser.setText(messages) except Exception as e: print(e) @@ -285,72 +283,75 @@ class MainApp(QMainWindow,ui): else: messages = self.textBrowser.toPlainText() self.textBrowser.setText(messages) - self.textBrowser.append("<span>[" + str(self.currentTime()) + "] <b>No more undo can be done!</b>... </span>") + self.textBrowser.append("<span>[" + str(self.current_time()) + "] <b>No more undo can be done!</b>... </span>") ''' Function for redo ''' def redo(self): - redo_data = POP('Redo') + redo_data = pop('Redo') if redo_data is not None: - PUSH('Undo', redo_data) + push('Undo', redo_data) messages = self.textBrowser.toPlainText() self.undo_redo_helper() - self.container.graphics.loadCanvas(redo_data) + self.container.graphics.load_canvas(redo_data, self.container) self.textBrowser.setText(messages) else: messages = self.textBrowser.toPlainText() self.textBrowser.setText(messages) - self.textBrowser.append("<span>[" + str(self.currentTime()) + "] <b>No more redo can be done!</b>... </span>") + self.textBrowser.append("<span>[" + str(self.current_time()) + "] <b>No more redo can be done!</b>... </span>") ''' Function for saving the current canvas items and compound_selected ''' def save(self): data = [] - for i in self.container.unitOp: + for i in self.container.unit_operations: data.append(i) print(i.pos) data.append(compound_selected) print(data) - fileFormat = 'sim' - initialPath = QDir.currentPath() + 'untitled.' + fileFormat - fileName, _ = QFileDialog.getSaveFileName(self, "Save As", - initialPath, "%s Files (*.%s);; All Files (*)" % - (fileFormat.upper(), fileFormat)) - if fileName != "": - with open(fileName, 'wb') as f: #'saved_file.sim' + file_format = 'sim' + initial_path = QDir.currentPath() + 'untitled.' + file_format + file_name, _ = QFileDialog.getSaveFileName(self, "Save As", + initial_path, "%s Files (*.%s);; All Files (*)" % + (file_format.upper(), file_format)) + #if file_name != "": + try: + with open(file_name, 'wb') as f: #'saved_file.sim' pickle.dump(data, f, pickle.HIGHEST_PROTOCOL) + except Exception as e: + pass ''' Function for loading previous saved canvas and simulation ''' def open(self): try: - fileFormat = 'sim' - initialPath = QDir.currentPath() + 'untitled.' + fileFormat + file_format = 'sim' + initial_path = QDir.currentPath() + 'untitled.' + file_format - fileName, _ = QFileDialog.getOpenFileName(self, "Open As", - initialPath, "%s Files (*.%s);; All Files (*)" % - (fileFormat.upper(), fileFormat)) + file_name, _ = QFileDialog.getOpenFileName(self, "Open As", + initial_path, "%s Files (*.%s);; All Files (*)" % + (file_format.upper(), file_format)) # if fileName != "": # self.new() self.undo_redo_helper() - with open(fileName, 'rb') as f: + with open(file_name, 'rb') as f: obj = pickle.load(f) - - self.container.graphics.loadCanvas(obj) + print(obj) + self.container.graphics.load_canvas(obj, self.container) except Exception as e: pass def main(): - CLEAN_FILE('Undo') - CLEAN_FILE('Redo') + clean_file('Undo') + clean_file('Redo') app = QApplication(sys.argv) window = MainApp() diff --git a/resDockWidget.py b/resDockWidget.py deleted file mode 100644 index 9466b4e..0000000 --- a/resDockWidget.py +++ /dev/null @@ -1,92 +0,0 @@ -from PyQt5.QtCore import * -from PyQt5.QtWidgets import * -from PyQt5.QtGui import * -from PyQt5.uic import loadUiType -import pandas as pd -from functools import partial -from component_selector import * -from collections import defaultdict -from container import * - -ui_dialog,_ = loadUiType('resDock.ui') - -class resdockWidget(QDockWidget,ui_dialog): - - def __init__(self,containerobj,parent=None): - QDockWidget.__init__(self,parent) - self.setupUi(self) - self.setWindowTitle("Results") - self.nameType = None - self.Container = containerobj - self.results() - - self.pushButton_3.clicked.connect(self.resultTree) - - def abriveation(self,key): - d ={"P":"Pressure","T":"Temperature", - "xliq":"Liquid Phase Mol Fraction","xmliq":"Liquid Pase Mass Fraction", - "xvap":"Vapour Phase Mol Fracrion","xmvap":"Vapour Phase Mass Fracrion", - "F_p[1]":"Molar Flow","Fm_p[1]":"Mass Flow","MW_p[1]":"Mixer Phase Molecular Weight", - "MW_p[2]":"Liquid Phase Molecular Weight","MW_p[3]":"Vapour Phase Molecular Weight", - "Cp_p[1]":"Mixer Phase molar Heat Capacity","Cp_p[2]":"Liquid Phase molar Heat Capacity", - "Cp_p[3]":"Vapour Phase molar Heat Capacity","H_p[1]":"Mixer Phase Molar Enthalpy", - "H_p[2]":"Liquid Phase Molar Enthalpy","H_p[3]":"Vapour Phase Molar Enthalpy", - "S_p[1]":"Mixer Phase Molar Entropy","S_p[2]":"Liquid Phase Molar Entropy", - "S_p[3]":"Vapour Phase Molar Entropy","F_p[2]":"Liquid Phase Molar Flow Rate", - "F_p[3]":"Vapour Phase Molar Flow Rate","Fm_p[2]":"Liquid Phase Mass Flow Rate", - "F_p[3]":"Liquid Phase Mass Flow Rate", - } - - for i in range(len(compound_selected)): - d["compMolFrac[1,"+str(i+1)+"]"] = str(compound_selected[i]) +" Mixer mole fraction" - d["compMolFrac[2,"+str(i+1)+"]"] = str(compound_selected[i]) +" Liquid mole fraction" - d["compMolFrac[3,"+str(i+1)+"]"] = str(compound_selected[i]) +" Vapour mole fraction" - - d["compMasFrac[1,"+str(i+1)+"]"] = str(compound_selected[i]) +" Mixer mass fraction" - d["compMasFrac[2,"+str(i+1)+"]"] = str(compound_selected[i]) +" Liquid mass fraction" - d["compMasFrac[3,"+str(i+1)+"]"] = str(compound_selected[i]) +" Vapour mass fraction" - - d["compMasFlo[1,"+str(i+1)+"]"] = str(compound_selected[i]) +" Mixer mass flo" - d["compMasFlo[2,"+str(i+1)+"]"] = str(compound_selected[i]) +" Liquid mass flo" - d["compMasFlo[3,"+str(i+1)+"]"] = str(compound_selected[i]) +" Vapour mass flo" - - d["compMolFlo[1,"+str(i+1)+"]"] = str(compound_selected[i]) +" Mixer mole flo" - d["compMolFlo[2,"+str(i+1)+"]"] = str(compound_selected[i]) +" Liquid mole flo" - d["compMolFlo[3,"+str(i+1)+"]"] = str(compound_selected[i]) +" Vapour mole flo" - if key in d.keys(): - return d[key] - else: - return key - - def resultsCategory(self,name): - try: - print("Under result category") - result=self.Container.result - obj = self.Container.fetchObject(name) - self.tableWidget.setRowCount(0) - for key, value in obj.Prop.items(): - propertyname = name + '.' + key - print(key,value) - if propertyname in result[0]: - ind = result[0].index(propertyname) - resultval = str(result[-1][ind]) - #stm.Prop[key] = resultval - print("######Resultsfetch####",key,resultval) - rowPosition = self.tableWidget.rowCount() - self.tableWidget.insertRow(rowPosition) - self.tableWidget.setItem(rowPosition , 0, QTableWidgetItem(str(self.abriveation(key)))) - self.tableWidget.setItem(rowPosition , 1, QTableWidgetItem(str(resultval))) - self.tableWidget.resizeColumnsToContents() - except Exception as e: - print(e) - - - def resultTree(self): - self.resultsCategory(self.comboBox.currentText()) - - def results(self): # Should be named as selecting object whose result is to be displayed - self.nameType={} - for i in Container.unitOp: - #nameslist.append(i.name) - self.nameType[i.name] = i.type - self.comboBox.addItem(str(i.name))
\ No newline at end of file diff --git a/svg/Centrifugal Pump.svg b/svg/Centrifugal Pump.svg new file mode 100644 index 0000000..5b60256 --- /dev/null +++ b/svg/Centrifugal Pump.svg @@ -0,0 +1,104 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="5.8764515mm" + height="5.1060538mm" + viewBox="0 0 5.8764515 5.1060538" + version="1.1" + id="svg919" + inkscape:version="0.92.4 (5da689c313, 2019-01-14)" + sodipodi:docname="Centrifugal Pump.svg"> + <defs + id="defs913" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="0.35" + inkscape:cx="11.105106" + inkscape:cy="9.6492281" + inkscape:document-units="mm" + inkscape:current-layer="layer1" + showgrid="false" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + inkscape:window-width="1304" + inkscape:window-height="745" + inkscape:window-x="-8" + inkscape:window-y="-8" + inkscape:window-maximized="1" /> + <metadata + id="metadata916"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-102.89511,-146.2803)"> + <g + id="use23667" + transform="matrix(0.26458333,0,0,0.26458333,87.26164,148.76091)"> + <desc + id="desc937">Centrifugal pump</desc> + <title + id="title939">Centrifugal pump</title> + <path + d="m 63.461437,0.93302941 c 0,-4.83160421 3.917761,-8.74995261 8.751431,-8.74995261 4.831585,0 8.749327,3.9183484 8.749327,8.74995261 0,4.83440929 -3.917742,8.75275769 -8.749327,8.75275769 -4.83367,0 -8.751431,-3.9183484 -8.751431,-8.75275769 z" + style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.66862381" + id="path941" + inkscape:connector-curvature="0" /> + <g + style="stroke-width:0.96060389" + id="g945" + transform="matrix(0.69599386,0,0,0.6960967,-60.599463,-916.20963)"> + <path + d="m 178.25,1317.551 c 0,-6.942 5.629,-12.571 12.574,-12.571 6.942,0 12.571,5.629 12.571,12.571 0,6.945 -5.629,12.574 -12.571,12.574 -6.945,0 -12.574,-5.629 -12.574,-12.574 z m -6.285,0 h 18.859 m 0,-12.571 h 12.571" + style="fill:none;stroke:#000000;stroke-width:0.68082803;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path943" + inkscape:connector-curvature="0" /> + </g> + <g + style="stroke-width:0.96060389" + id="g949" + transform="matrix(0.69599386,0,0,0.6960967,-60.599463,-916.20963)"> + <path + d="m 189.406,1316.133 1.418,1.418 -1.418,1.418 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.68082803;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path947" + inkscape:connector-curvature="0" /> + </g> + <g + style="stroke-width:0.96060389" + id="g953" + transform="matrix(0.69599386,0,0,0.6960967,-60.599463,-916.20963)"> + <path + d="m 201.977,1303.563 1.418,1.417 -1.418,1.418 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.68082803;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path951" + inkscape:connector-curvature="0" /> + </g> + </g> + </g> +</svg> diff --git a/svg/Cooler.svg b/svg/Cooler.svg new file mode 100644 index 0000000..fd7a4a8 --- /dev/null +++ b/svg/Cooler.svg @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="6.2097631mm" + height="6.957972mm" + viewBox="0 0 6.2097631 6.957972" + version="1.1" + id="svg834" + inkscape:version="0.92.4 (5da689c313, 2019-01-14)" + sodipodi:docname="Cooler.svg"> + <defs + id="defs828" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="0.35" + inkscape:cx="328.87784" + inkscape:cy="-235.4225" + inkscape:document-units="mm" + inkscape:current-layer="layer1" + showgrid="false" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + inkscape:window-width="1304" + inkscape:window-height="745" + inkscape:window-x="-8" + inkscape:window-y="-8" + inkscape:window-maximized="1" /> + <metadata + id="metadata831"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-18.817737,-79.58649)"> + <g + id="use29930" + transform="matrix(0.26458333,0,0,0.26458333,15.449143,40.948477)"> + <desc + id="desc848">Cooler</desc> + <title + id="title850">Cooler</title> + <path + inkscape:connector-curvature="0" + id="path852" + style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.66862381" + d="m 12.968678,159.18366 c 0,-5.83167 4.727229,-10.55964 10.559596,-10.55964 5.831627,0 10.559615,4.72797 10.559615,10.55964 0,5.83227 -4.727988,10.55957 -10.559615,10.55957 -5.832367,0 -10.559596,-4.7273 -10.559596,-10.55957 z" /> + <g + style="stroke-width:0.91540313" + transform="matrix(0.73041461,0,0,0.73041461,-222.05687,-1910.6315)" + id="g856"> + <path + inkscape:connector-curvature="0" + id="path854" + style="fill:none;stroke:#000000;stroke-width:0.64879197;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + d="m 321.77,2833.754 c 0,-7.984 6.472,-14.457 14.457,-14.457 7.984,0 14.457,6.473 14.457,14.457 0,7.984 -6.473,14.457 -14.457,14.457 -7.985,0 -14.457,-6.473 -14.457,-14.457 z m 31.808,-8.676 h -14.457 v 5.781 h 5.781 v 5.786 h -5.781 v 5.781 h 14.457 m -26.023,-26.676 v 36.004" /> + </g> + </g> + </g> +</svg> diff --git a/svg/Heater.svg b/svg/Heater.svg new file mode 100644 index 0000000..7d21cf7 --- /dev/null +++ b/svg/Heater.svg @@ -0,0 +1,101 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="5.3247261mm" + height="6.4700546mm" + viewBox="0 0 5.3247261 6.4700546" + version="1.1" + id="svg781" + inkscape:version="0.92.4 (5da689c313, 2019-01-14)" + sodipodi:docname="Heater.svg"> + <defs + id="defs775" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="0.35" + inkscape:cx="232.91962" + inkscape:cy="-110.63027" + inkscape:document-units="mm" + inkscape:current-layer="layer1" + showgrid="false" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + inkscape:window-width="1304" + inkscape:window-height="745" + inkscape:window-x="-8" + inkscape:window-y="-8" + inkscape:window-maximized="1" /> + <metadata + id="metadata778"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-44.206684,-113.09235)"> + <g + id="use29539" + transform="matrix(0.26458333,0,0,0.26458333,-24.278784,87.432225)"> + <desc + id="desc799">Heater</desc> + <title + id="title801">Heater</title> + <path + inkscape:connector-curvature="0" + id="path803" + style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.66862381" + d="m 261.57546,109.05859 c 0,-3.75298 3.04023,-6.79588 6.79323,-6.79588 3.75299,0 6.79322,3.0429 6.79322,6.79588 0,3.75099 -3.04023,6.79322 -6.79322,6.79322 -3.753,0 -6.79323,-3.04223 -6.79323,-6.79322 z" /> + <g + transform="matrix(0.66862381,0,0,0.66862381,142.28093,-1940.5551)" + id="g807"> + <path + inkscape:connector-curvature="0" + id="path805" + style="fill:none;stroke:#000000;stroke-width:0.70875001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + d="m 178.418,3065.152 h 2.543 l 5.078,-4.812 5.586,10.16 4.574,-5.348 h 2.539 m -20.32,0.27 c 0,-5.613 4.547,-10.164 10.16,-10.164 5.613,0 10.16,4.551 10.16,10.164 0,5.609 -4.547,10.16 -10.16,10.16 -5.613,0 -10.16,-4.551 -10.16,-10.16 z" /> + </g> + <g + transform="matrix(0.66862381,0,0,0.66862381,142.28093,-1940.5551)" + id="g811"> + <path + inkscape:connector-curvature="0" + id="path809" + style="fill:none;stroke:#000000;stroke-width:0.70875001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + d="m 204.156,3047.586 -28.898,35.219" /> + </g> + <g + transform="matrix(0.66862381,0,0,0.66862381,142.28093,-1940.5551)" + id="g815"> + <path + inkscape:connector-curvature="0" + id="path813" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.70875001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + d="m 181.516,3078.16 -6.258,4.645 3.336,-7.043 z" /> + </g> + </g> + </g> +</svg> diff --git a/svg/Pump.svg b/svg/Pump.svg new file mode 100644 index 0000000..dd573ee --- /dev/null +++ b/svg/Pump.svg @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="6.877779mm" + height="4.7104506mm" + viewBox="0 0 6.8777789 4.7104506" + version="1.1" + id="svg875" + inkscape:version="0.92.4 (5da689c313, 2019-01-14)" + sodipodi:docname="Pump.svg"> + <defs + id="defs869" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="5.6" + inkscape:cx="24.307994" + inkscape:cy="39.562189" + inkscape:document-units="mm" + inkscape:current-layer="layer1" + showgrid="false" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + inkscape:window-width="1304" + inkscape:window-height="745" + inkscape:window-x="-8" + inkscape:window-y="-8" + inkscape:window-maximized="1" /> + <metadata + id="metadata872"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-46.453968,-113.21621)"> + <g + id="use23472" + transform="matrix(0.26458333,0,0,0.26458333,42.705476,115.26531)"> + <desc + id="desc890">Pump</desc> + <title + id="title892">Pump</title> + <g + id="g900"> + <path + inkscape:connector-curvature="0" + id="path894" + style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.66862381" + d="m 18.500164,1.1580787 c 0,-4.7846574 3.878698,-8.6660282 8.666047,-8.6660282 4.784657,0 8.663356,3.8813708 8.663356,8.6660282 0,4.7853397 -3.878699,8.6633558 -8.663356,8.6633558 -4.787349,0 -8.666047,-3.8780161 -8.666047,-8.6633558 z" /> + <g + transform="matrix(0.66862381,0,0,0.66862381,-389.41514,-1116.0024)" + id="g898"> + <path + inkscape:connector-curvature="0" + id="path896" + style="fill:none;stroke:#000000;stroke-width:0.70875001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + d="m 610.082,1670.836 c 0,-7.156 5.801,-12.961 12.961,-12.961 7.156,0 12.957,5.805 12.957,12.961 0,7.156 -5.801,12.957 -12.957,12.957 -7.16,0 -12.961,-5.801 -12.961,-12.957 z m 5.184,10.367 20.734,-10.367 -20.734,-10.367 m -5.184,10.367 h -6.48 m 32.398,0 h 6.48" /> + </g> + </g> + </g> + </g> +</svg> @@ -1,13 +1,37 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <diagram program="umlet" version="14.3.0"> - <zoom_level>11</zoom_level> + <help_text>// Uncomment the following line to change the fontsize and font: +fontsize=10 +// fontfamily=SansSerif //possible: SansSerif,Serif,Monospaced + + +////////////////////////////////////////////////////////////////////////////////////////////// +// Welcome to UMLet! +// +// Double-click on elements to add them to the diagram, or to copy them +// Edit elements by modifying the text in this panel +// Hold Ctrl to select multiple elements +// Use Ctrl+mouse to select via lasso +// +// Use +/- or Ctrl+mouse wheel to zoom +// Drag a whole relation at its central square icon +// +// Press Ctrl+C to copy the whole diagram to the system clipboard (then just paste it to, eg, Word) +// Edit the files in the "palettes" directory to create your own element palettes +// +// Select "Custom Elements > New..." to create new element types +////////////////////////////////////////////////////////////////////////////////////////////// + + +// This text will be stored with each diagram; use it for notes.</help_text> + <zoom_level>7</zoom_level> <element> <id>UMLClass</id> <coordinates> - <x>341</x> - <y>759</y> - <w>286</w> - <h>462</h> + <x>217</x> + <y>385</y> + <w>182</w> + <h>245</h> </coordinates> <panel_attributes>MainApp -- @@ -43,10 +67,10 @@ <element> <id>UMLClass</id> <coordinates> - <x>363</x> - <y>484</y> - <w>242</w> - <h>187</h> + <x>231</x> + <y>210</y> + <w>154</w> + <h>119</h> </coordinates> <panel_attributes>QMainWindow -- @@ -64,21 +88,21 @@ addDockWidget()</panel_attributes> <element> <id>Relation</id> <coordinates> - <x>473</x> - <y>660</y> - <w>33</w> - <h>121</h> + <x>301</x> + <y>322</y> + <w>21</w> + <h>77</h> </coordinates> - <panel_attributes>lt=<<<-</panel_attributes> + <panel_attributes>lt=<<.</panel_attributes> <additional_attributes>10.0;10.0;10.0;90.0</additional_attributes> </element> <element> <id>UMLClass</id> <coordinates> - <x>385</x> - <y>330</y> - <w>187</w> - <h>66</h> + <x>245</x> + <y>112</y> + <w>119</w> + <h>42</h> </coordinates> <panel_attributes>UC1 (textBrowserClass) -- @@ -88,10 +112,10 @@ setText()</panel_attributes> <element> <id>Relation</id> <coordinates> - <x>462</x> - <y>385</y> - <w>33</w> - <h>121</h> + <x>294</x> + <y>147</y> + <w>21</w> + <h>77</h> </coordinates> <panel_attributes>lt=<<.</panel_attributes> <additional_attributes>10.0;10.0;10.0;90.0</additional_attributes> @@ -99,10 +123,10 @@ setText()</panel_attributes> <element> <id>UMLClass</id> <coordinates> - <x>715</x> - <y>352</y> - <w>352</w> - <h>363</h> + <x>455</x> + <y>126</y> + <w>224</w> + <h>189</h> </coordinates> <panel_attributes>ComponentSelector -- @@ -136,10 +160,10 @@ _+ setCompounds(compounds)_ <element> <id>UMLClass</id> <coordinates> - <x>737</x> - <y>748</y> - <w>253</w> - <h>462</h> + <x>469</x> + <y>378</y> + <w>161</w> + <h>252</h> </coordinates> <panel_attributes>Container -- @@ -174,10 +198,10 @@ _+ setCompounds(compounds)_ <element> <id>UMLClass</id> <coordinates> - <x>1078</x> - <y>836</y> - <w>374</w> - <h>187</h> + <x>686</x> + <y>434</y> + <w>238</w> + <h>119</h> </coordinates> <panel_attributes>Graphics -- @@ -196,10 +220,10 @@ _+ setCompounds(compounds)_ <element> <id>UMLClass</id> <coordinates> - <x>1144</x> - <y>528</y> - <w>231</w> - <h>165</h> + <x>728</x> + <y>238</y> + <w>147</w> + <h>105</h> </coordinates> <panel_attributes>QDialog -- @@ -216,10 +240,10 @@ show()</panel_attributes> <element> <id>UMLClass</id> <coordinates> - <x>1144</x> - <y>220</y> - <w>231</w> - <h>55</h> + <x>728</x> + <y>42</y> + <w>147</w> + <h>35</h> </coordinates> <panel_attributes>QStringListModel -- @@ -229,10 +253,10 @@ setStringList()</panel_attributes> <element> <id>UMLClass</id> <coordinates> - <x>1430</x> - <y>517</y> - <w>231</w> - <h>77</h> + <x>910</x> + <y>231</y> + <w>147</w> + <h>49</h> </coordinates> <panel_attributes>UC3 (selectButtonClass) -- @@ -244,10 +268,10 @@ setAutoDefault() <element> <id>UMLClass</id> <coordinates> - <x>1144</x> - <y>297</y> - <w>231</w> - <h>77</h> + <x>728</x> + <y>98</y> + <w>147</w> + <h>49</h> </coordinates> <panel_attributes>QCompleter -- @@ -258,10 +282,10 @@ setModel()</panel_attributes> <element> <id>UMLClass</id> <coordinates> - <x>1144</x> - <y>407</y> - <w>231</w> - <h>55</h> + <x>728</x> + <y>175</y> + <w>147</w> + <h>35</h> </coordinates> <panel_attributes>UC2 (lineEditClass) -- @@ -271,10 +295,10 @@ setCompleter()</panel_attributes> <element> <id>UMLClass</id> <coordinates> - <x>1430</x> - <y>616</y> - <w>231</w> - <h>55</h> + <x>910</x> + <y>294</y> + <w>147</w> + <h>35</h> </coordinates> <panel_attributes>UC4 (pushButtonClass) -- @@ -284,10 +308,10 @@ clicked.connect()</panel_attributes> <element> <id>UMLClass</id> <coordinates> - <x>1045</x> - <y>1089</y> - <w>440</w> - <h>583</h> + <x>665</x> + <y>595</y> + <w>259</w> + <h>315</h> </coordinates> <panel_attributes>NodeItem -- @@ -330,10 +354,10 @@ mouseDoubleClickEvent(event) <element> <id>UMLClass</id> <coordinates> - <x>1012</x> - <y>1705</y> - <w>187</w> - <h>77</h> + <x>644</x> + <y>987</y> + <w>119</w> + <h>49</h> </coordinates> <panel_attributes>QtWidgets.QGraphicsItem -- @@ -346,10 +370,10 @@ setFlag <element> <id>UMLClass</id> <coordinates> - <x>1331</x> - <y>1782</y> - <w>231</w> - <h>55</h> + <x>847</x> + <y>1036</y> + <w>147</w> + <h>35</h> </coordinates> <panel_attributes>QtWidgets.QInputDialog -- @@ -361,10 +385,10 @@ getText() <element> <id>UMLClass</id> <coordinates> - <x>1254</x> - <y>1870</y> - <w>231</w> - <h>55</h> + <x>798</x> + <y>1092</y> + <w>147</w> + <h>35</h> </coordinates> <panel_attributes>QtGui.QFont -- @@ -376,10 +400,10 @@ setPointSize() <element> <id>UMLClass</id> <coordinates> - <x>1012</x> - <y>1826</y> - <w>231</w> - <h>121</h> + <x>644</x> + <y>1064</y> + <w>147</w> + <h>77</h> </coordinates> <panel_attributes>QtWidgets.QGraphicTextItem -- @@ -395,10 +419,10 @@ setPlainText() <element> <id>UMLClass</id> <coordinates> - <x>759</x> - <y>1265</y> - <w>176</w> - <h>66</h> + <x>483</x> + <y>707</y> + <w>112</w> + <h>42</h> </coordinates> <panel_attributes>QtGui.QBrush -- @@ -411,10 +435,10 @@ setColor() <element> <id>UMLClass</id> <coordinates> - <x>462</x> - <y>1265</y> - <w>231</w> - <h>88</h> + <x>294</x> + <y>707</y> + <w>147</w> + <h>56</h> </coordinates> <panel_attributes>QtGui.QPen -- @@ -428,10 +452,10 @@ setWidth() <element> <id>UMLClass</id> <coordinates> - <x>737</x> - <y>1419</y> - <w>231</w> - <h>363</h> + <x>469</x> + <y>805</y> + <w>147</w> + <h>189</h> </coordinates> <panel_attributes>NodeSocket -- @@ -460,10 +484,10 @@ hoverLeaveEvent(event) <element> <id>UMLClass</id> <coordinates> - <x>385</x> - <y>1419</y> - <w>231</w> - <h>418</h> + <x>245</x> + <y>805</y> + <w>147</w> + <h>161</h> </coordinates> <panel_attributes>NodeLine -- @@ -489,10 +513,10 @@ __delete__(instance) <element> <id>UMLClass</id> <coordinates> - <x>220</x> - <y>1265</y> - <w>231</w> - <h>88</h> + <x>140</x> + <y>707</y> + <w>147</w> + <h>56</h> </coordinates> <panel_attributes>QtWigets.QGraphicsPathItem -- @@ -505,39 +529,39 @@ setPen() <element> <id>UMLClass</id> <coordinates> - <x>2101</x> - <y>396</y> - <w>264</w> - <h>330</h> + <x>1337</x> + <y>154</y> + <w>168</w> + <h>210</h> </coordinates> <panel_attributes>DockWidgetMaterialStream -- + name: string = name + obj: UnitOperations = obj + type: string = comptype -+ inputdict: dictionary = {} ++ input_dict: dictionary = {} + dict: dictionary = {} + x_pclist: list = [] -+ nameType: string = None ++ name_type: string = None + container: Container = container + header: QTreeWidgetItem() -- + modes() -+ modeSelection() -+ inputparamslist() ++ mode_selection() ++ input_params_list() + param() -+ resultsCategory(name) -+ _showResult(lst)_ -+ Show_Error()</panel_attributes> ++ results_category(name) ++ _show_result(lst)_ ++ show_error()</panel_attributes> <additional_attributes/> </element> <element> <id>UMLClass</id> <coordinates> - <x>1430</x> - <y>704</y> - <w>231</w> - <h>55</h> + <x>910</x> + <y>350</y> + <w>147</w> + <h>35</h> </coordinates> <panel_attributes>UC5 (comboBoxClass) -- @@ -547,38 +571,38 @@ currentIndexChanged.connect()</panel_attributes> <element> <id>UMLClass</id> <coordinates> - <x>1716</x> - <y>616</y> - <w>264</w> - <h>308</h> + <x>1092</x> + <y>294</y> + <w>168</w> + <h>182</h> </coordinates> <panel_attributes>DockWidget -- + name: string = name + obj: UnitOperations = obj + type: string = comptype -+ inputdict: dictionary = {} ++ input_dict: dictionary = {} + dict: dictionary = {} + x_pclist: list = [] -+ nameType: string = None ++ name_type: string = None + container: Container = container -- + modes() -+ modeSelection() -+ inputparamslist() ++ mode_selection() ++ input_params_list() + param() -+ resultsCategory(name) -_+ showResult(lst)_ -+ Show_Error()</panel_attributes> ++ show_error() +_+ show_result(lst)_ ++ result_category(name)</panel_attributes> <additional_attributes/> </element> <element> <id>UMLClass</id> <coordinates> - <x>1760</x> - <y>385</y> - <w>231</w> - <h>176</h> + <x>1120</x> + <y>147</y> + <w>147</w> + <h>112</h> </coordinates> <panel_attributes>QDockWidget -- @@ -595,36 +619,36 @@ hide()</panel_attributes> <element> <id>UMLClass</id> <coordinates> - <x>2101</x> - <y>1232</y> - <w>264</w> - <h>275</h> + <x>1337</x> + <y>686</y> + <w>168</w> + <h>161</h> </coordinates> <panel_attributes>DockWidgetShortcutColumn -- + name: string = name + obj: UnitOperations = obj + type: string = comptype -+ inputdict: list = [] ++ input_dict: list = [] + dict: list = [] -+ nameType: string = None ++ name_yype: string = None + container: Container = container -- -+ inputparamslist() ++ input_params_list() + fun() + param() -+ Show_Error() -_+ showResult(lst)_ -+ resultCategory(name)</panel_attributes> ++ show_error() +_+ show_result(lst)_ ++ result_category(name)</panel_attributes> <additional_attributes/> </element> <element> <id>UMLClass</id> <coordinates> - <x>2101</x> - <y>1012</y> - <w>264</w> - <h>198</h> + <x>1337</x> + <y>546</y> + <w>168</w> + <h>126</h> </coordinates> <panel_attributes>DockWidgetMixer DockWidgetCompoundSeparator @@ -632,21 +656,21 @@ DockWidgetCompoundSeparator + name: string = name + obj: UnitOperations = obj + type: string = comptype -+ inputdict: list = [] ++ input_dict: list = [] + dict: list = [] -- -+ inputparamslist() ++ input_params_list() + param() -+ Show_Error()</panel_attributes> ++ show_error()</panel_attributes> <additional_attributes/> </element> <element> <id>UMLClass</id> <coordinates> - <x>2101</x> - <y>770</y> - <w>264</w> - <h>220</h> + <x>1337</x> + <y>392</y> + <w>168</w> + <h>140</h> </coordinates> <panel_attributes>DockWidgetSplitter DockWidgetFlash @@ -654,22 +678,22 @@ DockWidgetFlash + name: string = name + obj: UnitOperations = obj + type: string = comptype -+ inputdict: list = [] ++ input_dict: list = [] + dict: list = [] -- -+ inputparamslist() ++ input_params_list() + fun() + param() -+ Show_Error()</panel_attributes> ++ show_error()</panel_attributes> <additional_attributes/> </element> <element> <id>UMLClass</id> <coordinates> - <x>1606</x> - <y>957</y> - <w>451</w> - <h>473</h> + <x>1022</x> + <y>511</y> + <w>231</w> + <h>231</h> </coordinates> <panel_attributes>Flowsheet -- @@ -703,10 +727,10 @@ DockWidgetFlash <element> <id>UMLClass</id> <coordinates> - <x>1650</x> - <y>1694</y> - <w>297</w> - <h>517</h> + <x>1050</x> + <y>980</y> + <w>189</w> + <h>280</h> </coordinates> <panel_attributes>MaterialStream -- @@ -743,10 +767,10 @@ _+ counter: int = 1_ <element> <id>UMLClass</id> <coordinates> - <x>2068</x> - <y>1694</y> - <w>297</w> - <h>572</h> + <x>1316</x> + <y>980</y> + <w>189</w> + <h>350</h> </coordinates> <panel_attributes>UnitOperations -- @@ -787,9 +811,9 @@ _+ counter: int = 1_ <id>UMLClass</id> <coordinates> <x>0</x> - <y>935</y> - <w>275</w> - <h>264</h> + <y>497</y> + <w>175</w> + <h>168</h> </coordinates> <panel_attributes>Bin_Phase_env -- @@ -811,10 +835,10 @@ setupUi() <element> <id>UMLClass</id> <coordinates> - <x>770</x> - <y>154</y> - <w>231</w> - <h>154</h> + <x>490</x> + <y>0</y> + <w>147</w> + <h>98</h> </coordinates> <panel_attributes>ChemsepDatabase -- @@ -830,21 +854,21 @@ setupUi() <element> <id>Relation</id> <coordinates> - <x>616</x> - <y>704</y> - <w>132</w> - <h>132</h> + <x>392</x> + <y>308</y> + <w>84</w> + <h>126</h> </coordinates> <panel_attributes>lt=<-</panel_attributes> - <additional_attributes>100.0;10.0;100.0;100.0;10.0;100.0</additional_attributes> + <additional_attributes>100.0;10.0;100.0;160.0;10.0;160.0</additional_attributes> </element> <element> <id>Relation</id> <coordinates> - <x>616</x> - <y>902</y> - <w>143</w> - <h>33</h> + <x>392</x> + <y>476</y> + <w>91</w> + <h>21</h> </coordinates> <panel_attributes>lt=<-</panel_attributes> <additional_attributes>110.0;10.0;10.0;10.0</additional_attributes> @@ -852,65 +876,65 @@ setupUi() <element> <id>Relation</id> <coordinates> - <x>869</x> - <y>297</y> - <w>33</w> - <h>77</h> + <x>553</x> + <y>91</y> + <w>21</w> + <h>49</h> </coordinates> - <panel_attributes>lt=<<<-</panel_attributes> + <panel_attributes>lt=<<.</panel_attributes> <additional_attributes>10.0;10.0;10.0;50.0</additional_attributes> </element> <element> <id>Relation</id> <coordinates> - <x>1056</x> - <y>594</y> - <w>110</w> - <h>33</h> + <x>672</x> + <y>280</y> + <w>70</w> + <h>21</h> </coordinates> - <panel_attributes>lt=<<<-</panel_attributes> + <panel_attributes>lt=<<.</panel_attributes> <additional_attributes>80.0;10.0;10.0;10.0</additional_attributes> </element> <element> <id>Relation</id> <coordinates> - <x>1243</x> - <y>451</y> - <w>33</w> - <h>99</h> + <x>791</x> + <y>203</y> + <w>21</w> + <h>49</h> </coordinates> <panel_attributes>lt=<<.</panel_attributes> - <additional_attributes>10.0;10.0;10.0;70.0</additional_attributes> + <additional_attributes>10.0;10.0;10.0;50.0</additional_attributes> </element> <element> <id>Relation</id> <coordinates> - <x>1243</x> - <y>363</y> - <w>33</w> - <h>66</h> + <x>791</x> + <y>140</y> + <w>21</w> + <h>49</h> </coordinates> - <panel_attributes/> - <additional_attributes>10.0;10.0;10.0;40.0</additional_attributes> + <panel_attributes>lt=<<.</panel_attributes> + <additional_attributes>10.0;10.0;10.0;50.0</additional_attributes> </element> <element> <id>Relation</id> <coordinates> - <x>1243</x> - <y>264</y> - <w>33</w> - <h>55</h> + <x>791</x> + <y>70</y> + <w>21</w> + <h>42</h> </coordinates> - <panel_attributes/> - <additional_attributes>10.0;10.0;10.0;30.0</additional_attributes> + <panel_attributes>lt=<<.</panel_attributes> + <additional_attributes>10.0;10.0;10.0;40.0</additional_attributes> </element> <element> <id>Relation</id> <coordinates> - <x>1364</x> - <y>550</y> - <w>88</w> - <h>33</h> + <x>868</x> + <y>252</y> + <w>56</w> + <h>21</h> </coordinates> <panel_attributes>lt=<<.</panel_attributes> <additional_attributes>60.0;10.0;10.0;10.0</additional_attributes> @@ -918,10 +942,10 @@ setupUi() <element> <id>Relation</id> <coordinates> - <x>1364</x> - <y>627</y> - <w>88</w> - <h>33</h> + <x>868</x> + <y>301</y> + <w>56</w> + <h>21</h> </coordinates> <panel_attributes>lt=<<.</panel_attributes> <additional_attributes>60.0;10.0;10.0;10.0</additional_attributes> @@ -929,10 +953,10 @@ setupUi() <element> <id>Relation</id> <coordinates> - <x>979</x> - <y>935</y> - <w>121</w> - <h>33</h> + <x>623</x> + <y>497</y> + <w>77</w> + <h>21</h> </coordinates> <panel_attributes>lt=<-</panel_attributes> <additional_attributes>90.0;10.0;10.0;10.0</additional_attributes> @@ -940,10 +964,10 @@ setupUi() <element> <id>Relation</id> <coordinates> - <x>1243</x> - <y>1012</y> - <w>33</w> - <h>99</h> + <x>791</x> + <y>546</y> + <w>21</w> + <h>63</h> </coordinates> <panel_attributes>lt=<-</panel_attributes> <additional_attributes>10.0;70.0;10.0;10.0</additional_attributes> @@ -951,10 +975,10 @@ setupUi() <element> <id>Relation</id> <coordinates> - <x>957</x> - <y>1529</y> - <w>110</w> - <h>33</h> + <x>609</x> + <y>875</y> + <w>70</w> + <h>21</h> </coordinates> <panel_attributes>lt=<-</panel_attributes> <additional_attributes>10.0;10.0;80.0;10.0</additional_attributes> @@ -962,10 +986,10 @@ setupUi() <element> <id>Relation</id> <coordinates> - <x>605</x> - <y>1529</y> - <w>154</w> - <h>33</h> + <x>385</x> + <y>875</y> + <w>98</w> + <h>21</h> </coordinates> <panel_attributes>lt=<-</panel_attributes> <additional_attributes>10.0;10.0;120.0;10.0</additional_attributes> @@ -973,10 +997,10 @@ setupUi() <element> <id>Relation</id> <coordinates> - <x>341</x> - <y>1342</y> - <w>165</w> - <h>99</h> + <x>217</x> + <y>756</y> + <w>105</w> + <h>63</h> </coordinates> <panel_attributes>lt=<<.</panel_attributes> <additional_attributes>10.0;10.0;130.0;70.0</additional_attributes> @@ -984,10 +1008,10 @@ setupUi() <element> <id>Relation</id> <coordinates> - <x>495</x> - <y>1342</y> - <w>99</w> - <h>99</h> + <x>315</x> + <y>756</y> + <w>63</w> + <h>63</h> </coordinates> <panel_attributes>lt=<<.</panel_attributes> <additional_attributes>70.0;10.0;10.0;70.0</additional_attributes> @@ -995,10 +1019,10 @@ setupUi() <element> <id>Relation</id> <coordinates> - <x>847</x> - <y>1320</y> - <w>33</w> - <h>121</h> + <x>539</x> + <y>742</y> + <w>21</w> + <h>77</h> </coordinates> <panel_attributes>lt=<<.</panel_attributes> <additional_attributes>10.0;10.0;10.0;90.0</additional_attributes> @@ -1006,10 +1030,10 @@ setupUi() <element> <id>Relation</id> <coordinates> - <x>924</x> - <y>1298</y> - <w>143</w> - <h>33</h> + <x>588</x> + <y>728</y> + <w>91</w> + <h>21</h> </coordinates> <panel_attributes>lt=<<.</panel_attributes> <additional_attributes>10.0;10.0;110.0;10.0</additional_attributes> @@ -1017,54 +1041,54 @@ setupUi() <element> <id>Relation</id> <coordinates> - <x>1100</x> - <y>1661</y> - <w>33</w> - <h>66</h> + <x>700</x> + <y>903</y> + <w>21</w> + <h>98</h> </coordinates> <panel_attributes>lt=<<.</panel_attributes> - <additional_attributes>10.0;40.0;10.0;10.0</additional_attributes> + <additional_attributes>10.0;120.0;10.0;10.0</additional_attributes> </element> <element> <id>Relation</id> <coordinates> - <x>1441</x> - <y>1661</y> - <w>33</w> - <h>143</h> + <x>917</x> + <y>903</y> + <w>21</w> + <h>147</h> </coordinates> <panel_attributes>lt=<<.</panel_attributes> - <additional_attributes>10.0;110.0;10.0;10.0</additional_attributes> + <additional_attributes>10.0;190.0;10.0;10.0</additional_attributes> </element> <element> <id>Relation</id> <coordinates> - <x>1287</x> - <y>1661</y> - <w>33</w> - <h>231</h> + <x>819</x> + <y>903</y> + <w>21</w> + <h>203</h> </coordinates> <panel_attributes>lt=<<.</panel_attributes> - <additional_attributes>10.0;190.0;10.0;10.0</additional_attributes> + <additional_attributes>10.0;270.0;10.0;10.0</additional_attributes> </element> <element> <id>Relation</id> <coordinates> - <x>1210</x> - <y>1661</y> - <w>33</w> - <h>187</h> + <x>770</x> + <y>903</y> + <w>21</w> + <h>175</h> </coordinates> <panel_attributes>lt=<<.</panel_attributes> - <additional_attributes>10.0;150.0;10.0;10.0</additional_attributes> + <additional_attributes>10.0;230.0;10.0;10.0</additional_attributes> </element> <element> <id>Relation</id> <coordinates> - <x>979</x> - <y>1034</y> - <w>649</w> - <h>33</h> + <x>623</x> + <y>560</y> + <w>413</w> + <h>21</h> </coordinates> <panel_attributes>lt=<-</panel_attributes> <additional_attributes>570.0;10.0;10.0;10.0</additional_attributes> @@ -1072,10 +1096,10 @@ setupUi() <element> <id>Relation</id> <coordinates> - <x>1529</x> - <y>1034</y> - <w>704</w> - <h>682</h> + <x>973</x> + <y>560</y> + <w>448</w> + <h>434</h> </coordinates> <panel_attributes>lt=<-</panel_attributes> <additional_attributes>620.0;600.0;620.0;520.0;10.0;520.0;10.0;10.0</additional_attributes> @@ -1083,10 +1107,10 @@ setupUi() <element> <id>Relation</id> <coordinates> - <x>1782</x> - <y>1595</y> - <w>33</w> - <h>121</h> + <x>1134</x> + <y>917</y> + <w>21</w> + <h>77</h> </coordinates> <panel_attributes>lt=<-</panel_attributes> <additional_attributes>10.0;90.0;10.0;10.0</additional_attributes> @@ -1094,21 +1118,21 @@ setupUi() <element> <id>Relation</id> <coordinates> - <x>1474</x> - <y>539</y> - <w>1023</w> - <h>1023</h> + <x>917</x> + <y>245</y> + <w>672</w> + <h>651</h> </coordinates> <panel_attributes>lt=<-</panel_attributes> - <additional_attributes>810.0;10.0;910.0;10.0;910.0;910.0;10.0;910.0</additional_attributes> + <additional_attributes>840.0;10.0;940.0;10.0;940.0;910.0;10.0;910.0</additional_attributes> </element> <element> <id>Relation</id> <coordinates> - <x>2354</x> - <y>858</y> - <w>143</w> - <h>33</h> + <x>1498</x> + <y>448</y> + <w>91</w> + <h>21</h> </coordinates> <panel_attributes>lt=<-</panel_attributes> <additional_attributes>10.0;10.0;110.0;10.0</additional_attributes> @@ -1116,10 +1140,10 @@ setupUi() <element> <id>Relation</id> <coordinates> - <x>2354</x> - <y>1100</y> - <w>143</w> - <h>33</h> + <x>1498</x> + <y>602</y> + <w>91</w> + <h>21</h> </coordinates> <panel_attributes>lt=<-</panel_attributes> <additional_attributes>10.0;10.0;110.0;10.0</additional_attributes> @@ -1127,10 +1151,10 @@ setupUi() <element> <id>Relation</id> <coordinates> - <x>2354</x> - <y>1353</y> - <w>143</w> - <h>33</h> + <x>1498</x> + <y>763</y> + <w>91</w> + <h>21</h> </coordinates> <panel_attributes>lt=<-</panel_attributes> <additional_attributes>10.0;10.0;110.0;10.0</additional_attributes> @@ -1138,10 +1162,10 @@ setupUi() <element> <id>Relation</id> <coordinates> - <x>1969</x> - <y>737</y> - <w>528</w> - <h>33</h> + <x>1253</x> + <y>371</y> + <w>336</w> + <h>21</h> </coordinates> <panel_attributes>lt=<-</panel_attributes> <additional_attributes>10.0;10.0;460.0;10.0</additional_attributes> @@ -1149,10 +1173,10 @@ setupUi() <element> <id>Relation</id> <coordinates> - <x>1826</x> - <y>550</y> - <w>33</w> - <h>88</h> + <x>1162</x> + <y>252</y> + <w>21</w> + <h>56</h> </coordinates> <panel_attributes>lt=<<.</panel_attributes> <additional_attributes>10.0;10.0;10.0;60.0</additional_attributes> @@ -1160,10 +1184,10 @@ setupUi() <element> <id>Relation</id> <coordinates> - <x>1980</x> - <y>429</y> - <w>143</w> - <h>33</h> + <x>1260</x> + <y>175</y> + <w>91</w> + <h>21</h> </coordinates> <panel_attributes>lt=<<.</panel_attributes> <additional_attributes>10.0;10.0;110.0;10.0</additional_attributes> @@ -1171,10 +1195,10 @@ setupUi() <element> <id>Relation</id> <coordinates> - <x>1980</x> - <y>462</y> - <w>154</w> - <h>330</h> + <x>1260</x> + <y>196</y> + <w>98</w> + <h>210</h> </coordinates> <panel_attributes>lt=<<.</panel_attributes> <additional_attributes>10.0;10.0;120.0;280.0</additional_attributes> @@ -1182,10 +1206,10 @@ setupUi() <element> <id>Relation</id> <coordinates> - <x>1980</x> - <y>506</y> - <w>143</w> - <h>528</h> + <x>1260</x> + <y>224</y> + <w>91</w> + <h>336</h> </coordinates> <panel_attributes>lt=<<.</panel_attributes> <additional_attributes>10.0;10.0;110.0;460.0</additional_attributes> @@ -1193,10 +1217,10 @@ setupUi() <element> <id>Relation</id> <coordinates> - <x>1980</x> - <y>550</y> - <w>143</w> - <h>715</h> + <x>1260</x> + <y>252</y> + <w>91</w> + <h>455</h> </coordinates> <panel_attributes>lt=<<.</panel_attributes> <additional_attributes>10.0;10.0;110.0;630.0</additional_attributes> @@ -1204,21 +1228,21 @@ setupUi() <element> <id>Relation</id> <coordinates> - <x>264</x> - <y>1012</y> - <w>99</w> - <h>33</h> + <x>168</x> + <y>546</y> + <w>63</w> + <h>21</h> </coordinates> - <panel_attributes>lt=<<<-</panel_attributes> + <panel_attributes>lt=<<.</panel_attributes> <additional_attributes>10.0;10.0;70.0;10.0</additional_attributes> </element> <element> <id>Relation</id> <coordinates> - <x>1650</x> - <y>638</y> - <w>88</w> - <h>33</h> + <x>1050</x> + <y>308</y> + <w>56</w> + <h>21</h> </coordinates> <panel_attributes>lt=<<.</panel_attributes> <additional_attributes>10.0;10.0;60.0;10.0</additional_attributes> @@ -1226,10 +1250,10 @@ setupUi() <element> <id>Relation</id> <coordinates> - <x>1650</x> - <y>726</y> - <w>88</w> - <h>33</h> + <x>1050</x> + <y>364</y> + <w>56</w> + <h>21</h> </coordinates> <panel_attributes>lt=<<.</panel_attributes> <additional_attributes>10.0;10.0;60.0;10.0</additional_attributes> @@ -1237,10 +1261,10 @@ setupUi() <element> <id>UMLNote</id> <coordinates> - <x>1804</x> - <y>165</y> - <w>176</w> - <h>55</h> + <x>14</x> + <y>1008</y> + <w>112</w> + <h>35</h> </coordinates> <panel_attributes>UC is the abbreviation for unknown class. @@ -1251,10 +1275,10 @@ bg=white <element> <id>UMLClass</id> <coordinates> - <x>1793</x> - <y>242</y> - <w>231</w> - <h>77</h> + <x>1141</x> + <y>56</y> + <w>147</w> + <h>49</h> </coordinates> <panel_attributes>Graphics.py -- @@ -1262,35 +1286,12 @@ findMainWindow()</panel_attributes> <additional_attributes/> </element> <element> - <id>UMLNote</id> - <coordinates> - <x>1100</x> - <y>0</y> - <w>341</w> - <h>187</h> - </coordinates> - <panel_attributes>OMCS Class Diagram --- -Initial version : - Author - Saurabh Agarwala - Date - 7th December 2019 - Contact - saur.agarwala@gmail.com --- -Current final version : - Author - Thiha Min Maung - Date - 19th February 2020 - Contact - lucaszhao999@gmail.com -bg=white -</panel_attributes> - <additional_attributes/> - </element> - <element> <id>UMLClass</id> <coordinates> - <x>2442</x> - <y>2145</y> - <w>231</w> - <h>187</h> + <x>1554</x> + <y>1267</y> + <w>147</w> + <h>119</h> </coordinates> <panel_attributes>Heater Cooler @@ -1306,10 +1307,10 @@ Flash <element> <id>UMLClass</id> <coordinates> - <x>2442</x> - <y>1925</y> - <w>231</w> - <h>55</h> + <x>1554</x> + <y>1127</y> + <w>147</w> + <h>35</h> </coordinates> <panel_attributes>Mixer -- @@ -1320,10 +1321,10 @@ Flash <element> <id>UMLClass</id> <coordinates> - <x>2442</x> - <y>1991</y> - <w>231</w> - <h>55</h> + <x>1554</x> + <y>1169</y> + <w>147</w> + <h>35</h> </coordinates> <panel_attributes>Splitter -- @@ -1334,10 +1335,10 @@ Flash <element> <id>UMLClass</id> <coordinates> - <x>2442</x> - <y>2068</y> - <w>231</w> - <h>55</h> + <x>1554</x> + <y>1218</y> + <w>147</w> + <h>35</h> </coordinates> <panel_attributes>CompoundSeparator -- @@ -1348,10 +1349,10 @@ Flash <element> <id>UMLClass</id> <coordinates> - <x>2442</x> - <y>1716</y> - <w>275</w> - <h>110</h> + <x>1554</x> + <y>994</y> + <w>175</w> + <h>70</h> </coordinates> <panel_attributes>DistillationColumn -- @@ -1366,10 +1367,10 @@ Flash <element> <id>UMLClass</id> <coordinates> - <x>2442</x> - <y>1837</y> - <w>275</w> - <h>77</h> + <x>1554</x> + <y>1071</y> + <w>175</w> + <h>49</h> </coordinates> <panel_attributes>ShortcutColumn -- @@ -1382,10 +1383,10 @@ Flash <element> <id>Relation</id> <coordinates> - <x>2354</x> - <y>1760</y> - <w>110</w> - <h>33</h> + <x>1498</x> + <y>1022</y> + <w>70</w> + <h>21</h> </coordinates> <panel_attributes>lt=<<-</panel_attributes> <additional_attributes>10.0;10.0;80.0;10.0</additional_attributes> @@ -1393,10 +1394,10 @@ Flash <element> <id>Relation</id> <coordinates> - <x>2354</x> - <y>1859</y> - <w>110</w> - <h>33</h> + <x>1498</x> + <y>1085</y> + <w>70</w> + <h>21</h> </coordinates> <panel_attributes>lt=<<-</panel_attributes> <additional_attributes>10.0;10.0;80.0;10.0</additional_attributes> @@ -1404,10 +1405,10 @@ Flash <element> <id>Relation</id> <coordinates> - <x>2354</x> - <y>1947</y> - <w>110</w> - <h>33</h> + <x>1498</x> + <y>1141</y> + <w>70</w> + <h>21</h> </coordinates> <panel_attributes>lt=<<-</panel_attributes> <additional_attributes>10.0;10.0;80.0;10.0</additional_attributes> @@ -1415,10 +1416,10 @@ Flash <element> <id>Relation</id> <coordinates> - <x>2354</x> - <y>2024</y> - <w>110</w> - <h>33</h> + <x>1498</x> + <y>1190</y> + <w>70</w> + <h>21</h> </coordinates> <panel_attributes>lt=<<-</panel_attributes> <additional_attributes>10.0;10.0;80.0;10.0</additional_attributes> @@ -1426,10 +1427,10 @@ Flash <element> <id>Relation</id> <coordinates> - <x>2354</x> - <y>2090</y> - <w>110</w> - <h>33</h> + <x>1498</x> + <y>1232</y> + <w>70</w> + <h>21</h> </coordinates> <panel_attributes>lt=<<-</panel_attributes> <additional_attributes>10.0;10.0;80.0;10.0</additional_attributes> @@ -1437,12 +1438,60 @@ Flash <element> <id>Relation</id> <coordinates> - <x>2354</x> - <y>2211</y> - <w>110</w> - <h>33</h> + <x>1498</x> + <y>1309</y> + <w>70</w> + <h>21</h> </coordinates> <panel_attributes>lt=<<-</panel_attributes> <additional_attributes>10.0;10.0;80.0;10.0</additional_attributes> </element> + <element> + <id>Relation</id> + <coordinates> + <x>7</x> + <y>1064</y> + <w>133</w> + <h>28</h> + </coordinates> + <panel_attributes>lt=<- +Association</panel_attributes> + <additional_attributes>10.0;20.0;170.0;20.0</additional_attributes> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>7</x> + <y>1106</y> + <w>133</w> + <h>28</h> + </coordinates> + <panel_attributes>lt=<<. +Implements</panel_attributes> + <additional_attributes>10.0;20.0;170.0;20.0</additional_attributes> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>7</x> + <y>1141</y> + <w>133</w> + <h>28</h> + </coordinates> + <panel_attributes>lt=<<- +Inherits</panel_attributes> + <additional_attributes>10.0;20.0;170.0;20.0</additional_attributes> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>7</x> + <y>1169</y> + <w>147</w> + <h>28</h> + </coordinates> + <panel_attributes>+'s are user-defined variables and methods +Qt's methods does not have any symbols</panel_attributes> + <additional_attributes>80.0;20.0;120.0;20.0</additional_attributes> + </element> </diagram> |