aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/udisks2/settingsdialog.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2016-05-08 08:30:16 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2016-05-08 08:30:16 +0000
commit21d7bcfa0e1704407c5313053a9926ed7cf127c0 (patch)
tree5744ba0642ec42ef347dfd09a9249986e1b8365d /src/plugins/General/udisks2/settingsdialog.cpp
parent04b1185fe9f0864879ced3caf506d67c3596145a (diff)
downloadqmmp-21d7bcfa0e1704407c5313053a9926ed7cf127c0.tar.gz
qmmp-21d7bcfa0e1704407c5313053a9926ed7cf127c0.tar.bz2
qmmp-21d7bcfa0e1704407c5313053a9926ed7cf127c0.zip
updated Japanese translation (RyoTa SimaMoto)
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@6337 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/udisks2/settingsdialog.cpp')
0 files changed, 0 insertions, 0 deletions
span> * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include <QtPlugin> #include <QTranslator> #include <QLocale> #include <qmmp/soundcore.h> #include "incdecvolumeoption.h" bool IncDecVolumeCommandLineOption::identify(const QString & str) const { if ( str == QString("--volume-inc") || str == QString("--volume-dec") ) { return true; } return false; } const QString IncDecVolumeCommandLineOption::helpString() const { return QString( "--volume-inc " + tr("Increase volume with step 5")+"\n" "--volume-dec " + tr("Decrease volume with step 5")+"\n" ); } QString IncDecVolumeCommandLineOption::executeCommand(const QString& opt_str, const QStringList &args) { Q_UNUSED(args); SoundCore *core = SoundCore::instance(); int volume = qMax(core->leftVolume(), core->rightVolume()); int balance = 0; int left = core->leftVolume(); int right = core->rightVolume(); if (left || right) balance = (right - left)*100/volume; if (opt_str == "--volume-inc") { volume = qMin (100, volume + 5); } else if (opt_str == "--volume-dec") { volume = qMax (0, volume - 5); } core->setVolume(volume-qMax(balance,0)*volume/100, volume+qMin(balance,0)*volume/100); return QString(); } const QString IncDecVolumeCommandLineOption::name() const { return "IncDecVolumeCommandLineOption"; }