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_ACCOUNTSSERVICE_H
18#define UNITY_ACCOUNTSSERVICE_H
23class AccountsServiceDBusAdaptor;
25class AccountsService: public QObject
28 Q_ENUMS(PasswordDisplayHint)
29 Q_PROPERTY (QString user
33 Q_PROPERTY (bool demoEdges
36 NOTIFY demoEdgesChanged)
37 Q_PROPERTY (bool enableLauncherWhileLocked
38 READ enableLauncherWhileLocked
39 NOTIFY enableLauncherWhileLockedChanged)
40 Q_PROPERTY (bool enableIndicatorsWhileLocked
41 READ enableIndicatorsWhileLocked
42 NOTIFY enableIndicatorsWhileLockedChanged)
43 Q_PROPERTY (QString backgroundFile
45 NOTIFY backgroundFileChanged)
46 Q_PROPERTY (bool statsWelcomeScreen
47 READ statsWelcomeScreen
48 NOTIFY statsWelcomeScreenChanged)
49 Q_PROPERTY (PasswordDisplayHint passwordDisplayHint
50 READ passwordDisplayHint
51 NOTIFY passwordDisplayHintChanged)
52 Q_PROPERTY (uint failedLogins
55 NOTIFY failedLoginsChanged)
56 Q_PROPERTY(bool hereEnabled
59 NOTIFY hereEnabledChanged)
60 Q_PROPERTY(QString hereLicensePath
62 NOTIFY hereLicensePathChanged)
63 Q_PROPERTY(bool hereLicensePathValid // qml sees a null string as "", so we use proxy setting for that
64 READ hereLicensePathValid
65 NOTIFY hereLicensePathChanged)
66 Q_PROPERTY(QString realName READ realName WRITE setRealName NOTIFY realNameChanged)
67 Q_PROPERTY(QString email READ email WRITE setEmail NOTIFY emailChanged)
70 enum PasswordDisplayHint {
75 explicit AccountsService(QObject *parent = 0, const QString & user = QString());
76 ~AccountsService() = default;
79 void setUser(const QString &user);
80 bool demoEdges() const;
81 void setDemoEdges(bool demoEdges);
82 bool enableLauncherWhileLocked() const;
83 bool enableIndicatorsWhileLocked() const;
84 QString backgroundFile() const;
85 bool statsWelcomeScreen() const;
86 PasswordDisplayHint passwordDisplayHint() const;
87 uint failedLogins() const;
88 void setFailedLogins(uint failedLogins);
89 bool hereEnabled() const;
90 void setHereEnabled(bool enabled);
91 QString hereLicensePath() const;
92 bool hereLicensePathValid() const;
93 QString realName() const;
94 void setRealName(const QString &realName);
95 QString email() const;
96 void setEmail(const QString &email);
100 void demoEdgesChanged();
101 void enableLauncherWhileLockedChanged();
102 void enableIndicatorsWhileLockedChanged();
103 void backgroundFileChanged();
104 void statsWelcomeScreenChanged();
105 void passwordDisplayHintChanged();
106 void failedLoginsChanged();
107 void hereEnabledChanged();
108 void hereLicensePathChanged();
109 void realNameChanged();
113 void onPropertiesChanged(const QString &user, const QString &interface, const QStringList &changed);
114 void onMaybeChanged(const QString &user);
117 void updateDemoEdges(bool async = true);
118 void updateEnableLauncherWhileLocked(bool async = true);
119 void updateEnableIndicatorsWhileLocked(bool async = true);
120 void updateBackgroundFile(bool async = true);
121 void updateStatsWelcomeScreen(bool async = true);
122 void updatePasswordDisplayHint(bool async = true);
123 void updateFailedLogins(bool async = true);
124 void updateHereEnabled(bool async = true);
125 void updateHereLicensePath(bool async = true);
126 void updateRealName(bool async = true);
127 void updateEmail(bool async = true);
129 AccountsServiceDBusAdaptor *m_service;
132 bool m_enableLauncherWhileLocked;
133 bool m_enableIndicatorsWhileLocked;
134 QString m_backgroundFile;
135 bool m_statsWelcomeScreen;
136 PasswordDisplayHint m_passwordDisplayHint;
139 QString m_hereLicensePath;
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