New generic mechanism added to ListSlot to retrieve, for items, by index: (1) an item string (for display). (2) an item icon (as a Sim/IconHandle) -- does not depend on QPixmap. These are implemented correctly via the ListSlotTraits class. ---------------- Sim/ListSlot.hpp Sim/ListSlot.cxx ---------------- New public ListSlotBase methods: virtual RWCString itemStr (int index, const char* dflt="") const = 0; virtual bool getItemIcon (int index, IconHandle& ret) const = 0; New public ListSlot methods: virtual RWCString itemStr (int index, const char* dflt="") const; virtual bool getItemIcon (int index, IconHandle& ret) const; Added 'const' variant of the private find(index) ListSlot method: bool find(int index, Iterator& iter); bool find(int index, ConstIterator& iter) const; <<< ADDED ----------------------- Sim/ListSlotTraits.hpp ----------------------- New public ListSlotTraits method: static bool toIcon (T const&, IconHandle&) { return false; } Implemented in: template <> class ListSlotTraits template <> class ListSlotTraits template <> class ListSlotTraits (1) static bool toIcon(Reservoir* const& obj, IconHandle& retIcon) (2) static bool toIcon(ControlPoint* const& obj, IconHandle& retIcon) (3) static bool toIcon(WaterAccount* const& obj, IconHandle& retIcon) Also, Null pointer checks added to the implementations of: static bool toStr (T const&, RWCString&): (1) static bool toStr(Reservoir* const& obj, RWCString& str) (2) static bool toStr(ControlPoint* const& obj, RWCString& str) (3) static bool toStr(WaterAccount* const& obj, RWCString& str) ----------------------- Sim/SlotGUIUtils.cpp ----------------------- RWCString SlotGUIUtils::getValueUsrStr(const Slot *slot, int row ..) now uses this new ListSlotBase method for ListSlots: RWCString ListSlotBase::itemStr (int index, const char* dflt="") ------------------ Sim/IconHandle.hpp ------------------ Remove 'const' from private data members (that was unnecessary) so that the implicit assignment operator can be used. This is needed for use of the IconHandle class with the ListSlot templated class. ---