RiverWare Qt4 Porting, 2012 -- Lists, Tables and other major widgets
Qt4 Port: Display Group Editor / Display Group TreeView
Qt4 Port: Display Group Editor (Q3ListView -> QTreeWidget w/ custom drawing).
9-13-2012 / For Release Nums: 6.3
This is an item-based two-level QTreeWidget with these special requirements:
(1) Custom Drawn "Legend" column <<< IN A a QTreeWidget !!!
(2) Editable Name column (edit started with double-click).
(3) Application-implemented TOGGLE icon column (Red-X / Green-Check)
(4) Reorderable (2nd item level only). In port: with Up/Down Arrow Buttons
... with order assigned to data model's "priority" property.
The Custom Drawing is implemented with a light-weight QWidget subclass installed in "Legend" column cells within each "Group" (2nd level) QTreeWidgetItem. The "GroupLegendWidget" class implements the paintEvent() virtual method which creates a QPainter from itself (the QWidget) and calls back into its client QTreeWidgetItem to perform the custom painting. With the appropriate geometry management implemented, drawing fills the cell smoothly, with changes to the Legend column width. Pretty cool.
Other changes:
(1) Full removal of the use of the Qt3 Compatibility Library in:
Q3GUI/DispalyGroupDlg and Q3GUI/DisplayGroupListView.
// Prevent use of the Qt3 compatibility library
#undef QT3_SUPPORT
(2) [Sim] Display Group Classes: NAME passed in as const QString ref.
This was done to simplify the solution to a compatibility-library
removal issue.
Images prior to the port were put aside here (Qt3):
http://cadswes2.colorado.edu/~philw/2012/Qt4Port/DispGroupList/OrigImages/
--- (end) ---