mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-31 00:03:42 -04:00
Run clang-tidy modernize-use-override to remove all the redundant virtual keywords from overridden methods, and add some missing overrides. Another benefit is that this has also added the overrides on destructors, which will cause a build failure if a base class is missing a virtual destructor.
60 lines
1.8 KiB
C++
60 lines
1.8 KiB
C++
/***************************************************************************
|
|
qgsdial.h
|
|
-------------------
|
|
begin : July 2013
|
|
copyright : (C) 2013 by Daniel Vaz
|
|
email : danielvaz at gmail dot com
|
|
***************************************************************************/
|
|
|
|
/***************************************************************************
|
|
* *
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
* it under the terms of the GNU General Public License as published by *
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
* (at your option) any later version. *
|
|
* *
|
|
***************************************************************************/
|
|
|
|
#include <QDial>
|
|
#include <QVariant>
|
|
#include "qgis_gui.h"
|
|
#include "qgis.h"
|
|
|
|
class QPaintEvent;
|
|
|
|
/**
|
|
* \ingroup gui
|
|
* \class QgsDial
|
|
*/
|
|
class GUI_EXPORT QgsDial : public QDial
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
|
|
/**
|
|
* Constructor for QgsDial
|
|
* \param parent parent object
|
|
*/
|
|
QgsDial( QWidget *parent SIP_TRANSFERTHIS = nullptr );
|
|
|
|
void setMinimum( const QVariant &min );
|
|
void setMaximum( const QVariant &max );
|
|
void setSingleStep( const QVariant &step );
|
|
void setValue( const QVariant &value );
|
|
QVariant variantValue() const;
|
|
|
|
signals:
|
|
void valueChanged( const QVariant & );
|
|
|
|
private slots:
|
|
void onValueChanged( int );
|
|
|
|
protected:
|
|
void paintEvent( QPaintEvent *event ) override;
|
|
|
|
private:
|
|
void update();
|
|
|
|
QVariant mMin, mMax, mStep, mValue;
|
|
};
|