Work on plugin mechanism

Context actions have become normal actions in the pluginwidget so the widget knows abot them and
can easily do things like enable/disable.
This commit is contained in:
eelke 2019-02-08 10:10:11 +01:00
parent eca8841427
commit a704332342
24 changed files with 239 additions and 267 deletions

View file

@ -36,7 +36,7 @@ QVariant QueryResultModel::data(const QModelIndex &index, int role) const
const int col = index.column();
const int rij = index.row();
const Oid oid = result->type(col);
if (role == Qt::DisplayRole) {
if (role == Qt::DisplayRole || role == Qt::EditRole) {
if (result->null(col, rij)) {
//v = nullptr;
}
@ -74,10 +74,11 @@ QVariant QueryResultModel::headerData(int section, Qt::Orientation orientation,
r = QString::number(section + 1);
}
}
Qt::ItemFlags f;
return r;
}
//Qt::ItemFlags QueryResultModel::flags(const QModelIndex &) const
//{
// return Qt::ItemIsUserCheckable;
//}
Qt::ItemFlags QueryResultModel::flags(const QModelIndex &) const
{
return Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable;
}