RPL Global User-defined Functions -- 4-19-2009 http://cadswes2.colorado.edu/~philw/2009/GlobalRplFunctions/ (1) Distinctions are made between Global RplFunctions (and containing RplObjs) which are local to the RplSet context (Green Globe), and _references_ to Global RplFunctions (...) in other RplSets (White Globe). (2) More complete handling of Globalness change notifications within Rpl GUI modules. ----------------- Rpl/RplGroup.cpp Rpl/RplSet.cpp ----------------- Completed override implementations: void RplSet::notifyRplGlobalChanged() void RplGroup::notifyRplGlobalChanged() These methods now iterate over (relevant) children and call this RplObj virtual method. (void RplObj::notifyRplGlobalChanged()). ------------------------ QtRpl/RplBlockDlg.cpp QtRpl/RplFunctionDlg.cpp QtRpl/RplGroupDlg.cpp QtRpl/RplSetDlg.cpp ------------------------ Added new RplSet parameter in calls to method: static const QPixmap& RplIcon::getGlobalObjIconIfGlobal ( const RplObj* rplObj, const RplSet* refRplSet=NULL); This causes the Green Globe Icon to be used instead of the Plain Globe Icon. The Green Globe icon now is used for locally defined globalness, and the Plain Globe is used for _references_ to Global RplObjs (in other RplSets). Also, in the RplSetDlg constructor, after adding the RplSetDlg to the RplDlgMgr, IF the dialog is for a Global RplSet, also call RplDlgMgr:: updateDlgs (... RplDlgMgr::RPL_EDIT_IS_GLOBAL). This causes the RplGroups and RplFunctions in a newly opened Global RplSet to appear in the RplDlgs of other RplSets. ------------------- QtRpl/RplDlgMgr.cpp ------------------- Modified processing of RPL_EDIT_IS_GLOBAL notifications. More updating is now implemented in response to that event. --------------------- QtRpl/RplListView.cpp QtRpl/RplListView.hpp --------------------- Global RplFunctions are now decorated in two different ways. (1) Global RplFunctions which are local to are shown with Green Globe icons. (2) Other RplFunctions (external to the local RplSet) are shown with Plain (white) Globe icons. The following changes were made to implement this: (1) RplList::RplQViewItems now retain a pointer to the parent RplListView. (2) New RplList::RplQViewItem methods: void updateRplObjIcon(); RplListView* parentRplListView() const { return _parentRplListView; } RplSet* topRplSet() const; (3) New RplList methods: RplObj* getTopRplObj() const; void updateGlobalStates(); ----------------------- QtRpl/RplPaletteDlg.cpp QtRpl/RplPaletteDlg.hpp ----------------------- Global RplFunctions are now decorated in two different ways. (1) Global RplFunctions which are local to the current RplSelection RplSet are shown with Green Globe icons. (2) Other RplFunctions (external to the current RplSelection) are shown with Plain (white) Globe icons. The following changes were made to implement this: (1) RplPaletteDlg::FunctionViewItems now retail a pointer to the parent RplPaletteDlg. (2) New RplPaletteDlg method: RplSet* selectionRplSet() const; // May be NULL ---