~aacid/unity8/fix_testDash

« back to all changes in this revision

Viewing changes to plugins/AccountsService/AccountsService.h

  • Committer: CI Train Bot
  • Author(s): Michael Terry
  • Date: 2014-12-04 20:54:46 UTC
  • mfrom: (1432.3.19 wizard-plugin)
  • Revision ID: ci-train-bot@canonical.com-20141204205446-pbuftf6d5yt854oj
Convert the welcome wizard from a separate executable into a qml plugin (with a small C++ plugin for support).

- This changes the path for adding customized wizard pages (drops system-settings namespacing).  I checked with cwayne, that support isn't being used yet.  So that's safe to adjust while we're here.

- I did not change the path for the 'has the wizard run yet' marker, since that is being used in the wild.  But I added a comment as to why we're using the phrase "ubuntu-system-settings" in that filename.

- I fleshed out unity8's support for changing the language on the fly, since that's now done in-process.  I believe I caught all cases (anything that used a qml binding to i18n worked automatically, just had to catch the cases that were pulling from outside sources like infographics).

- If an incoming call happens during the wizard, we just bail out of it and the edge demo. I'm not sure what the ideal behavior is, but this is at least reasonable. There's nothing in the wizard that *needs* to be done.

- Making the wizard a plugin lets us drop the gap between the end of the wizard and the start of the shell.  Yay! 
Approved by: Andrea Cimitan

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
                READ failedLogins
56
56
                WRITE setFailedLogins
57
57
                NOTIFY failedLoginsChanged)
 
58
    Q_PROPERTY(bool hereEnabled
 
59
               READ hereEnabled
 
60
               WRITE setHereEnabled
 
61
               NOTIFY hereEnabledChanged)
 
62
    Q_PROPERTY(QString hereLicensePath
 
63
               READ hereLicensePath
 
64
               NOTIFY hereLicensePathChanged)
 
65
    Q_PROPERTY(bool hereLicensePathValid // qml sees a null string as "", so we use proxy setting for that
 
66
               READ hereLicensePathValid
 
67
               NOTIFY hereLicensePathChanged)
58
68
 
59
69
public:
60
70
    enum PasswordDisplayHint {
75
85
    PasswordDisplayHint passwordDisplayHint() const;
76
86
    uint failedLogins() const;
77
87
    void setFailedLogins(uint failedLogins);
 
88
    bool hereEnabled() const;
 
89
    void setHereEnabled(bool enabled);
 
90
    QString hereLicensePath() const;
 
91
    bool hereLicensePathValid() const;
78
92
 
79
93
Q_SIGNALS:
80
94
    void userChanged();
85
99
    void statsWelcomeScreenChanged();
86
100
    void passwordDisplayHintChanged();
87
101
    void failedLoginsChanged();
 
102
    void hereEnabledChanged();
 
103
    void hereLicensePathChanged();
88
104
 
89
105
private Q_SLOTS:
90
106
    void propertiesChanged(const QString &user, const QString &interface, const QStringList &changed);
98
114
    void updateStatsWelcomeScreen();
99
115
    void updatePasswordDisplayHint();
100
116
    void updateFailedLogins();
 
117
    void updateHereEnabled();
 
118
    void updateHereLicensePath();
101
119
 
102
120
    AccountsServiceDBusAdaptor *m_service;
103
121
    QString m_user;
108
126
    bool m_statsWelcomeScreen;
109
127
    PasswordDisplayHint m_passwordDisplayHint;
110
128
    uint m_failedLogins;
 
129
    bool m_hereEnabled;
 
130
    QString m_hereLicensePath;
111
131
};
112
132
 
113
133
#endif