UI.mainWindow module

class UI.mainWindow.TabWidget[source]

Bases: QTabWidget

Custom QTableWidget to populate a empty page with a welcome and information message

Methods

paintEvent(event)

Special paint event

paintEvent(event)[source]

Special paint event

class UI.mainWindow.TreeEquipment(parent=None)[source]

Bases: QTreeWidget

Custom QTreWidget to list the equipment and stream from the active project

Methods

updateList(items)

Update list with project items

__init__(parent=None)[source]
updateList(items)[source]

Update list with project items

class UI.mainWindow.FlowLayout(margin=0, spacing=0, parent=None)[source]

Bases: QLayout

Dynamic layout to reorder object using all available space

Methods

addItem(item)

Add item to layout

count()

Return count of item

doLayout(rect, testOnly)

Dynamic generation of layout

expandingDirections()

Limit expanding direction to horizontal orientation

hasHeightForWidth()

Change default value

heightForWidth(width)

Get height from layout

itemAt(index)

Return item at position index

minimumSize()

Get minimum size of layout

setGeometry(rect)

Special geomtry from layout

sizeHint()

Set size hint to minimum size

takeAt(index)

Return item at position index and remove from layout

__init__(margin=0, spacing=0, parent=None)[source]
addItem(item)[source]

Add item to layout

count()[source]

Return count of item

itemAt(index)[source]

Return item at position index

takeAt(index)[source]

Return item at position index and remove from layout

expandingDirections()[source]

Limit expanding direction to horizontal orientation

hasHeightForWidth()[source]

Change default value

heightForWidth(width)[source]

Get height from layout

setGeometry(rect)[source]

Special geomtry from layout

sizeHint()[source]

Set size hint to minimum size

minimumSize()[source]

Get minimum size of layout

doLayout(rect, testOnly)[source]

Dynamic generation of layout

class UI.mainWindow.UI_pychemqt(parent=None)[source]

Bases: QMainWindow

Main window UI definition

Attributes:
currentConfig

Get config of current project

currentFilename

Get file name of current project

currentMdi

Get mdi area of current project

currentScene

Get current graphicscene

currentView

Get current graphicsview

idTab

Get id of current tab

Methods

Preferences()

Show preferences dialog

aboutToShow_MenuEdit()

Dynamic generation of edit menu

aboutToShow_MenuPFD()

Dynamic generation of PFD menu

aboutToShow_MenuRecentFiles()

Dynamic generation of recent files menu

aboutToShow_MenuWindow()

Dynamic generation of window menu

acerca()

Show basic information about pychemqt including version of library used

acercaQt()

Show info about qt library

activeControl(boolean)

Enable/Disable actions if any project is loaded

addEquipment(equipo)

Add equipment to PFD of current project

addItem(tipo[, check])

Add item to PFD of current project tipo: type of item * square: square item, defining 2 points of diagonal * ellipse: ellipse item, enclosed in a square defined with 2 points * Input stream to PFD, defined only by one point * Output stream to PFD, defined only by one point * Strem: Stream to join several equipment

addRecentFile(fname)

Populate recent file menu

addText()

Add text item to PFD of current project

bip()

Show bip parameters of selected compounds

calculator()

Show external calculator application

changePreferenceLive()

Upgrade UI when change preferences

changeStatusThermo(conf)

Update status thermo for pfd subwindow

changeWindow(window)

Update status info when change subwindow

clearRecentFiles()

Clear recent open files list

clearWindow()

Actions to be done when close a window in a tab mdi

closeEvent([event])

Catch main close event to do actions like avoid lost changes or save main program settings

contextListMenu(event)

Generation of context menu for list toolbox

currentTabChanged(index)

Actions to be done when change current tab in main window

dialogConfig(UIconfig)

Generic procedure for launch a config dialog

documentation()

Open tools/doi app with scientific references

fileClose(index)

Actions to be done when close a project in mainwindow

fileNew()

Actions to be done when create a new project

fileOpen([fname])

Open project

fileSave([indice])

Save project to file

fileSaveAll()

Save all open project with changes

fileSaveAs([indice])

Save current project with a new name

getScene(index)

Get graphicscene of tab with selected index

getView(index)

Get graphics view of tab with selected index

help()

Open pychemqt documentation

launch(dlg, *args)

Generic method to launch external application

loadFile([fname])

Actions to be done when load a project file

loadPFD(mdiarea)

Actions to be done to load a PFD

log()

Open log file

meos()

Launch main dialog of UI_Tables tool

overview()

Show a overview window of PFD or hide if exist

plotProperties()

Plot temperature dependent properties of selected compounds

saveControl()

Enable/Disable save actions is current tab is modified

savePFDImage()

Save PFD screenshot in a file

selectionChanged()

Selection changed from both PFD and item treewidget to let both stay syncronized with same selected items

tabModified(index)

Set icon as modified for tab with index specified

terminal()

Show instrospection console

updateConfig(conf)

Do changes in mainwindow at any config change

updatePreferences(preferences)

Update preferences in program and save to file

updateStatus(text[, success])

Función que añade entradas al cuadro de status text: texto a mostrar success: boolean que indica si va todo bien

windowClose()

Close active subwindow

windowMinimizeAll()

Minimize all subwindows

windowRestoreAll()

Restore all subwindows to last window size and position

windowSelect(index)

Show the selected subwindow

wizard()

Show a wizard dialog for project configuration

zoom([value])

Change zoom value of PFD

idNew = 0
config = []
dirty = []
filename = []
pfd = []
__init__(parent=None)[source]
property currentScene

Get current graphicscene

property currentView

Get current graphicsview

property currentMdi

Get mdi area of current project

property currentConfig

Get config of current project

property currentFilename

Get file name of current project

getScene(index)[source]

Get graphicscene of tab with selected index

getView(index)[source]

Get graphics view of tab with selected index

property idTab

Get id of current tab

closeEvent(event=None)[source]

Catch main close event to do actions like avoid lost changes or save main program settings

aboutToShow_MenuEdit()[source]

Dynamic generation of edit menu

aboutToShow_MenuPFD()[source]

Dynamic generation of PFD menu

aboutToShow_MenuWindow()[source]

Dynamic generation of window menu

windowClose()[source]

Close active subwindow

windowSelect(index)[source]

Show the selected subwindow

windowRestoreAll()[source]

Restore all subwindows to last window size and position

windowMinimizeAll()[source]

Minimize all subwindows

contextListMenu(event)[source]

Generation of context menu for list toolbox

aboutToShow_MenuRecentFiles()[source]

Dynamic generation of recent files menu

clearRecentFiles()[source]

Clear recent open files list

addRecentFile(fname)[source]

Populate recent file menu

fileNew()[source]

Actions to be done when create a new project

fileSave(indice=None)[source]

Save project to file

fileSaveAs(indice=None)[source]

Save current project with a new name

fileSaveAll()[source]

Save all open project with changes

fileOpen(fname=None)[source]

Open project

loadFile(fname=None)[source]

Actions to be done when load a project file

loadPFD(mdiarea)[source]

Actions to be done to load a PFD

changeWindow(window)[source]

Update status info when change subwindow

clearWindow()[source]

Actions to be done when close a window in a tab mdi

fileClose(index)[source]

Actions to be done when close a project in mainwindow

wizard()[source]

Show a wizard dialog for project configuration

updateConfig(conf)[source]

Do changes in mainwindow at any config change

updateStatus(text, success=True)[source]

Función que añade entradas al cuadro de status text: texto a mostrar success: boolean que indica si va todo bien

changeStatusThermo(conf)[source]

Update status thermo for pfd subwindow

dialogConfig(UIconfig)[source]

Generic procedure for launch a config dialog

Preferences()[source]

Show preferences dialog

updatePreferences(preferences)[source]

Update preferences in program and save to file

changePreferenceLive()[source]

Upgrade UI when change preferences

activeControl(boolean)[source]

Enable/Disable actions if any project is loaded

saveControl()[source]

Enable/Disable save actions is current tab is modified

tabModified(index)[source]

Set icon as modified for tab with index specified

currentTabChanged(index)[source]

Actions to be done when change current tab in main window

bip()[source]

Show bip parameters of selected compounds

plotProperties()[source]

Plot temperature dependent properties of selected compounds

calculator()[source]

Show external calculator application

terminal()[source]

Show instrospection console

meos()[source]

Launch main dialog of UI_Tables tool

launch(dlg, *args)[source]

Generic method to launch external application

help()[source]

Open pychemqt documentation

documentation()[source]

Open tools/doi app with scientific references

log()[source]

Open log file

acerca()[source]

Show basic information about pychemqt including version of library used

acercaQt()[source]

Show info about qt library

savePFDImage()[source]

Save PFD screenshot in a file

zoom(value=None)[source]

Change zoom value of PFD

Parameters:
Valuefloat

Zoom value or any of this str + : Zoom in view - : Zoom out view Dialog : Show dialog to set custom zoom value

overview()[source]

Show a overview window of PFD or hide if exist

selectionChanged()[source]

Selection changed from both PFD and item treewidget to let both stay syncronized with same selected items

addText()[source]

Add text item to PFD of current project

addItem(tipo, check=True)[source]

Add item to PFD of current project tipo: type of item

  • square: square item, defining 2 points of diagonal

  • ellipse: ellipse item, enclosed in a square defined with 2 points

  • Input stream to PFD, defined only by one point

  • Output stream to PFD, defined only by one point

  • Strem: Stream to join several equipment

addEquipment(equipo)[source]

Add equipment to PFD of current project