27 #include "../../../../common/Translator.h"
28 #include "../../../../dataaccess/dataset/Index.h"
29 #include "../../Exception.h"
56 if(role == Qt::DecorationRole)
57 return QVariant(QIcon::fromTheme(
"index"));
59 if(role == Qt::DisplayRole)
60 return QVariant(m_idx->getName().c_str());
67 QMenu* m =
new QMenu(parent);
69 QAction* aOpenIndex = m->addAction(tr(
"&Open index"));
71 connect(aOpenIndex, SIGNAL(triggered()),
this, SLOT(openIndex()));
78 if(!children().empty())
86 return Qt::NoItemFlags;
91 const std::size_t nproperties = m_idx->getProperties().size();
93 for(std::size_t i = 0; i < nproperties; ++i)
99 return !m_idx->getProperties().empty();
A class that represents an index in a TreeModel.
It describes an index associated to a DataSetType.