QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
qgsextentgroupbox.h
Go to the documentation of this file.
1 #ifndef QGSEXTENTGROUPBOX_H
2 #define QGSEXTENTGROUPBOX_H
3 
5 
6 #include "ui_qgsextentgroupboxwidget.h"
7 
9 #include "qgsrectangle.h"
10 
12 
23 class GUI_EXPORT QgsExtentGroupBox : public QgsCollapsibleGroupBox, private Ui::QgsExtentGroupBoxWidget
24 {
25  Q_OBJECT
26  public:
27  explicit QgsExtentGroupBox( QWidget* parent = 0 );
28 
30  {
34  };
35 
37  void setOriginalExtent( const QgsRectangle& originalExtent, const QgsCoordinateReferenceSystem& originalCrs );
38 
39  QgsRectangle originalExtent() const { return mOriginalExtent; }
40  const QgsCoordinateReferenceSystem& originalCrs() const { return mOriginalCrs; }
41 
43  void setCurrentExtent( const QgsRectangle& currentExtent, const QgsCoordinateReferenceSystem& currentCrs );
44 
45  QgsRectangle currentExtent() const { return mCurrentExtent; }
46  const QgsCoordinateReferenceSystem& currentCrs() const { return mCurrentCrs; }
47 
50  void setOutputCrs( const QgsCoordinateReferenceSystem& outputCrs );
51 
53  QgsRectangle outputExtent() const;
54 
55  ExtentState extentState() const { return mExtentState; }
56 
57  public slots:
59  void setOutputExtentFromOriginal();
60 
62  void setOutputExtentFromCurrent();
63 
65  void setOutputExtentFromUser( const QgsRectangle& extent, const QgsCoordinateReferenceSystem& crs );
66 
67  signals:
69  void extentChanged( const QgsRectangle& r );
70 
71  protected slots:
72 
73  void on_mXMinLineEdit_textEdited( const QString & ) { setOutputExtentFromLineEdit(); }
74  void on_mXMaxLineEdit_textEdited( const QString & ) { setOutputExtentFromLineEdit(); }
75  void on_mYMinLineEdit_textEdited( const QString & ) { setOutputExtentFromLineEdit(); }
76  void on_mYMaxLineEdit_textEdited( const QString & ) { setOutputExtentFromLineEdit(); }
77 
78  protected:
79  void setOutputExtent( const QgsRectangle& r, const QgsCoordinateReferenceSystem& srcCrs, ExtentState state );
80  void setOutputExtentFromLineEdit();
81  void updateTitle();
82 
84 
86 
89 
92 };
93 
94 #endif // QGSEXTENTGROUPBOX_H
void on_mYMaxLineEdit_textEdited(const QString &)
Definition: qgsextentgroupbox.h:76
extent manually entered/modified by the user
Definition: qgsextentgroupbox.h:33
ExtentState mExtentState
Definition: qgsextentgroupbox.h:83
A rectangle specified with double values.
Definition: qgsrectangle.h:35
void on_mXMinLineEdit_textEdited(const QString &)
Definition: qgsextentgroupbox.h:73
A groupbox that collapses/expands when toggled and can save its collapsed and checked states...
Definition: qgscollapsiblegroupbox.h:148
map canvas extent
Definition: qgsextentgroupbox.h:32
QgsCoordinateReferenceSystem mOutputCrs
Definition: qgsextentgroupbox.h:85
QgsCoordinateReferenceSystem mOriginalCrs
Definition: qgsextentgroupbox.h:91
ExtentState
Definition: qgsextentgroupbox.h:29
const QgsCoordinateReferenceSystem & currentCrs() const
Definition: qgsextentgroupbox.h:46
ExtentState extentState() const
Definition: qgsextentgroupbox.h:55
layer's extent
Definition: qgsextentgroupbox.h:31
QgsRectangle mCurrentExtent
Definition: qgsextentgroupbox.h:87
QgsRectangle originalExtent() const
Definition: qgsextentgroupbox.h:39
void on_mXMaxLineEdit_textEdited(const QString &)
Definition: qgsextentgroupbox.h:74
QgsRectangle currentExtent() const
Definition: qgsextentgroupbox.h:45
const QgsCoordinateReferenceSystem & originalCrs() const
Definition: qgsextentgroupbox.h:40
Class for storing a coordinate reference system (CRS)
Definition: qgscoordinatereferencesystem.h:50
QgsRectangle mOriginalExtent
Definition: qgsextentgroupbox.h:90
QgsCoordinateReferenceSystem mCurrentCrs
Definition: qgsextentgroupbox.h:88
void on_mYMinLineEdit_textEdited(const QString &)
Definition: qgsextentgroupbox.h:75
Collapsible group box for configuration of extent, typically for a save operation.
Definition: qgsextentgroupbox.h:23