kicad2ems.gui.document¶
The study's config with no window: what a config holds, as data, read and
written back.
StudyDocument.read(path) a config: the RF settings as the form has them
(runner.settings_values), the settings the form
has no field for (extra), each analysis's
[analysis.<name>] tables (the first, and the
rest of an analysis given several: a run
each), the tables of analyses not installed
here, and the study ([study]: what is asked,
who answers)
doc.write(path, ...) the settings, the analyses' tables and the
study written back (write_study: the last
two alone): the loaded config's comments and
order kept (runner.save_config),
what this machine cannot show (an analysis not
installed, a question no engine here answers,
an analysis's other tables) kept as it was
The window's form and panels are views of a document (setuptab.py,
winconfigs.py): they are filled from it when a config opens and give it their
values when it is saved. A program that edits a study without the window (the
KiCad plugin, a test) reads, changes and writes the same object. Nothing in
this module needs Qt.
- class kicad2ems.gui.document.StudyDocument(installed=None)[source]¶
A config as the window holds it: path the file (None: not saved yet) values the RF settings, as the form has them (the solver ticks included: runner.solver_ticks) extra the config's settings the form has no field for, passed on to the runs as they are tables {analysis: its first [analysis.<name>] table}, the board and folder made whole more {analysis: [its other tables]} of an analysis given several (a board's rails: a run each) others {analysis: table, or [tables]} of analyses not installed here: written back as they were study what is asked and who answers (core.study.Study) foreign the part of the study this machine cannot show (a question no engine here answers): written back as it was notes what reading it found to say (a setting not understood, the board not found) dirty changed since it was read or written `installed` is the analyses this machine has (their names): a table of another is kept in `others`; None takes kicad2ems's registry.- classmethod read(path, installed=None, questions=None)[source]¶
A config read. Its RF settings must be readable (an error raises); its study and analyses' tables are read leniently (a fault is a note, and leaves them empty). `questions`: the questions this machine has an engine for ({question: engines}); the rest of the study goes to `foreign`. None: every question of the study is shown.
- write(path, values=None, tables=None, study=None)[source]¶
Write the config to `path` (the file read is the template: its comments and order stay): the RF settings (values; None: the document's), then the study and the analyses' tables (write_study). The document then is that file, saved.
- write_study(path, tables=None, study=None)[source]¶
The study and the analyses' tables into the config at `path`, its other settings left as they are. tables: {analysis: table, or [tables] for one with several runs} as the window's panels give them now, paths relative to `path` (None: the document's); study: the study now (None: the document's).