From 6eb98ff0b238304e96f3d52e05cd9c05dc486557 Mon Sep 17 00:00:00 2001 From: Sebastian Eichelbaum Date: Mon, 30 Jul 2012 19:46:46 +0200 Subject: [PATCH] [CHANGE #198] min max edit can now be hidden using the setting added by alex. --- src/qt4gui/qt4/controlPanel/WPropertyDoubleWidget.cpp | 5 +++-- src/qt4gui/qt4/controlPanel/WPropertyDoubleWidget.h | 2 +- src/qt4gui/qt4/controlPanel/WPropertyIntWidget.cpp | 5 +++-- src/qt4gui/qt4/controlPanel/WPropertyIntWidget.h | 2 +- src/qt4gui/qt4/guiElements/WQtIntervalEdit.cpp | 2 +- src/qt4gui/qt4/guiElements/WQtIntervalEdit.h | 10 +++++----- 6 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/qt4gui/qt4/controlPanel/WPropertyDoubleWidget.cpp b/src/qt4gui/qt4/controlPanel/WPropertyDoubleWidget.cpp index 88574f402..9a41f848e 100644 --- a/src/qt4gui/qt4/controlPanel/WPropertyDoubleWidget.cpp +++ b/src/qt4gui/qt4/controlPanel/WPropertyDoubleWidget.cpp @@ -22,6 +22,7 @@ // //--------------------------------------------------------------------------- +#include #include #include #include @@ -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 diff --git a/src/qt4gui/qt4/controlPanel/WPropertyDoubleWidget.h b/src/qt4gui/qt4/controlPanel/WPropertyDoubleWidget.h index 1a76fab89..c463804c8 100644 --- a/src/qt4gui/qt4/controlPanel/WPropertyDoubleWidget.h +++ b/src/qt4gui/qt4/controlPanel/WPropertyDoubleWidget.h @@ -133,7 +133,7 @@ protected: /** * Resolution of the slider. */ - const static int SliderResolution; + static int SliderResolution; private: public slots: diff --git a/src/qt4gui/qt4/controlPanel/WPropertyIntWidget.cpp b/src/qt4gui/qt4/controlPanel/WPropertyIntWidget.cpp index d5b20471c..abb725d40 100644 --- a/src/qt4gui/qt4/controlPanel/WPropertyIntWidget.cpp +++ b/src/qt4gui/qt4/controlPanel/WPropertyIntWidget.cpp @@ -22,6 +22,7 @@ // //--------------------------------------------------------------------------- +#include #include #include #include @@ -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 diff --git a/src/qt4gui/qt4/controlPanel/WPropertyIntWidget.h b/src/qt4gui/qt4/controlPanel/WPropertyIntWidget.h index acddb903e..fecc66ed3 100644 --- a/src/qt4gui/qt4/controlPanel/WPropertyIntWidget.h +++ b/src/qt4gui/qt4/controlPanel/WPropertyIntWidget.h @@ -135,7 +135,7 @@ protected: /** * Resolution of the slider. */ - const static int SliderResolution; + static int SliderResolution; private: public slots: diff --git a/src/qt4gui/qt4/guiElements/WQtIntervalEdit.cpp b/src/qt4gui/qt4/guiElements/WQtIntervalEdit.cpp index dec98d98e..fa23e4646 100644 --- a/src/qt4gui/qt4/guiElements/WQtIntervalEdit.cpp +++ b/src/qt4gui/qt4/guiElements/WQtIntervalEdit.cpp @@ -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 ), diff --git a/src/qt4gui/qt4/guiElements/WQtIntervalEdit.h b/src/qt4gui/qt4/guiElements/WQtIntervalEdit.h index a0d7a452e..9b8dcbe71 100644 --- a/src/qt4gui/qt4/guiElements/WQtIntervalEdit.h +++ b/src/qt4gui/qt4/guiElements/WQtIntervalEdit.h @@ -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. -- GitLab