QGIS API Documentation  2.6.0-Brighton
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
QgsExtentGroupBox Class Reference

Collapsible group box for configuration of extent, typically for a save operation. More...

#include <qgsextentgroupbox.h>

Inheritance diagram for QgsExtentGroupBox:
Inheritance graph
[legend]

Public Types

enum  ExtentState { OriginalExtent, CurrentExtent, UserExtent }

Public Slots

void setOutputExtentFromOriginal ()
 set output extent to be the same as original extent (may be transformed to output CRS)
void setOutputExtentFromCurrent ()
 set output extent to be the same as current extent (may be transformed to output CRS)
void setOutputExtentFromUser (const QgsRectangle &extent, const QgsCoordinateReferenceSystem &crs)
 set output extent to custom extent (may be transformed to outut CRS)

Signals

void extentChanged (const QgsRectangle &r)
 emitted when extent is changed

Public Member Functions

 QgsExtentGroupBox (QWidget *parent=0)
void setOriginalExtent (const QgsRectangle &originalExtent, const QgsCoordinateReferenceSystem &originalCrs)
 Setup original extent - should be called as part of initialization.
QgsRectangle originalExtent () const
const
QgsCoordinateReferenceSystem
originalCrs () const
void setCurrentExtent (const QgsRectangle &currentExtent, const QgsCoordinateReferenceSystem &currentCrs)
 Setup current extent - should be called as part of initialization (or whenever current extent changes)
QgsRectangle currentExtent () const
const
QgsCoordinateReferenceSystem
currentCrs () const
void setOutputCrs (const QgsCoordinateReferenceSystem &outputCrs)
 Set the output CRS - may need to be used for transformation from original/current extent.
QgsRectangle outputExtent () const
 Get the resulting extent - in output CRS coordinates.
ExtentState extentState () const
- Public Member Functions inherited from QgsCollapsibleGroupBox
 QgsCollapsibleGroupBox (QWidget *parent=0, QSettings *settings=0)
 QgsCollapsibleGroupBox (const QString &title, QWidget *parent=0, QSettings *settings=0)
 ~QgsCollapsibleGroupBox ()
void setSettings (QSettings *settings)
void setSaveCollapsedState (bool save)
 set this to false to not save/restore collapsed state
void setSaveCheckedState (bool save)
 set this to true to save/restore checked state
bool saveCollapsedState ()
bool saveCheckedState ()
void setSettingGroup (const QString &group)
 set this to a defined string to share save/restore states across different parent dialogs
QString settingGroup () const
- Public Member Functions inherited from QgsCollapsibleGroupBoxBasic
 QgsCollapsibleGroupBoxBasic (QWidget *parent=0)
 QgsCollapsibleGroupBoxBasic (const QString &title, QWidget *parent=0)
 ~QgsCollapsibleGroupBoxBasic ()
bool isCollapsed () const
void setCollapsed (bool collapse)
QString syncGroup () const
 Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key.
void setSyncGroup (QString grp)
void setScrollOnExpand (bool scroll)
 set this to false to not automatically scroll parent QScrollArea to this widget's contents when expanded
bool scrollOnExpand ()

Protected Slots

void on_mXMinLineEdit_textEdited (const QString &)
void on_mXMaxLineEdit_textEdited (const QString &)
void on_mYMinLineEdit_textEdited (const QString &)
void on_mYMaxLineEdit_textEdited (const QString &)
- Protected Slots inherited from QgsCollapsibleGroupBox
void loadState ()
void saveState ()

Protected Member Functions

void setOutputExtent (const QgsRectangle &r, const QgsCoordinateReferenceSystem &srcCrs, ExtentState state)
void setOutputExtentFromLineEdit ()
void updateTitle ()
- Protected Member Functions inherited from QgsCollapsibleGroupBox
void init ()
void showEvent (QShowEvent *event)
QString saveKey () const
- Protected Member Functions inherited from QgsCollapsibleGroupBoxBasic
void collapseExpandFixes ()
 Visual fixes for when group box is collapsed/expanded.
void mousePressEvent (QMouseEvent *event)
void mouseReleaseEvent (QMouseEvent *event)
void changeEvent (QEvent *event)
void updateStyle ()
QRect titleRect () const
void clearModifiers ()

Protected Attributes

ExtentState mExtentState
QgsCoordinateReferenceSystem mOutputCrs
QgsRectangle mCurrentExtent
QgsCoordinateReferenceSystem mCurrentCrs
QgsRectangle mOriginalExtent
QgsCoordinateReferenceSystem mOriginalCrs
- Protected Attributes inherited from QgsCollapsibleGroupBox
QPointer< QSettings > mSettings
bool mDelSettings
bool mSaveCollapsedState
bool mSaveCheckedState
QString mSettingGroup
- Protected Attributes inherited from QgsCollapsibleGroupBoxBasic
bool mCollapsed
bool mInitFlat
bool mInitFlatChecked
bool mScrollOnExpand
bool mShown
QScrollArea * mParentScrollArea
QgsGroupBoxCollapseButtonmCollapseButton
QWidget * mSyncParent
QString mSyncGroup
bool mAltDown
bool mShiftDown
bool mTitleClicked

Additional Inherited Members

- Static Protected Attributes inherited from QgsCollapsibleGroupBoxBasic
static QIcon mCollapseIcon
static QIcon mExpandIcon
- Properties inherited from QgsCollapsibleGroupBox
bool collapsed
bool saveCollapsedState
bool saveCheckedState
QString syncGroup
bool scrollOnExpand

Detailed Description

Collapsible group box for configuration of extent, typically for a save operation.

Besides allowing the user to enter the extent manually, it comes with options to use original extent or extent defined by the current view in map canvas.

When using the widget, make sure to call setOriginalExtent(), setCurrentExtent() and setOutputCrs() during initialization.

Note
added in 2.4

Member Enumeration Documentation

Enumerator:
OriginalExtent 

layer's extent

CurrentExtent 

map canvas extent

UserExtent 

extent manually entered/modified by the user

Constructor & Destructor Documentation

QgsExtentGroupBox::QgsExtentGroupBox ( QWidget *  parent = 0)
explicit

Member Function Documentation

const QgsCoordinateReferenceSystem& QgsExtentGroupBox::currentCrs ( ) const
inline
QgsRectangle QgsExtentGroupBox::currentExtent ( ) const
inline
void QgsExtentGroupBox::extentChanged ( const QgsRectangle r)
signal

emitted when extent is changed

ExtentState QgsExtentGroupBox::extentState ( ) const
inline
void QgsExtentGroupBox::on_mXMaxLineEdit_textEdited ( const QString &  )
inlineprotectedslot
void QgsExtentGroupBox::on_mXMinLineEdit_textEdited ( const QString &  )
inlineprotectedslot
void QgsExtentGroupBox::on_mYMaxLineEdit_textEdited ( const QString &  )
inlineprotectedslot
void QgsExtentGroupBox::on_mYMinLineEdit_textEdited ( const QString &  )
inlineprotectedslot
const QgsCoordinateReferenceSystem& QgsExtentGroupBox::originalCrs ( ) const
inline
QgsRectangle QgsExtentGroupBox::originalExtent ( ) const
inline
QgsRectangle QgsExtentGroupBox::outputExtent ( ) const

Get the resulting extent - in output CRS coordinates.

void QgsExtentGroupBox::setCurrentExtent ( const QgsRectangle currentExtent,
const QgsCoordinateReferenceSystem currentCrs 
)

Setup current extent - should be called as part of initialization (or whenever current extent changes)

void QgsExtentGroupBox::setOriginalExtent ( const QgsRectangle originalExtent,
const QgsCoordinateReferenceSystem originalCrs 
)

Setup original extent - should be called as part of initialization.

void QgsExtentGroupBox::setOutputCrs ( const QgsCoordinateReferenceSystem outputCrs)

Set the output CRS - may need to be used for transformation from original/current extent.

Should be called as part of initialization and whenever the the output CRS is changed

void QgsExtentGroupBox::setOutputExtent ( const QgsRectangle r,
const QgsCoordinateReferenceSystem srcCrs,
ExtentState  state 
)
protected
void QgsExtentGroupBox::setOutputExtentFromCurrent ( )
slot

set output extent to be the same as current extent (may be transformed to output CRS)

void QgsExtentGroupBox::setOutputExtentFromLineEdit ( )
protected
void QgsExtentGroupBox::setOutputExtentFromOriginal ( )
slot

set output extent to be the same as original extent (may be transformed to output CRS)

void QgsExtentGroupBox::setOutputExtentFromUser ( const QgsRectangle extent,
const QgsCoordinateReferenceSystem crs 
)
slot

set output extent to custom extent (may be transformed to outut CRS)

void QgsExtentGroupBox::updateTitle ( )
protected

Member Data Documentation

QgsCoordinateReferenceSystem QgsExtentGroupBox::mCurrentCrs
protected
QgsRectangle QgsExtentGroupBox::mCurrentExtent
protected
ExtentState QgsExtentGroupBox::mExtentState
protected
QgsCoordinateReferenceSystem QgsExtentGroupBox::mOriginalCrs
protected
QgsRectangle QgsExtentGroupBox::mOriginalExtent
protected
QgsCoordinateReferenceSystem QgsExtentGroupBox::mOutputCrs
protected

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