mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-22 00:06:12 -05:00
documention update
git-svn-id: http://svn.osgeo.org/qgis/trunk@29 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
daab26143f
commit
971793965f
@ -22,29 +22,37 @@ class QRect;
|
||||
class QCanvasView;
|
||||
class QStringList;
|
||||
#include "qgisappbase.h"
|
||||
/**
|
||||
*@author Gary E.Sherman
|
||||
*/
|
||||
class QgsMapCanvas;
|
||||
|
||||
class QgsMapCanvas;
|
||||
/*! \class QgisApp
|
||||
* \brief Main window for the Qgis application
|
||||
*/
|
||||
class QgisApp : public QgisAppBase {
|
||||
public:
|
||||
QgisApp(QWidget *parent=0, const char * name=0, WFlags fl = WType_TopLevel );
|
||||
|
||||
~QgisApp();
|
||||
//public slots:
|
||||
//! Add a layer to the map
|
||||
void addLayer();
|
||||
//! Exit Qgis
|
||||
void fileExit();
|
||||
//! Zoom out
|
||||
void zoomOut();
|
||||
//! Zoom int
|
||||
void zoomIn();
|
||||
//! Read Well Known Binary stream from PostGIS
|
||||
void readWKB(const char *, QStringList tables);
|
||||
//! Draw a point on the map canvas
|
||||
void drawPoint(double x, double y);
|
||||
private:
|
||||
//QCanvasView *cv;
|
||||
//QCanvas *canvas;
|
||||
//! Map canvase
|
||||
QgsMapCanvas *mapCanvas;
|
||||
//! Table of contents (legend) for the map
|
||||
QWidget *mapToc;
|
||||
//! scale factor
|
||||
double scaleFactor;
|
||||
//! Current map window extent in real-world coordinates
|
||||
QRect *mapWindow;
|
||||
|
||||
};
|
||||
|
@ -20,19 +20,32 @@
|
||||
class QString;
|
||||
#include "qgsmaplayer.h"
|
||||
|
||||
/**
|
||||
*@author Gary E.Sherman
|
||||
*/
|
||||
|
||||
/*! \class QgsDatabaseLayer
|
||||
* \brief A map layer based on data stored in a relational database.
|
||||
*
|
||||
* At present Qgis supports PostGIS "layers" in PostgresQL.
|
||||
*/
|
||||
class QgsDatabaseLayer : public QgsMapLayer {
|
||||
public:
|
||||
/*! Constructor
|
||||
* @param conninfo Pointer to the connection information required to
|
||||
* connect to PostgresQl
|
||||
*@param table Name of the table in the database that this layer
|
||||
* represents
|
||||
*/
|
||||
QgsDatabaseLayer(const char *conninfo=0, QString table=QString::null);
|
||||
//! Destructor
|
||||
~QgsDatabaseLayer();
|
||||
private:
|
||||
//! Calculates extent of the layer using SQL and PostGIS functions
|
||||
void calculateExtent();
|
||||
QString type; // maps to one of the OGIS Simple geometry types
|
||||
//! Type geometry contained in the layer. This corresponds to one of the OGIS Simple geometry types
|
||||
QString type;
|
||||
//! Name of the database containing the layer (table)
|
||||
QString database;
|
||||
//! Name of the table containing the features
|
||||
QString tableName;
|
||||
//! Name of the columen in the table that contains the geometry for the features
|
||||
QString geometryColumn;
|
||||
|
||||
|
||||
|
@ -1,17 +1,33 @@
|
||||
#ifndef QGSDBSOURCESELECT_H
|
||||
#define QGSDBSOURCESELECT_H
|
||||
#include "qgsdbsourceselectbase.h"
|
||||
|
||||
/*! \class QgsDbSourceSelect
|
||||
* \brief Dialog to create connections and add tables from PostgresQL.
|
||||
*
|
||||
* This dialog allows the user to define and save connection information
|
||||
* for PostGIS enabled PostgresQL databases. The user can then connect and add
|
||||
* tables from the database to the map canvas.
|
||||
*/
|
||||
class QgsDbSourceSelect : public QgsDbSourceSelectBase
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
QgsDbSourceSelect();
|
||||
//! Destructor
|
||||
~QgsDbSourceSelect();
|
||||
//! Opens the create connection dialog to build a new connection
|
||||
void addNewConnection();
|
||||
//! Opens a dialog to edit an existing connection
|
||||
void editConnection();
|
||||
//! Determines the tables the user selected and closes the dialog
|
||||
void addTables();
|
||||
/*! Connects to the database using the stored connection parameters.
|
||||
* Once connected, available layers are displayed.
|
||||
*/
|
||||
void dbConnect();
|
||||
//! String list containing the selected tables
|
||||
QStringList selectedTables();
|
||||
//! Connection info (database, host, user, password)
|
||||
QString connInfo();
|
||||
private:
|
||||
QString m_connInfo;
|
||||
|
@ -22,18 +22,26 @@
|
||||
|
||||
class QgsMapLayer;
|
||||
|
||||
/**Map canvas class for displaying all GIS data types
|
||||
*@author Gary E.Sherman
|
||||
*/
|
||||
/*! \class QgsMapCanvas
|
||||
* \brief Map canvas class for displaying all GIS data types.
|
||||
*/
|
||||
|
||||
class QgsMapCanvas : public QWidget {
|
||||
Q_OBJECT
|
||||
public:
|
||||
//! Constructor
|
||||
QgsMapCanvas(QWidget *parent=0, const char *name=0);
|
||||
//! Destructor
|
||||
~QgsMapCanvas();
|
||||
/*! Adds a layer to the map canvas.
|
||||
* @param lyr Pointer to a layer derived from QgsMapLayer
|
||||
*/
|
||||
void addLayer(QgsMapLayer *lyr);
|
||||
/*! Draw the map using the symbology set for each layer
|
||||
*/
|
||||
void render();
|
||||
private:
|
||||
|
||||
//! map containing the layers by name
|
||||
map<QString,QgsMapLayer> layers;
|
||||
};
|
||||
|
@ -20,43 +20,66 @@
|
||||
|
||||
#include <qwidget.h>
|
||||
#include "qgsdatasource.h"
|
||||
/**
|
||||
*@author Gary E.Sherman
|
||||
*/
|
||||
|
||||
class QRect;
|
||||
|
||||
/** \class QgsMapLayer
|
||||
* \brief Base class for all map layer types.
|
||||
* This class is the base class for all map layer types (shapefile,
|
||||
* raster, database).
|
||||
*/
|
||||
class QgsMapLayer : public QgsDataSource {
|
||||
|
||||
public:
|
||||
public:
|
||||
/*! Constructor
|
||||
* @param type Type of layer as defined in LAYERS enum
|
||||
* @param lyrname Display Name of the layer
|
||||
*/
|
||||
QgsMapLayer(int type=0, QString lyrname=QString::null );
|
||||
//! Destructor
|
||||
virtual ~QgsMapLayer();
|
||||
/** Read property of int layerType. */
|
||||
const int type();
|
||||
/** Write property of QString layerName. */
|
||||
void setlayerName( const QString& _newVal);
|
||||
/** Read property of QString layerName. */
|
||||
const QString name();
|
||||
virtual void calculateExtent();
|
||||
const QRect extent();
|
||||
/*! Get the type of the layer
|
||||
* @return Integer matching a value in the LAYERS enum
|
||||
*/
|
||||
const int type();
|
||||
/*! Set the name of the layer
|
||||
# @param name New name for the layer
|
||||
*/
|
||||
void setlayerName( const QString& name);
|
||||
/*! Get the name of the layer
|
||||
* @return the layer name
|
||||
*/
|
||||
const QString name();
|
||||
/*! Virtual function to calculate the extent of the current layer.
|
||||
* This function must be overridden in all child classes and implemented
|
||||
* based on the layer type
|
||||
*/
|
||||
virtual void calculateExtent();
|
||||
/*! Return the extent of the layer as a QRect
|
||||
*/
|
||||
const QRect extent();
|
||||
|
||||
|
||||
public: // Public attributes
|
||||
enum LAYERS {
|
||||
public: // Public attributes
|
||||
//! Layers enum defining the types of layers that can be added to a map
|
||||
enum LAYERS {
|
||||
VECTOR,
|
||||
RASTER,
|
||||
DATABASE
|
||||
} ;
|
||||
DATABASE
|
||||
} ;
|
||||
protected:
|
||||
QRect layerExtent;
|
||||
//! Position in the map stack
|
||||
int zpos;
|
||||
private: // Private attributes
|
||||
/** Name of the layer - used for display */
|
||||
QString layerName;
|
||||
/** Type of the layer (eg. vector, raster, database */
|
||||
int layerType;
|
||||
//! Extent of the layer
|
||||
QRect layerExtent;
|
||||
//! Position in the map stack
|
||||
int zpos;
|
||||
private: // Private attributes
|
||||
/** Name of the layer - used for display */
|
||||
QString layerName;
|
||||
/** Type of the layer (eg. vector, raster, database */
|
||||
int layerType;
|
||||
|
||||
//! Tag for embedding additional information
|
||||
QString tag;
|
||||
//! Tag for embedding additional information
|
||||
QString tag;
|
||||
|
||||
};
|
||||
|
||||
|
@ -1,13 +1,20 @@
|
||||
#ifndef QGSNEWCONNECTION_H
|
||||
#define QGSNEWCONNECTION_H
|
||||
#include "qgsnewconnectionbase.h"
|
||||
|
||||
/*! \class QgsNewConnection
|
||||
* \brief Dialog to allow the user to configure and save connection
|
||||
* information for a PostgresQl database
|
||||
*/
|
||||
class QgsNewConnection : public QgsNewConnectionBase
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
QgsNewConnection();
|
||||
//! Destructor
|
||||
~QgsNewConnection();
|
||||
//! Tests the connection using the parameters supplied
|
||||
void testConnection();
|
||||
//! Saves the connection to ~/.qt/qgisrc
|
||||
void saveConnection();
|
||||
};
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
begin : Fri Jun 28 2002
|
||||
copyright : (C) 2002 by Gary E.Sherman
|
||||
email : sherman@mrcc.com
|
||||
***************************************************************************/
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
@ -19,15 +19,16 @@
|
||||
#define QGSRASTERLAYER_H
|
||||
|
||||
#include "qgsmaplayer.h"
|
||||
|
||||
/**
|
||||
*@author Gary E.Sherman
|
||||
*/
|
||||
/*! \class QgsRasterLayer
|
||||
* \brief Raster layer class
|
||||
*/
|
||||
|
||||
class QgsRasterLayer : public QgsMapLayer {
|
||||
public:
|
||||
QgsRasterLayer();
|
||||
~QgsRasterLayer();
|
||||
public:
|
||||
//! Constructor
|
||||
QgsRasterLayer();
|
||||
//! Destructor
|
||||
~QgsRasterLayer();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -20,14 +20,17 @@
|
||||
|
||||
#include <qgsmaplayer.h>
|
||||
|
||||
/**
|
||||
*@author Gary E.Sherman
|
||||
*/
|
||||
/*! \class QgsShapeFileLayer
|
||||
* \brief Shapefile layer
|
||||
*/
|
||||
|
||||
class QgsShapeFileLayer : public QgsMapLayer {
|
||||
public:
|
||||
//! Constructor
|
||||
QgsShapeFileLayer();
|
||||
//! Destructor
|
||||
~QgsShapeFileLayer();
|
||||
|
||||
enum SHAPETYPE {
|
||||
Point,
|
||||
Line,
|
||||
|
@ -20,13 +20,16 @@
|
||||
|
||||
#include <qgsdatasource.h>
|
||||
|
||||
/**
|
||||
*@author Gary E.Sherman
|
||||
*/
|
||||
/*! \class QgsTable
|
||||
* \brief Class to represent an attribute table related
|
||||
* to a map layer of any type
|
||||
*/
|
||||
|
||||
class QgsTable : public QgsDataSource {
|
||||
public:
|
||||
//! Constructor
|
||||
QgsTable();
|
||||
//! Destructor
|
||||
~QgsTable();
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user