refs #325, name variant pair allows test for existing values

* equal value updates can be skipped
* equalsQVariant in CValueObject
* resizing parameter for views
This commit is contained in:
Klaus Basan
2014-09-27 15:48:04 +02:00
parent f10e625b7f
commit 7304d8bd3e
8 changed files with 70 additions and 27 deletions

View File

@@ -33,20 +33,26 @@ namespace BlackGui
//! Constructor
explicit CNameVariantPairModel(bool withIcon, QObject *parent = nullptr);
//! Destructor
virtual ~CNameVariantPairModel() {}
//! Icon on / off
void setIconMode(bool withIcon);
//! Remove by given name
void removeByName(const QString &name);
//! Contains name already?
bool containsName(const QString &name) const;
//! Contains name / value?
bool containsNameValue(const QString &name, const QVariant &value) const;
//! Add our update a value
void addOrUpdateByName(const QString &name, const QString &value, const BlackMisc::CIcon &icon);
bool addOrUpdateByName(const QString &name, const QVariant &value, const BlackMisc::CIcon &icon, bool skipEqualValues);
//! Current row index of given name
int getNameRowIndex(const QString &name);
//! Destructor
virtual ~CNameVariantPairModel() {}
int getRowIndexForName(const QString &name) const;
};
}