Skip to content
Permalink
Browse files

add qgsrasterformatsaveoptionswidget to sip and cleanup names ; bette…

…r hack for mOptionsLabel click
  • Loading branch information
etiennesky committed Jul 24, 2012
1 parent ee3bf0e commit c998ee4ac5ee7d974a3625cae36ea70b3af18740
@@ -37,5 +37,7 @@
%Include qgsattributeeditor.sip
%Include qgsfieldvalidator.sip
%Include qgsquerybuilder.sip
%Include qgsrasterformatsaveoptionswidget.sip

%Include symbology-ng-gui.sip

@@ -0,0 +1,49 @@

class QgsRasterFormatSaveOptionsWidget : QWidget
{
%TypeHeaderCode
#include <qgsrasterformatsaveoptionswidget.h>
%End

public:
QgsRasterFormatSaveOptionsWidget( QWidget* parent = 0, QString format = "GTiff", QString provider = "gdal" );
~QgsRasterFormatSaveOptionsWidget();

void setFormat( QString format );
void setProvider( QString provider );
QStringList options() const;
void showProfileButtons( bool show = true );

public slots:

void apply();
void helpOptions();
bool validateOptions( bool gui = true );

private slots:

void on_mProfileNewButton_clicked();
void on_mProfileDeleteButton_clicked();
void on_mProfileResetButton_clicked();
void on_mOptionsAddButton_clicked();
void on_mOptionsDeleteButton_clicked();
void on_mOptionsLabel_clicked();
void on_mOptionsLineEdit_editingFinished();
void optionsTableChanged();
void optionsTableEnableDeleteButton();
void updateOptions();

private:

QString settingsKey( QString profile ) const;
QString currentProfileKey() const;
QString createOptions( QString profile ) const;
void deleteCreateOptions( QString profile );
void setCreateOptions( );
void setCreateOptions( QString profile, QString options );
void setCreateOptions( QString profile, QStringList list );
QStringList profiles() const;
void updateProfiles();
bool eventFilter(QObject *obj, QEvent *event);

};
@@ -26,7 +26,7 @@
#include "qgsnetworkaccessmanager.h"
#include "qgsproject.h"

#include "qgsrasterformatoptionswidget.h"
#include "qgsrasterformatsaveoptionswidget.h"
#include "qgsdialog.h"

#include <QInputDialog>
@@ -1103,7 +1103,8 @@ void QgsOptions::editGdalDriver( const QString& driverName )
QLabel *label = new QLabel( title, &dlg );
label->setAlignment( Qt::AlignHCenter );
layout->addWidget( label );
QgsRasterFormatOptionsWidget* optionsWidget = new QgsRasterFormatOptionsWidget( &dlg, driverName, "gdal" );
QgsRasterFormatSaveOptionsWidget* optionsWidget =
new QgsRasterFormatSaveOptionsWidget( &dlg, driverName, "gdal" );
layout->addWidget( optionsWidget );
optionsWidget->showProfileButtons( true );

@@ -7,7 +7,6 @@ raster/qgspalettedrendererwidget.cpp
raster/qgssinglebandgrayrendererwidget.cpp
raster/qgssinglebandpseudocolorrendererwidget.cpp
raster/qgsrasterhistogramwidget.cpp
raster/qgsrasterformatoptionswidget.cpp

symbology-ng/qgsbrushstylecombobox.cpp
symbology-ng/qgscolorrampcombobox.cpp
@@ -79,6 +78,7 @@ qgsprojectbadlayerguihandler.cpp
qgsprojectionselector.cpp
qgsquickprint.cpp
qgsrasterlayersaveasdialog.cpp
qgsrasterformatsaveoptionswidget.cpp
qgsrubberband.cpp
qgsscalecombobox.cpp
qgstextannotationitem.cpp
@@ -105,7 +105,6 @@ raster/qgsmultibandcolorrendererwidget.h
raster/qgssinglebandgrayrendererwidget.h
raster/qgssinglebandpseudocolorrendererwidget.h
raster/qgsrasterhistogramwidget.h
raster/qgsrasterformatoptionswidget.h

symbology-ng/qgsdashspacedialog.h
symbology-ng/qgssymbollayerv2widget.h
@@ -160,6 +159,7 @@ qgsowssourceselect.h
qgsprojectionselector.h
qgsquickprint.h
qgsrasterlayersaveasdialog.h
qgsrasterformatsaveoptionswidget.h
qgsludialog.h
qgsprojectbadlayerguihandler.h
qgslonglongvalidator.h

0 comments on commit c998ee4

Please sign in to comment.
You can’t perform that action at this time.