mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
71 lines
1.9 KiB
C++
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
|