2 * Copyright (C) 2013, 2015 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17#ifndef UNITY_MOCK_ACCOUNTSSERVICE_H
18#define UNITY_MOCK_ACCOUNTSSERVICE_H
27class AccountsService: public QObject
30 Q_ENUMS(PasswordDisplayHint)
31 Q_PROPERTY (QString user
35 Q_PROPERTY (bool demoEdges
38 NOTIFY demoEdgesChanged)
39 Q_PROPERTY (QStringList demoEdgesCompleted
40 READ demoEdgesCompleted
41 WRITE setDemoEdgesCompleted // only available in mock
42 NOTIFY demoEdgesCompletedChanged)
43 Q_PROPERTY (bool enableFingerprintIdentification
44 READ enableFingerprintIdentification
45 WRITE setEnableFingerprintIdentification // only available in mock
46 NOTIFY enableFingerprintIdentificationChanged)
47 Q_PROPERTY (bool enableLauncherWhileLocked
48 READ enableLauncherWhileLocked
49 WRITE setEnableLauncherWhileLocked // only available in mock
50 NOTIFY enableLauncherWhileLockedChanged)
51 Q_PROPERTY (bool enableIndicatorsWhileLocked
52 READ enableIndicatorsWhileLocked
53 WRITE setEnableIndicatorsWhileLocked // only available in mock
54 NOTIFY enableIndicatorsWhileLockedChanged)
55 Q_PROPERTY (QString backgroundFile
57 WRITE setBackgroundFile // only available in mock
58 NOTIFY backgroundFileChanged)
59 Q_PROPERTY (bool statsWelcomeScreen
60 READ statsWelcomeScreen
61 WRITE setStatsWelcomeScreen // only available in mock
62 NOTIFY statsWelcomeScreenChanged)
63 Q_PROPERTY (PasswordDisplayHint passwordDisplayHint
64 READ passwordDisplayHint
65 NOTIFY passwordDisplayHintChanged)
66 Q_PROPERTY (uint failedLogins
69 NOTIFY failedLoginsChanged)
70 Q_PROPERTY (uint failedFingerprintLogins
71 READ failedFingerprintLogins
72 WRITE setFailedFingerprintLogins
73 NOTIFY failedFingerprintLoginsChanged)
74 Q_PROPERTY(bool hereEnabled
77 NOTIFY hereEnabledChanged)
78 Q_PROPERTY(QString hereLicensePath
80 WRITE setHereLicensePath // only available in mock
81 NOTIFY hereLicensePathChanged)
82 Q_PROPERTY(bool hereLicensePathValid // qml sees a null string as "", so we use proxy setting for that
83 READ hereLicensePathValid
84 NOTIFY hereLicensePathChanged)
85 Q_PROPERTY(QString realName READ realName WRITE setRealName NOTIFY realNameChanged)
86 Q_PROPERTY(QString email READ email WRITE setEmail NOTIFY emailChanged)
87 Q_PROPERTY(QStringList keymaps
90 NOTIFY keymapsChanged)
93 enum PasswordDisplayHint {
98 explicit AccountsService(QObject *parent = 0);
100 QString user() const;
101 void setUser(const QString &user);
102 bool demoEdges() const;
103 void setDemoEdges(bool demoEdges);
104 QStringList demoEdgesCompleted() const;
105 void setDemoEdgesCompleted(const QStringList &demoEdges);
106 Q_INVOKABLE void markDemoEdgeCompleted(const QString &edge);
107 bool enableFingerprintIdentification() const;
108 void setEnableFingerprintIdentification(bool enableFingerprintIdentification);
109 bool enableLauncherWhileLocked() const;
110 void setEnableLauncherWhileLocked(bool enableLauncherWhileLocked);
111 bool enableIndicatorsWhileLocked() const;
112 void setEnableIndicatorsWhileLocked(bool enableIndicatorsWhileLocked);
113 QString backgroundFile() const;
114 void setBackgroundFile(const QString &backgroundFile);
115 bool statsWelcomeScreen() const;
116 void setStatsWelcomeScreen(bool statsWelcomeScreen);
117 PasswordDisplayHint passwordDisplayHint() const;
118 uint failedLogins() const;
119 void setFailedLogins(uint failedLogins);
120 uint failedFingerprintLogins() const;
121 void setFailedFingerprintLogins(uint failedFingerprintLogins);
122 bool hereEnabled() const;
123 void setHereEnabled(bool enabled);
124 QString hereLicensePath() const;
125 void setHereLicensePath(const QString &path);
126 bool hereLicensePathValid() const;
127 QString realName() const;
128 void setRealName(const QString &realName);
129 QString email() const;
130 void setEmail(const QString &email);
131 QStringList keymaps() const;
132 void setKeymaps(const QStringList &keymaps);
136 void demoEdgesChanged();
137 void demoEdgesCompletedChanged();
138 void enableFingerprintIdentificationChanged();
139 void enableLauncherWhileLockedChanged();
140 void enableIndicatorsWhileLockedChanged();
141 void backgroundFileChanged();
142 void statsWelcomeScreenChanged();
143 void passwordDisplayHintChanged();
144 void failedLoginsChanged();
145 void failedFingerprintLoginsChanged();
146 void hereEnabledChanged();
147 void hereLicensePathChanged();
148 void realNameChanged();
150 void keymapsChanged();
153 bool m_enableFingerprintIdentification;
154 bool m_enableLauncherWhileLocked;
155 bool m_enableIndicatorsWhileLocked;
156 QString m_backgroundFile;
158 bool m_statsWelcomeScreen;
160 uint m_failedFingerprintLogins;
162 QStringList m_demoEdgesCompleted;
164 QString m_hereLicensePath;
166 QStringList m_kbdMap;
168 MockUsersModel *m_usersModel;
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list