QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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 &)
extent manually entered/modified by the user
ExtentState mExtentState
A rectangle specified with double values.
Definition: qgsrectangle.h:35
void on_mXMinLineEdit_textEdited(const QString &)
A groupbox that collapses/expands when toggled and can save its collapsed and checked states...
QgsCoordinateReferenceSystem mOutputCrs
QgsCoordinateReferenceSystem mOriginalCrs
const QgsCoordinateReferenceSystem & currentCrs() const
ExtentState extentState() const
QgsRectangle mCurrentExtent
QgsRectangle originalExtent() const
void on_mXMaxLineEdit_textEdited(const QString &)
QgsRectangle currentExtent() const
const QgsCoordinateReferenceSystem & originalCrs() const
Class for storing a coordinate reference system (CRS)
QgsRectangle mOriginalExtent
QgsCoordinateReferenceSystem mCurrentCrs
void on_mYMinLineEdit_textEdited(const QString &)
Collapsible group box for configuration of extent, typically for a save operation.