AlbumShaper  1.0a3
blurSharpenSlider.cpp
Go to the documentation of this file.
1 //==============================================
2 // copyright : (C) 2003-2005 by Will Stokes
3 //==============================================
4 // This program is free software; you can redistribute it
5 // and/or modify it under the terms of the GNU General
6 // Public License as published by the Free Software
7 // Foundation; either version 2 of the License, or
8 // (at your option) any later version.
9 //==============================================
10 
11 #include "blurSharpenSlider.h"
12 
13 //==========================================
14 BlurSharpenSlider::BlurSharpenSlider( Qt::Orientation orientation,
15  QWidget* parent, const char* name )
16  : DynamicSlider( orientation, parent, name)
17 {
18  setZeroString( tr("No change") );
19  setPrefixes( QString(tr("Blur"))+": ",
20  QString(tr("Sharpen"))+": " );
21  setSuffix("x");
22 }
23 //==========================================
25 {
26  //always use the absolute value of the value
27  return QString("%1").arg( QABS(value()) );
28 }
29 //==========================================
void setPrefixes(QString prefix1, QString prefix2)
set two prefix values, one for when the value is positive and one for when the value is negative...
BlurSharpenSlider(Qt::Orientation orientation, QWidget *parent, const char *name=0)
A more dynamic slider that provides moving tooltips that show the slider value.
Definition: dynamicSlider.h:23
virtual QString mapValToString()
subclass DynamicSlider and reimplement this method to change the behavior used to display slider valu...
void setZeroString(QString val)
when set, a zero string is shown instead of the current value/prefix/suffix when the slider value is ...
void setSuffix(QString val)
set the suffix that is displayed after the current slider value