QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
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_sip.h"
23 #include "qgis_gui.h"
24 
25 class QCheckBox;
26 
31 class GUI_EXPORT QgsRasterPyramidsOptionsWidget: public QWidget, private Ui::QgsRasterPyramidsOptionsWidgetBase
32 {
33  Q_OBJECT
34 
35  public:
36 
38  QgsRasterPyramidsOptionsWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr, const QString &provider = "gdal" );
39 
40  QStringList configOptions() const { return mSaveOptionsWidget->options(); }
42  const QList<int> overviewList() const { return mOverviewList; }
44  { return static_cast< QgsRaster::RasterPyramidsFormat >( cbxPyramidsFormat->currentIndex() ); }
45  QString resamplingMethod() const;
46  void setRasterLayer( QgsRasterLayer *rasterLayer ) { mSaveOptionsWidget->setRasterLayer( rasterLayer ); }
47  void setRasterFileName( const QString &file ) { mSaveOptionsWidget->setRasterFileName( file ); }
48 
49  public slots:
50 
51  void apply();
52  void checkAllLevels( bool checked );
53 
54  private slots:
55 
56  void cbxPyramidsLevelsCustom_toggled( bool toggled ) SIP_FORCE;
57  void cbxPyramidsFormat_currentIndexChanged( int index ) SIP_FORCE;
58  void setOverviewList() SIP_FORCE;
59  void updateUi() SIP_FORCE;
60 
61  signals:
62  void overviewListChanged();
63  void someValueChanged(); /* emitted when any other setting changes */
64 
65  private:
66 
67  // Must be in the same order as in the .ui file
68  typedef enum
69  {
70  GTIFF = 0,
71  INTERNAL = 1,
72  ERDAS = 2
73  } Format;
74 
75 
76  QString mProvider;
77  QList< int > mOverviewList;
78  QMap< int, QCheckBox * > mOverviewCheckBoxes;
79 };
80 
81 // clazy:excludeall=qstring-allocations
82 
83 #endif // QGSRASTERLAYERSAVEASDIALOG_H
QgsRasterFormatSaveOptionsWidget
A widget to select format-specific raster saving options.
Definition: qgsrasterformatsaveoptionswidget.h:32
QgsRaster::RasterPyramidsFormat
RasterPyramidsFormat
Definition: qgsraster.h:82
SIP_FACTORY
#define SIP_FACTORY
Definition: qgis_sip.h:76
QgsRasterPyramidsOptionsWidget::createOptionsWidget
QgsRasterFormatSaveOptionsWidget * createOptionsWidget()
Definition: qgsrasterpyramidsoptionswidget.h:41
qgis_sip.h
QgsRasterLayer
Represents a raster layer.
Definition: qgsrasterlayer.h:71
QgsRasterPyramidsOptionsWidget::setRasterFileName
void setRasterFileName(const QString &file)
Definition: qgsrasterpyramidsoptionswidget.h:47
SIP_FORCE
#define SIP_FORCE
Definition: qgis_sip.h:131
QgsRasterPyramidsOptionsWidget::pyramidsFormat
QgsRaster::RasterPyramidsFormat pyramidsFormat() const
Definition: qgsrasterpyramidsoptionswidget.h:43
QgsRasterPyramidsOptionsWidget::setRasterLayer
void setRasterLayer(QgsRasterLayer *rasterLayer)
Definition: qgsrasterpyramidsoptionswidget.h:46
QgsRasterPyramidsOptionsWidget::configOptions
QStringList configOptions() const
Definition: qgsrasterpyramidsoptionswidget.h:40
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:53
QgsRasterPyramidsOptionsWidget::overviewList
const QList< int > overviewList() const
Definition: qgsrasterpyramidsoptionswidget.h:42
QgsRasterPyramidsOptionsWidget
A widget to select format-specific raster saving options.
Definition: qgsrasterpyramidsoptionswidget.h:32