lyx_mirror/lib/doc
Richard Heck d5d665482e This commit changes the way individual LyXModule's are represented, both internally and in the .lyx files. The earlier version represented them by their `descriptive name', e.g., "Endnote" or "Theorems (AMS)", these being the same names used in the UI. This was a mistake, as becomes readily apparent when one starts to think about translating these strings. The modules ought to be represented by their filename, without the extension, just as TextClass's are.
The changes that accomplish this part are in ModuleList.{h,cpp}, configure.py, and the *.module files themselves. This is a format change, and the lyx2lyx is in those files.

By itself, that change would not be major, except for the fact that we do not want the module to be represented in the UI by its filename---e.g., theorems-std---but rather by a descriptive name, such as "Theorems". But that change turns out to be wholly non-trivial. The mechanism for choosing modules was the same as---indeed, was borrowed from---that in GuiCitation: You get a list of modules, and choosing them involves moving strings from one QListView to another. The models underlying these views are just QStringListModels, which means that, when you want to know what modules have been selected, you see what strings are in the "selected" QListView. But these are just the descriptive names, and we can't look up a module by its descriptive name if it's been translated. That, indeed, was the whole point of the change to the new representation.

So, we need a more complicated model underlying the QListView, one that will pair an identifying string---the filename minus the extension, in this case---with each item. This turns out not to be terribly difficult, though it took rather a while for me to understand why it's not difficult. There are two parts:
(i)  GuiSelectionManger gets re-written to use any QAbstractListModel, not just a QStringListModel. This actually seems to improve the code, independently.
(ii) We then subclass QAbstractListModel to get the associated ID string, using the Qt::UserRole slot associated with each item to store its ID. This would be almost completely trivial if QAbstractListItem::itemData() included the QVariant associated with this role, but it doesn't, so there are some additional hoops through which to jump.

The new model, a GuiIdListModel, is defined in the files by that name. The changes in GuiSelectionManger.{h,cpp} make it more abstract; the changes in GuiDocument.{h,cpp} adapt it to the new framework. 

I've also updated the module documenation to accord with this change.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22501 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-12 04:28:12 +00:00
..
biblio UserGuide.lyx updates: - Finish the descriptions of the bibliography and the document settings dialog 2007-08-11 01:20:33 +00:00
clipart lib/doc/clipart: Add two new images for the Userguide 2007-08-13 01:35:48 +00:00
cs In last commit I wrote: 2007-09-28 01:02:12 +00:00
da Update documentation to latest file format (for 1.5.0 release) 2007-07-24 17:39:27 +00:00
de UserGuide.lyx: add a paragraph how to dissolve insets, fixes bug 3687 2008-01-11 23:39:18 +00:00
es UserGuide.lyx: add a paragraph how to dissolve insets, fixes bug 3687 2008-01-11 23:39:18 +00:00
eu all UserGuides: fix the broken character "DOTTLESS J WITH HAT", according to r20730 2007-10-06 17:05:17 +00:00
fr UserGuide.lyx: add a paragraph how to dissolve insets, fixes bug 3687 2008-01-11 23:39:18 +00:00
gl xpm -> png 2007-08-30 20:09:12 +00:00
he In last commit I wrote: 2007-09-28 01:02:12 +00:00
hu Hungarian translation updates by Szöke 2007-10-03 21:14:22 +00:00
it Italian UserGuide.lyx: revert wrong translation in last commit 2007-10-06 17:12:33 +00:00
nb Update documentation to latest file format (for 1.5.0 release) 2007-07-24 17:39:27 +00:00
nl In last commit I wrote: 2007-09-28 01:02:12 +00:00
pl Extended manual: fix description of tex2lyx 2007-09-29 12:42:32 +00:00
pt In last commit I wrote: 2007-09-28 01:02:12 +00:00
ro Update documentation to latest file format (for 1.5.0 release) 2007-07-24 17:39:27 +00:00
ru In last commit I wrote: 2007-09-28 01:02:12 +00:00
sk In last commit I wrote: 2007-09-28 01:02:12 +00:00
sl In last commit I wrote: 2007-09-28 01:02:12 +00:00
sv In last commit I wrote: 2007-09-28 01:02:12 +00:00
Customization.lyx This commit changes the way individual LyXModule's are represented, both internally and in the .lyx files. The earlier version represented them by their `descriptive name', e.g., "Endnote" or "Theorems (AMS)", these being the same names used in the UI. This was a mistake, as becomes readily apparent when one starts to think about translating these strings. The modules ought to be represented by their filename, without the extension, just as TextClass's are. 2008-01-12 04:28:12 +00:00
depend.py doc_toc.py: add comment to explain its calling syntax (fixes bug 3798 2007-07-18 19:45:11 +00:00
doc_toc.py Further cleanup, remove encoding since we now use utf-8 for all languages 2007-09-11 09:43:44 +00:00
DocStyle.lyx Update documentation to latest file format (for 1.5.0 release) 2007-07-24 17:39:27 +00:00
DummyDocument1.lyx documentation: apply the last cleanups also to the other languages 2007-08-14 23:09:56 +00:00
DummyDocument2.lyx documentation: apply the last cleanups also to the other languages 2007-08-14 23:09:56 +00:00
DummyTextDocument.txt EmbeddedObjects.lyx: 2007-03-18 03:27:19 +00:00
EmbeddedObjects.lyx - EmbeddedObjects.lyx: typo 2007-12-22 18:49:09 +00:00
Extended.lyx Extended.lyx: remove some Linux-only path descriptions 2007-10-30 21:26:01 +00:00
FAQ.lyx Update documentation to latest file format (for 1.5.0 release) 2007-07-24 17:39:27 +00:00
Intro.lyx Intro.lyx: change some sentences as proposed on the docs list by Jeff Barnes 2007-12-21 20:41:59 +00:00
LaTeXConfig.lyx typo. 2008-01-11 18:34:21 +00:00
Makefile.am * lib/doc/Makefile.am: 2007-12-12 09:39:08 +00:00
Makefile.depend big French manual update: 2007-11-12 22:34:10 +00:00
README.Documentation add missing doc files and update makefile 2004-06-02 13:40:06 +00:00
Reference.lyx Update documentation to latest file format (for 1.5.0 release) 2007-07-24 17:39:27 +00:00
Shortcuts.lyx remove the manifest section from two doc files 2007-11-01 16:50:51 +00:00
Tutorial.lyx - LaTeXConfig.lyx: Japanese class updates by Koji 2007-12-18 21:35:23 +00:00
UserGuide.lyx UserGuide.lyx: add a paragraph how to dissolve insets, fixes bug 3687 2008-01-11 23:39:18 +00:00

README.Documentation

by John Weiss [3/2000] jpweiss@idsi.net


================
Introduction

    The purpose of this file is *used* *to* *be* to provide a style
    sheet and helpful hints to those wishing to help with the
    LyX Documentation Project.  There's now a separate style-sheet for
    that.

    If you're actually looking for documentation, check out the "Help"
    menu.  Start by reading the Introduction.

================
Why a separate documentation project?  Can't the developers do it?

    In a word, no.  They're too busy adding features and squishing
    bugs.

    Also, g++ is far more forgiving of style changes than a human
    brain.  As long as the code is correct, g++ will happilly compile
    it, and compile it the same way from machine to machine.  Human
    brains are far less forgiving and far more individualized.  So,
    the documentation needs to all be in a uniform style, in addition
    to being grammatically correct and easily readable.  That's a
    pretty big undertaking - which is why I volunteered to
    administrate the docs back in 1997.  Since then, I've passed the
    duty of maintaining the docs on to others.

================
Helping Out

    If you'd like to contribute to the LyX Documentation Project,
    start by reading the file Intro.lyx.  It contains a description of
    the style of the documentation from a reader's perspective.  After
    that, read the LyX Documentation Style Sheet (DocStyle.lyx) and
    commit it to memory!


John Weiss
March, 2000