Widget for display the objects, terrains, observers in the scene in a list. Used by DtObjectsListWidget, DtTerrainListWidget, DtObserversListWidget.
- See Also
- makVrv::DtItemsListInterface
|
| virtual | ~DtItemsListWidget () |
| |
| void | setupGui () |
| |
| void | connectSignals () |
| |
| virtual void | addSubTypeTopLevelItem (const DtElementAttributes::ElementSubtypes &subType, const std::string &displayName, int index, const std::string &icon) |
| |
| virtual void | addSubTypeTopLevelItem (const DtElementAttributes::ElementSubtypes &subType, const std::string &displayName, int index, double r, double g, double b) |
| |
| virtual void | addSubTypeItem (const DtElementAttributes::ElementSubtypes &subType, DtElementID elementId, const std::string &displayName) |
| |
| virtual bool | hasSubTypeTopLevelItem (const DtElementAttributes::ElementSubtypes &subType) |
| |
| virtual void | addTypeTopLevelItem (const DtElementEntry::ElementType &type, const std::string &displayName, int index, const std::string &icon) |
| |
| virtual void | addTypeItem (const DtElementEntry::ElementType &type, DtElementID elementId, const std::string &displayName) |
| |
| virtual bool | hasTypeTopLevelItem (const DtElementEntry::ElementType &type) |
| |
| virtual void | sortItems () |
| |
| virtual void | removeItem (DtElementID id) |
| |
| virtual void | renameItem (DtElementID id, const std::string &newName) |
| |
| virtual void | updateItemDamageState (DtElementID id, EntityStateListener::DamageState damageState) |
| |
| virtual void | updateItemSubType (DtElementID id, int subType) |
| |
| virtual void | setSelectedItems (const DtSelectionManager::IdSet &selected, const DtSelectionManager::IdSet &deselected) |
| |
| virtual bool | comparator (const QTreeWidgetItem &lhs, const QTreeWidgetItem &rhs) const |
| |
Item data stored in the objects tree widget item.
| Enumerator |
|---|
| ItemElementId |
|
| ItemDisplayName |
|
| ItemType |
|
| ItemIsSubType |
|
| virtual makVrv::DtItemsListWidget::~DtItemsListWidget |
( |
| ) |
|
|
virtual |
| makVrv::DtItemsListWidget::DtItemsListWidget |
( |
DtDe & |
de, |
|
|
QWidget * |
parent = NULL, |
|
|
const Qt::WindowFlags & |
f = 0 |
|
) |
| |
|
protected |
CTOR. Use DtOsgEarthProfileDialogCreator to create an instance of this class.
| makVrv::DtItemsListWidget::DtItemsListWidget |
( |
| ) |
|
|
privatedelete |
Unimplemented Default CTOR.
| void makVrv::DtItemsListWidget::setupGui |
( |
| ) |
|
Create the widgets and layout. Called in the CTOR.
| void makVrv::DtItemsListWidget::connectSignals |
( |
| ) |
|
Add a top level item which has subtype items as children(Friendly, Opposing, Munitions, etc).
- Parameters
-
| subType | The subtype of the child items. |
| displayName | The display name of the top level item. |
| index | The index of the top level item in the tree. |
| icon | The icon of the item, empty string means no icon. |
Implements makVrv::DtItemsListInterface.
Add a top level item which has subtype items as children(Friendly, Opposing, Munitions, etc).
- Parameters
-
| subType | The subtype of the child items. |
| displayName | The display name of the top level item. |
| index | The index of the top level item in the tree. |
| r | The red color of the icon if the icon is generated by the color. |
| g | The red color of the icon if the icon is generated by the color. |
| b | The red color of the icon if the icon is generated by the color. |
Implements makVrv::DtItemsListInterface.
Add a subtype item(Friendly, Opposing, Munitions, etc).
- Parameters
-
| subType | The subtype of the item |
| elementId | The elementId of the item. |
| displayName | The display name of the item. |
| icon | The icon of the item, empty string means no icon. |
Implements makVrv::DtItemsListInterface.
Check if the tree has a subtype top level item with the given subType.
- Parameters
-
| subType | The subtype of the item |
Implements makVrv::DtItemsListInterface.
| virtual void makVrv::DtItemsListWidget::addTypeTopLevelItem |
( |
const DtElementEntry::ElementType & |
type, |
|
|
const std::string & |
displayName, |
|
|
int |
index, |
|
|
const std::string & |
icon |
|
) |
| |
|
virtual |
Add a top level item which has type items as children(Observers, Tactical Graphics, etc).
- Parameters
-
| type | The type of the child items. |
| displayName | The display name of the top level item. |
| index | The index of the top level item in the tree. |
| icon | The icon of the item, empty string means no icon. |
Implements makVrv::DtItemsListInterface.
Add a tye item(Observers, Tactical Graphics, etc).
- Parameters
-
| type | The type of the item |
| elementId | The elementId of the item. |
| displayName | The display name of the item. |
| icon | The icon of the item, empty string means no icon. |
Implements makVrv::DtItemsListInterface.
| virtual void makVrv::DtItemsListWidget::sortItems |
( |
| ) |
|
|
virtual |
| virtual void makVrv::DtItemsListWidget::removeItem |
( |
DtElementID |
id | ) |
|
|
virtual |
| virtual void makVrv::DtItemsListWidget::renameItem |
( |
DtElementID |
id, |
|
|
const std::string & |
newName |
|
) |
| |
|
virtual |
| virtual void makVrv::DtItemsListWidget::updateItemSubType |
( |
DtElementID |
id, |
|
|
int |
subType |
|
) |
| |
|
virtual |
compare the names of two list items for sorting This method is used for sorting the objects in a item list. It works like a standard 'operator<' - true if lhs is < rhs, false otherwise. This default comparator looks for names of the form '<someString> <someNumber>', which is what most VR-Forces marking texts look like (e.g., Civ 1, Civ 2). If the names compared are both of that form and both have the same base string, then they are compared based on the number (so Civ 2 < Civ 10); otherwise they are compared lexicographically.
Set the attributes of the item.
- Parameters
-
| item | The QTreeWidgetItem. |
| elementId | The elementId of the item. |
| displayName | The display name of the item. |
Convenient function to get the element id of the item.
- Parameters
-
| bool makVrv::DtItemsListWidget::parseNumber |
( |
const QTreeWidgetItem & |
lhs, |
|
|
int & |
number, |
|
|
QString & |
name |
|
) |
| const |
|
protected |
This helper function is used by the comparator to determine is a name is of the type described in.
- See Also
- comparator() and if so, returns the name and number portions of the string
| virtual void makVrv::DtItemsListWidget::on_objectsTreeWidget_rightClickOnItem |
( |
QTreeWidgetItem * |
item, |
|
|
QMouseEvent * |
, |
|
|
int |
column |
|
) |
| |
|
protectedvirtualslot |
Slot when user right click on the tree widget item.
| virtual void makVrv::DtItemsListWidget::on_objectsTreeWidget_itemDoubleClicked |
( |
QTreeWidgetItem * |
item, |
|
|
int |
column |
|
) |
| |
|
protectedvirtualslot |
Slot when user double click on the tree widget item.
| virtual void makVrv::DtItemsListWidget::on_objectsTreeWidget_itemSelectionChanged |
( |
| ) |
|
|
protectedvirtualslot |
Slot when the current selection of the tree widget changed.
| virtual void makVrv::DtItemsListWidget::on_lookupLineEdit_textChanged |
( |
QString |
str | ) |
|
|
protectedvirtualslot |
Slot the text of the line edit changed.
| virtual void makVrv::DtItemsListWidget::on_searchCleanButton_released |
( |
| ) |
|
|
protectedvirtualslot |
Slot when user click on the clean filter button.
| DtDe& makVrv::DtItemsListWidget::myDe |
|
protected |
| QVBoxLayout* makVrv::DtItemsListWidget::myMainLayout |
|
protected |
| QLabel* makVrv::DtItemsListWidget::myLookupLabel |
|
protected |
| QLineEdit* makVrv::DtItemsListWidget::myLookupLineEdit |
|
protected |
| QPushButton* makVrv::DtItemsListWidget::mySearchCleanButton |
|
protected |
| DtTreeWidget* makVrv::DtItemsListWidget::myObjectsTreeWidget |
|
protected |
| std::map<const QString, std::pair<QString, int> > makVrv::DtItemsListWidget::myObjectListCache |
|
mutableprotected |
The documentation for this class was generated from the following file:
- /data/exports/nrhent7-1/nightly/docs/vrForces.vrf5-1-branch/include/vrvCoreQt/DtItemsListWidget.h