Short Description: Qt4 Accounting View: Account QGraphicsItem Features Bug Number: n/a Release notes (y/n): no, not yet. For Release Nums: 6.1 (1) Account Items use the configured Font and Text Color. (But still to do: Account Region background color/pattern). (2) Isolated Mouse Events in the Account Row Graphics Item. (Preparation for Account Item reordering and context menu). (3) ToolTips and StatusBar Message implemented for Account Items. (4) Optimization: In child label items, use 'setPlainText' (making use of the "default" font and color set on the item) instead of 'setHtml'. -------------------------- QtUtils/AccountGfxItem.hpp QtUtils/AccountGfxItem.cpp -------------------------- New public methods: void updateAccountFont (const QFont&); void updateAccountTextColor (const QColor&); .. Cause an item update if the given property value differs from the .. item's current property value. New private methods: QFont getRwSceneFont() const; QColor getRwSceneTextColor() const; -------------------------- QtUtils/AcctRowGfxItem.hpp QtUtils/AcctRowGfxItem.cpp -------------------------- New public methods: void setAccountFont (const QFont&); void setAccountTextColor (const QColor&); QList getAccountGfxItems() const; int accountIndexAtScenePos (const QPointF&) const; Account* accountAtScenePos (const QPointF&) const; QFont getRwSceneFont() const; QColor getRwSceneTextColor() const; New protected methods: // virtual from QGraphicsItem virtual void contextMenuEvent (QGraphicsSceneContextMenuEvent*); virtual void mouseDoubleClickEvent (QGraphicsSceneMouseEvent*); virtual void mouseMoveEvent (QGraphicsSceneMouseEvent*); virtual void mousePressEvent (QGraphicsSceneMouseEvent*); virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent*); -------------------------- QtUtils/SimObjGfxItem.hpp QtUtils/SimObjGfxItem.cpp -------------------------- New SimObjGfxItem methods: void updateChildZValues(); Account* accountAtScenePos (const QPointF&) const; void showSimObjContextMenu (const QPoint& evtScreenPos); void showAcctContextMenu (Account*, const QPoint& evtScreenPos); // STUB New SimObjGfxItem::LabelItem data member: QBrush _bgBrush; // Qt::NoBrush: no background. New SimObjGfxItem::LabelItem methods: void setBgBrush (const QBrush&, bool doUpdate=true); virtual void paint (QPainter*, const QStyleOptionGraphicsItem*, QWidget* w=NULL); ---------------------------- QtUtils/WorkspaceGfxView.cpp ---------------------------- Enhancement to method: QString WorkspaceGfxView::mouseStatusMessage (..) .. to support status messages for Account Items. The "complete" Account .. name is shown in the status bar when hovering the mouse over an .. Account item. ------------------------------ QtUtils/SimulationGfxScene.cpp ------------------------------ Enhancement to method: QString SimulationGfxScene::toolTipString (..) .. to support tooltips for Account Items. Only the local Account name .. is shown (i.e. not the "complete" name which incluses the SimObj .. name). This is useful for when the Account name is truncated due .. to the limited width of Account items. -------------------------- Q3GUI/Workspace.cpp QtUtils/RwGraphicsView.cpp -------------------------- Minor: added to constructors: setAttribute (Qt::WA_AlwaysShowToolTips); .. this causes QToolTips to "work" even on widgets in non-active windows. (Note: at any given time, only one window is the "active" window). ---