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.MainWindow(settings, testDB)[source]

Bases: QMainWindow

Parameters:
actionSpreadsheet()[source]
Return type:

None

closeEvent(event)[source]
Return type:

None

connectEvents()[source]
Return type:

None

onButGenTest()[source]

Open a file Dialog so the export file may be choosen.

Return type:

None

onSelectionChanged(**args)[source]

Whenever the selection changes the total of selected points needs to be recalculated.

Return type:

None

openAboutDlg()[source]
Return type:

None

openDocumentation()[source]
Return type:

None

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

setIncludeCategoriesSetting()[source]
Return type:

None

setQVariantDefault(value)[source]
Return type:

None

Parameters:

value (int)

setSheetPath(sheet)[source]
Return type:

None

Parameters:

sheet (Path)

setStatus(status)[source]
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=onSelectionChanged()   #42 type=Slot, signature=toggleQuestionSelectionState()   #43 type=Slot, signature=onButGenTest()   #44 type=Slot, signature=actionSpreadsheet()   #45 type=Slot, signature=treeRefreshCategory(PyObject), parameters=PyObject   #46 type=Slot, signature=updateQuestionPreview()   #47 type=Slot, signature=openEqCheckerDlg()   #48 type=Slot, signature=openAboutDlg()   #49 type=Slot, signature=openDocumentation() )
toggleQuestionSelectionState(state)[source]
Return type:

None

treeRefreshCategory(cat)[source]

Append Category with its Questions to the treewidget.

Return type:

None

Parameters:

cat (Category)

updateLog(log)[source]
Return type:

None

updateQuestionPreview()[source]
Return type:

None

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:
run()[source]
Return type:

None

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": )
class excel2moodle.ui.dialogs.ExportDialog(parent)[source]

Bases: QDialog

property exportFile: Path
getExportFile()[source]
Return type:

None

staticMetaObject = PySide6.QtCore.QMetaObject("ExportDialog" inherits "QDialog": )
class excel2moodle.ui.dialogs.QuestionPreview(parent)[source]

Bases: object

setAnswers()[source]
Return type:

None

setPicture()[source]
Return type:

None

setText()[source]
Return type:

None

setupQuestion(question)[source]
Return type:

None

Parameters:

question (Question)

class excel2moodle.ui.dialogs.QuestionVariantDialog(parent, question)[source]

Bases: QDialog

Parameters:

question (Question)

property categoryWide
staticMetaObject = PySide6.QtCore.QMetaObject("QuestionVariantDialog" inherits "QDialog": )
property variant

excel2moodle.ui.treewidget module

class excel2moodle.ui.treewidget.CategoryItem(parent, category)[source]

Bases: QTreeWidgetItem

Parameters:

category (Category)

getCategory()[source]
Return type:

Category

getMaxVariants()[source]
Return type:

int

iterateChildren()[source]
class excel2moodle.ui.treewidget.QuestionItem(parent, question)[source]

Bases: QTreeWidgetItem

Parameters:

question (Question | ParametricQuestion)

getQuestion()[source]

Return the question Object the QTreeWidgetItem represents.

Return type:

Question | ParametricQuestion

excel2moodle.ui.equationChecker module

class excel2moodle.ui.equationChecker.EqCheckerWindow[source]

Bases: QWidget

setup(question)[source]
Return type:

None

Parameters:

question (ParametricQuestion)

staticMetaObject = PySide6.QtCore.QMetaObject("EqCheckerWindow" inherits "QWidget": )
updateCalculation()[source]
Return type:

None