2017-04-30 16:22:23 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgsscalecombobox.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-01-10 15:50:48 +02:00
|
|
|
|
|
|
|
class QgsScaleComboBox : QComboBox
|
|
|
|
{
|
2017-04-30 16:22:23 +02:00
|
|
|
%Docstring
|
|
|
|
A combobox which lets the user select map scale from predefined list
|
|
|
|
and highlights nearest to current scale value
|
|
|
|
*
|
2012-01-10 15:50:48 +02:00
|
|
|
%End
|
|
|
|
|
2017-04-30 16:22:23 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsscalecombobox.h"
|
|
|
|
%End
|
2012-07-05 17:06:04 +03:00
|
|
|
public:
|
2017-04-30 16:22:23 +02:00
|
|
|
QgsScaleComboBox( QWidget *parent /TransferThis/ = 0 );
|
2012-07-05 17:06:04 +03:00
|
|
|
|
2012-09-21 19:09:57 +02:00
|
|
|
QString scaleString();
|
2017-04-30 16:22:23 +02:00
|
|
|
%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
|
2016-03-03 09:32:30 +01:00
|
|
|
double scale() const;
|
2017-04-30 16:22:23 +02:00
|
|
|
%Docstring
|
|
|
|
Function to read the selected scale as double
|
|
|
|
:rtype: float
|
|
|
|
%End
|
2012-09-21 19:09:57 +02:00
|
|
|
void setScale( double scale );
|
2017-04-30 16:22:23 +02:00
|
|
|
%Docstring
|
|
|
|
Function to set the selected scale from double
|
|
|
|
%End
|
2016-03-03 09:32:30 +01:00
|
|
|
double minScale() const;
|
2017-04-30 16:22:23 +02:00
|
|
|
%Docstring
|
|
|
|
Function to read the min scale
|
|
|
|
:rtype: float
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2012-09-21 19:09:57 +02:00
|
|
|
static QString toString( double scale );
|
2017-04-30 16:22:23 +02:00
|
|
|
%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
|
2012-09-21 19:09:57 +02:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
signals:
|
2016-03-03 09:32:30 +01:00
|
|
|
void scaleChanged( double scale );
|
2017-04-30 16:22:23 +02:00
|
|
|
%Docstring
|
|
|
|
Signal is emitted when *user* has finished editing/selecting a new scale.
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2012-07-05 17:06:04 +03:00
|
|
|
public slots:
|
|
|
|
void updateScales( const QStringList &scales = QStringList() );
|
2017-04-30 16:22:23 +02:00
|
|
|
|
2016-03-03 09:32:30 +01:00
|
|
|
void setMinScale( double scale );
|
2017-04-30 16:22:23 +02:00
|
|
|
%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
|
2012-09-24 02:28:15 +02:00
|
|
|
|
|
|
|
protected:
|
2017-04-30 16:22:23 +02:00
|
|
|
virtual void showPopup();
|
|
|
|
|
|
|
|
|
2012-01-10 15:50:48 +02:00
|
|
|
};
|
|
|
|
|
2017-04-30 16:22:23 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgsscalecombobox.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|