excel2moodle.ui package — excel2moodle 0.3.4 documentation

# excel2moodle.ui package

Here is the relevant stuff for the UI

## Submodules

## excel2moodle.ui.appUi module

This Module 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 tho `pyside6-uic` command, which generates the python code from the `.ui` file

class excel2moodle.ui.appUi.EqCheckerWindow

  Bases: `QWidget`

  onButRunCheck(catN, qN)

    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)

  Bases: `QMainWindow`

  Parameters:

    - settings (Settings)

    - testDB (QuestionDB)

  closeEvent(self, event: PySide6.QtGui.QCloseEvent, /) → None
  connectEvents()
    Return type:

      `None`

  onAbout()
  onButGenTest()
    Return type:

      `None`

  onButOpenEqChecker()
  onButSpreadsheet()
  onParseAll()

    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`

  onSelectionChanged(item, col)

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

  onSheetPathChanged(sheet)
    Return type:

      `None`

    Parameters:

      sheet (Path)

  previewQ()
    Return type:

      `None`

  setIncludeCategoriesSetting()
  setStatus(status)
  staticMetaObject = PySide6.QtCore.QMetaObject("MainWindow" inherits "QMainWindow": Methods: #39 type=Slot, signature=onSheetPathChanged(PyObject), parameters=PyObject #40 type=Slot, signature=onAbout() #41 type=Slot, signature=onSelectionChanged() #42 type=Slot, signature=toggleQuestionSelectionState() #43 type=Slot, signature=onButGenTest() #44 type=Slot, signature=onButSpreadsheet() #45 type=Slot, signature=onParseAll() #46 type=Slot, signature=previewQ() #47 type=Slot, signature=onButOpenEqChecker() )
  toggleQuestionSelectionState(state)
  updateLog(log)
    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.QuestinoPreviewDialog(parent, question)

  Bases: `QDialog`

  Parameters:

    - parent (QWidget)

    - question (Question)

  setAnswers()
    Return type:

      `None`

  setPicture()
    Return type:

      `None`

  setText()
    Return type:

      `None`

  setupQuestion()
    Return type:

      `None`

  staticMetaObject = PySide6.QtCore.QMetaObject("QuestinoPreviewDialog" inherits "QDialog": )

class excel2moodle.ui.dialogs.QuestionVariantDialog(parent, question)

  Bases: `QDialog`

  Parameters:

    question (Question)

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

## excel2moodle.ui.questionPreviewDialog module

class excel2moodle.ui.questionPreviewDialog.Ui_QuestionPrevDialog

  Bases: `object`

  retranslateUi(QuestionPrevDialog)
  setupUi(QuestionPrevDialog)

## excel2moodle.ui.settings module

class excel2moodle.ui.settings.Settings

  Bases: `QSettings`

  ensureSettings()

    Makes sure all necessary settings are made

    if not yet inside the settings file, they will be appended

    Return type:

      `None`

  get(value, default=None)
  nfParserSet(setting, value)
    Return type:

      `None`

  parserGet(value, default=None, **kwargs)
  parserSet(setting, value)
    Return type:

      `None`

  set(setting, value)
  setSpreadsheet(sheet)
    Return type:

      `None`

    Parameters:

      sheet (Path)

  shPathChanged
  staticMetaObject = PySide6.QtCore.QMetaObject("Settings" inherits "QSettings": Methods: #4 type=Signal, signature=shPathChanged(PyObject), parameters=PyObject )
  testgenGet(value, default=None)
  testgenSet(setting, value)
    Return type:

      `None`

## excel2moodle.ui.treewidget module

class excel2moodle.ui.treewidget.CategoryItem(parent, category)

  Bases: `QTreeWidgetItem`

  Parameters:

    category (Category)

  getCategory()
    Return type:

      `Category`

  getMaxVariants()
    Return type:

      `int`

  iterateChildren()

class excel2moodle.ui.treewidget.QuestionItem(parent, question)

  Bases: `QTreeWidgetItem`

  Parameters:

    question (Question)

  getQuestion()
    Return type:

      `Question`

## excel2moodle.ui.variantDialog module

class excel2moodle.ui.variantDialog.Ui_Dialog

  Bases: `object`

  retranslateUi(Dialog)
  setupUi(Dialog)

## excel2moodle.ui.windowEquationChecker module

class excel2moodle.ui.windowEquationChecker.Ui_EquationChecker

  Bases: `object`

  retranslateUi(EquationChecker)
  setupUi(EquationChecker)

## excel2moodle.ui.windowMain module

class excel2moodle.ui.windowMain.Ui_MoodleTestGenerator

  Bases: `object`

  retranslateUi(MoodleTestGenerator)
  setupUi(MoodleTestGenerator)