Changeset View
Changeset View
Standalone View
Standalone View
src/lib/accountmodel.h
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Line(s) | 46 | public: | |||
---|---|---|---|---|---|
60 | explicit AccountModel(QObject* parent); | 60 | explicit AccountModel(QObject* parent); | ||
61 | ~AccountModel() override; | 61 | ~AccountModel() override; | ||
62 | int rowCount(const QModelIndex& parent = QModelIndex()) const override; | 62 | int rowCount(const QModelIndex& parent = QModelIndex()) const override; | ||
63 | QVariant data(const QModelIndex& index, int role) const override; | 63 | QVariant data(const QModelIndex& index, int role) const override; | ||
64 | QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; | 64 | QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; | ||
65 | bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole) override; | 65 | bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole) override; | ||
66 | bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex()) override; | 66 | bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex()) override; | ||
67 | bool removeAccountKeepingFiles(int row, bool keepFile = false); | 67 | bool removeAccountKeepingFiles(int row, bool keepFile = false); | ||
68 | void setDpr(qreal dpr); | ||||
68 | 69 | | |||
69 | QVariant newUserData(int role) const; | 70 | QVariant newUserData(int role) const; | ||
70 | bool newUserSetData(const QModelIndex& index, const QVariant& value, int roleInt); | 71 | bool newUserSetData(const QModelIndex& index, const QVariant& value, int roleInt); | ||
71 | 72 | | |||
72 | public Q_SLOTS: | 73 | public Q_SLOTS: | ||
73 | void UserAdded(const QDBusObjectPath &dbusPah); | 74 | void UserAdded(const QDBusObjectPath &dbusPah); | ||
74 | void UserDeleted(const QDBusObjectPath &path); | 75 | void UserDeleted(const QDBusObjectPath &path); | ||
75 | void Changed(); | 76 | void Changed(); | ||
Show All 10 Lines | 79 | private: | |||
86 | UserSession* m_sessions; | 87 | UserSession* m_sessions; | ||
87 | QStringList m_userPath; | 88 | QStringList m_userPath; | ||
88 | OrgFreedesktopAccountsInterface* m_dbus; | 89 | OrgFreedesktopAccountsInterface* m_dbus; | ||
89 | QHash<AccountModel::Role, QVariant> m_newUserData; | 90 | QHash<AccountModel::Role, QVariant> m_newUserData; | ||
90 | QHash<QString, OrgFreedesktopAccountsUserInterface*> m_users; | 91 | QHash<QString, OrgFreedesktopAccountsUserInterface*> m_users; | ||
91 | QHash<QString, bool> m_loggedAccounts; | 92 | QHash<QString, bool> m_loggedAccounts; | ||
92 | KEMailSettings m_kEmailSettings; | 93 | KEMailSettings m_kEmailSettings; | ||
93 | AutomaticLoginSettings m_autoLoginSettings; | 94 | AutomaticLoginSettings m_autoLoginSettings; | ||
95 | qreal m_dpr = 1; | ||||
crossi: Style related, attribute member are prefixed with 'm_', see above declarations. | |||||
94 | }; | 96 | }; | ||
95 | 97 | | |||
96 | QDebug operator<<(QDebug debug, AccountModel::Role role); | 98 | QDebug operator<<(QDebug debug, AccountModel::Role role); | ||
97 | #endif // ACCOUNTMODEL_H | 99 | #endif // ACCOUNTMODEL_H |
Style related, attribute member are prefixed with 'm_', see above declarations.