2012-07-24 01:02:41 -03:00
|
|
|
|
|
|
|
class QgsRasterFormatSaveOptionsWidget : QWidget
|
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include <qgsrasterformatsaveoptionswidget.h>
|
|
|
|
%End
|
2013-01-12 23:48:58 +01:00
|
|
|
|
2012-07-24 01:02:41 -03:00
|
|
|
public:
|
2012-07-24 13:53:35 -03:00
|
|
|
|
|
|
|
enum Type
|
|
|
|
{
|
|
|
|
Default, // everything except profile buttons (save as dlg)
|
|
|
|
Full, // everything (options dlg)
|
|
|
|
Table, // just table
|
2012-09-24 02:28:15 +02:00
|
|
|
LineEdit, // just the line edit
|
|
|
|
ProfileLineEdit // Profile + LineEdit
|
2012-07-24 13:53:35 -03:00
|
|
|
};
|
|
|
|
|
2015-02-18 17:00:36 +11:00
|
|
|
QgsRasterFormatSaveOptionsWidget( QWidget* parent /TransferThis/ = 0, QString format = "GTiff",
|
2012-07-24 13:53:35 -03:00
|
|
|
QgsRasterFormatSaveOptionsWidget::Type type = Default,
|
|
|
|
QString provider = "gdal" );
|
2012-07-24 01:02:41 -03:00
|
|
|
~QgsRasterFormatSaveOptionsWidget();
|
|
|
|
|
|
|
|
void setFormat( QString format );
|
|
|
|
void setProvider( QString provider );
|
2012-09-24 02:28:15 +02:00
|
|
|
void setRasterLayer( QgsRasterLayer* rasterLayer );
|
2013-01-18 18:18:47 -02:00
|
|
|
void setRasterFileName( const QString& file );
|
2012-07-24 01:02:41 -03:00
|
|
|
QStringList options() const;
|
2012-07-24 13:53:35 -03:00
|
|
|
void setType( QgsRasterFormatSaveOptionsWidget::Type type = Default );
|
2013-04-24 17:18:15 +02:00
|
|
|
void setPyramidsFormat( QgsRaster::RasterPyramidsFormat format );
|
2012-07-24 01:02:41 -03:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
void apply();
|
|
|
|
void helpOptions();
|
2012-09-20 16:03:40 -03:00
|
|
|
QString validateOptions( bool gui = true, bool reportOk = true );
|
2012-09-24 02:28:15 +02:00
|
|
|
void updateProfiles();
|
2012-07-24 01:02:41 -03:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
void on_mProfileNewButton_clicked();
|
|
|
|
void on_mProfileDeleteButton_clicked();
|
|
|
|
void on_mProfileResetButton_clicked();
|
|
|
|
void on_mOptionsAddButton_clicked();
|
|
|
|
void on_mOptionsDeleteButton_clicked();
|
|
|
|
void on_mOptionsLineEdit_editingFinished();
|
|
|
|
void optionsTableChanged();
|
|
|
|
void optionsTableEnableDeleteButton();
|
|
|
|
void updateOptions();
|
2012-07-24 13:53:35 -03:00
|
|
|
void swapOptionsUI( int newIndex = -1 );
|
2012-09-24 02:28:15 +02:00
|
|
|
void updateControls();
|
2012-07-24 01:02:41 -03:00
|
|
|
|
2014-05-27 23:22:50 +02:00
|
|
|
protected:
|
|
|
|
virtual void showEvent( QShowEvent * event );
|
|
|
|
|
2014-01-27 09:22:24 +01:00
|
|
|
signals:
|
|
|
|
void optionsChanged();
|
|
|
|
|
2012-07-24 01:02:41 -03:00
|
|
|
private:
|
|
|
|
|
|
|
|
QString settingsKey( QString profile ) const;
|
|
|
|
QString currentProfileKey() const;
|
|
|
|
QString createOptions( QString profile ) const;
|
|
|
|
void deleteCreateOptions( QString profile );
|
2014-10-20 22:50:15 +02:00
|
|
|
void setCreateOptions();
|
2012-07-24 01:02:41 -03:00
|
|
|
void setCreateOptions( QString profile, QString options );
|
|
|
|
void setCreateOptions( QString profile, QStringList list );
|
|
|
|
QStringList profiles() const;
|
2012-09-24 02:28:15 +02:00
|
|
|
bool eventFilter( QObject *obj, QEvent *event );
|
2012-07-24 01:02:41 -03:00
|
|
|
|
|
|
|
};
|