QGIS API Documentation
2.4.0-Chugiak
|
Collapsible group box for configuration of extent, typically for a save operation. More...
#include <qgsextentgroupbox.h>
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) More... | |
void | setOutputExtentFromCurrent () |
set output extent to be the same as current extent (may be transformed to output CRS) More... | |
void | setOutputExtentFromUser (const QgsRectangle &extent, const QgsCoordinateReferenceSystem &crs) |
set output extent to custom extent (may be transformed to outut CRS) More... | |
Public Slots inherited from QgsCollapsibleGroupBoxBasic | |
void | checkToggled (bool ckd) |
void | checkClicked (bool ckd) |
void | toggleCollapsed () |
Signals | |
void | extentChanged (const QgsRectangle &r) |
emitted when extent is changed More... | |
Signals inherited from QgsCollapsibleGroupBoxBasic | |
void | collapsedStateChanged (bool collapsed) |
Signal emitted when groupbox collapsed/expanded state is changed, and when first shown. More... | |
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. More... | |
QgsRectangle | originalExtent () const |
const QgsCoordinateReferenceSystem & | originalCrs () const |
void | setCurrentExtent (const QgsRectangle ¤tExtent, const QgsCoordinateReferenceSystem ¤tCrs) |
Setup current extent - should be called as part of initialization (or whenever current extent changes) More... | |
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. More... | |
QgsRectangle | outputExtent () const |
Get the resulting extent - in output CRS coordinates. More... | |
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 More... | |
void | setSaveCheckedState (bool save) |
set this to true to save/restore checked state More... | |
bool | saveCollapsedState () |
bool | saveCheckedState () |
void | setSettingGroup (const QString &group) |
set this to a defined string to share save/restore states across different parent dialogs More... | |
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. More... | |
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 More... | |
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 | init () |
void | collapseExpandFixes () |
Visual fixes for when group box is collapsed/expanded. More... | |
void | showEvent (QShowEvent *event) |
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 |
QgsGroupBoxCollapseButton * | mCollapseButton |
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 |
Properties inherited from QgsCollapsibleGroupBoxBasic | |
bool | collapsed |
QString | syncGroup |
bool | scrollOnExpand |
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.
Definition at line 23 of file qgsextentgroupbox.h.
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.
|
explicit |
Definition at line 6 of file qgsextentgroupbox.cpp.
References setOutputExtentFromCurrent(), and setOutputExtentFromOriginal().
|
inline |
Definition at line 46 of file qgsextentgroupbox.h.
Referenced by setCurrentExtent().
|
inline |
Definition at line 45 of file qgsextentgroupbox.h.
Referenced by setCurrentExtent().
|
signal |
emitted when extent is changed
Referenced by setOutputExtent(), and setOutputExtentFromLineEdit().
|
inline |
Definition at line 55 of file qgsextentgroupbox.h.
|
inlineprotectedslot |
Definition at line 74 of file qgsextentgroupbox.h.
|
inlineprotectedslot |
Definition at line 73 of file qgsextentgroupbox.h.
|
inlineprotectedslot |
Definition at line 76 of file qgsextentgroupbox.h.
|
inlineprotectedslot |
Definition at line 75 of file qgsextentgroupbox.h.
|
inline |
Definition at line 40 of file qgsextentgroupbox.h.
Referenced by setOriginalExtent().
|
inline |
Definition at line 39 of file qgsextentgroupbox.h.
Referenced by setOriginalExtent().
QgsRectangle QgsExtentGroupBox::outputExtent | ( | ) | const |
Get the resulting extent - in output CRS coordinates.
Definition at line 117 of file qgsextentgroupbox.cpp.
Referenced by setOutputExtentFromLineEdit().
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 28 of file qgsextentgroupbox.cpp.
References currentCrs(), currentExtent(), mCurrentCrs, and mCurrentExtent.
void QgsExtentGroupBox::setOriginalExtent | ( | const QgsRectangle & | originalExtent, |
const QgsCoordinateReferenceSystem & | originalCrs | ||
) |
Setup original extent - should be called as part of initialization.
Definition at line 21 of file qgsextentgroupbox.cpp.
References mOriginalCrs, mOriginalExtent, originalCrs(), and originalExtent().
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 34 of file qgsextentgroupbox.cpp.
References mOutputCrs.
|
protected |
Definition at line 40 of file qgsextentgroupbox.cpp.
References extentChanged(), mExtentState, mOutputCrs, QgsRasterBlock::printValue(), QgsCoordinateTransform::transformBoundingBox(), updateTitle(), QgsRectangle::xMaximum(), QgsRectangle::xMinimum(), QgsRectangle::yMaximum(), and QgsRectangle::yMinimum().
Referenced by setOutputExtentFromCurrent(), setOutputExtentFromOriginal(), and setOutputExtentFromUser().
|
slot |
set output extent to be the same as current extent (may be transformed to output CRS)
Definition at line 99 of file qgsextentgroupbox.cpp.
References CurrentExtent, mCurrentCrs, mCurrentExtent, and setOutputExtent().
Referenced by QgsExtentGroupBox().
|
protected |
Definition at line 66 of file qgsextentgroupbox.cpp.
References extentChanged(), mExtentState, outputExtent(), updateTitle(), and UserExtent.
|
slot |
set output extent to be the same as original extent (may be transformed to output CRS)
Definition at line 105 of file qgsextentgroupbox.cpp.
References mOriginalCrs, mOriginalExtent, OriginalExtent, and setOutputExtent().
Referenced by QgsExtentGroupBox().
|
slot |
set output extent to custom extent (may be transformed to outut CRS)
Definition at line 111 of file qgsextentgroupbox.cpp.
References setOutputExtent(), and UserExtent.
|
protected |
Definition at line 76 of file qgsextentgroupbox.cpp.
References CurrentExtent, mExtentState, OriginalExtent, tr, and UserExtent.
Referenced by setOutputExtent(), and setOutputExtentFromLineEdit().
|
protected |
Definition at line 88 of file qgsextentgroupbox.h.
Referenced by setCurrentExtent(), and setOutputExtentFromCurrent().
|
protected |
Definition at line 87 of file qgsextentgroupbox.h.
Referenced by setCurrentExtent(), and setOutputExtentFromCurrent().
|
protected |
Definition at line 83 of file qgsextentgroupbox.h.
Referenced by setOutputExtent(), setOutputExtentFromLineEdit(), and updateTitle().
|
protected |
Definition at line 91 of file qgsextentgroupbox.h.
Referenced by setOriginalExtent(), and setOutputExtentFromOriginal().
|
protected |
Definition at line 90 of file qgsextentgroupbox.h.
Referenced by setOriginalExtent(), and setOutputExtentFromOriginal().
|
protected |
Definition at line 85 of file qgsextentgroupbox.h.
Referenced by setOutputCrs(), and setOutputExtent().