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:
committed by
Tobias Fella
parent
10667f98ef
commit
ef255243ec
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user