libQuotient
A Qt library for building matrix clients
|
#include <accountregistry.h>
Public Types | |
enum | EventRoles { AccountRole = Qt::UserRole + 1 , ConnectionRole = AccountRole , UserIdRole = Qt::DisplayRole } |
using | vector_t = QVector< Connection * > |
using | const_iterator = vector_t::const_iterator |
using | const_reference = vector_t::const_reference |
Signals | |
void | accountCountChanged () |
void | accountsLoadingChanged () |
void | keychainError (QKeychain::Error error) |
void | loginError (Connection *connection, QString message, QString details) |
void | resolveError (Connection *connection, QString error) |
Public Member Functions | |
AccountRegistry (QObject *parent=nullptr) | |
const vector_t & | accounts () const |
void | add (Connection *a) |
void | drop (Connection *a) |
const_iterator | begin () const |
const_iterator | end () const |
const_reference | front () const |
const_reference | back () const |
bool | isLoggedIn (const QString &userId) const |
Connection * | get (const QString &userId) const |
QVariant | data (const QModelIndex &index, int role) const override |
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
QHash< int, QByteArray > | roleNames () const override |
QStringList | accountsLoading () const |
void | invokeLogin () |
Properties | |
int | accountCount |
Number of accounts that are currently fully loaded. | |
QStringList | accountsLoading |
Definition at line 16 of file accountregistry.h.
using Quotient::AccountRegistry::const_iterator = vector_t::const_iterator |
Definition at line 26 of file accountregistry.h.
using Quotient::AccountRegistry::const_reference = vector_t::const_reference |
Definition at line 27 of file accountregistry.h.
using Quotient::AccountRegistry::vector_t = QVector<Connection*> |
Definition at line 25 of file accountregistry.h.
Enumerator | |
---|---|
AccountRole | |
ConnectionRole | |
UserIdRole |
Definition at line 29 of file accountregistry.h.
|
explicit |
|
signal |
Definition at line 42 of file accountregistry.h.
QStringList Quotient::AccountRegistry::accountsLoading | ( | ) | const |
|
signal |
void Quotient::AccountRegistry::add | ( | Connection * | a | ) |
|
inline |
Definition at line 48 of file accountregistry.h.
|
inline |
Definition at line 45 of file accountregistry.h.
|
override |
void Quotient::AccountRegistry::drop | ( | Connection * | a | ) |
|
inline |
Definition at line 46 of file accountregistry.h.
|
inline |
Definition at line 47 of file accountregistry.h.
Connection * Quotient::AccountRegistry::get | ( | const QString & | userId | ) | const |
void Quotient::AccountRegistry::invokeLogin | ( | ) |
|
signal |
|
signal |
|
signal |
|
override |
|
override |
|
read |
Number of accounts that are currently fully loaded.
Definition at line 20 of file accountregistry.h.
|
read |
List of accounts that are currently in some stage of being loaded (Reading token from keychain, trying to contact server, etc). Can be used to inform the user or to show a login screen if size() == 0 and no accounts are loaded
Definition at line 23 of file accountregistry.h.