コード例 #1
0
void ProfileControl::setSystemSoundLevel(int level)
{
    if (level == m_systemSoundLevel) {
        return;
    }
    m_systemSoundLevel = level;
    profile_set_value_as_int(GeneralProfile, SystemSoundLevelKey, level);
    emit systemSoundLevelChanged();
}
コード例 #2
0
void ProfileControl::setTouchscreenVibrationLevel(int level)
{
    if (level == m_touchscreenVibrationLevel) {
        return;
    }
    m_touchscreenVibrationLevel = level;
    profile_set_value_as_int(GeneralProfile, TouchscreenVibrationLevelKey, level);
    emit touchscreenVibrationLevelChanged();
}
コード例 #3
0
void ProfileControl::setRingerVolume(int volume)
{
    if (volume == m_ringerVolume) {
        return;
    }

    m_ringerVolume = volume;
    profile_set_value_as_int(GeneralProfile, VolumeKey, volume);
    emit ringerVolumeChanged();
}
bool
ProfileBackend::setVolumeLevel (QString profileName, int level)
{
    bool success =
#ifdef HAVE_LIBPROFILE
        profile_set_value_as_int (toCharArray (profileName), keyVolume, level) == 0;
#else
        false;
#endif

    if (success)
        m_profileVolumes[profileName] = level;

    return success;
}