QGIS API Documentation  2.0.1-Dufour
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgsrasterpyramidsoptionswidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsrasterpyramidsoptionswidget.h
3  -------------------
4  begin : July 2012
5  copyright : (C) 2012 by Etienne Tourigny
6  email : etourigny dot dev at gmail dot com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSRASTERPYRAMIDSOPTIONSWIDGET_H
19 #define QGSRASTERPYRAMIDSOPTIONSWIDGET_H
20 
21 #include "ui_qgsrasterpyramidsoptionswidgetbase.h"
22 #include "qgsrasterdataprovider.h"
23 
24 class QCheckBox;
25 
29 class GUI_EXPORT QgsRasterPyramidsOptionsWidget: public QWidget,
30  private Ui::QgsRasterPyramidsOptionsWidgetBase
31 {
32  Q_OBJECT
33 
34  public:
35 
36  QgsRasterPyramidsOptionsWidget( QWidget* parent = 0, QString provider = "gdal" );
38 
39  QStringList configOptions() const { return mSaveOptionsWidget->options(); }
40  QgsRasterFormatSaveOptionsWidget* createOptionsWidget() { return mSaveOptionsWidget; }
41  const QList<int> overviewList() const { return mOverviewList; }
42  QgsRaster::RasterPyramidsFormat pyramidsFormat() const
43  { return ( QgsRaster::RasterPyramidsFormat ) cbxPyramidsFormat->currentIndex(); }
44  QString resamplingMethod() const;
45  void setRasterLayer( QgsRasterLayer* rasterLayer ) { mSaveOptionsWidget->setRasterLayer( rasterLayer ); }
46  void setRasterFileName( const QString& file ) { mSaveOptionsWidget->setRasterFileName( file ); }
47 
48  public slots:
49 
50  void apply();
51  void checkAllLevels( bool checked );
52 
53  private slots:
54 
55  void on_cbxPyramidsLevelsCustom_toggled( bool toggled );
56  void on_cbxPyramidsFormat_currentIndexChanged( int index );
57  void setOverviewList();
58  void updateUi();
59 
60  signals:
61  void overviewListChanged();
62  void someValueChanged(); /* emitted when any other setting changes */
63 
64  private:
65 
66  QString mProvider;
67  QList< int > mOverviewList;
68  QMap< int, QCheckBox* > mOverviewCheckBoxes;
69 };
70 
71 #endif // QGSRASTERLAYERSAVEASDIALOG_H