VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Types | Protected Slots | Protected Member Functions | Protected Attributes
makVrv::DtMultiMapEditorWidget Class Reference

The widget for display string keys to multiple mapped values. More...

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

Public Member Functions

 DtMultiMapEditorWidget (DtDe &de, QWidget *parent, Qt::WindowFlags f=0)
 CTOR.
virtual ~DtMultiMapEditorWidget ()
virtual void setColumnTitles (QString keyTitle, QStringList valueTitles)
 Set strings to indicate the name of the keys and the name of the values.
virtual QString columnTitle (int col) const
 Returns the title at the particular column.
virtual void setPossibleValues (QStringList values, int column=1)
 Set the list of possible values for value.
const QStringList & possibleValues (int column)
 Get the possible values for a column.
virtual void addValue (const std::string &key, const std::string &value, int index=1)
 Called by the logic to add a key/value to the widget.
virtual void changeValue (const std::string &key, const std::string &oldValue, const std::string &value, int index=1)
 Called by the logic to change a key/value to the widget.
virtual void deleteValue (const std::string &key, const std::string &value)
 Called by the logic to delete a key/value to the widget.
virtual void deleteValues (const std::vector< std::string > &key, const std::vector< std::string > &value)
 Called by the logic to delete key/value to the widget.
virtual void replaceValue (const std::string &key, const std::string &oldValue, const std::string &newValue)
 Called by the logic to replace the old value with the new value for the specified key.
virtual void clearValues ()
 Called by the logic to clear all values on widget.
virtual void sortItems ()
 Sort the items.
virtual void setTitle (const QString &)
 Sets the title of the label next to dialog buttons.
virtual void unableToRenameParameter (const std::string &oldName)
 Called by the logic when a renameValue fails.
virtual void selectValue (const std::string &key, const std::string &value)
 Called by the logic to select a value in the widget.
virtual void selectFirstValue (const std::string &key)
 Called by the logic to select a value in the widget.
virtual void renameKey (const std::string &oldkey, const std::string &value, const std::string &newkey)
 Called by the logic to rename a key Warning: This only does so visually and is primarily only used when using the map editor to display an ordered list with an invisible key.
virtual QWidget * widget ()
 Returns this widget.
virtual std::vector< std::string > selectedInstancesNames ()
 get the current selected instances names
- Public Member Functions inherited from makVrv::DtMultiMapEditorInterface
virtual ~DtMultiMapEditorInterface ()
virtual void showErrors ()=0
 Display invalid items if needed.

Protected Types

typedef std::multimap
< std::string, QTreeWidgetItem * > 
FastTreeLoopkupMap

Protected Slots

virtual void on_myTreeWidget_itemActivated (QTreeWidgetItem *item, int column)
virtual void on_myTreeWidget_itemClicked (QTreeWidgetItem *item, int column)
virtual void on_myTreeWidget_itemChanged (QTreeWidgetItem *item, int column)
virtual void on_myAddButton_clicked ()
virtual void on_myDeleteButton_clicked ()
virtual void on_keySelected (QAction *action)
virtual void on_myTreeWidget_itemSelectionChanged ()
void editParameterName (QString nameInData)

Protected Member Functions

void setupGui ()
QTreeWidgetItemfindItem (const std::string &key, const std::string &value)
bool selectedInstanceNameAndValue (std::vector< std::string > &names, std::vector< std::string > &values) const
 Returns the selected instance names and values in the supplied parameters.
virtual void setValid (const std::string &name, const std::string &value, bool valid, const QString &errorText)
 Sets value valid/invalid and gives text to display when selected if invalid.

Protected Attributes

DtDemyDe
QVBoxLayout * myMainLayout
QHBoxLayout * myButtonLayout
QTreeWidgetmyTreeWidget
QPushButtonmyAddButton
QPushButtonmyDeleteButton
QMenumyMenu
QLabelmyTitle
FastTreeLoopkupMap myFastItemLookup
std::map< int, QStringList > myPossibleValueMap

Additional Inherited Members

- Public Attributes inherited from makVrv::DtMultiMapEditorInterface
boost::signal< void(const
std::string &oldName, const
std::string &value, const
std::string &newName)> 
signal_renameValue
 Signal emitted when the user wants to rename a key.
boost::signal< void(const
std::string &key, const
std::string &value, int index)> 
signal_addValue
 Signal emitted when the user wants to add a new key/value.
boost::signal< void(const
std::string &key, const
std::string &oldValue, const
std::string &value, int index)> 
signal_valueChanged
 Signal emitted when the user wants to add a new key/value.
boost::signal< void(const
std::vector< std::string >
&keys, const std::vector
< std::string > &values)> 
signal_deleteValue
 Signal emitted when the user wants to delete key value.
boost::signal< void(const
std::string &key)> 
signal_itemSelected
 Signal emitted when the user select items.

Detailed Description

The widget for display string keys to multiple mapped values.

Member Typedef Documentation

typedef std::multimap<std::string,QTreeWidgetItem*> makVrv::DtMultiMapEditorWidget::FastTreeLoopkupMap
protected

Constructor & Destructor Documentation

makVrv::DtMultiMapEditorWidget::DtMultiMapEditorWidget ( DtDe de,
QWidget *  parent,
Qt::WindowFlags  f = 0 
)

CTOR.

virtual makVrv::DtMultiMapEditorWidget::~DtMultiMapEditorWidget ( )
virtual

Member Function Documentation

virtual void makVrv::DtMultiMapEditorWidget::setColumnTitles ( QString  keyTitle,
QStringList  valueTitles 
)
virtual

Set strings to indicate the name of the keys and the name of the values.

virtual QString makVrv::DtMultiMapEditorWidget::columnTitle ( int  col) const
virtual

Returns the title at the particular column.

virtual void makVrv::DtMultiMapEditorWidget::setPossibleValues ( QStringList  values,
int  column = 1 
)
virtual

Set the list of possible values for value.

Optionally there may be multiple sets of values, specified by the index.

Implements makVrv::DtMultiMapEditorInterface.

const QStringList& makVrv::DtMultiMapEditorWidget::possibleValues ( int  column)

Get the possible values for a column.

virtual void makVrv::DtMultiMapEditorWidget::addValue ( const std::string &  key,
const std::string &  value,
int  index = 1 
)
virtual

Called by the logic to add a key/value to the widget.

Implements makVrv::DtMultiMapEditorInterface.

virtual void makVrv::DtMultiMapEditorWidget::changeValue ( const std::string &  key,
const std::string &  oldValue,
const std::string &  value,
int  index = 1 
)
virtual

Called by the logic to change a key/value to the widget.

Implements makVrv::DtMultiMapEditorInterface.

virtual void makVrv::DtMultiMapEditorWidget::deleteValue ( const std::string &  key,
const std::string &  value 
)
virtual

Called by the logic to delete a key/value to the widget.

Implements makVrv::DtMultiMapEditorInterface.

Reimplemented in makVrv::DtEntityTypeMapEditorWidget.

virtual void makVrv::DtMultiMapEditorWidget::deleteValues ( const std::vector< std::string > &  key,
const std::vector< std::string > &  value 
)
virtual

Called by the logic to delete key/value to the widget.

Implements makVrv::DtMultiMapEditorInterface.

Reimplemented in makVrv::DtEntityTypeMapEditorWidget.

virtual void makVrv::DtMultiMapEditorWidget::replaceValue ( const std::string &  key,
const std::string &  oldValue,
const std::string &  newValue 
)
virtual

Called by the logic to replace the old value with the new value for the specified key.

Implements makVrv::DtMultiMapEditorInterface.

virtual void makVrv::DtMultiMapEditorWidget::clearValues ( )
virtual

Called by the logic to clear all values on widget.

Implements makVrv::DtMultiMapEditorInterface.

Reimplemented in makVrv::DtEntityTypeMapEditorWidget.

virtual void makVrv::DtMultiMapEditorWidget::sortItems ( )
virtual

Sort the items.

Implements makVrv::DtMultiMapEditorInterface.

virtual void makVrv::DtMultiMapEditorWidget::setTitle ( const QString &  )
virtual

Sets the title of the label next to dialog buttons.

Implements makVrv::DtMultiMapEditorInterface.

virtual void makVrv::DtMultiMapEditorWidget::unableToRenameParameter ( const std::string &  oldName)
virtual

Called by the logic when a renameValue fails.

Implements makVrv::DtMultiMapEditorInterface.

virtual void makVrv::DtMultiMapEditorWidget::selectValue ( const std::string &  key,
const std::string &  value 
)
virtual

Called by the logic to select a value in the widget.

Implements makVrv::DtMultiMapEditorInterface.

virtual void makVrv::DtMultiMapEditorWidget::selectFirstValue ( const std::string &  key)
virtual

Called by the logic to select a value in the widget.

Implements makVrv::DtMultiMapEditorInterface.

virtual void makVrv::DtMultiMapEditorWidget::renameKey ( const std::string &  oldkey,
const std::string &  value,
const std::string &  newkey 
)
virtual

Called by the logic to rename a key Warning: This only does so visually and is primarily only used when using the map editor to display an ordered list with an invisible key.

Implements makVrv::DtMultiMapEditorInterface.

Reimplemented in makVrv::DtEntityTypeMapEditorWidget.

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

Returns this widget.

Implements makVrv::DtMultiMapEditorInterface.

virtual std::vector<std::string> makVrv::DtMultiMapEditorWidget::selectedInstancesNames ( )
virtual

get the current selected instances names

Implements makVrv::DtMultiMapEditorInterface.

virtual void makVrv::DtMultiMapEditorWidget::on_myTreeWidget_itemActivated ( QTreeWidgetItem item,
int  column 
)
protectedvirtualslot
virtual void makVrv::DtMultiMapEditorWidget::on_myTreeWidget_itemClicked ( QTreeWidgetItem item,
int  column 
)
protectedvirtualslot
virtual void makVrv::DtMultiMapEditorWidget::on_myTreeWidget_itemChanged ( QTreeWidgetItem item,
int  column 
)
protectedvirtualslot
virtual void makVrv::DtMultiMapEditorWidget::on_myAddButton_clicked ( )
protectedvirtualslot
virtual void makVrv::DtMultiMapEditorWidget::on_myDeleteButton_clicked ( )
protectedvirtualslot
virtual void makVrv::DtMultiMapEditorWidget::on_keySelected ( QAction action)
protectedvirtualslot
virtual void makVrv::DtMultiMapEditorWidget::on_myTreeWidget_itemSelectionChanged ( )
protectedvirtualslot
void makVrv::DtMultiMapEditorWidget::editParameterName ( QString  nameInData)
protectedslot
void makVrv::DtMultiMapEditorWidget::setupGui ( )
protected
QTreeWidgetItem* makVrv::DtMultiMapEditorWidget::findItem ( const std::string &  key,
const std::string &  value 
)
protected
bool makVrv::DtMultiMapEditorWidget::selectedInstanceNameAndValue ( std::vector< std::string > &  keys,
std::vector< std::string > &  values 
) const
protectedvirtual

Returns the selected instance names and values in the supplied parameters.

Will return true if there is something selected

Implements makVrv::DtMultiMapEditorInterface.

virtual void makVrv::DtMultiMapEditorWidget::setValid ( const std::string &  name,
const std::string &  value,
bool  valid,
const QString &  errorText 
)
protectedvirtual

Sets value valid/invalid and gives text to display when selected if invalid.

Invalid background color is 0

Implements makVrv::DtMultiMapEditorInterface.

Member Data Documentation

DtDe& makVrv::DtMultiMapEditorWidget::myDe
protected
QVBoxLayout* makVrv::DtMultiMapEditorWidget::myMainLayout
protected
QHBoxLayout* makVrv::DtMultiMapEditorWidget::myButtonLayout
protected
QTreeWidget* makVrv::DtMultiMapEditorWidget::myTreeWidget
protected
QPushButton* makVrv::DtMultiMapEditorWidget::myAddButton
protected
QPushButton* makVrv::DtMultiMapEditorWidget::myDeleteButton
protected
QMenu* makVrv::DtMultiMapEditorWidget::myMenu
protected
QLabel* makVrv::DtMultiMapEditorWidget::myTitle
protected
FastTreeLoopkupMap makVrv::DtMultiMapEditorWidget::myFastItemLookup
protected
std::map<int,QStringList> makVrv::DtMultiMapEditorWidget::myPossibleValueMap
protected

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

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)