USGS

Isis 3.0 Object Programmers' Reference

Home

ControlTreeWidgetItem.cpp
1 #include "ControlTreeWidgetItem.h"
2 
3 #include <QDebug>
4 
5 #include "Control.h"
7 
8 namespace Isis {
9 
18  QTreeWidgetItem(parent, UserType) {
19  m_control = control;
20 
21  setText(0, m_control->displayProperties()->displayName());
22 // setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
23  setIcon(0, QIcon(":pointReg"));
24 
25  connect(m_control, SIGNAL(destroyed(QObject *)), this, SLOT(deleteLater()));
26  }
27 
28 
29  ControlTreeWidgetItem::~ControlTreeWidgetItem() {
30  m_control = NULL;
31  }
32 
33 
34  Control *ControlTreeWidgetItem::control() {
35  return m_control;
36  }
37 
38 
39  void ControlTreeWidgetItem::selectionChanged() {
40  m_control->displayProperties()->setSelected(isSelected());
41  }
42 }