excel2moodle.ui package
Here is the relevant stuff for the UI
Submodules
excel2moodle.ui.appUi module
AppUi holds the extended class mainWindow() and any other main Windows.
It needs to be seperated from windowMain.py
because that file will be changed by the
pyside6-uic
command, which generates the python code from the .ui
file
- class excel2moodle.ui.appUi.EqCheckerWindow[source]
Bases:
QWidget
- onButRunCheck(catN, qN)[source]
Is Triggered by the
Run Check now
Button and runs the Equation Check.- Return type:
None
- Parameters:
catN (int)
qN (int)
- staticMetaObject = PySide6.QtCore.QMetaObject("EqCheckerWindow" inherits "QWidget": )
- class excel2moodle.ui.appUi.MainWindow(settings, testDB)[source]
Bases:
QMainWindow
- Parameters:
settings (Settings)
testDB (QuestionDB)
- onSelectionChanged(**args)[source]
Whenever the selection changes the total of selected points needs to be recalculated.
- Return type:
None
- parseSpreadsheetAll()[source]
Event triggered by the Tools/Parse all Questions Event.
It parses all the Questions found in the spreadsheet and then refreshes the list of questions. If successful it prints out a list of all exported Questions
- Return type:
None
- staticMetaObject = PySide6.QtCore.QMetaObject("MainWindow" inherits "QMainWindow": Methods: #39 type=Slot, signature=setQVariantDefault() #40 type=Slot, signature=parseSpreadsheetAll() #41 type=Slot, signature=onSheetPathChanged(PyObject), parameters=PyObject #42 type=Slot, signature=onSelectionChanged() #43 type=Slot, signature=toggleQuestionSelectionState() #44 type=Slot, signature=onButGenTest() #45 type=Slot, signature=onButSpreadsheet() #46 type=Slot, signature=treeRefreshCategory(PyObject), parameters=PyObject #47 type=Slot, signature=openPreviewQuestionDlg() #48 type=Slot, signature=openEqCheckerDlg() #49 type=Slot, signature=openAboutDlg() )
- class excel2moodle.ui.appUi.ParseAllThread(questionDB, mainApp)[source]
Bases:
QRunnable
Parse the whole Spreadsheet. Start by reading the spreadsheet asynchron. When finished parse all Categories subsequently.
- Parameters:
questionDB (QuestionDB)
mainApp (MainWindow)
excel2moodle.ui.dialogs module
This Module hosts the various Dialog Classes, that can be shown from main Window.
- class excel2moodle.ui.dialogs.AboutDialog(parent)[source]
Bases:
QMessageBox
- Parameters:
parent (QWidget)
- staticMetaObject = PySide6.QtCore.QMetaObject("AboutDialog" inherits "QMessageBox": )
excel2moodle.ui.questionPreviewDialog module
excel2moodle.ui.settings module
Settings module provides the adjusted subclass of PySide6.QtCore.QSettings
.
- class excel2moodle.ui.settings.Settings[source]
Bases:
QSettings
Settings for Excel2moodle.
- get(key)[source]
Get the typesafe settings value.
- Parameters:
key (SettingsKey)
-
localSettings:
ClassVar
[dict
[str
,str
|float
|Path
]] = {}
- set(key, value, local=False)[source]
Set the setting to value.
- Parameters:
local (
bool
) – True saves local project specific settings. Defaults to False The local settings are meant to be set in the first sheetsettings
key (SettingsKey | str)
value (float | bool | Path | str)
- Return type:
None
- setSpreadsheet(sheet)[source]
Save spreadsheet path and emit the changed event.
- Return type:
None
- Parameters:
sheet (Path)
- shPathChanged
- staticMetaObject = PySide6.QtCore.QMetaObject("Settings" inherits "QSettings": Methods: #4 type=Signal, signature=shPathChanged(PyObject), parameters=PyObject )
- class excel2moodle.ui.settings.SettingsKey(_, place, typ, default)[source]
Bases:
StrEnum
Settings Keys are needed to always acess the correct Value.
As the QSettings settings are accesed via strings, which could easily gotten wrong. Further, this Enum defines, which type a setting has to be.
- CATEGORIESSHEET = 'categoriesDataSheet'
- INCLUDEINCATS = 'includeCats'
- LOGFILE = 'logfile'
- LOGLEVEL = 'loglevel'
- PARSERNF_TOLERANCE = 'tolerance'
- PICTUREFOLDER = 'pictureFolder'
- PICTURESUBFOLDER = 'imgSubFolder'
- POINTS = 'points'
- QUESTIONVARIANT = 'defaultQuestionVariant'
- SPREADSHEETFOLDER = 'spreadsheetFolder'
- VERSION = 'version'
- property default: str | int | float | Path | bool | None
Get default value for the key.
- property full: str
- property place: str