QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Slots | Public Member Functions | Private Slots | Private Attributes | List of all members
QgsScaleRangeWidget Class Reference

#include <qgsscalerangewidget.h>

Inheritance diagram for QgsScaleRangeWidget:
Inheritance graph
[legend]
Collaboration diagram for QgsScaleRangeWidget:
Collaboration graph
[legend]

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

QgsMapCanvasmCanvas
 pointer to the map canvas used for current buttons. More...
 
QGridLayout * mLayout
 
QLabel * mMaximumScaleIconLabel
 
QLabel * mMinimumScaleIconLabel
 
QPushButton * mMaximumScaleSetCurrentPushButton
 
QPushButton * mMinimumScaleSetCurrentPushButton
 
QgsScaleComboBoxmMaximumScaleComboBox
 
QgsScaleComboBoxmMinimumScaleComboBox
 

Detailed Description

Definition at line 30 of file qgsscalerangewidget.h.

Constructor & Destructor Documentation

QgsScaleRangeWidget::QgsScaleRangeWidget ( QWidget *  parent = 0)
explicit
QgsScaleRangeWidget::~QgsScaleRangeWidget ( )

Definition at line 68 of file qgsscalerangewidget.cpp.

Member Function Documentation

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().

void QgsScaleRangeWidget::setMaximumScale ( double  scale)
slot
void QgsScaleRangeWidget::setMaxScaleFromCanvas ( )
privateslot
void QgsScaleRangeWidget::setMinimumScale ( double  scale)
slot
void QgsScaleRangeWidget::setMinScaleFromCanvas ( )
privateslot
void QgsScaleRangeWidget::setScaleRange ( double  min,
double  max 
)
slot

Definition at line 140 of file qgsscalerangewidget.cpp.

References setMaximumScale(), and setMinimumScale().

Member Data Documentation

QgsMapCanvas* QgsScaleRangeWidget::mCanvas
private

pointer to the map canvas used for current buttons.

Definition at line 73 of file qgsscalerangewidget.h.

Referenced by setMapCanvas(), setMaxScaleFromCanvas(), and setMinScaleFromCanvas().

QGridLayout* QgsScaleRangeWidget::mLayout
private

Definition at line 76 of file qgsscalerangewidget.h.

Referenced by QgsScaleRangeWidget(), and setMapCanvas().

QgsScaleComboBox* QgsScaleRangeWidget::mMaximumScaleComboBox
private
QLabel* QgsScaleRangeWidget::mMaximumScaleIconLabel
private

Definition at line 77 of file qgsscalerangewidget.h.

Referenced by QgsScaleRangeWidget().

QPushButton* QgsScaleRangeWidget::mMaximumScaleSetCurrentPushButton
private

Definition at line 79 of file qgsscalerangewidget.h.

Referenced by setMapCanvas().

QgsScaleComboBox* QgsScaleRangeWidget::mMinimumScaleComboBox
private
QLabel* QgsScaleRangeWidget::mMinimumScaleIconLabel
private

Definition at line 78 of file qgsscalerangewidget.h.

Referenced by QgsScaleRangeWidget().

QPushButton* QgsScaleRangeWidget::mMinimumScaleSetCurrentPushButton
private

Definition at line 80 of file qgsscalerangewidget.h.

Referenced by setMapCanvas().


The documentation for this class was generated from the following files: