|
QGIS API Documentation
master-59fd5e0
|
00001 /*************************************************************************** 00002 qgsrasterpyramidsoptionswidget.h 00003 ------------------- 00004 begin : July 2012 00005 copyright : (C) 2012 by Etienne Tourigny 00006 email : etourigny dot dev at gmail dot com 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef QGSRASTERPYRAMIDSOPTIONSWIDGET_H 00019 #define QGSRASTERPYRAMIDSOPTIONSWIDGET_H 00020 00021 #include "ui_qgsrasterpyramidsoptionswidgetbase.h" 00022 #include "qgsrasterdataprovider.h" 00023 00024 class QCheckBox; 00025 00029 class GUI_EXPORT QgsRasterPyramidsOptionsWidget: public QWidget, 00030 private Ui::QgsRasterPyramidsOptionsWidgetBase 00031 { 00032 Q_OBJECT 00033 00034 public: 00035 00036 QgsRasterPyramidsOptionsWidget( QWidget* parent = 0, QString provider = "gdal" ); 00037 ~QgsRasterPyramidsOptionsWidget(); 00038 00039 QStringList configOptions() const { return mSaveOptionsWidget->options(); } 00040 QgsRasterFormatSaveOptionsWidget* createOptionsWidget() { return mSaveOptionsWidget; } 00041 const QList<int> overviewList() const { return mOverviewList; } 00042 QgsRaster::RasterPyramidsFormat pyramidsFormat() const 00043 { return ( QgsRaster::RasterPyramidsFormat ) cbxPyramidsFormat->currentIndex(); } 00044 QString resamplingMethod() const; 00045 void setRasterLayer( QgsRasterLayer* rasterLayer ) { mSaveOptionsWidget->setRasterLayer( rasterLayer ); } 00046 void setRasterFileName( const QString& file ) { mSaveOptionsWidget->setRasterFileName( file ); } 00047 00048 public slots: 00049 00050 void apply(); 00051 void checkAllLevels( bool checked ); 00052 00053 private slots: 00054 00055 void on_cbxPyramidsLevelsCustom_toggled( bool toggled ); 00056 void on_cbxPyramidsFormat_currentIndexChanged( int index ); 00057 void setOverviewList(); 00058 void updateUi(); 00059 00060 signals: 00061 void overviewListChanged(); 00062 void someValueChanged(); /* emitted when any other setting changes */ 00063 00064 private: 00065 00066 QString mProvider; 00067 QList< int > mOverviewList; 00068 QMap< int, QCheckBox* > mOverviewCheckBoxes; 00069 }; 00070 00071 #endif // QGSRASTERLAYERSAVEASDIALOG_H