Skip to content
Permalink
Browse files

fix build on precise

(cherry picked from commit ffd2f26)
  • Loading branch information
jef-n committed Jun 11, 2015
1 parent da94916 commit d7f662f3254559e9cfef7d74aa5595d44f87f5fc
Showing with 16 additions and 10 deletions.
  1. +5 −2 src/gui/qgsdial.cpp
  2. +3 −3 src/gui/qgsdial.h
  3. +5 −2 src/gui/qgsslider.cpp
  4. +3 −3 src/gui/qgsslider.h
@@ -18,7 +18,10 @@
#include "qgsdial.h"
#include "qgslogger.h"

#include <QPaintEvent>
#include <QPainter>
#include <QRect>
#include <qmath.h>

QgsDial::QgsDial( QWidget *parent ) : QDial( parent )
{
@@ -87,14 +90,14 @@ void QgsDial::update()
if ( minimum() != 0 )
QDial::setMinimum( 0 );

int max = ( int ) ceil(( mMax.toDouble() - mMin.toDouble() ) / mStep.toDouble() );
int max = qCeil(( mMax.toDouble() - mMin.toDouble() ) / mStep.toDouble() );
if ( maximum() != max )
QDial::setMaximum( max );

if ( singleStep() != 1 )
QDial::setSingleStep( 1 );

QDial::setValue(( int ) ceil(( mValue.toDouble() - mMin.toDouble() ) / mStep.toDouble() ) );
QDial::setValue( qCeil(( mValue.toDouble() - mMin.toDouble() ) / mStep.toDouble() ) );
}

connect( this, SIGNAL( valueChanged( int ) ), this, SLOT( valueChanged( int ) ) );
@@ -15,10 +15,10 @@
* *
***************************************************************************/

#include <QPainter>
#include <QPaintEvent>
#include <QSize>
#include <QDial>
#include <QVariant>

class QPaintEvent;

class GUI_EXPORT QgsDial : public QDial
{
@@ -18,7 +18,10 @@
#include "qgsslider.h"
#include "qgslogger.h"

#include <QPaintEvent>
#include <QPainter>
#include <QRect>
#include <qmath.h>

QgsSlider::QgsSlider( QWidget * parent ) : QSlider( parent )
{
@@ -92,14 +95,14 @@ void QgsSlider::update()
if ( minimum() != 0 )
QSlider::setMinimum( 0 );

int max = ( int ) ceil(( mMax.toDouble() - mMin.toDouble() ) / mStep.toDouble() );
int max = qCeil(( mMax.toDouble() - mMin.toDouble() ) / mStep.toDouble() );
if ( maximum() != max )
QSlider::setMaximum( max );

if ( singleStep() != 1 )
QSlider::setSingleStep( 1 );

QSlider::setValue(( int ) ceil(( mValue.toDouble() - mMin.toDouble() ) / mStep.toDouble() ) );
QSlider::setValue( qCeil(( mValue.toDouble() - mMin.toDouble() ) / mStep.toDouble() ) );
}

connect( this, SIGNAL( valueChanged( int ) ), this, SLOT( valueChanged( int ) ) );
@@ -15,10 +15,10 @@
* *
***************************************************************************/

#include <QPainter>
#include <QPaintEvent>
#include <QSize>
#include <QSlider>
#include <QVariant>

class QPaintEvent;

class GUI_EXPORT QgsSlider : public QSlider
{

0 comments on commit d7f662f

Please sign in to comment.
You can’t perform that action at this time.