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 Member Functions | Protected Attributes | Private Member Functions | Friends
makVrv::DtObjectsListWidget Class Reference

Widget for the objects list panel. More...

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

Public Member Functions

virtual ~DtObjectsListWidget ()
 DTOR. More...
 
virtual void showEvent (QShowEvent *event)
 QWidget override. More...
 
virtual void sortItems ()
 DtItemsListWidget override. More...
 
- Public Member Functions inherited from makVrv::DtItemsListWidget
virtual ~DtItemsListWidget ()
 DTOR. More...
 
void setupGui ()
 Create the widgets and layout. Called in the CTOR. More...
 
void connectSignals ()
 Connect the signals. More...
 
virtual void addSubTypeTopLevelItem (const DtElementAttributes::ElementSubtypes &subType, const std::string &displayName, int index, const std::string &icon)
 Add a top level item which has subtype items as children(Friendly, Opposing, Munitions, etc). More...
 
virtual void addSubTypeTopLevelItem (const DtElementAttributes::ElementSubtypes &subType, const std::string &displayName, int index, double r, double g, double b)
 Add a top level item which has subtype items as children(Friendly, Opposing, Munitions, etc). More...
 
virtual void addSubTypeItem (const DtElementAttributes::ElementSubtypes &subType, DtElementID elementId, const std::string &displayName)
 Add a subtype item(Friendly, Opposing, Munitions, etc). More...
 
virtual bool hasSubTypeTopLevelItem (const DtElementAttributes::ElementSubtypes &subType)
 Check if the tree has a subtype top level item with the given subType. More...
 
virtual void addTypeTopLevelItem (const DtElementEntry::ElementType &type, const std::string &displayName, int index, const std::string &icon)
 Add a top level item which has type items as children(Observers, Tactical Graphics, etc). More...
 
virtual void addTypeItem (const DtElementEntry::ElementType &type, DtElementID elementId, const std::string &displayName)
 Add a tye item(Observers, Tactical Graphics, etc). More...
 
virtual bool hasTypeTopLevelItem (const DtElementEntry::ElementType &type)
 Check if the tree has a type top level item with the given type. More...
 
virtual void removeItem (DtElementID id)
 Remove an item with the given element Id from the tree. More...
 
virtual void renameItem (DtElementID id, const std::string &newName)
 Rename an item with the new name. More...
 
virtual void updateItemDamageState (DtElementID id, int damageState)
 Update the damage state of the item, update the icon mostly. More...
 
virtual void updateItemSubType (DtElementID id, int subType)
 Update the subType of the item, change of force type etc. More...
 
virtual void setSelectedItems (const DtSelectionManager::IdSet &selected, const DtSelectionManager::IdSet &deselected)
 Update the current selection of the tree widget. More...
 
virtual bool comparator (const QTreeWidgetItem &lhs, const QTreeWidgetItem &rhs) const
 compare the names of two list items for sorting This method is used for sorting the objects in a item list. More...
 

Protected Member Functions

 DtObjectsListWidget (DtDe &de, QWidget *parent=NULL, const Qt::WindowFlags &f=0)
 Protected constructor of the page. Use DtObjectsListWidgetCreator to create an instance of this class. More...
 
- Protected Member Functions inherited from makVrv::DtItemsListWidget
 DtItemsListWidget (DtDe &de, QWidget *parent=NULL, const Qt::WindowFlags &f=0)
 CTOR. Use DtOsgEarthProfileDialogCreator to create an instance of this class. More...
 
void setItemAttributes (QTreeWidgetItem *item, DtElementID elementId, const QString &displayName)
 Set the attributes of the item. More...
 
DtElementID getItemElementId (QTreeWidgetItem *item)
 Convenient function to get the element id of the item. More...
 
bool parseNumber (const QTreeWidgetItem &lhs, int &number, QString &name) const
 This helper function is used by the comparator to determine is a name is of the type described in. More...
 

Protected Attributes

bool myNeedsSortFlag
 
- Protected Attributes inherited from makVrv::DtItemsListWidget
DtDemyDe
 
QVBoxLayout * myMainLayout
 
QLabelmyLookupLabel
 
QLineEditmyLookupLineEdit
 
QPushButtonmySearchCleanButton
 
DtTreeWidgetmyObjectsTreeWidget
 
boost::unordered_map
< DtElementEntry::ElementType,
QTreeWidgetItem * > 
myElementTypeItemsMap
 
boost::unordered_map
< DtElementAttributes::ElementSubtypes,
QTreeWidgetItem * > 
myElementSubtypeItemsMap
 
boost::unordered_map
< DtElementID, QTreeWidgetItem * > 
myElementItemsMap
 
std::map< const QString,
std::pair< QString, int > > 
myObjectListCache
 

Private Member Functions

 DtObjectsListWidget ()
 Unimplemented Default CTOR. More...
 
 DtObjectsListWidget (const DtObjectsListWidget &orig)
 Not implemented. More...
 
DtObjectsListWidgetoperator= (const DtObjectsListWidget &orig)
 Not implemented. More...
 

Friends

class DtObjectsListWidgetCreator
 

Additional Inherited Members

- Public Types inherited from makVrv::DtItemsListWidget
enum  ItemsListWidgetItemDataRole { ItemElementId = Qt::UserRole, ItemDisplayName, ItemType, ItemIsSubType }
 Item data stored in the objects tree widget item. More...
 
- Public Attributes inherited from makVrv::DtItemsListInterface
boost::signal< void(DtElementID)> signal_itemAttachRequested
 
boost::signal< void(std::vector
< DtElementID >)> 
signal_itemSelectionChanged
 
- Protected Slots inherited from makVrv::DtItemsListWidget
virtual void on_objectsTreeWidget_rightClickOnItem (QTreeWidgetItem *item, QMouseEvent *, int column)
 Slot when user right click on the tree widget item. More...
 
virtual void on_objectsTreeWidget_itemDoubleClicked (QTreeWidgetItem *item, int column)
 Slot when user double click on the tree widget item. More...
 
virtual void on_objectsTreeWidget_itemSelectionChanged ()
 Slot when the current selection of the tree widget changed. More...
 
virtual void on_lookupLineEdit_textChanged (QString str)
 Slot the text of the line edit changed. More...
 
virtual void on_searchCleanButton_released ()
 Slot when user click on the clean filter button. More...
 

Detailed Description

Widget for the objects list panel.

"Objects" will include normal entities, aggregates, munitions, and tactical graphics.

See Also
makVrv::DtItemsListWidget

Constructor & Destructor Documentation

virtual makVrv::DtObjectsListWidget::~DtObjectsListWidget ( )
virtual

DTOR.

makVrv::DtObjectsListWidget::DtObjectsListWidget ( DtDe de,
QWidget *  parent = NULL,
const Qt::WindowFlags &  f = 0 
)
protected

Protected constructor of the page. Use DtObjectsListWidgetCreator to create an instance of this class.

makVrv::DtObjectsListWidget::DtObjectsListWidget ( )
private

Unimplemented Default CTOR.

makVrv::DtObjectsListWidget::DtObjectsListWidget ( const DtObjectsListWidget orig)
private

Not implemented.

Member Function Documentation

virtual void makVrv::DtObjectsListWidget::showEvent ( QShowEvent *  event)
virtual

QWidget override.

If the list has unsorted items, they will be sorted when this is called

virtual void makVrv::DtObjectsListWidget::sortItems ( )
virtual

DtItemsListWidget override.

If this panel is visible, DtItemsListWidget::sortItems() is called. Otherwise, a flag is set to indicate a sort is needed.

Reimplemented from makVrv::DtItemsListWidget.

DtObjectsListWidget& makVrv::DtObjectsListWidget::operator= ( const DtObjectsListWidget orig)
private

Not implemented.

Friends And Related Function Documentation

friend class DtObjectsListWidgetCreator
friend

Member Data Documentation

bool makVrv::DtObjectsListWidget::myNeedsSortFlag
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)