VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes
makVrv::DtKeyMappingEditorWidget Class Reference

A widget class for editing key functions.

Inheritance diagram for makVrv::DtKeyMappingEditorWidget:
Inheritance graph
[legend]

Public Member Functions

 DtKeyMappingEditorWidget (DtDe &de, QWidget *parent=0, Qt::WindowFlags flags=0)
 
virtual ~DtKeyMappingEditorWidget ()
 
virtual void addKeyFunction (const std::string &name, const std::string &keyString)
 
virtual void updateKeyFunction (const std::string &name, const std::string &keyString)
 
virtual void addChildKeyFunction (const std::string &name, const std::string &parentName, const std::string &keyString)
 
virtual void deleteKeyFunction (const std::string &name)
 
virtual void clearKeyFunctions ()
 
virtual void selectKeyFunction (const std::string &name)
 
virtual void selectKeyMapping (const DtKeyMapping &keyMapping, bool isBinary)
 
virtual void setEnableFilterEditor (bool filters)
 
virtual void setFilters (const std::vector< std::pair< int, bool > > &filters)
 
virtual void sortKeyFunctions ()
 
virtual void addKeyMapping (const DtKeyMapping &keyMapping, bool suppressUpDown)
 
virtual void removeKeyMapping (const DtKeyMapping &keyMapping)
 
virtual void clearKeyMappings ()
 
virtual void setEnableAddMappingButton (bool enabled)
 
virtual void setEnableRemoveMappingButton (bool enabled)
 
virtual void setEnableEditMappingButton (bool enabled)
 
virtual void requestInput (const std::string &functionName, const DtKeyMapping &keyMapping, bool isBinary)
 
virtual void requestInput (const std::string &functionName, bool isBinary)
 
virtual void closeEditor ()
 
virtual std::string unmappedString ()
 
virtual void requestKeyValidation (const DtKeyMapping &keyMapping, const std::string &functionName, const DtKeyFunctionNameList &fnList, bool isEdit)
 
virtual void disableEditor ()
 
virtual void enableEditor ()
 
virtual QWidget * widget ()
 
virtual void resizeColumnToContents ()
 
- Public Member Functions inherited from makVrv::DtKeyMappingEditorWidgetInterface
virtual ~DtKeyMappingEditorWidgetInterface ()
 

Protected Slots

virtual void onFunctionItemSelectionChanged ()
 
virtual void onEditItemSelectionChanged ()
 
virtual void onFilterGroupTriggered (QAction *action)
 
virtual void onAddMappingClicked ()
 
virtual void onRemoveMappingClicked ()
 
virtual void onEditMappingClicked ()
 

Protected Member Functions

virtual void closeEvent (QCloseEvent *)
 
virtual void hideEvent (QHideEvent *)
 
void slot_requestInputAccepted (const DtKeyMapping &, bool)
 
void slot_requestInputCanceled ()
 
void slot_requestKeyValidationAccepted (const DtKeyMapping &keyMapping, const DtKeyFunctionNameList &fnList, bool isEdit, bool replace)
 
QString selectedKeyFunctionName () const
 
void functionCategoryToCategoryName (int category, QString &categoryName)
 
void setupGui ()
 
QTreeWidgetItemfindItem (const std::string &key)
 
QTreeWidgetItemfindKeyMapping (const DtKeyMapping &mapping, bool isBinary)
 

Protected Attributes

DtDemyDe
 
std::string myKeyMapName
 
QPushButtonmyFilterButton
 
QLabelmyFilterLabel
 
QActionGroup * myFilterGroup
 
QMenumyFilterMenu
 
QWidget * myFunctionWidget
 
QWidget * myEditWidget
 
QTreeWidgetmyFunctionTreeWidget
 
QTreeWidgetmyEditTreeWidget
 
QSplitter * myTreeWidgetSplitter
 
QVBoxLayout * myFunctionLayout
 
QVBoxLayout * myMappingEditorLayout
 
QHBoxLayout * myMappingEditorButtonLayout
 
QHBoxLayout * myButtonLayout
 
QPushButtonmyEditMappingButton
 
QPushButtonmyAddMappingButton
 
QPushButtonmyRemoveMappingButton
 
DtRequestKeyMapKeyDialogmyRequestDialog
 
DtRequestKeyValidationDialogmyRequestKeyValidationDialog
 
bool mySaveFilterEnabledState
 
bool mySaveFunctionListEnabledState
 
bool mySaveMappingListEnabledState
 
bool mySaveEditMappingButtonEnabledState
 
bool mySaveAddMappingButtonEnabledState
 
bool mySaveRemoveMappingButtonEnabledState
 
bool myEditorDisabled
 
bool myIsClosing
 

Additional Inherited Members

- Public Attributes inherited from makVrv::DtKeyMappingEditorWidgetInterface
boost::signalslib::signal
< void(int)> 
signal_filterChanged
 
boost::signalslib::signal< void()> signal_deselectKeyMappings
 
boost::signalslib::signal
< void(const DtKeyMapping &)> 
signal_selectKeyMapping
 
boost::signalslib::signal< void()> signal_deselectFunctions
 
boost::signalslib::signal
< void(const std::string &)> 
signal_selectFunction
 
boost::signalslib::signal< void()> signal_addKeyMapping
 
boost::signalslib::signal< void()> signal_removeKeyMapping
 
boost::signalslib::signal< void()> signal_editKeyMapping
 
boost::signalslib::signal< void()> signal_requestInputCanceled
 
boost::signalslib::signal
< void(const DtKeyMapping
&, bool)> 
signal_requestInputAccepted
 
boost::signalslib::signal
< void(const DtKeyMapping
&, const DtKeyFunctionNameList
&, bool, bool)> 
signal_requestKeyValidationAccepted
 

Constructor & Destructor Documentation

makVrv::DtKeyMappingEditorWidget::DtKeyMappingEditorWidget ( DtDe de,
QWidget *  parent = 0,
Qt::WindowFlags  flags = 0 
)

CTOR.

virtual makVrv::DtKeyMappingEditorWidget::~DtKeyMappingEditorWidget ( )
virtual

Virtual DTOR.

Member Function Documentation

virtual void makVrv::DtKeyMappingEditorWidget::addKeyFunction ( const std::string &  name,
const std::string &  keyString 
)
virtual

Called by the logic to add a key function to the GUI.

Implements makVrv::DtKeyMappingEditorWidgetInterface.

Reimplemented in makVrf::DtVrfKeyMappingEditorWidget.

virtual void makVrv::DtKeyMappingEditorWidget::updateKeyFunction ( const std::string &  name,
const std::string &  keyString 
)
virtual

Called by the logic to update a key function to the gui.

Implements makVrv::DtKeyMappingEditorWidgetInterface.

virtual void makVrv::DtKeyMappingEditorWidget::addChildKeyFunction ( const std::string &  name,
const std::string &  parentName,
const std::string &  keyString 
)
virtual

Called by the logic to add a key function parented by a binary key funciton to the gui.

Implements makVrv::DtKeyMappingEditorWidgetInterface.

virtual void makVrv::DtKeyMappingEditorWidget::deleteKeyFunction ( const std::string &  name)
virtual

Called by the logic to remove a key function from the GUI.

Implements makVrv::DtKeyMappingEditorWidgetInterface.

virtual void makVrv::DtKeyMappingEditorWidget::clearKeyFunctions ( )
virtual

Called by the logic to remove all key functions from the gui.

Implements makVrv::DtKeyMappingEditorWidgetInterface.

virtual void makVrv::DtKeyMappingEditorWidget::selectKeyFunction ( const std::string &  name)
virtual

Called by the logic to select a key function in the GUI.

Implements makVrv::DtKeyMappingEditorWidgetInterface.

virtual void makVrv::DtKeyMappingEditorWidget::selectKeyMapping ( const DtKeyMapping keyMapping,
bool  isBinary 
)
virtual

Select a specific key mapping.

Implements makVrv::DtKeyMappingEditorWidgetInterface.

virtual void makVrv::DtKeyMappingEditorWidget::setEnableFilterEditor ( bool  filters)
virtual

Called by the logic to enable/disable the filter editing control The filter editor typically selects the desired filter, the logic is still responsible for executing the actual filtering.

Implements makVrv::DtKeyMappingEditorWidgetInterface.

virtual void makVrv::DtKeyMappingEditorWidget::setFilters ( const std::vector< std::pair< int, bool > > &  filters)
virtual

Set a list of filter strings the interface may display.

Implements makVrv::DtKeyMappingEditorWidgetInterface.

virtual void makVrv::DtKeyMappingEditorWidget::sortKeyFunctions ( )
virtual

Sorts the key functions by name.

Implements makVrv::DtKeyMappingEditorWidgetInterface.

virtual void makVrv::DtKeyMappingEditorWidget::addKeyMapping ( const DtKeyMapping keyMapping,
bool  suppressUpDown 
)
virtual

Add a key mapping to the edit list.

Implements makVrv::DtKeyMappingEditorWidgetInterface.

virtual void makVrv::DtKeyMappingEditorWidget::removeKeyMapping ( const DtKeyMapping keyMapping)
virtual

Remove a key mapping from the edit list.

Implements makVrv::DtKeyMappingEditorWidgetInterface.

virtual void makVrv::DtKeyMappingEditorWidget::clearKeyMappings ( )
virtual

clear all the key mappings from the edit list

Implements makVrv::DtKeyMappingEditorWidgetInterface.

virtual void makVrv::DtKeyMappingEditorWidget::setEnableAddMappingButton ( bool  enabled)
virtual

enable or disable the add key mapping button

Implements makVrv::DtKeyMappingEditorWidgetInterface.

virtual void makVrv::DtKeyMappingEditorWidget::setEnableRemoveMappingButton ( bool  enabled)
virtual

enable or disable the remove key mapping button

Implements makVrv::DtKeyMappingEditorWidgetInterface.

virtual void makVrv::DtKeyMappingEditorWidget::setEnableEditMappingButton ( bool  enabled)
virtual

enable or disable the edit key mapping button

Implements makVrv::DtKeyMappingEditorWidgetInterface.

virtual void makVrv::DtKeyMappingEditorWidget::requestInput ( const std::string &  functionName,
const DtKeyMapping keyMapping,
bool  isBinary 
)
virtual

Bring up dialog to request key to edit.

Implements makVrv::DtKeyMappingEditorWidgetInterface.

virtual void makVrv::DtKeyMappingEditorWidget::requestInput ( const std::string &  functionName,
bool  isBinary 
)
virtual

Bring up dialog to request key to add.

Implements makVrv::DtKeyMappingEditorWidgetInterface.

virtual void makVrv::DtKeyMappingEditorWidget::closeEditor ( )
virtual

close the editor

Implements makVrv::DtKeyMappingEditorWidgetInterface.

virtual std::string makVrv::DtKeyMappingEditorWidget::unmappedString ( )
virtual

Returns the translated equivalent of <unmapped> which the logic needs to be able to return.

Implements makVrv::DtKeyMappingEditorWidgetInterface.

virtual void makVrv::DtKeyMappingEditorWidget::requestKeyValidation ( const DtKeyMapping keyMapping,
const std::string &  functionName,
const DtKeyFunctionNameList fnList,
bool  isEdit 
)
virtual

When an input request is filled and the key mapping has already been assigned to one or more other functions, we ask if the new mapping should replace the old mappings, be added to them, or cancel the whole thing,.

Implements makVrv::DtKeyMappingEditorWidgetInterface.

virtual void makVrv::DtKeyMappingEditorWidget::disableEditor ( )
virtual

Disable all editor widgets.

Implements makVrv::DtKeyMappingEditorWidgetInterface.

virtual void makVrv::DtKeyMappingEditorWidget::enableEditor ( )
virtual

Enable all editor widgets.

Implements makVrv::DtKeyMappingEditorWidgetInterface.

virtual QWidget* makVrv::DtKeyMappingEditorWidget::widget ( )
virtual

Returns this as a widget.

Implements makVrv::DtKeyMappingEditorWidgetInterface.

virtual void makVrv::DtKeyMappingEditorWidget::resizeColumnToContents ( )
virtual

Resize the column to contents.

Implements makVrv::DtKeyMappingEditorWidgetInterface.

virtual void makVrv::DtKeyMappingEditorWidget::onFunctionItemSelectionChanged ( )
protectedvirtualslot

handle change of function selection

virtual void makVrv::DtKeyMappingEditorWidget::onEditItemSelectionChanged ( )
protectedvirtualslot

handle change of mapping selection

virtual void makVrv::DtKeyMappingEditorWidget::onFilterGroupTriggered ( QAction action)
protectedvirtualslot

handle click on filter group pulldown

virtual void makVrv::DtKeyMappingEditorWidget::onAddMappingClicked ( )
protectedvirtualslot

handle click on Add Mapping button

virtual void makVrv::DtKeyMappingEditorWidget::onRemoveMappingClicked ( )
protectedvirtualslot

handle click on Remove Mapping button

virtual void makVrv::DtKeyMappingEditorWidget::onEditMappingClicked ( )
protectedvirtualslot

handle click on Edit Mapping button

virtual void makVrv::DtKeyMappingEditorWidget::closeEvent ( QCloseEvent *  )
protectedvirtual

Override to close key editing dialogs if shown.

Reimplemented in makVrf::DtVrfKeyMappingEditorWidget.

virtual void makVrv::DtKeyMappingEditorWidget::hideEvent ( QHideEvent *  )
protectedvirtual

Override to close key editing dialogs if shown.

Reimplemented in makVrf::DtVrfKeyMappingEditorWidget.

void makVrv::DtKeyMappingEditorWidget::slot_requestInputAccepted ( const DtKeyMapping ,
bool   
)
protected

Resend signal.

void makVrv::DtKeyMappingEditorWidget::slot_requestInputCanceled ( )
protected
void makVrv::DtKeyMappingEditorWidget::slot_requestKeyValidationAccepted ( const DtKeyMapping keyMapping,
const DtKeyFunctionNameList fnList,
bool  isEdit,
bool  replace 
)
protected

Resend signal.

QString makVrv::DtKeyMappingEditorWidget::selectedKeyFunctionName ( ) const
protected
void makVrv::DtKeyMappingEditorWidget::functionCategoryToCategoryName ( int  category,
QString &  categoryName 
)
protected
void makVrv::DtKeyMappingEditorWidget::setupGui ( )
protected
QTreeWidgetItem* makVrv::DtKeyMappingEditorWidget::findItem ( const std::string &  key)
protected
QTreeWidgetItem* makVrv::DtKeyMappingEditorWidget::findKeyMapping ( const DtKeyMapping mapping,
bool  isBinary 
)
protected

Member Data Documentation

DtDe& makVrv::DtKeyMappingEditorWidget::myDe
protected
std::string makVrv::DtKeyMappingEditorWidget::myKeyMapName
protected
QPushButton* makVrv::DtKeyMappingEditorWidget::myFilterButton
protected
QLabel* makVrv::DtKeyMappingEditorWidget::myFilterLabel
protected
QActionGroup* makVrv::DtKeyMappingEditorWidget::myFilterGroup
protected
QMenu* makVrv::DtKeyMappingEditorWidget::myFilterMenu
protected
QWidget* makVrv::DtKeyMappingEditorWidget::myFunctionWidget
protected
QWidget* makVrv::DtKeyMappingEditorWidget::myEditWidget
protected
QTreeWidget* makVrv::DtKeyMappingEditorWidget::myFunctionTreeWidget
protected
QTreeWidget* makVrv::DtKeyMappingEditorWidget::myEditTreeWidget
protected
QSplitter* makVrv::DtKeyMappingEditorWidget::myTreeWidgetSplitter
protected
QVBoxLayout* makVrv::DtKeyMappingEditorWidget::myFunctionLayout
protected
QVBoxLayout* makVrv::DtKeyMappingEditorWidget::myMappingEditorLayout
protected
QHBoxLayout* makVrv::DtKeyMappingEditorWidget::myMappingEditorButtonLayout
protected
QHBoxLayout* makVrv::DtKeyMappingEditorWidget::myButtonLayout
protected
QPushButton* makVrv::DtKeyMappingEditorWidget::myEditMappingButton
protected
QPushButton* makVrv::DtKeyMappingEditorWidget::myAddMappingButton
protected
QPushButton* makVrv::DtKeyMappingEditorWidget::myRemoveMappingButton
protected
DtRequestKeyMapKeyDialog* makVrv::DtKeyMappingEditorWidget::myRequestDialog
protected
DtRequestKeyValidationDialog* makVrv::DtKeyMappingEditorWidget::myRequestKeyValidationDialog
protected
bool makVrv::DtKeyMappingEditorWidget::mySaveFilterEnabledState
protected
bool makVrv::DtKeyMappingEditorWidget::mySaveFunctionListEnabledState
protected
bool makVrv::DtKeyMappingEditorWidget::mySaveMappingListEnabledState
protected
bool makVrv::DtKeyMappingEditorWidget::mySaveEditMappingButtonEnabledState
protected
bool makVrv::DtKeyMappingEditorWidget::mySaveAddMappingButtonEnabledState
protected
bool makVrv::DtKeyMappingEditorWidget::mySaveRemoveMappingButtonEnabledState
protected
bool makVrv::DtKeyMappingEditorWidget::myEditorDisabled
protected
bool makVrv::DtKeyMappingEditorWidget::myIsClosing
protected

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

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)