27 #include "../../../../common/STLUtils.h" 28 #include "../../../../core/translator/Translator.h" 29 #include "../../../../dataaccess/dataset/DataSetType.h" 30 #include "../../../../dataaccess/dataset/Index.h" 31 #include "../../../../dataaccess/datasource/DataSource.h" 32 #include "../../../../dataaccess/utils/Utils.h" 33 #include "../../Exception.h" 56 if(role == Qt::DecorationRole)
57 return QVariant(QIcon::fromTheme(
"indexes"));
59 if(role == Qt::DisplayRole)
60 return QVariant(QString(
"indexes"));
67 QMenu* m =
new QMenu(parent);
69 QAction* aOpenIndexes = m->addAction(tr(
"&Open indexes"));
71 connect(aOpenIndexes, SIGNAL(triggered()),
this, SLOT(openIndexes()));
78 if(!children().empty())
86 return Qt::NoItemFlags;
91 if(parent() ==
nullptr)
96 if(parentItem ==
nullptr)
101 if(dt.get() ==
nullptr)
108 const std::size_t nidxs = dt->getNumberOfIndexes();
110 for(std::size_t i = 0; i < nidxs; ++i)
116 if(parent() ==
nullptr)
121 if(parentItem ==
nullptr)
133 return dt->getNumberOfIndexes() != 0;
boost::shared_ptr< DataSetType > DataSetTypePtr
static te::dt::TimeDuration dt(20, 30, 50, 11)
A class that represents an index in a TreeModel.
A class used to group a set of indexes from a dataset in a TreeModel.