QGIS API Documentation  2.99.0-Master (13a3f2f)
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 "qgis.h"
23 #include "qgis_gui.h"
24 
25 class QCheckBox;
26 
30 class GUI_EXPORT QgsRasterPyramidsOptionsWidget: public QWidget,
31  private Ui::QgsRasterPyramidsOptionsWidgetBase
32 {
33  Q_OBJECT
34 
35  public:
36 
37  QgsRasterPyramidsOptionsWidget( QWidget *parent SIP_TRANSFERTHIS = 0, const QString &provider = "gdal" );
38 
39  QStringList configOptions() const { return mSaveOptionsWidget->options(); }
41  const QList<int> overviewList() const { return mOverviewList; }
43  { return static_cast< 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  // Must be in the same order as in the .ui file
67  typedef enum
68  {
69  GTIFF = 0,
70  INTERNAL = 1,
71  ERDAS = 2
72  } Format;
73 
74 
75  QString mProvider;
76  QList< int > mOverviewList;
77  QMap< int, QCheckBox * > mOverviewCheckBoxes;
78 };
79 
80 #endif // QGSRASTERLAYERSAVEASDIALOG_H
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:34
A widget to select format-specific raster saving options.
This class provides qgis with the ability to render raster datasets onto the mapcanvas.
#define SIP_FACTORY
Definition: qgis_sip.h:57
QgsRasterFormatSaveOptionsWidget * createOptionsWidget()
A widget to select format-specific raster saving options.
void setRasterLayer(QgsRasterLayer *rasterLayer)
QgsRaster::RasterPyramidsFormat pyramidsFormat() const
RasterPyramidsFormat
Definition: qgsraster.h:97