LVRTextureMeshItem.cpp
Go to the documentation of this file.
1 
28 /*
29  * LVRTextureMeshItem.cpp
30  *
31  * Created on: Dec 10, 2014
32  * Author: twiemann
33  */
34 
35 #include "LVRTextureMeshItem.hpp"
36 
37 namespace lvr2
38 {
39 
41  : LVRMeshItem(ptr, parent)
42 {
43  // Super class ctor should insert mesh information, add texture
44  // information here
45  addSubItems();
46 }
47 
49 {
50  QIcon icon;
51  icon.addFile(QString::fromUtf8(":/qv_mesh_texture_icon.png"), QSize(), QIcon::Normal, QIcon::Off);
52 
53  // Add item to parent to display them on the same tree level
54  QTreeWidgetItem* item = new QTreeWidgetItem(m_parent);
55  item->setIcon(0, icon);
56  item->setText(0, "Textures");
57 
58 
59  // Add sub items containing statistics
60  QTreeWidgetItem* texNumItem = new QTreeWidgetItem(item);
61  QString numTextures;
62  texNumItem->setText(0, "Num Textures:");
63  texNumItem->setText(1, numTextures.setNum(m_meshBridge->getNumTextures()));
64  item->addChild(texNumItem);
65 
66  QTreeWidgetItem* colFaceItem = new QTreeWidgetItem(item);
67  QString numColFaces;
68  colFaceItem->setText(0, "Num Colored Tris:");
69  colFaceItem->setText(1, numColFaces.setNum(m_meshBridge->getNumColoredFaces()));
70  item->addChild(colFaceItem);
71 
72  QTreeWidgetItem* texFaceItem = new QTreeWidgetItem(item);
73  QString numTexFaces;
74  texFaceItem->setText(0, "Num Textured Tris:");
75  texFaceItem->setText(1, numTexFaces.setNum(m_meshBridge->getNumTexturedFaces()));
76  item->addChild(texFaceItem);
77 
78  m_parent->addChild(item);
79 }
80 
82 {
83  // TODO Auto-generated destructor stub
84 }
85 
86 } /* namespace lvr2 */
MeshBufferBridgePtr m_meshBridge
Definition: LVRMeshItem.hpp:66
boost::shared_ptr< LVRMeshBufferBridge > MeshBufferBridgePtr
LVRTextureMeshItem(MeshBufferBridgePtr &ptr, QTreeWidgetItem *parent=0)
QTreeWidgetItem * m_parent
Definition: LVRMeshItem.hpp:76


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:08