QGIS API Documentation  2.99.0-Master (9caa722)
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, private Ui::QgsRasterPyramidsOptionsWidgetBase
31 {
32  Q_OBJECT
33 
34  public:
35 
36  QgsRasterPyramidsOptionsWidget( QWidget *parent SIP_TRANSFERTHIS = 0, const QString &provider = "gdal" );
37 
38  QStringList configOptions() const { return mSaveOptionsWidget->options(); }
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 ) SIP_FORCE;
55  void on_cbxPyramidsFormat_currentIndexChanged( int index ) SIP_FORCE;
56  void setOverviewList() SIP_FORCE;
57  void updateUi() SIP_FORCE;
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
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:46
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_FORCE
Definition: qgis_sip.h:124
#define SIP_FACTORY
Definition: qgis_sip.h:69
QgsRasterFormatSaveOptionsWidget * createOptionsWidget()
A widget to select format-specific raster saving options.
void setRasterLayer(QgsRasterLayer *rasterLayer)
QgsRaster::RasterPyramidsFormat pyramidsFormat() const
RasterPyramidsFormat
Definition: qgsraster.h:80