refs #568, improved validation and handling

* invalid models can be highlighted on stash
* selection mode can be toggled between single/multi selection (where applicable)
* color for highlighting can be set
* finetuning of menus
This commit is contained in:
Klaus Basan
2016-01-10 02:53:12 +01:00
parent 11ee49a382
commit b4dc21eeb4
15 changed files with 188 additions and 63 deletions

View File

@@ -84,17 +84,13 @@ namespace BlackGui
template <class ModelClass, class ContainerType, class ObjectType, class KeyType>
void CViewWithDbObjects<ModelClass, ContainerType, ObjectType, KeyType>::customMenu(QMenu &menu) const
{
CViewBase<ModelClass, ContainerType, ObjectType>::customMenu(menu);
if (this->m_menus.testFlag(CViewBase<ModelClass, ContainerType, ObjectType>::MenuHighlightDbData))
{
if (!menu.isEmpty())
{
menu.addSeparator();
}
QAction *a = menu.addAction(CIcons::database16(), "Highlight DB data", this, SLOT(ps_toggleHighlightDbData()));
a->setCheckable(true);
a->setChecked(this->derivedModel()->highlightDbData());
}
CViewBase<ModelClass, ContainerType, ObjectType>::customMenu(menu);
}
template <class ModelClass, class ContainerType, class ObjectType, class KeyType>