-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
edit widgets: don't truncate double ranges and also support them in s…
…liders and dials (fixes #12421)
- Loading branch information
Showing
9 changed files
with
375 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,48 @@ | ||
#include <QDial> | ||
/*************************************************************************** | ||
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 <QPainter> | ||
#include <QPaintEvent> | ||
#include <QSize> | ||
#include <QDial> | ||
|
||
class GUI_EXPORT QgsDial : public QDial | ||
{ | ||
Q_OBJECT | ||
public: | ||
QgsDial( QWidget *parent = 0 ); | ||
|
||
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( QVariant ); | ||
|
||
protected slots: | ||
void valueChanged( int ); | ||
|
||
protected: | ||
virtual void paintEvent( QPaintEvent * event ) override; | ||
|
||
private: | ||
void update(); | ||
|
||
QVariant mMin, mMax, mStep, mValue; | ||
}; |
Oops, something went wrong.