~ubuntu-branches/ubuntu/trusty/qgis/trusty

« back to all changes in this revision

Viewing changes to src/providers/grass/provider.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Johan Van de Wauw
  • Date: 2010-07-11 20:23:24 UTC
  • mfrom: (3.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100711202324-5ktghxa7hracohmr
Tags: 1.4.0+12730-3ubuntu1
* Merge from Debian unstable (LP: #540941).
* Fix compilation issues with QT 4.7
* Add build-depends on libqt4-webkit-dev 

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 *                                                                         *
15
15
 ***************************************************************************/
16
16
#include <string.h>
17
 
#include <iostream>
18
17
#include <vector>
19
18
#include <cfloat>
20
19
 
21
 
#include <qpixmap.h>
22
 
#include <qicon.h>
23
 
#include <qdir.h>
24
 
#include <qstring.h>
25
 
#include <qdatetime.h>
26
 
#include <qmessagebox.h>
 
20
#include <QString>
 
21
#include <QDateTime>
27
22
 
28
23
#include "qgis.h"
29
24
#include "qgsdataprovider.h"
30
25
#include "qgsfeature.h"
31
26
#include "qgsfield.h"
32
 
#include "qgsrect.h"
 
27
#include "qgsrectangle.h"
33
28
 
34
 
extern "C" {
 
29
extern "C"
 
30
{
35
31
#include <grass/gis.h>
36
32
#include <grass/dbmi.h>
37
33
#include <grass/Vect.h>
41
37
#include "qgsgrassprovider.h"
42
38
 
43
39
/**
44
 
* Class factory to return a pointer to a newly created 
 
40
* Class factory to return a pointer to a newly created
45
41
* QgsGrassProvider object
46
42
*/
47
 
extern "C" QgsGrassProvider * classFactory(const QString *uri)
 
43
QGISEXTERN QgsGrassProvider * classFactory( const QString *uri )
48
44
{
49
 
    return new QgsGrassProvider(*uri);
 
45
  return new QgsGrassProvider( *uri );
50
46
}
 
47
 
51
48
/** Required key function (used to map the plugin to a data store type)
52
49
*/
53
 
extern "C" QString providerKey(){
54
 
    return QString("grass");
 
50
QGISEXTERN QString providerKey()
 
51
{
 
52
  return QString( "grass" );
55
53
}
 
54
 
56
55
/**
57
 
* Required description function 
 
56
* Required description function
58
57
*/
59
 
extern "C" QString description(){
60
 
    return QString("GRASS data provider");
61
 
 
58
QGISEXTERN QString description()
 
59
{
 
60
  return QString( "GRASS data provider" );
 
61
}
 
62
 
62
63
/**
63
64
* Required isProvider function. Used to determine if this shared library
64
65
* is a data provider plugin
65
66
*/
66
 
extern "C" bool isProvider(){
67
 
    return true;
 
67
QGISEXTERN bool isProvider()
 
68
{
 
69
  return true;
68
70
}
69