Quantum GIS API Documentation  1.8
src/gui/qgsnewvectorlayerdialog.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                          qgsnewvectorlayerdialog.h  -  description
00003                              -------------------
00004     begin                : October 2004
00005     copyright            : (C) 2004 by Marco Hugentobler
00006     email                : marco.hugentobler@autoform.ch
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 #ifndef qgsnewvectorlayerdialog_H
00018 #define qgsnewvectorlayerdialog_H
00019 
00020 #include "ui_qgsnewvectorlayerdialogbase.h"
00021 #include "qgisgui.h"
00022 #include "qgscontexthelp.h"
00023 
00024 #include "qgis.h"
00025 
00026 class GUI_EXPORT QgsNewVectorLayerDialog: public QDialog, private Ui::QgsNewVectorLayerDialogBase
00027 {
00028     Q_OBJECT
00029 
00030   public:
00031 
00032     // run the dialog, create the layer. Return file name if the creation was successful
00033     static QString runAndCreateLayer( QWidget* parent = 0, QString* enc = 0 );
00034 
00035     QgsNewVectorLayerDialog( QWidget *parent = 0, Qt::WFlags fl = QgisGui::ModalDialogFlags );
00036     ~QgsNewVectorLayerDialog();
00038     QGis::WkbType selectedType() const;
00040     void attributes( std::list<std::pair<QString, QString> >& at ) const;
00042     QString selectedFileFormat() const;
00044     int selectedCrsId() const;
00045 
00046   protected slots:
00047     void on_mAddAttributeButton_clicked();
00048     void on_mRemoveAttributeButton_clicked();
00049     void on_mTypeBox_currentIndexChanged( int index );
00050     void on_pbnChangeSpatialRefSys_clicked();
00051     void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
00052     void nameChanged( QString );
00053     void selectionChanged();
00054 
00055   private:
00056     QPushButton *mOkButton;
00057     int mCrsId;
00058 };
00059 
00060 #endif //qgsnewvectorlayerdialog_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines