]> git.lyx.org Git - features.git/commit
Cleanup of the Toc model and controller: The objective is to let the View (TocWidget...
authorAbdelrazak Younes <younes@lyx.org>
Fri, 16 Mar 2007 14:14:55 +0000 (14:14 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 16 Mar 2007 14:14:55 +0000 (14:14 +0000)
commit61dde5d7976b37b22c5ceac63fc168c3afedfabf
treed8830e5b266d1c735b139eb50187dce0d13d09c8
parent8a856a23796f8e90d1b4160b3ae13dfbb13f84c4
Cleanup of the Toc model and controller: The objective is to let the View (TocWidget) decide which kind of list it want to show. The type given by InsetCommandParam() (as read by the controller (ControlToc) then just becomes a hint to the View. Most of the commit is about getting rid of the controller maintained list of types.

* TocBackend
  - addType(), types_, types(): deleted.

* ControlToc
  - tocs(): new
  - selectedType(): access to selected_type_
  - initialiseParams(): transfer code from QToc::update() and look for selected type.
  - getTypes(), getContents(): deleted

* QToc: do not maintain current type. Get the info from the View.
  - setTocModel(): deleted

* TocWidget: always pass the currently selected type to the model/controller.
  - setTocModel(): new slot.
  - updateGui(): transfer code to setTocModel().

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17455 a592a061-630c-0410-9148-cb99ea01b6c8
src/TocBackend.C
src/TocBackend.h
src/frontends/controllers/ControlToc.C
src/frontends/controllers/ControlToc.h
src/frontends/qt4/QToc.C
src/frontends/qt4/QToc.h
src/frontends/qt4/TocWidget.C
src/frontends/qt4/TocWidget.h