Add menu entry to copy an entry attribute to clipboard.

This commit is contained in:
Florian Geyer 2012-10-24 00:15:23 +02:00
parent 18337927f5
commit ddd5e8a209
7 changed files with 71 additions and 3 deletions

View file

@ -17,8 +17,8 @@
#include "EntryAttributes.h"
const QStringList EntryAttributes::DefaultAttributes(QStringList() << "Title" << "URL"
<< "UserName" << "Password" << "Notes");
const QStringList EntryAttributes::DefaultAttributes(QStringList() << "Title" << "UserName"
<< "Password" << "URL" << "Notes");
EntryAttributes::EntryAttributes(QObject* parent)
: QObject(parent)
@ -31,6 +31,17 @@ QList<QString> EntryAttributes::keys() const
return m_attributes.keys();
}
QList<QString> EntryAttributes::customKeys()
{
QList<QString> customKeys;
Q_FOREACH (const QString& key, keys()) {
if (!isDefaultAttribute(key)) {
customKeys.append(key);
}
}
return customKeys;
}
QString EntryAttributes::value(const QString& key) const
{
return m_attributes.value(key);