QGIS/python/gui/qgsrasterformatsaveoptionswidget.sip
Nyall Dawson c49b5b777f Change a lot of arguments to const references in core/gui
Rationale:
- there was a lot of large objects passed by value, so potentially
there's a speed bump from this
- even for implicitly shared classes like QString/QList there's still
a (small) cost for copying the objects when there's no reason to
- it's the right thing to do!
2015-10-07 12:02:04 +11:00

72 lines
2.2 KiB
Plaintext

class QgsRasterFormatSaveOptionsWidget : QWidget
{
%TypeHeaderCode
#include <qgsrasterformatsaveoptionswidget.h>
%End
public:
enum Type
{
Default, // everything except profile buttons (save as dlg)
Full, // everything (options dlg)
Table, // just table
LineEdit, // just the line edit
ProfileLineEdit // Profile + LineEdit
};
QgsRasterFormatSaveOptionsWidget( QWidget* parent /TransferThis/ = 0, const QString& format = "GTiff",
QgsRasterFormatSaveOptionsWidget::Type type = Default,
const QString& provider = "gdal" );
~QgsRasterFormatSaveOptionsWidget();
void setFormat( const QString& format );
void setProvider( const QString& provider );
void setRasterLayer( QgsRasterLayer* rasterLayer );
void setRasterFileName( const QString& file );
QStringList options() const;
void setType( QgsRasterFormatSaveOptionsWidget::Type type = Default );
void setPyramidsFormat( QgsRaster::RasterPyramidsFormat format );
public slots:
void apply();
void helpOptions();
QString validateOptions( bool gui = true, bool reportOk = true );
void updateProfiles();
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();
void swapOptionsUI( int newIndex = -1 );
void updateControls();
protected:
virtual void showEvent( QShowEvent * event );
signals:
void optionsChanged();
private:
QString settingsKey( QString profile ) const;
QString currentProfileKey() const;
QString createOptions( const QString& profile ) const;
void deleteCreateOptions( const QString& profile );
void setCreateOptions();
void setCreateOptions( const QString& profile, const QString& options );
void setCreateOptions( const QString& profile, const QStringList& list );
QStringList profiles() const;
bool eventFilter( QObject *obj, QEvent *event );
};