Menu

Commit [r1040]  Maximize  Restore  History

- Implemented hiding of Aspects.

- Reduced usage of child indices in AbstractAspect's API, in order to avoid
confusion about whether index counting includes hidden children; hopefully
the new methods make it very clear how children are counted (by virtue of
an IncludeHidden flag and a template argument for only counting children
inheriting from a particular class).

- Removed redundant AbstractAspect signals and rewrote others to avoid indices.

- Major changes to Table and TableModel:

Q: Why do we need those strange completeAspectInsertion() and
prepareAspectRemoval() anyway? Do we really have to bother everyone reading
the code with figuring out their relation to aspectAdded() and
aspectAboutToBeRemoved()?
A: They were needed in order to reconcile existing Table code with the new
idea of handling Columns as Aspect children of Table.

In other words, this was a hack. The real problem is that we implemented the
same functionality twice. I've come to see Table as a kind of specialized
container object for Aspects, somewhat similar to Folder. I.e., instead of
duplicating AbstractAspect's child management in Table, simply _define_ the
table's columns to be all AbstractAspect children inheriting from Column.
This should also further emphasize the columns-as-objects concept and
discourage usage of column indices where they can be avoided. This paradigm
shift is supplemented by the new template methods in AbstractAspects, which
can later also be used in our plotting engine (e.g., for managing the curves
in a graph - so we don't need to write any undo-aware management of curves/
text labels/lines/whatever).

So, the (drastic) solution I've come up with here consists of
- removing Table::Private, tablecommands and parts of Table
- moving handling of the column's signals (which were more or less duplicated
by Table signals) as well as management of header data to TableModel
- moving handling of column widths to Column

A point that's not yet clear to me is in what sense an empty table can/should
be said to have an attribute "number of rows". Possibly Table could remember
the result of rowCount() for the last non-empty state, although I don't think
this needs to be undo aware or persistent.

- Misc minor improvements, like const declarations.

knut_f 2009-02-06

<< < 1 2 (Page 2 of 2)
changed /trunk/qtfrontend/core/ProjectWindow.h
changed /trunk/qtfrontend/core/core.pro
changed /trunk/qtfrontend/core/main.cpp
changed /trunk/qtfrontend/graph3D/Graph3D.cpp
changed /trunk/qtfrontend/graph3D/Graph3D.h
changed /trunk/qtfrontend/notes/Notes.cpp
changed /trunk/qtfrontend/notes/Notes.h
changed /trunk/qtfrontend/python/python.pro
changed /trunk/qtfrontend/table/TableModel.cpp
changed /trunk/qtfrontend/table/TableModel.h
changed /trunk/qtfrontend/table/TableView.cpp
changed /trunk/qtfrontend/table/TableView.h
changed /trunk/qtfrontend/table/table.pro
/trunk/qtfrontend/core/ProjectWindow.h Diff Switch to side-by-side view
Loading...
/trunk/qtfrontend/core/core.pro Diff Switch to side-by-side view
Loading...
/trunk/qtfrontend/core/main.cpp Diff Switch to side-by-side view
Loading...
/trunk/qtfrontend/graph3D/Graph3D.cpp Diff Switch to side-by-side view
Loading...
/trunk/qtfrontend/graph3D/Graph3D.h Diff Switch to side-by-side view
Loading...
/trunk/qtfrontend/notes/Notes.cpp Diff Switch to side-by-side view
Loading...
/trunk/qtfrontend/notes/Notes.h Diff Switch to side-by-side view
Loading...
/trunk/qtfrontend/python/python.pro Diff Switch to side-by-side view
Loading...
/trunk/qtfrontend/table/TableModel.cpp Diff Switch to side-by-side view
Loading...
/trunk/qtfrontend/table/TableModel.h Diff Switch to side-by-side view
Loading...
/trunk/qtfrontend/table/TableView.cpp Diff Switch to side-by-side view
Loading...
/trunk/qtfrontend/table/TableView.h Diff Switch to side-by-side view
Loading...
/trunk/qtfrontend/table/table.pro Diff Switch to side-by-side view
Loading...
<< < 1 2 (Page 2 of 2)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.