Rob Oakes wrote:
Dear LyX Developers,

Attached you will find a patch that adds a basic, Scrivener
(http://www.literatureandlatte.com/scrivener.html) like corkboard to LyX.
If interested more information about what specific features I would like to
implement can be found at my website
(http://www.oak-tree.us/blog/index.php/2009/03/04/perfect-tool).  You can
also find a (somewhat) working prototype that I started as a playground in
PyQt
(http://www.oak-tree.us/blog/index.php/science-and-technology/lyx-outline)
.

This patch adds three classes to the existing LyX-Codebase:

Hi Rob,

This looks like a very substancial and interesting addition to LyX. Thank you for that and welcome on board!

I've skimmed very briefly over the patch. Some initial comments, please don't be scared about them, peer review is the normal process in this list:

1) Please try to stick to LyX coding rules (see trunk/development/coding)

2) Your code seems quite well documented in the cpp files but not in the headers. Please try to document the different classes and their methods using doxygen tags. This will help us understanding what is doing what. I know that we don't follow this rules in all the source code but for new code this is close to mandatory I'd say.

3) Try to split some of your big methods in smaller ones. As a basic rule a method with more than 30 lines of code and 3 level of indentation is harder to digest.

I'm sure you'll receive some other comments from fellow LyXers, I will personally try your patch over the week-end.

Cheers,
Abdel.



1.) Corkboard.h/Corkboard.cpp - A QAbstractItemView that displays the items
of the TocModel as index cards.  While stub methods have been developed for
drag and drop reordering of the cards, these have not yet been implemented.
2.) CorkboardWidget.h/CokboardWidget.cpp - Parent widget and supporting code
that holds the QAbstractItemView (Corkboard.cpp) and connects the Cokboard
to the proper model.
3.) CorkboardManager.h/CorkboardManager.cpp - Supporting class to Corkboard
that acts as a controller in the Model/Controller/View architecture.
Largely, this is a stud class that will probably hold code related to drag
and drop/editing of cards; though none of these features have been
implemented yet.
4.) GuiCorkboard.h/GuiCorkboard.cpp - Dashboard widget that loads and
displays the other widgets and views.
5.) Also attached are two graphics files: Corkboard.png, which is the
background of the corkboard view, and ViewCorkboard.png which is it's UI
icon.

At present, it is possible the corkboard successfully shows the contents of
the tocmodel "tableofcontents."  Some of the methods necessary for drag and
drop are also present, but support for reordering of sections has not yet
been implemented.

I look forward to hearing the community's comments on the code as well as
any feedback regarding it's architecture/implementation.  I am a *very*
novice C++ developer, and while the code appears to work, it is not the most
... elegant ... I've ever seen.  I also have a number of questions regarding
how best to implement several features, but that is probably the subject of
a separate e-mail.

Cheers,

Rob Oakes

Reply via email to