mli.gui package¶
Submodules¶
mli.gui.abstract_classes module¶
mli.gui.dialog_elements module¶
- class mli.gui.dialog_elements.ADialogApplyButtons(oConnector, oParent=None)[source]¶
Bases:
QDialog
An abstract class that creates a block of Apply, OK, Cancel buttons and reserves action methods for them.
- class mli.gui.dialog_elements.HComboBox(sLabel='', oParent=None)[source]¶
Bases:
QHBoxLayout
Creates a block that units QLabel, QComboBox and QLineEdit. Also, it creates methods that change parameters inside block without direct access.
- get_text()[source]¶
The function gets text from QLineEdit of QComboBox.
- Returns
Selected text from QComboBox.
- Return type
str
- set_combo_list(lItems=None)[source]¶
Set up a list of QComboBox.
- Parameters
lItems (list) – A list of elements for QComboBox.
- Returns
None
- set_combo_width(iSize=300)[source]¶
Set up width of QComboBox.
- Parameters
iSize (int) – A number which point to width of QComboBox.
- Returns
None
- class mli.gui.dialog_elements.HLineEdit(sLabel='', iSize=300, oParent=None)[source]¶
Bases:
QHBoxLayout
Creates a block that units QLabel and QLineEdit. Also, it creates methods that change parameters inside block without direct access.
- get_text()[source]¶
The function gets text from QLineEdit.
- Returns
Selected text from QLineEdit.
- Return type
str
- set_label(sString='')[source]¶
Set up text into Label of block.
- Parameters
sString (str) – A string which needs to display as Label in the block.
- Returns
None
- class mli.gui.dialog_elements.VComboBox(sLabel='', iSize=300, oParent=None)[source]¶
Bases:
QVBoxLayout
Creates a block that units QLabel, QComboBox and QLineEdit. Also, it creates methods that change parameters inside block without direct access.
- get_text()[source]¶
The function gets text from QLineEdit of QComboBox.
- Returns
Selected text from QComboBox.
- Return type
str
- set_combo_list(lItems=None)[source]¶
Set up a list of QComboBox.
- Parameters
lItems (list) – A list of elements for QComboBox.
- set_combo_width(iSize=300)[source]¶
Set up width of QComboBox.
- Parameters
iSize (int) – A number which point to width of QComboBox.
- class mli.gui.dialog_elements.VLineEdit(sLabel='', iSize=300, oParent=None)[source]¶
Bases:
QVBoxLayout
Creates a block that units QLabel and QLineEdit. Also, it creates methods that change parameters inside block without direct access.
- get_text()[source]¶
The function gets text from QLineEdit.
- Returns
Selected text from QLineEdit.
- Return type
str
- set_label(sString='')[source]¶
Set up text into Label of block.
- Parameters
sString (str) – A string which needs to display as Label in the block.
- Returns
None
- class mli.gui.dialog_elements.VTextEdit(sLabel='', iSize=300, iHeight=120, oParent=None)[source]¶
Bases:
QVBoxLayout
Creates a block that units QLabel and QTextEdit. Also, it creates methods that change parameters inside block without direct access.
- get_text()[source]¶
The function gets text from QLineEdit of QTextEdit.
- Returns
Selected text from QTextEdit.
- Return type
str
- set_label(sString='')[source]¶
Set up text into Label of block.
- Parameters
sString (str) – A string which needs to display as Label in the block.
- Returns
None
mli.gui.file_dialogs module¶
mli.gui.help_dialog module¶
mli.gui.main_window module¶
- class mli.gui.main_window.MainWindow(sPath)[source]¶
Bases:
QMainWindow
- connect_actions()[source]¶
It is PyQt5 slots or other words is connecting from GUI element to method or function in program.
- onSetStatusBarMessage(sMassage='Ready')[source]¶
Method create Status Bar on main window of program GUI.
Method create Menu Bar on main window of program GUI.
mli.gui.message_box module¶
The module provides message boxes that give hints about incorrect user actions.
- Function:
- warning_no_synonyms(sName)warning_lat_name()warning_restart_app()warning_this_exist(sThis, sThisName)
- Using:
As an example, let’s show that the name of the taxon Cladonia, P. Browne already exists.
warning_this_exist('taxon name', 'Cladonia, P.Browne')
- mli.gui.message_box.warning_lat_name()[source]¶
Create a message dialog window with warning that a Latin name of taxon isn’t specified.
mli.gui.setting_dialog module¶
mli.gui.tab_widget module¶
mli.gui.taxon_dialogs module¶
- class mli.gui.taxon_dialogs.ATaxonDialog(oConnector, oParent=None)[source]¶
Bases:
ADialogApplyButtons
Creates abstract class that contain common elements for Dialogs of taxon.
- create_level_list(sTaxon='', bGetAll=None)[source]¶
Generates a list of taxon levels depending on a condition. At the first list initialization and using button Apply, all taxon levels are collected, at choosing Main taxon, only those that are below the selected taxon name.
- Parameters
sTaxon (str) – A name of main taxon.
bGetAll (bool) – It is needed to choose all levels.
- Returns
list of taxon levels.
- Return type
list[str]
- create_taxon_list()[source]¶
Creates a list of taxon names for further use in dialog elements.
- Returns
A list in form - (Taxon Rank) Taxon Name
- Type
list[str]
- fill_combobox()[source]¶
Fills the fields with the drop-down list during the first initialization and after applying the Apply button.
- class mli.gui.taxon_dialogs.EditSynonymDialog(oConnector, oParent=None)[source]¶
Bases:
ATaxonDialog
- class mli.gui.taxon_dialogs.EditTaxonDialog(oConnector, oParent=None)[source]¶
Bases:
ATaxonDialog