mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-05-02 06:36:07 -04:00
More work on the parser and Entry/Group data structures.
This commit is contained in:
parent
3e3c23e4ad
commit
dae532d659
14 changed files with 851 additions and 136 deletions
|
@ -17,6 +17,145 @@
|
|||
|
||||
#include "Entry.h"
|
||||
|
||||
Entry::Entry()
|
||||
#include "Group.h"
|
||||
|
||||
Entry::Entry() : m_group(0)
|
||||
{
|
||||
}
|
||||
|
||||
Uuid Entry::uuid() const
|
||||
{
|
||||
return m_uuid;
|
||||
}
|
||||
|
||||
QImage Entry::icon() const
|
||||
{
|
||||
// TODO implement
|
||||
}
|
||||
|
||||
QColor Entry::foregroundColor() const
|
||||
{
|
||||
return m_foregroundColor;
|
||||
}
|
||||
|
||||
QColor Entry::backgroundColor() const
|
||||
{
|
||||
return m_backgroundColor;
|
||||
}
|
||||
|
||||
QString Entry::overrideUrl() const
|
||||
{
|
||||
return m_overrideUrl;
|
||||
}
|
||||
|
||||
TimeInfo Entry::timeInfo() const
|
||||
{
|
||||
return m_timeInfo;
|
||||
}
|
||||
|
||||
bool Entry::autoTypeEnabled() const
|
||||
{
|
||||
return m_autoTypeEnabled;
|
||||
}
|
||||
|
||||
int Entry::autoTypeObfuscation() const
|
||||
{
|
||||
return m_autoTypeObfuscation;
|
||||
}
|
||||
|
||||
QString Entry::defaultAutoTypeSequence() const
|
||||
{
|
||||
return m_defaultAutoTypeSequence;
|
||||
}
|
||||
|
||||
const QList<AutoTypeAssociation>& Entry::autoTypeAssociations() const
|
||||
{
|
||||
return m_autoTypeAssociations;
|
||||
}
|
||||
|
||||
const QHash<QString, QString>& Entry::attributes() const
|
||||
{
|
||||
return m_attributes;
|
||||
}
|
||||
|
||||
const QHash<QString, QByteArray>& Entry::attachments() const
|
||||
{
|
||||
return m_binaries;
|
||||
}
|
||||
|
||||
void Entry::setUuid(const Uuid& uuid)
|
||||
{
|
||||
m_uuid = uuid;
|
||||
}
|
||||
|
||||
void Entry::setIcon(int iconNumber)
|
||||
{
|
||||
m_iconNumber = iconNumber;
|
||||
m_customIcon = Uuid();
|
||||
}
|
||||
|
||||
void Entry::setIcon(const Uuid& uuid)
|
||||
{
|
||||
m_iconNumber = 0;
|
||||
m_customIcon = uuid;
|
||||
}
|
||||
|
||||
void Entry::setForegroundColor(const QColor& color)
|
||||
{
|
||||
m_foregroundColor = color;
|
||||
}
|
||||
|
||||
void Entry::setBackgroundColor(const QColor& color)
|
||||
{
|
||||
m_backgroundColor = color;
|
||||
}
|
||||
|
||||
void Entry::setOverrideUrl(const QString& url)
|
||||
{
|
||||
m_overrideUrl = url;
|
||||
}
|
||||
|
||||
void Entry::setTimeInfo(const TimeInfo& timeInfo)
|
||||
{
|
||||
m_timeInfo = timeInfo;
|
||||
}
|
||||
|
||||
void Entry::setAutoTypeEnabled(bool enable)
|
||||
{
|
||||
m_autoTypeEnabled = enable;
|
||||
}
|
||||
|
||||
void Entry::setAutoTypeObfuscation(int obfuscation)
|
||||
{
|
||||
m_autoTypeObfuscation = obfuscation;
|
||||
}
|
||||
|
||||
void Entry::setDefaultAutoTypeSequence(const QString& sequence)
|
||||
{
|
||||
m_defaultAutoTypeSequence = sequence;
|
||||
}
|
||||
|
||||
void Entry::addAutoTypeAssociation(const AutoTypeAssociation& assoc)
|
||||
{
|
||||
m_autoTypeAssociations << assoc;
|
||||
}
|
||||
|
||||
void Entry::addAttribute(const QString& key, const QString& value)
|
||||
{
|
||||
m_attributes.insert(key, value);
|
||||
}
|
||||
|
||||
void Entry::addAttachment(const QString& key, const QByteArray& value)
|
||||
{
|
||||
m_binaries.insert(key, value);
|
||||
}
|
||||
|
||||
void Entry::setGroup(Group* group)
|
||||
{
|
||||
if (m_group) {
|
||||
group->removeEntry(this);
|
||||
}
|
||||
group->addEntry(this);
|
||||
m_group = group;
|
||||
QObject::setParent(group);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue