Phil Weinstein / 11-02-2011 Short Description: Open RplSet Usability Enhancements Bug Number: 5113 Release notes (y/n): Yes For Release Nums: 6.1 Gnats 5113: Policy Sets cannot be opened with "Reopen" if they have been closed in the session. See analysis and screenshots: https://cadswes2.colorado.edu/~philw/2011/bugs/5113/ Although menu items for the "Open" RplSets appear in the RiverWare Workspace Policy Menu (but not in the "Reopen" submenus), it can be difficult for the user to notice those items. In order to address this problem, the following two enhancements have been implemented: (1) An "Open Policy Sets:" label (disabled menu item) is now shown above the Policy Menu items for all existing Open RplSets. (2) Toolbar Buttons for the Open RplSets are now shown along the bottom of the Workspace Menu. Each button shows the icon for a RplSet. The name (or file path) of the button's RplSet is shown as a tool tip. Clicking the button brings up the RplSet Dialog for that RplSet. ----------------------- QtRpl/RplPolicyMenu.cpp ----------------------- Added an 'Open Policy Sets:' label item to the Workspace's 'Policy' menu above the open set items (bottom portion of that menu). (This has to be implemented, as a disabled menu item. It has a greyed-out appearance). Change in method: void RplPolicyMenu::buildPolicyMenu(); ------------------- Q3GUI/Workspace.hpp Q3GUI/Workspace.cpp ------------------- New Widgets to support dynamic management of the Open RplSet "Toolbar" buttons (along the bottom of the Workspace -- in the StatusBar). QWidget* _openRplSetButtonBox; QButtonGroup* _openRplSetButtonGroup; QList _openRplSetButtons; QList _openRplSetButRplSets; New methods: void rebuildOpenRplSetButtonBox(); ... called in response to RPL_SET_OPENED and RPL_SET_CLOSED callbacks ... from any of the three concrete RplSet Managers. New Qt slot (signal hander): void openRplSetButtonGroup_buttonClicked (int id); New callback handler. (Callback handlers had been in place for the RBS Ruleset Manager and the OptSet Manager. We needed one also for the Global RplSet Manager): int gblSetMgrCallbackHandler (CallbackType, CallbackData*, void*); Callback* _gblSetMgrCallback; -------------- Rpl/RplSet.hpp Rpl/RplSet.cpp -------------- Added public static method: static void preDeleteRemoveSet (RplSet*); This was needed in order to properly issue a RPL_SET_CLOSED callback from the RplSetMgr (manager base class) JUST BEFORE a RplSet is deleted. The problem was that the RplSet being closed (and deleted) was being removed from the static RplSet map only from the RplSet destructor, so clients receiving the RPL_SET_CLOSED callback weren't "noticing" that the doomed RplSet was going away. The processing in this new method is still also done in the RplSet destructor (safely) -- so it isn't actually a requirement to call this new method (preDeleteRemoveSet) when deleting a RplSet. But it IS called in the RplSetMgr method which issues the new RPL_SET_CLOSED callback. ----------------- Rpl/RplSetMgr.cpp ----------------- Method: RplSet* RplSetMgr::loadSet: Issues RPL_SET_OPENED callback. Method: RplSetMgr::addOpenSet (RplSet*) Issues RPL_SET_OPENED callback. Method: void RplSetMgr::closeSet(RplSet*) Issues RPL_SET_CLOSED callback. -------------------- Sim/CallbackType.hpp Sim/CallbackType.cpp -------------------- New callback types: RPL_SET_OPENED RPL_SET_CLOSED ---