diff options
Diffstat (limited to 'src/core/EntryAttributes.h')
-rw-r--r-- | src/core/EntryAttributes.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/core/EntryAttributes.h b/src/core/EntryAttributes.h index 40fc5dec4..91cc50879 100644 --- a/src/core/EntryAttributes.h +++ b/src/core/EntryAttributes.h @@ -21,6 +21,7 @@ #include <QMap> #include <QObject> +#include <QRegularExpression> #include <QSet> #include <QStringList> @@ -32,23 +33,25 @@ public: explicit EntryAttributes(QObject* parent = nullptr); QList<QString> keys() const; bool hasKey(const QString& key) const; - QList<QString> customKeys(); + QList<QString> customKeys() const; QString value(const QString& key) const; bool contains(const QString& key) const; + bool containsValue(const QString& value) const; bool isProtected(const QString& key) const; bool isReference(const QString& key) const; - QRegExp* referenceRegExp(); void set(const QString& key, const QString& value, bool protect = false); void remove(const QString& key); void rename(const QString& oldKey, const QString& newKey); void copyCustomKeysFrom(const EntryAttributes* other); bool areCustomKeysDifferent(const EntryAttributes* other); void clear(); - int attributesSize(); + int attributesSize() const; void copyDataFrom(const EntryAttributes* other); bool operator==(const EntryAttributes& other) const; bool operator!=(const EntryAttributes& other) const; + static QRegularExpressionMatch matchReference(const QString& text); + static const QString TitleKey; static const QString UserNameKey; static const QString PasswordKey; @@ -58,6 +61,10 @@ public: static const QString RememberCmdExecAttr; static bool isDefaultAttribute(const QString& key); + static const QString WantedFieldGroupName; + static const QString SearchInGroupName; + static const QString SearchTextGroupName; + signals: void modified(); void defaultKeyModified(); @@ -74,7 +81,6 @@ signals: private: QMap<QString, QString> m_attributes; QSet<QString> m_protectedAttributes; - QRegExp m_referenceRegExp; }; #endif // KEEPASSX_ENTRYATTRIBUTES_H |