QGIS/plugins/spit/qgsshapefile.h
gsherman 6f82ccdf6e intial check in of spit sources
git-svn-id: http://svn.osgeo.org/qgis/trunk@650 c8812cc2-4d05-0410-92ff-de0c093fc19c
2004-01-31 03:29:21 +00:00

71 lines
1.9 KiB
C++

/***************************************************************************
qgsshapefile.h - description
-------------------
begin : Fri Dec 19 2003
copyright : (C) 2003 by Denis Antipov
email :
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
/* $Id$ */
#ifndef QGSSHAPEFILE_H
#define QGSSHAPEFILE_H
#include <vector>
#include <qstring.h>
#include <qobject.h>
#include <ogrsf_frmts.h>
#include <qprogressdialog.h>
extern "C"
{
#include <libpq-fe.h>
}
class OGRLayer;
class OGRDataSource;
class QgsShapeFile : public QObject
{
Q_OBJECT
public:
QgsShapeFile(QString filename);
~QgsShapeFile();
int getFeatureCount();
QString getFeatureClass();
bool insertLayer(QString dbname, QString geom_col, QString srid, struct pg_conn* conn, QProgressDialog * pro, bool &fin);
bool is_valid();
QString getName();
QString getTable();
void setTable(QString new_table);
void setDefaultTable();
std::vector <QString> column_names;
std::vector <QString> column_types;
private:
QString table_name;
OGRDataSource *ogrDataSource;
OGRLayer * ogrLayer;
bool import_cancelled;
bool valid;
int features;
QString filename;
QString geom_type;
public slots:
void cancelImport();
};
#endif