Initialize Target Account List Slots Dialog / mockup version SEE: http://cadswes2.colorado.edu/~philw/2010/Accounting/InitAcctListSlots/ ------------------------------------------ QtAccounting/Make.package QtAccounting/QtAccounting.pro QtAccounting/QtAccounting.vcproj QtAccounting/QtAccountingGenerated.pro QtAccounting/QtAccountingGenerated.vcproj ------------------------------------------ Added "Initialize Target Account List Slots Dialog" to builds ... ------------------------------------------- QtAccounting/InitAccountListSlotsDlg.cpp QtAccounting/InitAccountListSlotsDlg.hpp QtAccounting/InitAccountListSlotsWidgets.ui ------------------------------------------- New Dialog: Initialize Account List Slot on Objects SEE: http://cadswes2.colorado.edu/~philw/2010/Accounting/InitAcctListSlots/ Given a list of Simulation Objects, this dialog will allow the user to populate a specified Account List Slot on each of those objects with a single Account on the object which matches either a given Account Name or a selected Water Type. ------------------------------ Q3GUI/MultiObjMethSelector.cpp Q3GUI/MultiObjMethSelector.hpp ------------------------------ Mockup test hook, hidden in Test menu. To show Test menu, change this value at the head of MultiObjMethSelector.cpp: static const bool SHOW_TEST_MENU (false); ============== Short Description: Crash Fix: Multi-Obj Method Selector, on Object Deletion Bug Number: n/a Release notes (y/n): no (crash was only in new development). For Release Nums: 5.3 --------------------------------- Q3GUI/MultiObjMethObjListView.cpp --------------------------------- CRASH FIX (for a crash that was occuring in RiverWare 5.3 only. Not 5.2). The crash was a result of recent Qt4 porting of the MOMS dialog. // Called from MultiObjMethObjListViewItem (a QTreeWidgetItem) void MultiObjMethObjListView::objItemDeleted (MultiObjMethObjListViewItem* item) // Don't Delete the Item! The item is deleted by the caller. //-- // Delete the Item! //-- delete (item); ---------------------------------------- QtAccounting/InitAccountListSlotsDlg.cpp QtAccounting/InitAccountListSlotsDlg.hpp Q3GUI/MultiObjMethSelector.cpp ---------------------------------------- Maintenance of a SimObj list, with callbacks registered on those objects, and support for SimObj deletion (which the dialog is shown). New data members: QList _simObjList; QMap _simObjCallbackMap; New methods: void setSimObjList (const QList& newSimObjList); void refreshSimObjCallbacks(); void deleteSimObjCallbacks(); void addSimObjCallback (SimObj*); void deleteSimObjCallback (SimObj*); int simObjCallbackHandler (CallbackType, CallbackData*, void* clientDat); ============== ---------------------------------------- QtAccounting/InitAccountListSlotsDlg.hpp QtAccounting/InitAccountListSlotsDlg.cpp ---------------------------------------- (1) Implemented analysis, reporting and appropriate enabling of widgets with respect to the validity of the inputs, vis-a-vis ... (a) objects not having an account with the specified name. (b) objects not having an account of the specified water type. (c) objects having more than one account of the specified water type. (2) Implemented option to automatically create Accounts on Objects which lack an Account of the specified name. For each such Object, an Account of the first Account Type among the following three which are supported on that particular Object: (a) storage account (b) diversion account (c) passthrough account. *** We need to confirm that that Account creation algorithm (i.e. picking the Account type) is correct. New Methods: static int acctsWithWaterType (const SimObj*, const RWCString& waterType); static Account* createMissingAcct (SimObj*, const RWCString& acctName); QList simObjsMissingAcctName() const; QList simObjsMissingWaterType() const; QList simObjsExcessWaterType() const; New Qt Slots (signal handlers): void setByButGroup_buttonClicked (int id); void oneAcctOnlyCheckBox_toggled (bool); void accountNameLineEdit_textEdited (const QString&); void waterTypeComboBox_activated (const QString&); void createAcctsButton_clicked(); ---