I've been doing a lot of experimental work in a branch-off-the-branch,
called "qt4-graphicsview".

I started on this because I was getting sick of trying to track down
the continuous-refresh bugs in the notation view.  Our change
notification and refresh code is terrible, and the changes in refresh
propagation from Qt3 to Qt4 along with our use of the Qt3 canvas
really weren't helping.

So, I thought, since we'd ultimately like to move away from Q3Canvas
anyway, why not take a shot at it now?  So that's what I'm doing.  I
started without fanfare just to see how far I would get in a short
space of time, but I think it looks promising enough that this branch
will end up being merged back to qt4 soon enough -- though there's a
way to go yet.

Here's the general plan:

 * (done) update the low-level note-drawing code (NotePixmapFactory
and the NoteFont classes, etc) to use Qt4 classes throughout --
QPixmap and QGraphicsItem.

 * (done) break the dependency between LinedStaff and the base class
Staff type, and rename the latter to something else (ViewSegment) to
reflect the fact that all it does is keep track of the relationship
between view elements and segment contents, it doesn't actually do any
layout.

 * (done) update the notation layout code so that it is capable of
positioning items correctly on a QGraphicsScene to be displayed on a
QGraphicsView

 * (doing) break up NotationView into three parts: NotationView, the
main widget with the action definitions; NotationWidget, the central
bit with the canvas, editing tools, rulers, headers, etc; and
NotationStaffManager (or something -- haven't made this one yet) which
deals with things like telling the staffs whereabouts they live

 * make NotationStaff capable of reporting to NotationStaffManager
when something in it has changed and getting itself re-layed-out right
away, without intervention and without any gross hacks fired off from
paintEvent methods

 * add all the tools and the tool box back in to NotationWidget (or
NotationView, think about this)

 * put the rulers (standard rulers &c, not control rulers at this point) back in

 * provide action implementations in NotationView (largely much as
before, one hopes)

 * having done the above without using the EditView base class, review
how much of the new logic is in common with EditView and/or should be
a new base class that replaces EditView (noting that EditView has
canvas dependencies and EditViewBase has the core of the rotten
refresh logic)

 * propagate all of this goodness to the MatrixView as well (shouldn't
be too complicated, once the notation view is done)

 * tidy up and merge back to qt4 branch

 * then worry about control rulers

This will result in what is still rather a degenerate use of
QGraphicsView (with very simple, dumb items and most of the editing
logic handled at the top level), but it should be a substantial
improvement over the old code.

With all this in mind, I would suggest not worrying too much about
tidying up or fixing bugs in the matrix or notation views on the qt4
branch at the moment, since there are big changes coming soon anyway.
(None of this will affect the main window or the other dialogs,
though, so there's still plenty of stuff that needs fixing.)

I can't easily merge back before the work has been extended to the
matrix view, because at the moment several significant classes exist
in two differently named versions in different files (one for notation
and one for the legacy matrix) and I don't want to start merging stuff
like that back in until I've had the opportunity to resolve them back
into single versions.


Chris

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to