![]() |
VR-Forces 4.2 Class Documentation
|

Public Slots | |
| virtual void | validate () |
| virtual void | addOverlayDescriptor (DtOverlaySymbolDescriptor *desc) |
Public Slots inherited from DtPopupMenu | |
| virtual void | validate () |
| virtual void | featureActionManagerDestroyed () |
Public Member Functions | |
| DtTMCreateMenu (QWidget *parent, bool display=true) | |
| virtual | ~DtTMCreateMenu () |
| virtual void | setStartCreateSlot (DtEventController *controller, const char *slot) |
| Call this to set a new creation method for when an entity or overlay object wants to be created in a different manner. | |
Public Member Functions inherited from DtPopupMenu | |
| DtPopupMenu (QWidget *parent, bool display=true) | |
| In your override, if you want to create the menu for right click purposes but do not want the menu to be on the main menu bar, call the parent DtPopupMenu constructor with false as the display parameter. | |
| virtual | ~DtPopupMenu () |
| virtual bool | init (DtMainMenuType iType, DtMenuWidget *menu, QWidget *owner, int iPos=-1, int iID=-1) |
| Supply an id to identifiy this menu item or -1 to generate a unique id. | |
| virtual void | insertMenu (DtMenuWidget *menuWidget, int iPos=-1, int iID=-1) |
| virtual bool | setup (DtMenuWidget *menuWidget) |
| Called from init, sets up the menu items, connections and action groups. | |
| virtual int | id () const |
| virtual DtMenuItemType | typeFromAction (QAction *) |
| If this object contains the specified QAction, return the type it is. | |
| virtual DtMenuItemType | typeFromName (const QString &) |
| Returns the type from the menu item name. | |
| virtual QAction * | menuItemForType (DtMenuItemType iType) |
| Returns the QAction for this type (if this menu has it) | |
| virtual bool | hasType (DtMenuItemType iType) |
| Returns true if this menu contains the specified menu item type. | |
| virtual int | positionOfMenuItem (const DtPopupMenuItem &item) |
| Returns the position of the menu item in the ordered list. | |
| virtual int | positionOfMenuItem (DtMenuItemType iType) |
| virtual int | menuItemPositionOf (QAction *action) |
| Returns the true menu item position of the QAction. | |
| virtual DtMainMenuType | type () const |
| virtual void | setOwner (QWidget *owner) |
| Accessors for owner. | |
| virtual QWidget * | owner () const |
| virtual void | setEnableValidations (bool b) |
| Call to always make sure all menu items are enabled with b being set to false. | |
| virtual void | reconfigureMenu (QList< DtMenuItemType > &items, bool keep) |
| This will reconfigure the menu by either keeping or removing the items in the specified list. | |
| virtual void | seedActionGroups () |
| Goes through all the menu items and fills in the action groups list. | |
| virtual bool | attachMenu (const QString &title, DtPopupMenu *, int iIndex=-1) |
| This routine will add a DtPopupMenu as a sub menu to this menu. | |
| bool | initialized () const |
| DtFeatureActionManager * | featureActionManager () const |
| Accessors for featureActionManager. | |
| virtual void | setFeatureActionManager (DtFeatureActionManager *) |
| void | setAddFeatures (bool) |
| bool | addFeatures () const |
| virtual QString | shortcutFor (const QString &feature) const |
| Returns shortcut for specified feature. | |
| virtual void | addShortcut (const QString &feature, const QString &shortcut) |
| virtual void | replaceShortcut (const QString &feature, const QString &shortcut) |
| virtual bool | hasShortcutOverride (const QString &feature) const |
| virtual bool | hasShortcut (const QString &feature) const |
| virtual QString | iconFor (const QString &feature, QIcon::Mode mode=QIcon::Normal, QIcon::State=QIcon::Off, bool useDefault=false) |
| Returns icon for specified feature. If useDefault is true, finds default icon based on feature name. | |
| virtual QString | menuTextForAction (QAction *) |
| Returns text for the menu (or sub-menu) that contains the action. | |
| virtual QHash< DtMenuItemType, QAction * > & | actions () |
| virtual QList< QAction * > | menuActions () |
| virtual const QList < DtPopupMenu * > & | attachedMenus () const |
| virtual DtPopupMenuItem * | insertMenuItem (DtMenuItemType iPos, const QString &featureName, DtMenuItemType iType, QString text, QString toolTip=QString::null, QString accel=QString::null, bool addSeparator=false, bool toggle=false, bool isOn=false, const QString &objectName="") |
| The featureName in each of the inserts is a keyword that will be used to look up the feature in the featureActionManager for both shortcuts and icons. | |
| virtual DtPopupMenuItem * | insertMenuItem (DtMenuItemType iPos, DtMenuItemType iType, QString text, QString toolTip=QString::null, QString accel=QString::null, bool addSeparator=false, bool toggle=false, bool isOn=false, const QString &objectName="") |
| Call this version to not allow the item to be added to a user defined toolbar. | |
| virtual DtPopupMenuItem * | insertToggleMenuItem (DtMenuItemType iBefore, const QString &featureName, DtMenuItemType iType, QString text, QString toolTip=QString::null, QString accel=QString::null, bool addSeparator=false, bool isOn=false, const QString &objectName="") |
| Same as above except sets the myIsToggle flag to true which means that is will be an on/off menu item and rather than having the connection made to the "activated" signal, it will be made to the "toggled(bool)" signal. | |
| virtual DtPopupMenuItem * | insertToggleMenuItem (DtMenuItemType iBefore, DtMenuItemType iType, QString text, QString toolTip=QString::null, QString accel=QString::null, bool addSeparator=false, bool isOn=false, const QString &objectName="") |
| Call this version to not allow the item to be added to a user defined toolbar. | |
| virtual void | addMenuItemSeparator (DtMenuItemType iGroup) |
| Inserts a separator at the current create position for the specified group. | |
| virtual void | removeMenuItem (DtMenuItemType iType) |
| Removes the menu item of the specified type. If it's already created removes it immediately. | |
| virtual bool | removeMenuGroup (const QString &gr) |
| Removes the menu group and all sub-items from that group. | |
| virtual void | removeItemAtPosition (int iPos) |
| Removes the item at the specified position. | |
| virtual void | addIcon (DtMenuItemType iType, QString icon, QIcon::Mode mode=QIcon::Normal, QIcon::State=QIcon::Off) |
| Adds an icon to be added when the menu item is created. | |
| virtual void | removeIcon (DtMenuItemType iType, QIcon::Mode mode=(QIcon::Mode)-1, QIcon::State=QIcon::Off) |
| Removes an icon. If the menu item is created also removes it from the menu item. | |
| virtual void | addGroup (DtMenuItemType iToGroup, DtMenuItemType iGroup, int iPos, bool addSep=false) |
| Inserts the action group at the specified position to the specified group (use -1 to append at current position). | |
| virtual void | removeGroup (DtMenuItemType iGroup) |
| Removes group. | |
| virtual void | addMenu (DtMainMenuType, int iPos, bool addSep) |
| Inserts the menu at the specified position. | |
| virtual void | removeMenu (DtMainMenuType iGroup) |
| Removes group. | |
| virtual void | mappingMenu (DtPopupMenu *menu, int iFlags=0) |
| Call this routine if you want to map menu items. | |
| virtual void | mapMenuItem (DtMenuItemType iType, DtPopupMenu &popupMenu, int iPos=-1, bool addSeparator=false) |
| This will look at the target popup menu and take both the menu item definition and the validator map entry defined by the menu item type and add them to this menu. | |
| virtual void | setPosition (int iPos) |
| Sets the menu item position if inited. Removes then re-inserts. | |
| virtual bool | matchesName (QString name) |
| Returns true if the supplied name matches the menu name of this menu. Will take & into account. | |
| virtual DtMenuItemType | uniqueId () const |
| Returns a unique id for this menu (max + 1) | |
| virtual QAction * | addMenuItem (DtMenuItemType &retId, const QString &featureName, const QString &item, const QString &addToMenu, bool toggle=false, QObject *actionReceiver=NULL, const char *action=NULL, QObject *validationReceiver=NULL, const char *validation=NULL, const QString &tooltip=QString::null, const QString &accelerator=QString::null, bool addSep=false) |
| Adds a new menu item given the menu item, path to add, action and validator. | |
| virtual void | appendMenuValidator (DtMenuItemType iType, QObject *vCall, const char *validator) |
| Adds the specified validator to a list of validators that can be called for the menu item. | |
| virtual void | appendMenuValidator (const QString &menu, QObject *vCall, const char *validator) |
| virtual bool | removeMenuItem (const QString &item) |
| Removes the named menu item from the menu. | |
| virtual void | setupFrom (DtMainMenuType iType, DtPopupMenu *, QWidget *, DtMenuWidget *w) |
| Copies menu item information without creating the menu. | |
| virtual void | renameMenuItem (DtMenuItemType iType, QString text=QString::null, QString toolTip=QString::null, QString accel=QString::null) |
| Useful routines for subclasses of existing menus to rename/override default functionality. | |
| virtual void | positionBefore (DtMenuItemType iType, DtMenuItemType iBefore) |
| Repositioning of menu items. | |
| virtual void | positionAfter (DtMenuItemType iType, DtMenuItemType iAfter) |
| virtual void | addActionAndValidatorForType (DtMenuItemType iType, QObject *aCall, const char *action, QObject *vCall=NULL, const char *validator=NULL) |
| Adds a new action/validator pair. | |
| virtual void | addActionForType (DtMenuItemType iType, QObject *aCall, const char *action) |
| virtual void | addValidatorForType (DtMenuItemType iType, QObject *vCall, const char *validator) |
| virtual void | addGlobalActionAndValidatorForType (DtMenuItemType iType, QObject *aCall, const char *action, QObject *vCall=NULL, const char *validator=NULL) |
| Replaces on a global level the action/validator pair for the specified type. | |
| virtual DtActionGroup * | actionGroupWithName (const QString &) const |
| Returns an action (or action group) with the specified name. | |
| virtual QAction * | actionWithName (const QString &) const |
| virtual void | clearMenuItems () |
| Frees memory associated with menu items. Do not call unless the menu is about to be destroyed. | |
| virtual void | removeFeatureActions () |
Static Public Member Functions | |
| static void | setOnlyValidWithTerrainDatabase (bool b) |
| static DtPopupMenu * | create (QWidget *parent, bool display=true) |
Protected Member Functions | |
| virtual QString | menuName () |
| Pure virtual overrides. | |
| virtual bool | initMenuItems () |
| Initializes and maps the following menu items. | |
| virtual bool | initActionGroups () |
| Creates myOverlayActionGroup. | |
| virtual void | preCreateMenuItems () |
| Calls loadOverlayMenu() | |
| virtual QAction * | addMenuItem (DtMenuItemType &retId, const QString &name, const QString &item, const QString &addToMenu, bool toggle, QObject *actionReceiver, char *action, QObject *validationReceiver, char *validation, const QString &accelerator, const QString &tooltip, bool addSep) |
| Override in order to do something special if the developer wants to add to any of the existing popup menus. | |
| virtual QAction * | addMenuItem (QMenu *menu, DtMenuItemType &retId, const QString &item, const QString &addToMenu, bool toggle, QObject *actionReceiver, char *action, QObject *validationReceiver, char *validation, const QString &accelerator, const QString &tooltip, bool addSep) |
| Special code branch for this menu to start adding items into the popup menu structure. | |
| virtual DtActionGroup * | getActionGroupForType (DtMenuItemType iType) |
| If the newly created menu item is to be added to an action group, add it here. | |
| virtual bool | createMenuItems () |
| virtual bool | buildOverlayMenu () |
| virtual bool | loadOverlayMenu () |
| virtual void | menuItemDestroyed (QAction *) |
| virtual void | actionGroupDestroyed (DtActionGroup *) |
| virtual QPixmap | createPixmap (const DtModelData &data, bool useInternal=false) |
| virtual void | attachMenuItems () |
| Override to specifically attach create menu items. | |
| virtual DtActionGroup * | addOverlayMenuItem (DtOverlaySymbolDescriptor *desc, DtCreateObjectAction **newAct=NULL) |
| Returns the action group the new item was added to. | |
| virtual DtTMMapArea * | mapArea () const |
| Returns the currently active map area assuming owner is of type DtBaseWindow. | |
| virtual void | updateMenuItems () |
| Redo menu icons based on symbol map changes. | |
| virtual DtModelData * | dataFromKey (const DtEntityMapperKey &key) |
| virtual void | enableCreateItems (bool b) |
| Enables/disables create items that were created as part of this menu (typically from vrf.ent file) | |
Protected Member Functions inherited from DtPopupMenu | |
| virtual bool | removeMenuItemAtPosition (int iPos) |
| Removes the menu item at the specified position from the ordered list and the menu if it has been created. | |
| virtual void | addNewMenuItem (DtPopupMenuItem &item, int iPos) |
| Adds a new menu item to internal structures and creates if needed. | |
| virtual QAction * | createMenuItem (const DtPopupMenuItem &item) |
| Creates and returns the new menu item. | |
| virtual void | attachMenuItem (const DtPopupMenuItem &item) |
| Attaches a menu item based on the specific type. | |
| virtual void | addCompletedItemsToMenu () |
| Adds the completed items to the menu. | |
| virtual void | addAttachedMenus () |
| Adds any menus to this menu via the attachMenu command by creating them via the menu widget factory. | |
| virtual void | setIcon (DtMenuItemType iType) |
| Uses internal structures to see if this menu item needs an icon associated with it. | |
| virtual void | attachValidators (bool b) |
| Cycles through menu items and attaches/detatches validators according to flag. | |
| virtual void | initConnections () |
| Initializes connections used for validations on this popup menu. | |
| virtual DtPopupMenuItem * | popupMenuItem (DtMenuItemType iType, bool actionable=false) |
| Returns the DtPopupMenuItem associated with a particular type. | |
| virtual DtActionValidatorMap * | actionValidatorMapEntry (DtMenuItemType iType) |
| Returns a DtActionValidatorMap associated with the particular type. | |
| virtual void | removeOrderedMenuItem (int iPos) |
| Removes the item only from the ordered list. | |
| virtual int | addOrderedItem (const DtPopupMenuItem &item, int iPos) |
| Adds an item to the ordered list. Returns the position added to in the ordered list. | |
| virtual void | setMapMenuItemsTo (DtPopupMenu *menu) |
| Set proxy menu. | |
| virtual void | addActionGroup (DtActionGroup *) |
| Adds a new action group to internal list (if does not exist) | |
| virtual bool | matchesName (QString menu, QString name) const |
| virtual DtActionGroup * | internalGetActionGroupForType (DtMenuItemType type) |
| Checks internal groups then checks getActionGroupForType. | |
| virtual QAction * | addNewActionToActionGroup (const DtPopupMenuItem &item) |
| Creates a new menu item and adds it to its action group. | |
| virtual void | addAllActionsFor (DtActionGroup *) |
| Given the group, looks through all menu items that return the given sub group and adds them to the group. | |
Static Protected Attributes | |
| static bool | myOnlyValidWithTerrainDatabase |
Static Protected Attributes inherited from DtPopupMenu | |
| static QHash< DtMenuItemType, DtActionValidatorMap > | myGlobalActionValidators |
Additional Inherited Members | |
Signals inherited from DtPopupMenu | |
| void | validateItems () |
| Sent when items want to be validated. Emitted from the validate() method. | |
Protected Slots inherited from DtPopupMenu | |
| virtual void | popupRemoved (QObject *) |
| virtual void | menuItemDestroyed () |
| virtual void | actionGroupDestroyed () |
|
virtual |
|
static |
|
virtual |
Call this to set a new creation method for when an entity or overlay object wants to be created in a different manner.
|
protectedvirtual |
Pure virtual overrides.
Reimplemented from DtPopupMenu.
|
protectedvirtual |
Initializes and maps the following menu items.
Opens appOptions() overlay menu file and creates a sub-menu from those items DtDisplayOverlayPaletteAction to window->launchOverlayPalette()
Reimplemented from DtPopupMenu.
|
protectedvirtual |
Creates myOverlayActionGroup.
Reimplemented from DtPopupMenu.
|
protectedvirtual |
Calls loadOverlayMenu()
Reimplemented from DtPopupMenu.
|
protectedvirtual |
Override in order to do something special if the developer wants to add to any of the existing popup menus.
If so, create QActions and connect them up for that. If not, then call down to the parent class code
|
protectedvirtual |
Special code branch for this menu to start adding items into the popup menu structure.
This structure contains a popup menu (for the tear off handle) and an action group
|
static |
Reimplemented in DtTerrainCreateMenu.
|
virtualslot |
|
virtualslot |
|
protectedvirtual |
If the newly created menu item is to be added to an action group, add it here.
Reimplemented from DtPopupMenu.
|
protectedvirtual |
Reimplemented from DtPopupMenu.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Reimplemented from DtPopupMenu.
|
protectedvirtual |
Reimplemented from DtPopupMenu.
|
protectedvirtual |
|
protectedvirtual |
Override to specifically attach create menu items.
Reimplemented from DtPopupMenu.
|
protectedvirtual |
Returns the action group the new item was added to.
Should not call this method, but, call addOverlayDescriptor
|
protectedvirtual |
Returns the currently active map area assuming owner is of type DtBaseWindow.
|
protectedvirtual |
Redo menu icons based on symbol map changes.
Reimplemented from DtPopupMenu.
|
protectedvirtual |
|
protectedvirtual |
Enables/disables create items that were created as part of this menu (typically from vrf.ent file)
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Only items that appear on the overlay menu.
Subset of myCreateActions
|
staticprotected |
|
protected |
|
protected |