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.

connect_actions_button()[source]

The method of linking signals and button slots.

init_UI_button_block()[source]

Creates a block of buttons for further use in child dialog classes.

onCancel()[source]

The method closes the dialog without saving the data.

onClickApply()[source]

Reserves the Apply dialog button method for future use.

onClickOk()[source]

The method saves the data and closes the dialog In order for the data to be saved, you must override the method onClickApply.

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.

clear_list()[source]

Clean up a list of QComboBox.

Returns

None

get_text()[source]

The function gets text from QLineEdit of QComboBox.

Returns

Selected text from QComboBox.

Return type

str

get_widget()[source]
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

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

set_text(sString='')[source]

Set up text into QLineEdit of the block.

Parameters

sString (str) – A string which display by default in QLineEdit.

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

set_line_width(iSize=300)[source]

Set up width of QLineEdit.

Parameters

iSize (int) – A number which point to width of QComboBox.

Returns

None

set_text(sString='')[source]

Set up text into QLineEdit of the block.

Parameters

sString (str) – A string which display by default in QLineEdit.

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.

clear_list()[source]

Clean up a list of QComboBox.

get_text()[source]

The function gets text from QLineEdit of QComboBox.

Returns

Selected text from QComboBox.

Return type

str

get_widget()[source]
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.

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.

set_text(sString='')[source]

Set up text into QLineEdit of the block.

Parameters

sString (str) – A string which display by default in QLineEdit.

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

set_line_width(iSize=300)[source]

Set up width of QLineEdit.

Parameters

iSize (int) – A number which point to width of QComboBox.

Returns

None

set_text(sString='')[source]

Set up text into QLineEdit of the block.

Parameters

sString (str) – A string which display by default in QLineEdit.

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.

clear_text()[source]

The function clears QTextEdit failed.

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

set_text(sString='')[source]

Set up text into QTextEdit of the block.

Parameters

sString (str) – A string which display by default in QTextEdit.

Returns

None

set_textedit_size(iWidth=300, iHeight=120)[source]

Set up width of QTextEdit.

Parameters
  • iWidth (int) – A number which point to width of QTextEdit.

  • iHeight (int) – A number which point to height of QTextEdit.

Returns

None

mli.gui.file_dialogs module

class mli.gui.file_dialogs.OpenDirDialog(oParent=None, sNameDialog='Dialog')[source]

Bases: QFileDialog

exec(self) int[source]
set_dialog()[source]
class mli.gui.file_dialogs.OpenFileDialog(oParent=None, dParameter={})[source]

Bases: QFileDialog

exec(self) int[source]

mli.gui.help_dialog module

class mli.gui.help_dialog.About(oWidget)[source]

Bases: QMessageBox

set_dialog()[source]

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.

create_actions()[source]

Method collect all actions which can do from GUI of program.

get_page_taxon_info(sTaxonName)[source]
get_taxon_list()[source]
onDisplayAbout()[source]

Method open dialog window with information about the program.

onEditColor()[source]
onEditColorTaxon()[source]
onEditSubstrate()[source]
onEditSynonym()[source]
onEditTaxon()[source]
onNewColor()[source]
onNewColorTaxon()[source]
onNewSubstrate()[source]
onNewTaxon()[source]
onOpenDB()[source]
onOpenSetting()[source]
onSetStatusBarMessage(sMassage='Ready')[source]

Method create Status Bar on main window of program GUI.

onTaxonInfo()[source]
set_menu_bar()[source]

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.message_box.warning_no_synonyms(sName)[source]
mli.gui.message_box.warning_restart_app()[source]

Create a message dialog window with warning that app should be restarted.

mli.gui.message_box.warning_this_exist(sThis, sThisName)[source]

Create a dialog window of the message with warning that this exists.

Parameters
  • sThis (str) – A stuff which trying to add.

  • sThisName (str) – The name of stuff which trying to add.

mli.gui.setting_dialog module

class mli.gui.setting_dialog.SettingDialog(oConnector, sPathApp, oParent=None)[source]

Bases: ADialogApplyButtons

connect_actions()[source]
init_UI()[source]
onClickApply()[source]

Reserves the Apply dialog button method for future use.

onClickOpenFile()[source]

mli.gui.tab_widget module

class mli.gui.tab_widget.CentralTabWidget(oParent)[source]

Bases: QTabWidget

add_tab(oWidget=None, sName='')[source]
connect_actions()[source]
onCloseTab(index)[source]
update_tab_name(iTabIndex=0, sTabName='Table 1')[source]

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.

clean_field()[source]

Clears all fields after use.

connect_actions()[source]

Connects buttons with actions they should perform.

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_status_list()[source]

Creates a list of statuses.

Returns

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.

fill_form(sSciName)[source]
init_UI()[source]

initiating a dialog view

onClickApply()[source]

Reserves the Apply dialog button method for future use.

onCurrentMainTaxonChanged(sTaxon='')[source]

The slot that should fire after the taxon name in the Main taxon drop-down list.

Parameters

sTaxon (str) – A name of main taxon.

save_(sSetCol, sUpdate, sWhere, sTable='Taxa', sWhereCol='taxonID')[source]
class mli.gui.taxon_dialogs.EditSynonymDialog(oConnector, oParent=None)[source]

Bases: ATaxonDialog

connect_actions()[source]

Connects buttons with actions they should perform.

init_UI()[source]

Creating a dialog window.

onCurrentSynonymChanged(sSynonym)[source]
onCurrentTaxonNamesChanged(sTaxonName)[source]
class mli.gui.taxon_dialogs.EditTaxonDialog(oConnector, oParent=None)[source]

Bases: ATaxonDialog

connect_actions()[source]

Connects buttons with actions they should perform.

init_UI()[source]

Creating a dialog window.

onCurrentTaxonNamesChanged(sTaxonName)[source]
class mli.gui.taxon_dialogs.NewTaxonDialog(oConnector, oParent=None)[source]

Bases: ATaxonDialog

Dialog window which adds information on new taxon.

init_UI()[source]

Creating a dialog window.

onClickApply()[source]

Actions to be taken when adding a new taxon.

Module contents