QGIS API Documentation  2.99.0-Master (6a61179)
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 
23 class QCheckBox;
24 
28 class GUI_EXPORT QgsRasterPyramidsOptionsWidget: public QWidget,
29  private Ui::QgsRasterPyramidsOptionsWidgetBase
30 {
31  Q_OBJECT
32 
33  public:
34 
35  QgsRasterPyramidsOptionsWidget( QWidget* parent = nullptr, const QString& provider = "gdal" );
37 
38  QStringList configOptions() const { return mSaveOptionsWidget->options(); }
39  QgsRasterFormatSaveOptionsWidget* createOptionsWidget() { return mSaveOptionsWidget; }
40  const QList<int> overviewList() const { return mOverviewList; }
42  { return static_cast< QgsRaster::RasterPyramidsFormat >( cbxPyramidsFormat->currentIndex() ); }
43  QString resamplingMethod() const;
44  void setRasterLayer( QgsRasterLayer* rasterLayer ) { mSaveOptionsWidget->setRasterLayer( rasterLayer ); }
45  void setRasterFileName( const QString& file ) { mSaveOptionsWidget->setRasterFileName( file ); }
46 
47  public slots:
48 
49  void apply();
50  void checkAllLevels( bool checked );
51 
52  private slots:
53 
54  void on_cbxPyramidsLevelsCustom_toggled( bool toggled );
55  void on_cbxPyramidsFormat_currentIndexChanged( int index );
56  void setOverviewList();
57  void updateUi();
58 
59  signals:
60  void overviewListChanged();
61  void someValueChanged(); /* emitted when any other setting changes */
62 
63  private:
64 
65  // Must be in the same order as in the .ui file
66  typedef enum
67  {
68  GTIFF = 0,
69  INTERNAL = 1,
70  ERDAS = 2
71  } Format;
72 
73 
74  QString mProvider;
75  QList< int > mOverviewList;
76  QMap< int, QCheckBox* > mOverviewCheckBoxes;
77 };
78 
79 #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:95