2017-06-08 11:26:03 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgsrasterformatsaveoptionswidget.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
2012-07-24 01:02:41 -03:00
|
|
|
|
2017-06-08 11:26:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QgsRasterFormatSaveOptionsWidget: QWidget
|
2012-07-24 01:02:41 -03:00
|
|
|
{
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
A widget to select format-specific raster saving options
|
2012-07-24 01:02:41 -03:00
|
|
|
%End
|
2013-01-12 23:48:58 +01:00
|
|
|
|
2017-06-08 11:26:03 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsrasterformatsaveoptionswidget.h"
|
|
|
|
%End
|
2012-07-24 01:02:41 -03:00
|
|
|
public:
|
2012-07-24 13:53:35 -03:00
|
|
|
|
|
|
|
enum Type
|
|
|
|
{
|
2017-06-08 11:26:03 +02:00
|
|
|
Default,
|
|
|
|
Full,
|
|
|
|
Table,
|
|
|
|
LineEdit,
|
|
|
|
ProfileLineEdit
|
2012-07-24 13:53:35 -03:00
|
|
|
};
|
|
|
|
|
2017-06-08 11:26:03 +02:00
|
|
|
QgsRasterFormatSaveOptionsWidget( QWidget *parent /TransferThis/ = 0,
|
|
|
|
const QString &format = "GTiff",
|
2012-07-24 13:53:35 -03:00
|
|
|
QgsRasterFormatSaveOptionsWidget::Type type = Default,
|
2017-05-01 16:42:33 +02:00
|
|
|
const QString &provider = "gdal" );
|
2012-07-24 01:02:41 -03:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setFormat( const QString &format );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Set output raster format, it is used to determine list
|
|
|
|
of available options
|
|
|
|
%End
|
2016-12-30 14:27:37 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setProvider( const QString &provider );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Set provider key, , it is used to determine list
|
|
|
|
of available options
|
|
|
|
%End
|
2016-12-30 14:27:37 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setRasterLayer( QgsRasterLayer *rasterLayer );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Set output raster layer
|
|
|
|
%End
|
2016-12-30 14:27:37 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setRasterFileName( const QString &file );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Set output raster file name
|
|
|
|
%End
|
2016-12-30 14:27:37 +02:00
|
|
|
|
2012-07-24 01:02:41 -03:00
|
|
|
QStringList options() const;
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Returns list of selected options
|
|
|
|
.. seealso:: setOptions()
|
|
|
|
:rtype: list of str
|
|
|
|
%End
|
2016-12-30 14:27:37 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setOptions( const QString &options );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Populate widget with user-defined options. String should contain
|
|
|
|
key=value pairs separated by spaces, e.g. "TILED=YES TFW=YES"
|
|
|
|
.. seealso:: options()
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
2016-12-30 14:27:37 +02:00
|
|
|
|
2012-07-24 13:53:35 -03:00
|
|
|
void setType( QgsRasterFormatSaveOptionsWidget::Type type = Default );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Set widget look and feel
|
|
|
|
%End
|
2016-12-30 14:27:37 +02:00
|
|
|
|
2013-04-24 17:18:15 +02:00
|
|
|
void setPyramidsFormat( QgsRaster::RasterPyramidsFormat format );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Set pyramids format to use
|
|
|
|
%End
|
2012-07-24 01:02:41 -03:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
void apply();
|
2016-12-30 14:27:37 +02:00
|
|
|
|
2012-07-24 01:02:41 -03:00
|
|
|
void helpOptions();
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Opens window with options desctiption for given provider
|
|
|
|
and output format
|
|
|
|
%End
|
2016-12-30 14:27:37 +02:00
|
|
|
|
2012-09-20 16:03:40 -03:00
|
|
|
QString validateOptions( bool gui = true, bool reportOk = true );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Validates options correctness
|
|
|
|
:rtype: str
|
|
|
|
%End
|
2016-12-30 14:27:37 +02:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
void updateProfiles();
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
Reloads profiles list from QGIS settings
|
|
|
|
%End
|
2012-07-24 01:02:41 -03:00
|
|
|
|
|
|
|
private slots:
|
2017-06-08 11:26:03 +02:00
|
|
|
void on_mProfileNewButton_clicked() ;
|
|
|
|
private slots:
|
|
|
|
void on_mProfileDeleteButton_clicked() ;
|
|
|
|
private slots:
|
|
|
|
void on_mProfileResetButton_clicked() ;
|
|
|
|
private slots:
|
|
|
|
void on_mOptionsAddButton_clicked() ;
|
|
|
|
private slots:
|
|
|
|
void on_mOptionsDeleteButton_clicked() ;
|
|
|
|
private slots:
|
|
|
|
void on_mOptionsLineEdit_editingFinished() ;
|
|
|
|
private slots:
|
|
|
|
void optionsTableChanged() ;
|
|
|
|
private slots:
|
|
|
|
void optionsTableEnableDeleteButton() ;
|
|
|
|
private slots:
|
|
|
|
void updateOptions() ;
|
|
|
|
private slots:
|
|
|
|
void swapOptionsUI( int newIndex = -1 ) ;
|
|
|
|
private slots:
|
|
|
|
void updateControls() ;
|
2014-05-27 23:22:50 +02:00
|
|
|
protected:
|
2017-05-03 07:45:22 +02:00
|
|
|
virtual void showEvent( QShowEvent *event );
|
2014-05-27 23:22:50 +02:00
|
|
|
|
2014-01-27 09:22:24 +01:00
|
|
|
signals:
|
|
|
|
void optionsChanged();
|
|
|
|
|
2012-07-24 01:02:41 -03:00
|
|
|
private:
|
2017-06-08 11:26:03 +02:00
|
|
|
QString settingsKey( QString profile ) const ;
|
|
|
|
%Docstring
|
|
|
|
:rtype: str
|
|
|
|
%End
|
|
|
|
private:
|
|
|
|
QString currentProfileKey() const ;
|
|
|
|
%Docstring
|
|
|
|
:rtype: str
|
|
|
|
%End
|
|
|
|
private:
|
|
|
|
QString createOptions( const QString &profile ) const ;
|
|
|
|
%Docstring
|
|
|
|
:rtype: str
|
|
|
|
%End
|
|
|
|
private:
|
|
|
|
void deleteCreateOptions( const QString &profile ) ;
|
|
|
|
private:
|
|
|
|
void setCreateOptions() ;
|
|
|
|
private:
|
|
|
|
void setCreateOptions( const QString &profile, const QString &options ) ;
|
|
|
|
private:
|
|
|
|
void setCreateOptions( const QString &profile, const QStringList &list ) ;
|
|
|
|
private:
|
|
|
|
QStringList profiles() const ;
|
|
|
|
%Docstring
|
|
|
|
:rtype: list of str
|
|
|
|
%End
|
|
|
|
private:
|
|
|
|
virtual bool eventFilter( QObject *obj, QEvent *event ) ;
|
2012-07-24 01:02:41 -03:00
|
|
|
|
2017-06-08 11:26:03 +02:00
|
|
|
private:
|
|
|
|
QString pseudoFormat() const ;
|
|
|
|
%Docstring
|
|
|
|
:rtype: str
|
|
|
|
%End
|
2012-07-24 01:02:41 -03:00
|
|
|
};
|
2017-06-08 11:26:03 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgsrasterformatsaveoptionswidget.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|