Support save / load for the Animation Speed on the Preferences

User can now fine-tune the animation speed on the preferences,
a value of zero disables it completely.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2014-03-11 17:36:49 -03:00 committed by Dirk Hohndel
parent 9f37bac07a
commit 751c76a578
3 changed files with 128 additions and 51 deletions

View file

@ -26,6 +26,7 @@ namespace Animations
void moveTo(QObject *obj, qreal x, qreal y)
{
QSettings s;
s.beginGroup("Animations");
int msecs = s.value("animation_speed", 500).toInt();
if (msecs != 0){
QPropertyAnimation *animation = new QPropertyAnimation(obj, "pos");