| 
   
    | 
   
A class to efficiently build and maintain sorted items of QTreeWidget or QTreeWidgetItem based on a map matching the intended structure.  
 More...
#include <RobotAPI/libraries/armem_gui/TreeWidgetBuilder.h>
Public Types | |
| using | Base = TreeWidgetBuilder< typename MapT::value_type > | 
| using | CompareFn = std::function< int(const ElementT &element, QTreeWidgetItem *item)> | 
| using | ElementT = typename Base::ElementT | 
| using | MakeItemFn = std::function< QTreeWidgetItem *(const KeyT &key, const ValueT &value)> | 
| using | MapT = std::map< KeyT, ValueT > | 
| using | NameFn = std::function< std::string(const KeyT &key, const ValueT &value)> | 
| using | UpdateItemFn = std::function< bool(const KeyT &key, const ValueT &value, QTreeWidgetItem *item)> | 
Public Member Functions | |
| MapTreeWidgetBuilder () | |
| MapTreeWidgetBuilder (const MapT &) | |
| Allows declaring instance from container without explicit template arguments.  More... | |
| MapTreeWidgetBuilder (MakeItemFn makeItemFn, UpdateItemFn updateItemFn=NoUpdate) | |
| MapTreeWidgetBuilder (NameFn nameFn, MakeItemFn makeItemFn, UpdateItemFn updateItemFn=NoUpdate) | |
| void | setCompareFn (CompareFn compareFn) | 
| void | setExpand (bool expand) | 
| void | setMakeItemFn (MakeItemFn makeItemFn) | 
| void | setNameFn (NameFn nameFn) | 
| void | setUpdateItemFn (UpdateItemFn updateItemFn) | 
| template<class ParentT > | |
| void | updateTree (ParentT *tree, const MapT &elements) | 
Static Public Member Functions | |
| static std::string | KeyAsName (const KeyT &key, const ValueT &value) | 
| A name function using the key as name.  More... | |
| static bool | NoUpdate (const KeyT &key, const ValueT &value, QTreeWidgetItem *item) | 
| No update function (default).  More... | |
A class to efficiently build and maintain sorted items of QTreeWidget or QTreeWidgetItem based on a map matching the intended structure. 
Definition at line 137 of file TreeWidgetBuilder.h.
| using Base = TreeWidgetBuilder<typename MapT::value_type> | 
Definition at line 140 of file TreeWidgetBuilder.h.
Definition at line 143 of file TreeWidgetBuilder.h.
| using ElementT = typename Base::ElementT | 
Definition at line 141 of file TreeWidgetBuilder.h.
| using MakeItemFn = std::function<QTreeWidgetItem*(const KeyT& key, const ValueT& value)> | 
Definition at line 146 of file TreeWidgetBuilder.h.
| using MapT = std::map<KeyT, ValueT> | 
Definition at line 139 of file TreeWidgetBuilder.h.
| using NameFn = std::function<std::string(const KeyT& key, const ValueT& value)> | 
Definition at line 144 of file TreeWidgetBuilder.h.
| using UpdateItemFn = std::function<bool(const KeyT& key, const ValueT& value, QTreeWidgetItem* item)> | 
Definition at line 148 of file TreeWidgetBuilder.h.
      
  | 
  inline | 
Definition at line 150 of file TreeWidgetBuilder.h.
      
  | 
  inline | 
Allows declaring instance from container without explicit template arguments.
Definition at line 156 of file TreeWidgetBuilder.h.
      
  | 
  inline | 
Definition at line 160 of file TreeWidgetBuilder.h.
      
  | 
  inline | 
Definition at line 167 of file TreeWidgetBuilder.h.
      
  | 
  inlinestatic | 
A name function using the key as name.
Definition at line 230 of file TreeWidgetBuilder.h.
 Here is the caller graph for this function:
      
  | 
  inlinestatic | 
No update function (default).
Definition at line 247 of file TreeWidgetBuilder.h.
      
  | 
  inline | 
Definition at line 188 of file TreeWidgetBuilder.h.
      
  | 
  inline | 
Definition at line 216 of file TreeWidgetBuilder.h.
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline |