VR-Forces 4.0.4 Class Documentation
Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
DtFeatureActionManager Class Reference
Inheritance diagram for DtFeatureActionManager:
Inheritance graph
[legend]

List of all members.

Signals

void replacedShortcut (const QString &, const QString &, const QString &)
 Emitted when shortcut is replaced (replaceShortcut). Parameters are feature, old and new shortcuts.

Public Member Functions

 DtFeatureActionManager (const QString &name="featureActionManager")
 DtFeatureActionManager (const DtFeatureActionManager &)
virtual ~DtFeatureActionManager ()
virtual bool init ()
virtual void addFeatureAction (const DtFeatureAction &, bool replaceShortcutInAction=true)
virtual DtFeatureActionManageroperator= (const DtFeatureActionManager &)
virtual void replaceShortcut (const QString &feature, const QString &shortcut, bool replaceInAction=true)
 Replaces shortcut and set myIsOverride to true.
virtual void removeFeatureAction (const QString &featureName)
virtual void addFeatureAction (const QString &feature, const QString &shortcut=QString::null, const QString &normalIcon=DtAssignIconByFeatureName, const QString &disabledIcon=DtKeepIcon, const QString &normalOnIcon=DtKeepIcon)
virtual void addFeatureAction (const QString &feature, QObject *slotObj, const char *slot, const QString &displayName, bool isToggle=false, const QString &toolTip=QString::null, const QString &normalIcon=DtAssignIconByFeatureName, const QString &disabledIcon=DtKeepIcon, const QString &normalOnIcon=DtKeepIcon)
virtual void addFeatureAction (const QString &feature, const QString &displayName, const DtToolbarCallbackStructure &str)
virtual bool shortcutInUse (const QString &) const
 Returns true if the shortcut exists in the manager.
virtual bool hasShortcutOverride (const QString &) const
 Returns true if the particular feature has a shortcut override in the system.
virtual bool hasShortcut (const QString &) const
 Returns true if the particular feature has a shortcut in the system.
virtual QString shortcutFor (const QString &) const
 Returns the shortcut for the specified feature item.
virtual QString iconFor (const QString &feature, QIcon::Mode mode=QIcon::Normal, QIcon::State=QIcon::Off, bool useDefault=false) const
 Returns icon for specified feature.
virtual void setCanBePlacedOnToolbar (const QString &feature, bool)
 States that this feature should not be available to be placed on a toolbar. Default is true.
virtual bool canBePlacedOnToolbar (const QString &feature) const
virtual QString featureUsingShortcut (const QString &shortcut) const
 Returns the feature using the shortcut.
virtual bool shortcutIsUsed (const QString &shortcut)
 Returns true if shortcut is in use.
virtual void registerAction (const QString &featureName, QAction *act)
 Associates the QAction with the feature name. Used to keep track of shortcuts in use.
virtual DtFeatureAction featureFor (const QString &feature) const
 Returns a copy of the structure associated with the feature.
const QHash< QString,
DtFeatureAction > & 
featureActions () const
virtual void removeFeatureAction (QAction *)
 Removes the feature action associated the with QAction*.
virtual void clearQActions ()
 Clears out any QAction assignments.
virtual DtFeatureActionManagerclone ()
 Clones this object.
virtual void merge (const DtFeatureActionManager &)
 Merges in other feature action manager. Currently only merges shortcuts.

Static Public Member Functions

static DtFeatureActionManagercreate ()

Protected Member Functions

virtual void write (QTextStream &)
 Archives object to/from stream (only archives editable items), and, as such, will merge them into the current factory after read.
virtual void read (QTextStream &)
 Reads/writes archiver.
virtual QString defaultIcon (const QString &featureName, const QString &iconName) const

Protected Attributes

QHash< QString, DtFeatureActionmyFeatureActions
QHash< QString, QString > myShortcutToFeature

Constructor & Destructor Documentation

DtFeatureActionManager::DtFeatureActionManager ( const QString &  name = "featureActionManager")

Member Function Documentation

virtual bool DtFeatureActionManager::init ( ) [virtual]
virtual void DtFeatureActionManager::addFeatureAction ( const DtFeatureAction ,
bool  replaceShortcutInAction = true 
) [virtual]
virtual DtFeatureActionManager& DtFeatureActionManager::operator= ( const DtFeatureActionManager ) [virtual]
virtual void DtFeatureActionManager::replaceShortcut ( const QString &  feature,
const QString &  shortcut,
bool  replaceInAction = true 
) [virtual]

Replaces shortcut and set myIsOverride to true.

virtual void DtFeatureActionManager::removeFeatureAction ( const QString &  featureName) [virtual]
virtual void DtFeatureActionManager::addFeatureAction ( const QString &  feature,
const QString &  shortcut = QString::null,
const QString &  normalIcon = DtAssignIconByFeatureName,
const QString &  disabledIcon = DtKeepIcon,
const QString &  normalOnIcon = DtKeepIcon 
) [virtual]
virtual void DtFeatureActionManager::addFeatureAction ( const QString &  feature,
QObject slotObj,
const char *  slot,
const QString &  displayName,
bool  isToggle = false,
const QString &  toolTip = QString::null,
const QString &  normalIcon = DtAssignIconByFeatureName,
const QString &  disabledIcon = DtKeepIcon,
const QString &  normalOnIcon = DtKeepIcon 
) [virtual]
virtual void DtFeatureActionManager::addFeatureAction ( const QString &  feature,
const QString &  displayName,
const DtToolbarCallbackStructure str 
) [virtual]
virtual bool DtFeatureActionManager::shortcutInUse ( const QString &  ) const [virtual]

Returns true if the shortcut exists in the manager.

virtual bool DtFeatureActionManager::hasShortcutOverride ( const QString &  ) const [virtual]

Returns true if the particular feature has a shortcut override in the system.

virtual bool DtFeatureActionManager::hasShortcut ( const QString &  ) const [virtual]

Returns true if the particular feature has a shortcut in the system.

virtual QString DtFeatureActionManager::shortcutFor ( const QString &  ) const [virtual]

Returns the shortcut for the specified feature item.

virtual QString DtFeatureActionManager::iconFor ( const QString &  feature,
QIcon::Mode  mode = QIcon::Normal,
QIcon::State  = QIcon::Off,
bool  useDefault = false 
) const [virtual]

Returns icon for specified feature.

virtual void DtFeatureActionManager::setCanBePlacedOnToolbar ( const QString &  feature,
bool   
) [virtual]

States that this feature should not be available to be placed on a toolbar. Default is true.

virtual bool DtFeatureActionManager::canBePlacedOnToolbar ( const QString &  feature) const [virtual]
virtual QString DtFeatureActionManager::featureUsingShortcut ( const QString &  shortcut) const [virtual]

Returns the feature using the shortcut.

virtual bool DtFeatureActionManager::shortcutIsUsed ( const QString &  shortcut) [virtual]

Returns true if shortcut is in use.

A shortcut is in use if there is a QAction assigned to the feature

virtual void DtFeatureActionManager::registerAction ( const QString &  featureName,
QAction act 
) [virtual]

Associates the QAction with the feature name. Used to keep track of shortcuts in use.

virtual DtFeatureAction DtFeatureActionManager::featureFor ( const QString &  feature) const [virtual]

Returns a copy of the structure associated with the feature.

const QHash< QString, DtFeatureAction > & DtFeatureActionManager::featureActions ( ) const [inline]

References myFeatureActions.

virtual void DtFeatureActionManager::removeFeatureAction ( QAction ) [virtual]

Removes the feature action associated the with QAction*.

virtual void DtFeatureActionManager::clearQActions ( ) [virtual]

Clears out any QAction assignments.

Clones this object.

Reimplemented from DtArchivableObject.

virtual void DtFeatureActionManager::merge ( const DtFeatureActionManager ) [virtual]

Merges in other feature action manager. Currently only merges shortcuts.

void DtFeatureActionManager::replacedShortcut ( const QString &  ,
const QString &  ,
const QString &   
) [signal]

Emitted when shortcut is replaced (replaceShortcut). Parameters are feature, old and new shortcuts.

virtual void DtFeatureActionManager::write ( QTextStream &  ) [protected, virtual]

Archives object to/from stream (only archives editable items), and, as such, will merge them into the current factory after read.

Currently only archives shortcuts that have changed

Reimplemented from DtArchivableObject.

virtual void DtFeatureActionManager::read ( QTextStream &  s) [protected, virtual]

Reads/writes archiver.

Reimplemented from DtArchivableObject.

virtual QString DtFeatureActionManager::defaultIcon ( const QString &  featureName,
const QString &  iconName 
) const [protected, virtual]

Member Data Documentation

Referenced by featureActions().

QHash<QString, QString> DtFeatureActionManager::myShortcutToFeature [protected]

The documentation for this class was generated from the following file:

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)