refs #314, changed models and views to new CPropertyIndex approach

This commit is contained in:
Klaus Basan
2014-08-16 00:54:09 +02:00
parent f4a94aa8ff
commit d88c1bb252
14 changed files with 75 additions and 97 deletions

View File

@@ -304,14 +304,11 @@ namespace BlackMisc
return CKeyboardKey::equalsModifierReleaxed(this->getModifier1(), key.getModifier1());
}
bool CKeyboardKey::equalsWithoutFunction(const CKeyboardKey &key) const
QString CKeyboardKey::toStringRepresentation(int key)
{
if (key == (*this)) return true;
CKeyboardKey k1(*this);
CKeyboardKey k2(*this);
k1.setFunction(HotkeyNone);
k2.setFunction(HotkeyNone);
return k1 == k2;
if (key == 0) return "";
QString ks = QKeySequence(key).toString();
return ks;
}
QVariant CKeyboardKey::propertyByIndex(const BlackMisc::CPropertyIndex &index) const
@@ -343,14 +340,6 @@ namespace BlackMisc
return QVariant::fromValue(m);
}
QString CKeyboardKey::toStringRepresentation(int key)
{
if (key == 0) return "";
QString ks = QKeySequence(key).toString();
// ks.append('(').append(QString::number(key)).append(')');
return ks;
}
void CKeyboardKey::setPropertyByIndex(const QVariant &variant, const BlackMisc::CPropertyIndex &index)
{
if (index.isMyself())