From 42dfdcc3b1fcc67a4a893f935779e3caaaa1650d Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Rouby <pierre-antoine.rouby@inrae.fr> Date: Wed, 20 Sep 2023 15:32:04 +0200 Subject: [PATCH] doc: dev: Complete Model section. --- doc/dev/documentation.org | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/doc/dev/documentation.org b/doc/dev/documentation.org index 56b45032..0279790c 100644 --- a/doc/dev/documentation.org +++ b/doc/dev/documentation.org @@ -137,7 +137,7 @@ in {{{file(src/Solver)}}} (see section [[Solver]]). [fn:qt-mv] The Qt Model/View documentation web page: https://doc.qt.io/qt-5/model-view-programming.html -** TODO Model +** Model The model is a set of Python classes. In Pamhyr2, this classes must respect some constraint. Each model class must inherits @@ -258,7 +258,7 @@ other components are linked to one of these basic components. } #+end_src -*** TODO SQL +*** SQL The model must be export to a database file to create a study save file. This file use SQLite3[fn:sqlite] format and the extention @@ -403,8 +403,22 @@ of Bar (Listing [[sql-bar]] and [[sql-foo]]). [fn:sqlite] The SQLite web site: https://www.sqlite.org/index.html (last access 2023-09-20) -*** TODO List class -*** TODO Dict class +*** List class + +A abstract class PamhyrModelList is available and provide some of +basic methods for object list in Model. This abstract class implement +some classic action in View like: insert new object, delete object, +sort, move object up, move object down, and so on. An variant exists +for multiple list with same type of object, each sublist is called +tab, because in View, this kind of list si prensented in different +table PamhyrModelListWithTab. + +*** Dict class + +A abstract class PamhyrModelDict is available and provide some of +basic methods for object dictionary in Model. This class is like +PamhyrModelList but use a dictionary instead of list. + ** TODO View *** TODO UI file *** TODO Translate -- GitLab