![]() |
VR-Forces 4.0.4 Class Documentation
|
The widget for display string keys to multiple mapped values. More...

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 | 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. | |
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 () |
| QTreeWidgetItem * | findItem (const std::string &key, const std::string &value) |
| bool | selectedInstanceNameAndValue (QString &name, QString &value) const |
| Returns the selected instance name and value 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 | |
| DtDe & | myDe |
| QVBoxLayout * | myMainLayout |
| QHBoxLayout * | myButtonLayout |
| QTreeWidget * | myTreeWidget |
| QPushButton * | myAddButton |
| QPushButton * | myDeleteButton |
| QMenu * | myMenu |
| QLabel * | myTitle |
| FastTreeLoopkupMap | myFastItemLookup |
| std::map< int, QStringList > | myPossibleValueMap |
The widget for display string keys to multiple mapped values.
typedef std::multimap<std::string,QTreeWidgetItem*> makVrv::DtMultiMapEditorWidget::FastTreeLoopkupMap [protected] |
| makVrv::DtMultiMapEditorWidget::DtMultiMapEditorWidget | ( | DtDe & | de, |
| QWidget * | parent, | ||
| Qt::WindowFlags | f = 0 |
||
| ) |
CTOR.
| virtual makVrv::DtMultiMapEditorWidget::~DtMultiMapEditorWidget | ( | ) | [virtual] |
| 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::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 void makVrv::DtMultiMapEditorWidget::on_myTreeWidget_itemActivated | ( | QTreeWidgetItem * | item, |
| int | column | ||
| ) | [protected, virtual, slot] |
| virtual void makVrv::DtMultiMapEditorWidget::on_myTreeWidget_itemClicked | ( | QTreeWidgetItem * | item, |
| int | column | ||
| ) | [protected, virtual, slot] |
| virtual void makVrv::DtMultiMapEditorWidget::on_myTreeWidget_itemChanged | ( | QTreeWidgetItem * | item, |
| int | column | ||
| ) | [protected, virtual, slot] |
| virtual void makVrv::DtMultiMapEditorWidget::on_myAddButton_clicked | ( | ) | [protected, virtual, slot] |
| virtual void makVrv::DtMultiMapEditorWidget::on_myDeleteButton_clicked | ( | ) | [protected, virtual, slot] |
| virtual void makVrv::DtMultiMapEditorWidget::on_keySelected | ( | QAction * | action | ) | [protected, virtual, slot] |
| virtual void makVrv::DtMultiMapEditorWidget::on_myTreeWidget_itemSelectionChanged | ( | ) | [protected, virtual, slot] |
| void makVrv::DtMultiMapEditorWidget::editParameterName | ( | QString | nameInData | ) | [protected, slot] |
| void makVrv::DtMultiMapEditorWidget::setupGui | ( | ) | [protected] |
Reimplemented in makVrv::DtEntityTypeMapEditorWidget.
| QTreeWidgetItem* makVrv::DtMultiMapEditorWidget::findItem | ( | const std::string & | key, |
| const std::string & | value | ||
| ) | [protected] |
| bool makVrv::DtMultiMapEditorWidget::selectedInstanceNameAndValue | ( | QString & | key, |
| QString & | value | ||
| ) | const [protected, virtual] |
Returns the selected instance name and value 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 | ||
| ) | [protected, virtual] |
Sets value valid/invalid and gives text to display when selected if invalid.
Invalid backgroud color is 0
Implements makVrv::DtMultiMapEditorInterface.
Reimplemented in makVrv::DtEntityTypeMapEditorWidget.
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] |
QMenu* makVrv::DtMultiMapEditorWidget::myMenu [protected] |
QLabel* makVrv::DtMultiMapEditorWidget::myTitle [protected] |
std::map<int,QStringList> makVrv::DtMultiMapEditorWidget::myPossibleValueMap [protected] |