Short Description: Completed Adjust Values operation for the SCT. Bug Number: n/a Release notes (y/n): Yes For Release Nums: 5.3 SEE: http://cadswes2.colorado.edu/~philw/2010/SCT/AdjustValues/ (1) Integrated the existing Adjust Slot Values (parameters) dialog with the SCT operation. (That dialog had been developed for the Adjust Values operation in the standard Open Slot dialog). (2) Implemented mechanism to avoid applying the operation more than once to any Slot/Timestep value. (This is necessary because any SeriesSlot or TableSeriesSlot column can appear in an SCT more than once). (3) Implemented OPTION to show a results summary of the Adjust Values operation, with this text: XXX: Modified Values XXX: NaN Values (not modified) XXX: Read-Only Values XXX: Values with Different Unit [Shown only if non-zero] XXX: Redundant Values [Shown only if non-zero] XXX: Errors [Shown only if non-zero] ------------------------------ Q3GUI/AdjustSlotValsDlg.hpp Q3GUI/AdjustSlotValsDlg.cpp Q3GUI/AdjustSlotValsWidgets.ui Q3GUI/SlotQDlgTable.cpp ------------------------------ (1) Added Optionally-Shown "[X] Report results" checkbox (for client). ... used only by the SCT client -- not the Open Slot Dialog. The state of the "[X] Report results" checkbox persists during the RiverWare session. (2) Disable the OK button when the value is ZERO (no change -- in both modes). (This will need to be enhanced if we ever introduce a "SCALE" mode, where a value of 1.0 results in no change). (3) Optional widget (see 1) required a deferred dialog "adjust" operation. (200 msecs after dialog creation). Added parameter to AdjustSlotValsDlg constructor: ... bool showOptions -- shows additional controls, currently only the "[X] Report results" checkbox. New methods: bool reportRequested() const; // state of the "[X] Report results" checkbox. void sensitizeWidgets(); // Enable/Disable the "OK" Pushbutton. New private Qt slots (Signal handlers). void valueEdit_textEdited(); void delayedAdjust_timeout(); void okClicked(); void cancelClicked(); ------------------- QtSCT/SctDialog.hpp QtSCT/SctDialog.cpp ------------------- Moved SCT cell Visitor class declarations to header file, as internal classes (rather than just local classes in the C++ file): // Private Visitor Classes, SctDialog:: // class FlagSetter : public SctSlotTstepSet::ForEachFunction // class ValueSetter : public SctSlotTstepSet::ForEachFunction // class ValueAdjuster : public SctSlotTstepSet::ForEachFunction // class OutputValueClearer : public SctSlotTstepSet::ForEachFunction // class NoteSetter : public SctSlotTstepSet::ForEachFunction .. with enhancement to the ValueAdjuster class to support refraining from processing any given Slot/Timestep more than once ... New ValueAdjuster data members: private: const int _tstepCnt; // number of timesteps in SCT QMap _processedItems; public: int _alreadyProcCnt; New ValueAdjuster methods: virtual ~ValueAdjuster(); QString statusReport (bool allCounts) const; bool checkAndSetItemProcessed (int slotInx, int tstepInx); Added parameters (the last two) related to showing a results report popup dialog: void adjustValuesOnSlotTstepSet ( SctSlotTstepSet* stSet, bool doScale, // or absolute adjustment? unit_type unitType, // unit type, for absolute adj. double refVal, // _doScale: factor; else: offset bool reportResults, // show popup reporting results const QPoint* dlgPos = NULL); // position for report dlg -------------------------- QtSCT/SctModelData.hpp QtSCT/SctModelData.Sim.cpp -------------------------- Added method: SlotColRef getSlotColRef (int slotInx) const; ------------------------- QtSCT/SctSlotTstepSet.hpp QtSCT/SctSlotTstepSet.cpp ------------------------- Added methods: bool exactlyOneScaledUnit (ScaledUnitPtr& suPtrRet) const; bool hasOnlyScaledUnit (ScaledUnitPtr suPtr) const; ----------------- QtSCT/SctBmap.hpp ----------------- Added method: inline bool SctBmap::checkAndSetFast (int inx); ... used by the SCT's new Adjust Values operation to keep track of Slot/Timesteps which have already been processed. ================================== Short Description: Added bool operator< to RootColRef (aka SlotColRef). Bug Number: n/a Release notes (y/n): No For Release Nums: 5.3 ------------------ Sim/RootColRef.hpp Sim/RootColRef.cpp ------------------ Added comparison operator ("<") so that RootColRef (aka SlotColRef) can be used as a key in QMap. The is implemented using a new, somewhat "lighter weight" variation of QString RootColRef::getCompleteName() -- a method that doesn't also "stringify" the column label in multiple- column Slots. New RootColRef methods: bool operator< (const RootColRef& rhs) const; // expensive QString getRootCompleteName() const; // excludes column This addition is needed for the development of the "Adjust Values" operation in the SCT, in the mechanism which insures that no Slot/Timestep is adjusted more than once (since Slots can appear in an SCT more than once). ---