31 minLbl->
setToolTip(
tr(
"Minimum scale, i.e. maximum scale denominator. " 32 "This limit is exclusive, that means the layer will not be displayed on this scale." ) );
36 maxLbl->
setToolTip(
tr(
"Maximum scale, i.e. minimum scale denominator. " 37 "This limit is inclusive, that means the layer will be displayed on this scale." ) );
39 mMinimumScaleIconLabel =
new QLabel(
this );
41 mMaximumScaleIconLabel =
new QLabel(
this );
46 connect( mMinimumScaleWidget, SIGNAL( scaleChanged(
double ) ), mMaximumScaleWidget, SLOT( setMinScale(
double ) ) );
51 mMinimumScaleWidget->
setScale( 1.0 / 100000 );
52 mMaximumScaleWidget->
setScale( 1.0 / 1000 );
55 mLayout->
addWidget( mMinimumScaleIconLabel, 1, 0 );
56 mLayout->
addWidget( mMinimumScaleWidget, 1, 1 );
58 mLayout->
addWidget( mMaximumScaleIconLabel, 1, 2 );
59 mLayout->
addWidget( mMaximumScaleWidget, 1, 3 );
66 connect( mMinimumScaleWidget, SIGNAL( scaleChanged(
double ) ),
this, SLOT( emitRangeChanged() ) );
67 connect( mMaximumScaleWidget, SIGNAL( scaleChanged(
double ) ),
this, SLOT( emitRangeChanged() ) );
93 if ( qIsInf( scale ) )
95 mMinimumScaleWidget->
setScale( scale );
100 return mMinimumScaleWidget->
scale();
105 if ( qIsInf( scale ) )
107 mMaximumScaleWidget->
setScale( scale );
112 return mMaximumScaleWidget->
scale();
121 return qRound( 1.0 / scale );
130 return qRound( 1.0 / scale );
139 void QgsScaleRangeWidget::emitRangeChanged()
void setContentsMargins(int left, int top, int right, int bottom)
bool readBoolEntry(const QString &scope, const QString &key, bool def=false, bool *ok=nullptr) const
void setPixmap(const QPixmap &)
void setAlignment(QFlags< Qt::AlignmentFlag >)
QString tr(const char *sourceText, const char *disambiguation, int n)
static QPixmap getThemePixmap(const QString &theName)
Helper to get a theme icon as a pixmap.
Map canvas is a class for displaying all GIS data types on a canvas.
double ANALYSIS_EXPORT max(double x, double y)
Returns the maximum of two doubles or the first argument if both are equal.
QStringList readListEntry(const QString &scope, const QString &key, const QStringList &def=QStringList(), bool *ok=nullptr) const
Key value accessors.
void setColumnStretch(int column, int stretch)
static QgsProject * instance()
Returns the QgsProject singleton instance.
double ANALYSIS_EXPORT min(double x, double y)
Returns the minimum of two doubles or the first argument if both are equal.
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void setWordWrap(bool on)