27 #include "../../../../common/Translator.h"
28 #include "../../../../datatype/Property.h"
29 #include "../../Exception.h"
34 #include <QtGui/QMenu>
35 #include <QtGui/QWidget>
56 if(role == Qt::DecorationRole)
57 return QVariant(QIcon::fromTheme(
"property"));
59 if(role == Qt::DisplayRole)
60 return QVariant(m_property->getName().c_str());
67 QMenu* m =
new QMenu(parent);
69 QAction* aOpenProperty = m->addAction(tr(
"&Open property"));
71 connect(aOpenProperty, SIGNAL(triggered()),
this, SLOT(openProperty()));
83 return Qt::NoItemFlags;
A class used to group a set of properties from a dataset in a TreeModel.
QVariant data(int column, int role) const
A class that represents a dataset in a TreeModel.
te::dt::Property * getProperty() const
PropertyItem(te::dt::Property *p, AbstractDataSourceTreeItem *parent)
Constructor.
QMenu * getMenu(QWidget *parent=0) const
Qt::ItemFlags flags() const
bool setData(const QVariant &value, int role=Qt::EditRole)
It models a property definition.
bool canFetchMore() const