VR-Forces 4.8 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. More...
 
virtual ~DtMultiMapEditorWidget ()
 
virtual void setColumnTitles (QString keyTitle, QStringList valueTitles)
 Set strings to indicate the name of the keys and the name of the values. More...
 
virtual QString columnTitle (int col) const
 Returns the title at the particular column. More...
 
virtual void setPossibleValues (const QStringList &values, int column=1)
 Set the list of possible values for value. More...
 
const QStringList & possibleValues (int column)
 Get the possible values for a column. More...
 
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. More...
 
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. More...
 
virtual void deleteValue (const std::string &key, const std::string &value)
 Called by the logic to delete a key/value to the widget. More...
 
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. More...
 
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. More...
 
virtual void clearValues ()
 Called by the logic to clear all values on widget. More...
 
virtual void sortItems ()
 Sort the items. More...
 
virtual void changeFilePath ()
 Changes the path of currently selected definition to the file path currently displayed on the dropdown box. More...
 
virtual void setTitle (const QString &)
 Sets the title of the label next to dialog buttons. More...
 
virtual void unableToRenameParameter (const std::string &oldName)
 Called by the logic when a renameValue fails. More...
 
virtual void selectValue (const std::string &key, const std::string &value)
 Called by the logic to select a value in the widget. More...
 
virtual void selectFirstValue (const std::string &key)
 Called by the logic to select a value in the widget. More...
 
virtual void filterValues (const std::vector< std::string > &keys)
 Filters the tree by the given keys. More...
 
virtual void filterValues (const std::vector< std::pair< std::string, std::string > > &keys)
 Filters the tree by the given key and name pairs. More...
 
virtual void setAllTopLevelTreeWidgetItemsHidden (bool hide)
 Sets all the top level items hidden or not. More...
 
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. More...
 
virtual QWidget * widget ()
 Returns this widget. More...
 
virtual std::vector< std::string > selectedInstancesNames ()
 get the current selected instances names More...
 
- Public Member Functions inherited from makVrv::DtMultiMapEditorInterface
 DtMultiMapEditorInterface ()
 
virtual ~DtMultiMapEditorInterface ()
 
virtual void showErrors ()=0
 Display invalid items if needed. More...
 

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_myChangeFileButton_clicked ()
 
virtual void on_myChangeFileFilterButton_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. More...
 
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. More...
 

Protected Attributes

DtDemyDe
 
QVBoxLayout * myMainLayout
 
QHBoxLayout * myButtonLayout
 
QTreeWidgetmyTreeWidget
 
QPushButtonmyAddButton
 
QPushButtonmyChangeFileButton
 
QPushButtonmyChangeFileFilterButton
 
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. More...
 
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. More...
 
boost::signal< void()> signal_changeFilePath
 Signal emitted when the user wants to change the file path of the currently selected element. More...
 
boost::signal< void()> signal_changeFileFilterPath
 Signal emitted when the user wants to filter out all files whose file path doesn't match the path in the dropdown box. More...
 
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. More...
 
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. More...
 
boost::signal< void(const
std::string &key)> 
signal_itemSelected
 Signal emitted when the user select items. More...
 

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 ( const 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::changeFilePath ( )
virtual

Changes the path of currently selected definition to the file path currently displayed on the dropdown box.

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::filterValues ( const std::vector< std::string > &  keys)
virtual

Filters the tree by the given keys.

Implements makVrv::DtMultiMapEditorInterface.

virtual void makVrv::DtMultiMapEditorWidget::filterValues ( const std::vector< std::pair< std::string, std::string > > &  keys)
virtual

Filters the tree by the given key and name pairs.

Implements makVrv::DtMultiMapEditorInterface.

virtual void makVrv::DtMultiMapEditorWidget::setAllTopLevelTreeWidgetItemsHidden ( bool  hide)
virtual

Sets all the top level items hidden or not.

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_myChangeFileButton_clicked ( )
protectedvirtualslot
virtual void makVrv::DtMultiMapEditorWidget::on_myChangeFileFilterButton_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::myChangeFileButton
protected
QPushButton* makVrv::DtMultiMapEditorWidget::myChangeFileFilterButton
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 Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)