June 17, 2011 Short Description: Accounting View: Tooltips and Status Bar Enhancements Bug Number: n/a Release notes (y/n): Yes For Release Nums: 6.1 Accounting View: Tooltips and Status Bar include Account and Supply Attributes. SEE: https://cadswes2.colorado.edu/~philw/2011/AccountingMouseOvers/ ------------------------------ QtUtils/AccountingGfxScene.cpp ------------------------------ Option constant: static const bool SHOW_VERBOSE_TOOLTIPS_EVEN_FOR_MULTIPLE_SUPPLIES (true); Changes in method: QStringList suppliesToolTipStringList ( const QList& hitItems) const ------------------------------ QtUtils/SimulationGfxScene.cpp ------------------------------ Change in method, for account tooltip: QString toolTipString (QGraphicsSceneHelpEvent* evt) const ------------------------------ QtUtils/WorkspaceGfxView.cpp ------------------------------ Option constants: static const bool SHOW_VERBOSE_ACCOUNT_STATUS_MSG (true); static const bool SHOW_VERBOSE_SUPPLY_STATUS_MSG (true); Changes in method: QString WorkspaceGfxView::mouseStatusMessage ( const QPoint& pixelsPnt, int objRadius, // 0 == don't consider objects int linkRadius) const // 0 == don't consider links ------------------------------ QtUtils/AccountGfxItem.cpp QtUtils/AccountGfxItem.hpp ------------------------------ Option constant: static const bool SHOW_VERBOSE_TOOLTIPS_EVEN_FOR_MULTIPLE_ACCOUNTS (true); New methods (static and instance variants): static QString acctToolTipVerbose (const Account*, bool multiLine, bool onlyDefAttribs); QString acctToolTipVerbose (bool multiLine, bool onlyDefAttribs) const; ... the 'multiLine' parameter distinguishes between the tooltip and status bar formats. ... the 'onlyDefAttribs' parameter includes account attributes for which user-defined attribute values are defined (in the current RiverWare model; in the Accounting System Configuration dialog). ------------------------------ QtUtils/SupplyGfxItem.cpp QtUtils/SupplyGfxItem.hpp QtUtils/TransferGfxItem.cpp QtUtils/TransferGfxItem.hpp ------------------------------ New method (in each class): QString tipTextVerbose (bool multiLine, bool onlyDefAttribs) const; ... see parameter descriptions, above. ------------------------- Accounting/AccountMgr.hpp ------------------------- Added utility methods to assess the presence of user-defined account and supply attributes, without having to retrieve a whole list: int waterTypeCount() const { return _watertypes.size(); } int waterOwnerCount() const { return _waterowners.size(); } int releaseTypeCount() const { return _releasetypes.size(); } int destinationTypeCount() const { return _destinationtypes.size(); } ---