RPL Global User-defined Functions -- 4-9-2009 (2 of 2) http://cadswes2.colorado.edu/~philw/2009/GlobalRplFunctions/ In the four Rpl Editor Dialogs, manage a "Globe" icon in the upper right of the dialog, depending on the RplSet's new "isGlobal" flag, and toggle that flag from a toggle menu item in the RplSet editor, in the Set menu: [x] Functions Globally Accessible. Also, added RplObj Type icon to the upper left of the dialog, before the Name field. --------------------- QtRpl/RplDlgMgr.hpp --------------------- New RplEditType enum value: typedef enum { RPL_EDIT_NAME = 0, ... ... ... RPL_EDIT_EXPORT, RPL_EDIT_IS_GLOBAL <<< NEW } RplEditType; --------------------- QtRpl/RplBaseDlg.cpp QtRpl/RplBaseDlg.hpp --------------------- New Qt slot (signal handler): void isGlobalToggleHandler (bool); If the given toggle value is different from the RplSet's 'isGlobal' flag, then set that RplSet flag and call RplDlgMgr::updateDlgs (.., RplDlgMgr::RPL_EDIT_IS_GLOBAL). ------------------------------ QtRpl/RplBlockDlgWidgets.ui QtRpl/RplFunctionDlgWidgets.ui QtRpl/RplGroupDlgWidgets.ui QtRpl/RplSetDlgWidgets.ui ------------------------------ Added two labels (for icons) along the top of each of these Rpl dialogs. On Left: On Right: In the RplSet dialog only, added the following checkable action to the "Set" menu: QAction* _isGlobalToggleAction; ------------------------ QtRpl/RplBlockDlg.cpp QtRpl/RplFunctionDlg.cpp QtRpl/RplGroupDlg.cpp QtRpl/RplSetDlg.cpp ------------------------ Set the _rplObjTypeIconLabel label to the icon for the RplObj type. Set the _globalIconLabel label to the new "globe" icon, and conditionally show it in the update() method. void RplSetDlg::initConnections() Connect _isGlobalToggleAction's toggle signal to Qt slot: isGlobalToggleHandler(bool). ---