DataTreeBuilderBase.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
6
7namespace armarx
8{
9 template <class ContainerT>
10 struct TreeWidgetBuilder;
11}
12
13class QTreeWidgetItem;
14
16{
17
19 {
20 public:
22 virtual ~DataTreeBuilderBase();
23
24 void setColumns(int key, int value, int type);
25
26
27 protected:
30
33 std::vector<size_t> getIndex(size_t size) const;
34
35
36 QTreeWidgetItem* makeItem(const std::string& key) const;
37 QTreeWidgetItem* makeItem(size_t key) const;
38
39 void setRowTexts(QTreeWidgetItem* item,
40 const std::string& key,
41 const std::string& value,
42 const std::string& typeName = "") const;
43 void setRowTexts(QTreeWidgetItem* item,
44 const std::string& key,
46
47
48 public:
49 int columnKey = 0;
50 int columnValue = 1;
51 int columnType = 2;
52 };
53
54} // namespace armarx::armem::gui::instance
std::vector< size_t > getIndex(size_t size) const
armarx::TreeWidgetBuilder< std::string > DictBuilder
armarx::TreeWidgetBuilder< size_t > ListBuilder
void setRowTexts(QTreeWidgetItem *item, const std::string &key, const std::string &value, const std::string &typeName="") const
QTreeWidgetItem * makeItem(const std::string &key) const
std::shared_ptr< Variant > VariantPtr
This file offers overloads of toIce() and fromIce() functions for STL container types.
A class to efficiently build and maintain sorted items of QTreeWidget or QTreeWidgetItem based on a s...