Commit 6eb98ff0 by Sebastian Eichelbaum

[CHANGE #198] min max edit can now be hidden using the setting added by alex.

parent b4fc0542
......@@ -22,6 +22,7 @@
//
//---------------------------------------------------------------------------
#include <algorithm>
#include <cmath>
#include <limits>
#include <sstream>
......@@ -39,7 +40,7 @@
#include "WPropertyDoubleWidget.h"
#include "WPropertyDoubleWidget.moc"
const int WPropertyDoubleWidget::SliderResolution = 10000;
int WPropertyDoubleWidget::SliderResolution = 10000;
WPropertyDoubleWidget::WPropertyDoubleWidget( WPropDouble property, QGridLayout* propertyGrid, QWidget* parent ):
WPropertyWidget( property, propertyGrid, parent ),
......@@ -123,7 +124,7 @@ void WPropertyDoubleWidget::update()
// updating the interval edit causes the proper values to be set in m_min and m_max
m_slider.setHidden( false );
m_intervalEdit.setHidden( false );
m_intervalEdit.setHidden( !WQt4Gui::getSettings().value( "qt4gui/sliderMinMaxEdit", false ).toBool() );
m_slider.setValue( toSliderValue( m_integralProperty->get() ) );
}
else
......
......@@ -133,7 +133,7 @@ protected:
/**
* Resolution of the slider.
*/
const static int SliderResolution;
static int SliderResolution;
private:
public slots:
......
......@@ -22,6 +22,7 @@
//
//---------------------------------------------------------------------------
#include <algorithm>
#include <cmath>
#include <limits>
#include <sstream>
......@@ -39,7 +40,7 @@
#include "WPropertyIntWidget.h"
#include "WPropertyIntWidget.moc"
const int WPropertyIntWidget::SliderResolution = 10000;
int WPropertyIntWidget::SliderResolution = 10000;
WPropertyIntWidget::WPropertyIntWidget( WPropInt property, QGridLayout* propertyGrid, QWidget* parent ):
WPropertyWidget( property, propertyGrid, parent ),
......@@ -123,7 +124,7 @@ void WPropertyIntWidget::update()
// updating the interval edit causes the proper values to be set in m_min and m_max
m_slider.setHidden( false );
m_intervalEdit.setHidden( false );
m_intervalEdit.setHidden( !WQt4Gui::getSettings().value( "qt4gui/sliderMinMaxEdit", false ).toBool() );
m_slider.setValue( toSliderValue( m_integralProperty->get() ) );
}
else
......
......@@ -135,7 +135,7 @@ protected:
/**
* Resolution of the slider.
*/
const static int SliderResolution;
static int SliderResolution;
private:
public slots:
......
......@@ -27,7 +27,7 @@
#include "WQtIntervalEdit.h"
#include "WQtIntervalEdit.moc"
const int WQtIntervalEditBase::SliderResolution = 10000;
int WQtIntervalEditBase::SliderResolution = 10000;
WQtIntervalEditBase::WQtIntervalEditBase( QWidget* parent ):
QWidget( parent ),
......
......@@ -52,7 +52,7 @@ public:
*
* \param parent the parent widget
*/
WQtIntervalEditBase( QWidget* parent );
explicit WQtIntervalEditBase( QWidget* parent );
/**
* Destructor.
......@@ -66,12 +66,12 @@ public:
signals:
/**
* Called whenever the user changes the current minimum OR \ref setMin was called.
* Called whenever the user changes the current minimum OR setMin was called.
*/
void minimumChanged();
/**
* Called whenever the user changes the current ,aximum OR \ref setMax was called.
* Called whenever the user changes the current ,aximum OR setMax was called.
*/
void maximumChanged();
......@@ -101,7 +101,7 @@ protected:
/**
* Resolution of the sliders.
*/
const static int SliderResolution;
static int SliderResolution;
/**
* The slider for the minimum.
......@@ -155,7 +155,7 @@ public:
*
* \param parent the parent widget
*/
WQtIntervalEdit( QWidget* parent );
explicit WQtIntervalEdit( QWidget* parent );
/**
* Destructor.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment