Designer GUI
Note
The designer GUI requires the optional PyQt5 dependency
(pip install pyit2fls[gui]). It is not imported by import pyit2fls
when PyQt5 is not installed.
MainWindow
- class pyit2fls.MainWindow
Main window of the PyIT2FLS designer.
Members
variables : dict
The system’s input/output variables and terms, in the shared shape documented in
pyit2fls.FML.generate_system().rules : dict
The system’s rule base, in the same shared shape.
Notes
The window keeps
variables/rulesas its single source of truth; every widget (variable lists, MF tables, rule builder combo boxes, simulation sliders) is refreshed from that state rather than edited directly, so File > Open and File > New behave consistently with manual edits made through the tabs.
- pyit2fls.MainWindow._evaluate_system(self)
- pyit2fls.MainWindow._open_system(self)
- pyit2fls.MainWindow._save_system(self)
FormDialog
- class pyit2fls.FormDialog(parent, title, fields)
A small reusable modal dialog with one text field per entry in
fields, used for every “Add …” action in the designer.Parameters
parent : QWidget
Parent widget.
title : str
Dialog window title.
fields : list of tuple
Each tuple is
(key, label, default_text).keyis the name under which the field’s text is returned byvalues().
- pyit2fls.FormDialog.values(self)
Returns
{key: text}for every field, as entered by the user.