QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
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 = nullptr, const QString& provider = "gdal" );
38 
39  QStringList configOptions() const { return mSaveOptionsWidget->options(); }
40  QgsRasterFormatSaveOptionsWidget* createOptionsWidget() { return mSaveOptionsWidget; }
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
static unsigned index
A widget to select format-specific raster saving options.
This class provides qgis with the ability to render raster datasets onto the mapcanvas.
QgsRasterFormatSaveOptionsWidget * createOptionsWidget()
A widget to select format-specific raster saving options.
void setRasterLayer(QgsRasterLayer *rasterLayer)
QgsRaster::RasterPyramidsFormat pyramidsFormat() const
RasterPyramidsFormat
Definition: qgsraster.h:78