Use ComboBox as AccountRegistry view

Replace the RowLayout with a ComboBox. This permits a higher number
of accounts to be used in the application without reducing the
usability.

BUG: 460601
This commit is contained in:
Link Dupont
2022-10-17 11:54:53 -04:00
committed by Tobias Fella
parent 10667f98ef
commit ef255243ec
3 changed files with 26 additions and 23 deletions

View File

@@ -15,9 +15,12 @@ class Connection;
class AccountRegistry : public QAbstractListModel
{
Q_OBJECT
Q_PROPERTY(int accountCount READ count NOTIFY accountCountChanged);
public:
enum EventRoles {
ConnectionRole = Qt::UserRole + 1,
UserIdRole = Qt::DisplayRole,
};
static AccountRegistry &instance()
@@ -40,6 +43,9 @@ public:
[[nodiscard]] QHash<int, QByteArray> roleNames() const override;
Q_SIGNALS:
void accountCountChanged();
private:
AccountRegistry();