~seb128/ubuntu-system-settings/set-correct-application-name

« back to all changes in this revision

Viewing changes to plugins/sound/sound.cpp

  • Committer: CI Train Bot
  • Author(s): jonas-drange
  • Date: 2015-02-11 17:33:51 UTC
  • mfrom: (1156.2.8 sound-other-vibrations)
  • Revision ID: ci-train-bot@canonical.com-20150211173351-vaxl57xtw3aukw8y
[sound] let user toggle other vibrate setting 
Approved by: Sebastien Bacher

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
        Q_EMIT incomingCallVibrateSilentModeChanged();
58
58
    } else if (property == "IncomingMessageVibrateSilentMode") {
59
59
        Q_EMIT incomingMessageVibrateSilentModeChanged();
 
60
    } else if (property == "OtherVibrate") {
 
61
        Q_EMIT otherVibrateChanged();
60
62
    } else if (property == "DialpadSoundsEnabled") {
61
63
        Q_EMIT dialpadSoundsEnabledChanged();
62
64
    }
71
73
    Q_EMIT incomingMessageVibrateChanged();
72
74
    Q_EMIT incomingCallVibrateSilentModeChanged();
73
75
    Q_EMIT incomingMessageVibrateSilentModeChanged();
 
76
    Q_EMIT otherVibrateChanged();
74
77
    Q_EMIT dialpadSoundsEnabledChanged();
75
78
}
76
79
 
176
179
    Q_EMIT(incomingMessageVibrateSilentModeChanged());
177
180
}
178
181
 
 
182
bool Sound::getOtherVibrate()
 
183
{
 
184
    return m_accountsService.getUserProperty(AS_INTERFACE,
 
185
                                             "OtherVibrate").toBool();
 
186
}
 
187
 
 
188
void Sound::setOtherVibrate(bool enabled)
 
189
{
 
190
    if (enabled == getOtherVibrate())
 
191
        return;
 
192
 
 
193
    m_accountsService.setUserProperty(AS_INTERFACE,
 
194
                                      "OtherVibrate",
 
195
                                      QVariant::fromValue(enabled));
 
196
    Q_EMIT(otherVibrateChanged());
 
197
}
 
198
 
179
199
bool Sound::getDialpadSoundsEnabled()
180
200
{
181
201
    return m_accountsService.getUserProperty(AS_INTERFACE,