QGIS API Documentation  2.11.0-Master
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  Q_PROPERTY( QString titleBase READ titleBase WRITE setTitleBase )
27 
28  public:
29  explicit QgsExtentGroupBox( QWidget* parent = 0 );
30 
32  {
36  };
37 
39  void setOriginalExtent( const QgsRectangle& originalExtent, const QgsCoordinateReferenceSystem& originalCrs );
40 
41  QgsRectangle originalExtent() const { return mOriginalExtent; }
42  const QgsCoordinateReferenceSystem& originalCrs() const { return mOriginalCrs; }
43 
45  void setCurrentExtent( const QgsRectangle& currentExtent, const QgsCoordinateReferenceSystem& currentCrs );
46 
47  QgsRectangle currentExtent() const { return mCurrentExtent; }
48  const QgsCoordinateReferenceSystem& currentCrs() const { return mCurrentCrs; }
49 
52  void setOutputCrs( const QgsCoordinateReferenceSystem& outputCrs );
53 
55  QgsRectangle outputExtent() const;
56 
57  ExtentState extentState() const { return mExtentState; }
58 
61  void setTitleBase( const QString& title );
64  QString titleBase() const;
65 
66  public slots:
68  void setOutputExtentFromOriginal();
69 
71  void setOutputExtentFromCurrent();
72 
74  void setOutputExtentFromUser( const QgsRectangle& extent, const QgsCoordinateReferenceSystem& crs );
75 
76  signals:
78  void extentChanged( const QgsRectangle& r );
79 
80  protected slots:
81 
82  void on_mXMinLineEdit_textEdited( const QString & ) { setOutputExtentFromLineEdit(); }
83  void on_mXMaxLineEdit_textEdited( const QString & ) { setOutputExtentFromLineEdit(); }
84  void on_mYMinLineEdit_textEdited( const QString & ) { setOutputExtentFromLineEdit(); }
85  void on_mYMaxLineEdit_textEdited( const QString & ) { setOutputExtentFromLineEdit(); }
86 
87  void groupBoxClicked();
88 
89  protected:
90  void setOutputExtent( const QgsRectangle& r, const QgsCoordinateReferenceSystem& srcCrs, ExtentState state );
91  void setOutputExtentFromLineEdit();
92  void updateTitle();
93 
96 
98 
100 
103 
106 };
107 
108 #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
QString mTitleBase
Base part of the title used for the extent.
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.