kgpg
keylistproxymodel.cpp
Go to the documentation of this file.
55 KeyListProxyModelPrivate::KeyListProxyModelPrivate(KeyListProxyModel *parent, const KeyListProxyModel::DisplayMode mode)
157 KeyListProxyModelPrivate::dataSingleColumn(const QModelIndex &index, int role, const KGpgNode *node) const
214 KeyListProxyModelPrivate::dataMultiColumn(const QModelIndex &index, int role, const KGpgNode *node) const
273 KeyListProxyModelPrivate::lessThan(const KGpgNode *left, const KGpgNode *right, const int column) const
290 bool test1 = (left->getType() & ITYPE_PUBLIC) && !(left->getType() & ITYPE_SECRET); // only a public key
291 bool test2 = (right->getType() & ITYPE_PUBLIC) && !(right->getType() & ITYPE_SECRET); // only a public key
318 KeyListProxyModelPrivate::nodeLessThan(const KGpgNode *left, const KGpgNode *right, const int column) const
325 if (left->getName().startsWith(QLatin1Char( '[' )) && !right->getName().startsWith(QLatin1Char( '[' )))
327 else if (!left->getName().startsWith(QLatin1Char( '[' )) && right->getName().startsWith(QLatin1Char( '[' )))
329 else if (left->getName().startsWith(QLatin1Char( '[' )) && right->getName().startsWith(QLatin1Char( '[' )))
void invalidate()
Definition: kgpgitemmodel.h:44
QString & append(QChar ch)
void setFilterCaseSensitivity(Qt::CaseSensitivity cs)
KGpgExpandableNode * getParentKeyNode() const
Returns the parent node in the key hierarchy.
Definition: KGpgNode.cpp:330
virtual Qt::ItemFlags flags(const QModelIndex &index) const
void layoutChanged()
virtual void setSourceModel(QAbstractItemModel *sourceModel)
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
virtual ~KeyListProxyModel()
Definition: keylistproxymodel.cpp:241
QString & prepend(QChar ch)
virtual unsigned int getEncryptionKeySize() const
Returns the size of the first encryption subkey.
Definition: KGpgGroupMemberNode.cpp:89
void setEncryptionKeyFilter(bool b)
show only keys capable of encryption
Definition: keylistproxymodel.cpp:475
KGpgNode * nodeForIndex(const QModelIndex &index) const
Definition: keylistproxymodel.cpp:484
static QString reverseListAndJoinWithChar(const QStringList &list, const QChar &separator)
Reverses the list's order (this modifies the list) and returns a string containing the reversed list'...
Definition: keylistproxymodel.cpp:72
QString join(const QString &separator) const
void setKeyModel(KGpgItemModel *)
Definition: keylistproxymodel.cpp:253
virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const
Definition: keylistproxymodel.cpp:262
void layoutAboutToBeChanged()
virtual KgpgCore::KgpgItemType getType() const =0
Returns the item type of this object.
bool isValid() const
virtual unsigned int getSignKeySize() const
Returns the size of the signing key.
Definition: KGpgGroupMemberNode.cpp:81
int count(const T &value) const
void setTrustFilter(const KgpgCore::KgpgKeyTrustFlag t)
set the minimum trust level to be shown
Definition: keylistproxymodel.cpp:466
virtual QString getSize() const
Returns a string describing the size of this object.
Definition: KGpgNode.cpp:288
virtual bool hasChildren(const QModelIndex &idx) const
Definition: keylistproxymodel.cpp:247
bool canEncrypt() const
return if this key can be used for encryption
Definition: KGpgKeyNode.cpp:355
bool isEmpty() const
int row() const
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
int idLength() const
void invalidateFilter()
void setDynamicSortFilter(bool enable)
T & first()
QPixmap scaled(int width, int height, Qt::AspectRatioMode aspectRatioMode, Qt::TransformationMode transformMode) const
virtual Qt::ItemFlags flags(const QModelIndex &index) const
Definition: keylistproxymodel.cpp:584
QString right(int n) const
virtual bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Definition: keylistproxymodel.cpp:561
QString toLower() const
void setIdLength(const int length)
Definition: keylistproxymodel.cpp:549
virtual unsigned int getEncryptionKeySize() const
Returns the size of the first encryption subkey.
Definition: KGpgKeyNode.cpp:205
The abstract base class for all classes representing keyring data.
Definition: KGpgNode.h:42
bool contains(QChar ch, Qt::CaseSensitivity cs) const
virtual unsigned int getSignKeySize() const
Returns the size of the signing key.
Definition: KGpgKeyNode.cpp:199
virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
Definition: keylistproxymodel.cpp:384
bool isValid() const
Definition: keylistproxymodel.h:30
QAbstractItemModel * sourceModel() const
virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const
T takeLast()
Definition: kgpgsettings.h:13
QDateTime currentDateTime()
QVariant data(int role) const
void setOnlySecret(const bool b)
set if only secret keys should be shown
Definition: keylistproxymodel.cpp:444
void insert(int i, const T &value)
virtual bool hasChildren(const QModelIndex &parent) const
virtual QModelIndex mapFromSource(const QModelIndex &sourceIndex) const
T & last()
KeyListProxyModel(QObject *parent=0, const DisplayMode mode=MultiColumn)
Definition: keylistproxymodel.cpp:232
int column() const
KGpgNode * nodeForIndex(const QModelIndex &index) const
Definition: kgpgitemmodel.cpp:230
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: keylistproxymodel.cpp:510
QModelIndex nodeIndex(KGpgNode *node)
Definition: keylistproxymodel.cpp:492
void setPreviewSize(const int pixel)
Definition: keylistproxymodel.cpp:500
trust value unknown (i.e. no entry in gpg's trust database)
Definition: kgpgkey.h:60
Type type() const
int compare(const QString &other) const
QChar * data()
QString toString() const
void setFilterKeyColumn(int column)
void settingsChanged()
call this when the settings have changed
Definition: keylistproxymodel.cpp:453
QRegExp filterRegExp() const
typedef ItemFlags
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:42:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:42:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.