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

Protected Slots

void on_mXMaxLineEdit_textEdited (const QString &)
void on_mXMinLineEdit_textEdited (const QString &)
void on_mYMaxLineEdit_textEdited (const QString &)
void on_mYMinLineEdit_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 ()
QString saveKey () const
void showEvent (QShowEvent *event) override
- Protected Member Functions inherited from QgsCollapsibleGroupBoxBasic
void changeEvent (QEvent *event) override
void clearModifiers ()
void collapseExpandFixes ()
 Visual fixes for when group box is collapsed/expanded.
void mousePressEvent (QMouseEvent *event) override
void mouseReleaseEvent (QMouseEvent *event) override
QRect titleRect () const
void updateStyle ()

Protected Attributes

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

Additional Inherited Members

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

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

Definition at line 23 of file qgsextentgroupbox.h.

Member Enumeration Documentation

Enumerator:
OriginalExtent 

layer's extent

CurrentExtent 

map canvas extent

UserExtent 

extent manually entered/modified by the user

Definition at line 29 of file qgsextentgroupbox.h.

Constructor & Destructor Documentation

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

Definition at line 6 of file qgsextentgroupbox.cpp.

Member Function Documentation

const QgsCoordinateReferenceSystem& QgsExtentGroupBox::currentCrs ( ) const
inline

Definition at line 46 of file qgsextentgroupbox.h.

QgsRectangle QgsExtentGroupBox::currentExtent ( ) const
inline

Definition at line 45 of file qgsextentgroupbox.h.

void QgsExtentGroupBox::extentChanged ( const QgsRectangle r)
signal

emitted when extent is changed

ExtentState QgsExtentGroupBox::extentState ( ) const
inline

Definition at line 55 of file qgsextentgroupbox.h.

void QgsExtentGroupBox::on_mXMaxLineEdit_textEdited ( const QString &  )
inlineprotectedslot

Definition at line 74 of file qgsextentgroupbox.h.

void QgsExtentGroupBox::on_mXMinLineEdit_textEdited ( const QString &  )
inlineprotectedslot

Definition at line 73 of file qgsextentgroupbox.h.

void QgsExtentGroupBox::on_mYMaxLineEdit_textEdited ( const QString &  )
inlineprotectedslot

Definition at line 76 of file qgsextentgroupbox.h.

void QgsExtentGroupBox::on_mYMinLineEdit_textEdited ( const QString &  )
inlineprotectedslot

Definition at line 75 of file qgsextentgroupbox.h.

const QgsCoordinateReferenceSystem& QgsExtentGroupBox::originalCrs ( ) const
inline

Definition at line 40 of file qgsextentgroupbox.h.

QgsRectangle QgsExtentGroupBox::originalExtent ( ) const
inline

Definition at line 39 of file qgsextentgroupbox.h.

QgsRectangle QgsExtentGroupBox::outputExtent ( ) const

Get the resulting extent - in output CRS coordinates.

Definition at line 118 of file qgsextentgroupbox.cpp.

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

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

Definition at line 29 of file qgsextentgroupbox.cpp.

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

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

Definition at line 22 of file qgsextentgroupbox.cpp.

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

Definition at line 35 of file qgsextentgroupbox.cpp.

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

Definition at line 41 of file qgsextentgroupbox.cpp.

void QgsExtentGroupBox::setOutputExtentFromCurrent ( )
slot

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

Definition at line 100 of file qgsextentgroupbox.cpp.

void QgsExtentGroupBox::setOutputExtentFromLineEdit ( )
protected

Definition at line 67 of file qgsextentgroupbox.cpp.

void QgsExtentGroupBox::setOutputExtentFromOriginal ( )
slot

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

Definition at line 106 of file qgsextentgroupbox.cpp.

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

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

Definition at line 112 of file qgsextentgroupbox.cpp.

void QgsExtentGroupBox::updateTitle ( )
protected

Definition at line 77 of file qgsextentgroupbox.cpp.

Member Data Documentation

QgsCoordinateReferenceSystem QgsExtentGroupBox::mCurrentCrs
protected

Definition at line 88 of file qgsextentgroupbox.h.

QgsRectangle QgsExtentGroupBox::mCurrentExtent
protected

Definition at line 87 of file qgsextentgroupbox.h.

ExtentState QgsExtentGroupBox::mExtentState
protected

Definition at line 83 of file qgsextentgroupbox.h.

QgsCoordinateReferenceSystem QgsExtentGroupBox::mOriginalCrs
protected

Definition at line 91 of file qgsextentgroupbox.h.

QgsRectangle QgsExtentGroupBox::mOriginalExtent
protected

Definition at line 90 of file qgsextentgroupbox.h.

QgsCoordinateReferenceSystem QgsExtentGroupBox::mOutputCrs
protected

Definition at line 85 of file qgsextentgroupbox.h.


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