QGIS/python/gui/qgsnewvectorlayerdialog.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

35 lines
1.2 KiB
Plaintext

class QgsNewVectorLayerDialog : QDialog
{
%TypeHeaderCode
#include <qgsnewvectorlayerdialog.h>
%End
public:
// run the dialog, create the layer.
// @return fileName on success, empty string use aborted, QString::null if creation failed
static QString runAndCreateLayer( QWidget* parent = 0, QString* enc = 0 );
QgsNewVectorLayerDialog( QWidget *parent /TransferThis/ = 0, const Qt::WindowFlags& fl = QgisGui::ModalDialogFlags );
~QgsNewVectorLayerDialog();
/** Returns the selected geometry type*/
QGis::WkbType selectedType() const;
/** Appends the chosen attribute names and types to at*/
void attributes( QList< QPair<QString, QString> >& at ) const;
/** Returns the file format for storage*/
QString selectedFileFormat() const;
/** Returns the file format for storage*/
QString selectedFileEncoding() const;
/** Returns the selected crs id*/
int selectedCrsId() const;
protected slots:
void on_mAddAttributeButton_clicked();
void on_mRemoveAttributeButton_clicked();
void on_mFileFormatComboBox_currentIndexChanged( int index );
void on_mTypeBox_currentIndexChanged( int index );
void on_buttonBox_helpRequested();
void nameChanged( const QString& );
void selectionChanged();
};