~ubuntu-branches/debian/stretch/smplayer/stretch

« back to all changes in this revision

Viewing changes to src/prefinput.cpp

  • Committer: Package Import Robot
  • Author(s): Mateusz Łukasik
  • Date: 2014-04-21 11:53:59 UTC
  • mfrom: (1.3.2)
  • Revision ID: package-import@ubuntu.com-20140421115359-oz572avkq20ieqaf
Tags: 14.3.0-1
* Add myself to uploaders.
* New upstream release. (Closes: #740769, #742685)
* debian/control:
  - bump standards version to 3.9.5. (no changes needed)
  - rename smplayer-translations to smplayer-l10n. (Closes: #698365)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*  smplayer, GUI front-end for mplayer.
2
 
    Copyright (C) 2006-2013 Ricardo Villalba <rvm@users.sourceforge.net>
 
2
    Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net>
3
3
 
4
4
    This program is free software; you can redistribute it and/or modify
5
5
    it under the terms of the GNU General Public License as published by
172
172
        setWheelFunction( pref->wheel_function );
173
173
        setWheelFunctionCycle(pref->wheel_function_cycle);
174
174
        setWheelFunctionSeekingReverse(pref->wheel_function_seeking_reverse);
 
175
        delay_left_check->setChecked(pref->delay_left_click);
175
176
}
176
177
 
177
178
void PrefInput::getData(Preferences * pref) {
186
187
        pref->wheel_function = wheelFunction();
187
188
        pref->wheel_function_cycle = wheelFunctionCycle();
188
189
        pref->wheel_function_seeking_reverse = wheelFunctionSeekingReverse();
 
190
        pref->delay_left_click = delay_left_check->isChecked();
189
191
}
190
192
 
191
193
/*
265
267
        return wheel_function_combo->itemData(wheel_function_combo->currentIndex()).toInt();
266
268
}
267
269
 
268
 
void PrefInput::setWheelFunctionCycle(QFlags<Preferences::WheelFunctions> flags){
 
270
void PrefInput::setWheelFunctionCycle(Preferences::WheelFunctions flags){
269
271
        wheel_function_seek->setChecked(flags.testFlag(Preferences::Seeking));
270
272
        wheel_function_volume->setChecked(flags.testFlag(Preferences::Volume));
271
273
        wheel_function_zoom->setChecked(flags.testFlag(Preferences::Zoom));
272
274
        wheel_function_speed->setChecked(flags.testFlag(Preferences::ChangeSpeed));
273
275
}
274
276
 
275
 
QFlags<Preferences::WheelFunctions> PrefInput::wheelFunctionCycle(){
276
 
        QFlags<Preferences::WheelFunctions> seekflags (QFlag ((int) Preferences::Seeking)) ;
277
 
        QFlags<Preferences::WheelFunctions> volumeflags (QFlag ((int) Preferences::Volume)) ;
278
 
        QFlags<Preferences::WheelFunctions> zoomflags (QFlag ((int) Preferences::Zoom)) ;
279
 
        QFlags<Preferences::WheelFunctions> speedflags (QFlag ((int) Preferences::ChangeSpeed)) ;
280
 
        QFlags<Preferences::WheelFunctions> out (QFlag (0));
 
277
Preferences::WheelFunctions PrefInput::wheelFunctionCycle(){
 
278
        Preferences::WheelFunctions seekflags (QFlag ((int) Preferences::Seeking)) ;
 
279
        Preferences::WheelFunctions volumeflags (QFlag ((int) Preferences::Volume)) ;
 
280
        Preferences::WheelFunctions zoomflags (QFlag ((int) Preferences::Zoom)) ;
 
281
        Preferences::WheelFunctions speedflags (QFlag ((int) Preferences::ChangeSpeed)) ;
 
282
        Preferences::WheelFunctions out (QFlag (0));
281
283
        if(wheel_function_seek->isChecked()){
282
284
                out = out | seekflags;
283
285
        }
337
339
        setWhatsThis(wheel_function_combo, tr("Wheel function"),
338
340
                tr("Select the action for the mouse wheel.") );
339
341
 
 
342
        setWhatsThis(delay_left_check, tr("Don't trigger the left click function with a double click"),
 
343
                tr("If this option is enabled when you double click on the "
 
344
            "video area only the double click function will be triggered. "
 
345
            "The left click action won't be activated.") + " "+
 
346
                tr("By enabling this option the left click is delayed %1 milliseconds "
 
347
           "because it's necessary to wait that time to know if there's a double click or not.").arg(qApp->doubleClickInterval()+10) );
 
348
 
 
349
        setWhatsThis(wheel_function_seeking_reverse_check, tr("Reverse mouse wheel seeking"),
 
350
                tr("Check it to seek in the opposite direction.") );
 
351
 
340
352
        addSectionTitle(tr("Mouse wheel functions"));
341
353
 
342
354
        setWhatsThis(wheel_function_seek, tr("Media seeking"),
350
362
 
351
363
        setWhatsThis(wheel_function_speed, tr("Change speed"),
352
364
                tr("Check it to enable changing speed as one function.") );
353
 
 
354
 
        setWhatsThis(wheel_function_seeking_reverse_check, tr("Reverse mouse wheel seeking"),
355
 
                tr("Check it to seek in the opposite direction.") );
356
 
 
357
365
}
358
366
 
359
367
#include "moc_prefinput.cpp"