QGIS API Documentation
2.4.0-Chugiak
|
#include <qgsscalerangewidget.h>
Public Slots | |
void | setMinimumScale (double scale) |
void | setMaximumScale (double scale) |
void | setScaleRange (double min, double max) |
Public Member Functions | |
QgsScaleRangeWidget (QWidget *parent=0) | |
~QgsScaleRangeWidget () | |
void | setMapCanvas (QgsMapCanvas *mapCanvas) |
set the map canvas which will be used for the current scale buttons More... | |
double | minimumScale () |
return the minimum scale More... | |
double | maximumScale () |
return the maximum scale More... | |
double | minimumScaleDenom () |
return the minimum scale denominator ( = 1 / maximum scale ) More... | |
double | maximumScaleDenom () |
return the maximum scale denominator ( = 1 / minimum scale ) More... | |
void | reloadProjectScales () |
call to reload the project scales and apply them to the 2 scales combo boxes More... | |
Private Slots | |
void | setMaxScaleFromCanvas () |
void | setMinScaleFromCanvas () |
Private Attributes | |
QgsMapCanvas * | mCanvas |
pointer to the map canvas used for current buttons. More... | |
QGridLayout * | mLayout |
QLabel * | mMaximumScaleIconLabel |
QLabel * | mMinimumScaleIconLabel |
QPushButton * | mMaximumScaleSetCurrentPushButton |
QPushButton * | mMinimumScaleSetCurrentPushButton |
QgsScaleComboBox * | mMaximumScaleComboBox |
QgsScaleComboBox * | mMinimumScaleComboBox |
Definition at line 30 of file qgsscalerangewidget.h.
|
explicit |
Definition at line 21 of file qgsscalerangewidget.cpp.
References QgsApplication::getThemePixmap(), mLayout, mMaximumScaleComboBox, mMaximumScaleIconLabel, mMinimumScaleComboBox, mMinimumScaleIconLabel, reloadProjectScales(), and tr.
QgsScaleRangeWidget::~QgsScaleRangeWidget | ( | ) |
Definition at line 68 of file qgsscalerangewidget.cpp.
double QgsScaleRangeWidget::maximumScale | ( | ) |
return the maximum scale
Definition at line 125 of file qgsscalerangewidget.cpp.
References mMaximumScaleComboBox, and QgsScaleComboBox::scale().
Referenced by QgsScaleVisibilityDialog::maximumScale(), and minimumScaleDenom().
double QgsScaleRangeWidget::maximumScaleDenom | ( | ) |
return the maximum scale denominator ( = 1 / minimum scale )
Definition at line 135 of file qgsscalerangewidget.cpp.
References minimumScale().
double QgsScaleRangeWidget::minimumScale | ( | ) |
return the minimum scale
Definition at line 115 of file qgsscalerangewidget.cpp.
References mMinimumScaleComboBox, and QgsScaleComboBox::scale().
Referenced by maximumScaleDenom(), and QgsScaleVisibilityDialog::minimumScale().
double QgsScaleRangeWidget::minimumScaleDenom | ( | ) |
return the minimum scale denominator ( = 1 / maximum scale )
Definition at line 130 of file qgsscalerangewidget.cpp.
References maximumScale().
void QgsScaleRangeWidget::reloadProjectScales | ( | ) |
call to reload the project scales and apply them to the 2 scales combo boxes
Definition at line 72 of file qgsscalerangewidget.cpp.
References QgsProject::instance(), mMaximumScaleComboBox, mMinimumScaleComboBox, QgsProject::readBoolEntry(), QgsProject::readListEntry(), and QgsScaleComboBox::updateScales().
Referenced by QgsScaleRangeWidget().
void QgsScaleRangeWidget::setMapCanvas | ( | QgsMapCanvas * | mapCanvas | ) |
set the map canvas which will be used for the current scale buttons
setMapCanvas set the map canvas which will be used for the current scale buttons if not set, the buttons are hidden.
Definition at line 83 of file qgsscalerangewidget.cpp.
References mCanvas, mLayout, mMaximumScaleSetCurrentPushButton, mMinimumScaleSetCurrentPushButton, setMaxScaleFromCanvas(), setMinScaleFromCanvas(), and tr.
Referenced by QgsScaleVisibilityDialog::QgsScaleVisibilityDialog().
|
slot |
Definition at line 120 of file qgsscalerangewidget.cpp.
References mMaximumScaleComboBox, and QgsScaleComboBox::setScale().
Referenced by QgsScaleVisibilityDialog::setMaximumScale(), and setScaleRange().
|
privateslot |
Definition at line 151 of file qgsscalerangewidget.cpp.
References QgsMapCanvas::mapSettings(), mCanvas, mMaximumScaleComboBox, QgsMapSettings::scale(), and QgsScaleComboBox::setScale().
Referenced by setMapCanvas().
|
slot |
Definition at line 110 of file qgsscalerangewidget.cpp.
References mMinimumScaleComboBox, and QgsScaleComboBox::setScale().
Referenced by QgsScaleVisibilityDialog::setMinimumScale(), and setScaleRange().
|
privateslot |
Definition at line 146 of file qgsscalerangewidget.cpp.
References QgsMapCanvas::mapSettings(), mCanvas, mMinimumScaleComboBox, QgsMapSettings::scale(), and QgsScaleComboBox::setScale().
Referenced by setMapCanvas().
|
slot |
Definition at line 140 of file qgsscalerangewidget.cpp.
References setMaximumScale(), and setMinimumScale().
|
private |
pointer to the map canvas used for current buttons.
Definition at line 73 of file qgsscalerangewidget.h.
Referenced by setMapCanvas(), setMaxScaleFromCanvas(), and setMinScaleFromCanvas().
|
private |
Definition at line 76 of file qgsscalerangewidget.h.
Referenced by QgsScaleRangeWidget(), and setMapCanvas().
|
private |
Definition at line 81 of file qgsscalerangewidget.h.
Referenced by maximumScale(), QgsScaleRangeWidget(), reloadProjectScales(), setMaximumScale(), and setMaxScaleFromCanvas().
|
private |
Definition at line 77 of file qgsscalerangewidget.h.
Referenced by QgsScaleRangeWidget().
|
private |
Definition at line 79 of file qgsscalerangewidget.h.
Referenced by setMapCanvas().
|
private |
Definition at line 82 of file qgsscalerangewidget.h.
Referenced by minimumScale(), QgsScaleRangeWidget(), reloadProjectScales(), setMinimumScale(), and setMinScaleFromCanvas().
|
private |
Definition at line 78 of file qgsscalerangewidget.h.
Referenced by QgsScaleRangeWidget().
|
private |
Definition at line 80 of file qgsscalerangewidget.h.
Referenced by setMapCanvas().