-
-
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.
- Loading branch information
Showing
3 changed files
with
68 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,90 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/qgsscalecombobox.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
/** A combobox which lets the user select map scale from predefined list | ||
* and highlights nearest to current scale value | ||
*/ | ||
class QgsScaleComboBox : QComboBox | ||
{ | ||
%TypeHeaderCode | ||
#include <qgsscalecombobox.h> | ||
%Docstring | ||
A combobox which lets the user select map scale from predefined list | ||
and highlights nearest to current scale value | ||
* | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsscalecombobox.h" | ||
%End | ||
public: | ||
QgsScaleComboBox( QWidget* parent /TransferThis/ = 0 ); | ||
~QgsScaleComboBox(); | ||
QgsScaleComboBox( QWidget *parent /TransferThis/ = 0 ); | ||
|
||
//! Function to read the selected scale as text | ||
QString scaleString(); | ||
//! Function to set the selected scale from text | ||
bool setScaleString( const QString& scaleTxt ); | ||
//! Function to read the selected scale as double | ||
%Docstring | ||
Function to read the selected scale as text | ||
:rtype: str | ||
%End | ||
bool setScaleString( const QString &scaleTxt ); | ||
%Docstring | ||
Function to set the selected scale from text | ||
:rtype: bool | ||
%End | ||
double scale() const; | ||
//! Function to set the selected scale from double | ||
%Docstring | ||
Function to read the selected scale as double | ||
:rtype: float | ||
%End | ||
void setScale( double scale ); | ||
//! Function to read the min scale | ||
%Docstring | ||
Function to set the selected scale from double | ||
%End | ||
double minScale() const; | ||
%Docstring | ||
Function to read the min scale | ||
:rtype: float | ||
%End | ||
|
||
//! Helper function to convert a double to scale string | ||
// Performs rounding, so an exact representation is not to | ||
// be expected. | ||
static QString toString( double scale ); | ||
//! Helper function to convert a scale string to double | ||
static double toDouble( const QString& scaleString, bool *ok = 0 ); | ||
%Docstring | ||
:rtype: str | ||
%End | ||
static double toDouble( const QString &scaleString, bool *ok = 0 ); | ||
%Docstring | ||
Helper function to convert a scale string to double | ||
:rtype: float | ||
%End | ||
|
||
signals: | ||
//! Signal is emitted when *user* has finished editing/selecting a new scale. | ||
void scaleChanged( double scale ); | ||
%Docstring | ||
Signal is emitted when *user* has finished editing/selecting a new scale. | ||
%End | ||
|
||
public slots: | ||
void updateScales( const QStringList &scales = QStringList() ); | ||
//! Function to set the min scale | ||
|
||
void setMinScale( double scale ); | ||
%Docstring | ||
Set the minimum allowed scale. | ||
Anything scale lower than the minimum scale will automatically | ||
be converted to the minimum scale. | ||
Except for 0 which is always allowed. | ||
%End | ||
|
||
protected: | ||
void showPopup(); | ||
virtual void showPopup(); | ||
|
||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/qgsscalecombobox.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
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