In order to compile and install Qgis on your system, type the following in
-the base directory of the Qgis distribution:
-
-
-
-% ./configure
-% make
-% make install
-
-
-
-
-
Since Qgis uses
-
-autoconf
-
- you should have not trouble
-compiling it.
-Should you run into problems please report them to the the author at
-Gary E.Sherman
-
-
-
-
-Next
-Previous
-Contents
-
-
diff --git a/docs/en/index-3.html b/docs/en/index-3.html
deleted file mode 100644
index 6c676845ad8..00000000000
--- a/docs/en/index-3.html
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
- The Qgis Handbook: Usage
-
-
-
-
-
-Next
-Previous
-Contents
-
-
Qgis Copyright 2002 Gary E.Sherman , sherman at mrcc dot com
-
-
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.
-
This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-In order to compile and install Qgis on your system, type the following in
-the base directory of the Qgis distribution:
-
-
-% ./configure
-% make
-% make install
-
-
-
-Since Qgis uses autoconf you should have not trouble
-compiling it.
-Should you run into problems please report them to the the author at
-
-
-
-
- Usage
- General Usage
-
- Another Section
-
-
-Questions and Answers
-
-Copyright
-
-Qgis Copyright 2002 Gary E.Sherman , sherman at mrcc dot com
-
-
-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.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-
-
diff --git a/main.cpp b/main.cpp
deleted file mode 100644
index 94ebb69adc9..00000000000
--- a/main.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-/***************************************************************************
- main.cpp - description
- -------------------
- begin : Fri Jun 21 10:48:28 AKDT 2002
- copyright : (C) 2002 by Gary E.Sherman
- email : sherman@mrcc.com
-***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-
-#include
-#include
-#include
-#include
-#include
-#include
-//#include "qgis.h"
-#include "qgisapp.h"
-
-int main(int argc, char *argv[])
-{
-
-
- QApplication a(argc, argv);
- // a.setFont(QFont("helvetica", 11));
- QTranslator tor( 0 );
- // set the location where your .qm files are in load() below as the last parameter instead of "."
- // for development, use "/" to use the english original as
- // .qm files are stored in the base project directory.
- tor.load( QString("qgis.") + QTextCodec::locale(), "." );
- a.installTranslator( &tor );
- /* uncomment the following line, if you want a Windows 95 look*/
- a.setStyle("Windows");
-
- QgisApp *qgis=new QgisApp();
- a.setMainWidget(qgis);
-
- qgis->show();
- a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()) );
-
-
- int result = a.exec();
-
- return result;
-}
-
-
diff --git a/qgisapp.cpp b/qgisapp.cpp
deleted file mode 100644
index 9868fe592b1..00000000000
--- a/qgisapp.cpp
+++ /dev/null
@@ -1,272 +0,0 @@
-/***************************************************************************
- qgisapp.cpp - description
- -------------------
- begin : Sat Jun 22 2002
- copyright : (C) 2002 by Gary E.Sherman
- email : sherman@mrcc.com
-***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include "qgsrect.h"
-#include "qgsmapcanvas.h"
-#include "qgsdbsourceselect.h"
-#include "qgsdatabaselayer.h"
-
-#include "qgisapp.h"
-#include "xpm/qgis.xpm"
-
-QgisApp::QgisApp (QWidget * parent, const char *name, WFlags fl):
- QgisAppBase (parent, name, fl)
-{
- QPixmap icon;
- icon = QPixmap (qgis_xpm);
- setIcon (icon);
- QGridLayout *FrameLayout =
- new QGridLayout (frameMain, 1, 2, 4, 6, "mainFrameLayout");
- QSplitter *split = new QSplitter (frameMain);
- mapToc = new QWidget (split); //frameMain);
- //add a canvas
- mapCanvas = new QgsMapCanvas (split);
- // resize it to fit in the frame
- // QRect r = frmCanvas->rect();
- // canvas->resize(r.width(), r.height());
- mapCanvas->setBackgroundColor (Qt::white); //QColor (220, 235, 255));
- mapCanvas->setMinimumWidth (400);
-
-
-
-
-
-
-
-
-
- FrameLayout->addWidget (split, 0, 0);
- mapToc->setBackgroundColor (QColor (192, 192, 192));
-
-}
-
-QgisApp::~QgisApp ()
-{
-}
-void
-QgisApp::addLayer ()
-{
- // only supports postgis layers at present
- // show the postgis dialog
- QgsDbSourceSelect *dbs = new QgsDbSourceSelect ();
- if (dbs->exec ())
- {
- // add files to the map canvas
- QStringList tables = dbs->selectedTables ();
- QString connInfo = dbs->connInfo ();
- // for each selected table, connect to the datbase, parse the WKT geometry,
- // and build a cavnasitem for it
- // readWKB(connInfo,tables);
- QStringList::Iterator it = tables.begin ();
- while (it != tables.end ())
- {
-
- // create the layer
- QgsDatabaseLayer *lyr = new QgsDatabaseLayer (connInfo, *it);
- // add it to the mapcanvas collection
- mapCanvas->addLayer (lyr);
- // no drawing done -- need to pass the layer collection
- // to the rendering engine (yet to be written)
-
- ++it;
- }
- qApp->processEvents();
- mapCanvas->render2();
- statusBar()->message(mapCanvas->extent().stringRep());
-
- }
-
-}
-void
-QgisApp::fileExit ()
-{
- QApplication::exit ();
-
-}
-
-void
-QgisApp::zoomIn ()
-{
- /* QWMatrix m = mapCanvas->worldMatrix();
- m.scale( 2.0, 2.0 );
- mapCanvas->setWorldMatrix( m );
- */
- // scale the extent
- QgsRect ext = mapCanvas->extent();
- ext.scale(0.5);
- mapCanvas->setExtent(ext);
- statusBar()->message(ext.stringRep());
- mapCanvas->clear();
- mapCanvas->render2();
-
-}
-
-void
-QgisApp::zoomOut ()
-{
- /* QWMatrix m = mapCanvas->worldMatrix();
- m.scale( 0.5, 0.5 );
- mapCanvas->setWorldMatrix( m );
- */
-
-
-}
-void QgisApp::zoomFull(){
- mapCanvas->zoomFullExtent();
-}
-void
-QgisApp::readWKB (const char *connInfo, QStringList tables)
-{
-// PgCursor pgc (connInfo, "testcursor");
-// // get "endianness"
-// char *chkEndian = new char[4];
-// memset (chkEndian, '\0', 4);
-// chkEndian[0] = 0xE8;
-// int *ce = (int *) chkEndian;
-// bool isNDR = (232 == *ce);
-// /* if(*ce != 232)
-// cout << "Big endian" << endl;
-// else
-// cout << "Little endian" << endl;
-// */
-// QStringList::Iterator it = tables.begin ();
-// while (it != tables.end ())
-// {
-
-// // get the extent of the layer
-// QString esql = "select extent(the_geom) from " + *it;
-// PgDatabase *pd = new PgDatabase (connInfo);
-// int result = pd->ExecTuplesOk ((const char *) esql);
-// QString extent = pd->GetValue (0, 0);
-// // parse out the x and y values
-// extent = extent.right (extent.length () - extent.find ("BOX3D(") - 6);
-// QStringList coordPairs = QStringList::split (",", extent);
-// QStringList x1y1 = QStringList::split (" ", coordPairs[0]);
-// QStringList x2y2 = QStringList::split (" ", coordPairs[1]);
-// double x1 = x1y1[0].toDouble ();
-// double y1 = x1y1[1].toDouble ();
-// double x2 = x2y2[0].toDouble ();
-// double y2 = x2y2[1].toDouble ();
-// double xMu = x2 - x1;
-// double yMu = y2 - y1;
-// int subordinantAxisLength;
-
-
-// // determine the dominate direction for the mapcanvas
-// if (mapCanvas->width () > mapCanvas->height ())
-// {
-// subordinantAxisLength = mapCanvas->height ();
-// scaleFactor = yMu / subordinantAxisLength;
-// mapWindow = new QRect (x1, y1, xMu, xMu);
-// }
-// else
-// {
-// subordinantAxisLength = mapCanvas->width ();
-// scaleFactor = xMu / subordinantAxisLength;
-// mapWindow = new QRect (x1, y1, yMu, yMu);
-// }
-
-// const char *xtent = (const char *) extent;
-// string sql = "select asbinary(the_geom,";
-// if (isNDR)
-// sql += "'NDR'";
-// else
-// sql += "'XDR'";
-// sql += ") as features from ";
-// sql += *it++;
-// cout << sql.c_str () << endl;
-// pgc.Declare (sql.c_str (), true);
-// int res = pgc.Fetch ();
-// cout << "Number of binary records: " << pgc.Tuples () << endl;
-// bool setExtent = true;
-// // process each record
-// QPainter paint;
-
-// paint.begin (mapCanvas);
-// paint.setWindow (*mapWindow);
-// QRect v = paint.viewport ();
-// int d = QMIN (v.width (), v.height ());
-// paint.setViewport (v.left () + (v.width () - d) / 2,
-// v.top () + (v.height () - d) / 2, d, d);
-
-
-// paint.setPen (Qt::red);
-
-// for (int idx = 0; idx < pgc.Tuples (); idx++)
-// {
-// cout << "Size of this record: " << pgc.GetLength (idx, 0) << endl;
-// // allocate memory for the item
-// char *feature = new char[pgc.GetLength (idx, 0) + 1];
-// memset (feature, '\0', pgc.GetLength (idx, 0) + 1);
-// memcpy (feature, pgc.GetValue (idx, 0), pgc.GetLength (idx, 0));
-
-
-// cout << "Endian is: " << (int) feature[0] << endl;
-// cout << "Geometry type is: " << (int) feature[1] << endl;
-// // print the x,y coordinates
-// double *x = (double *) (feature + 5);
-// double *y = (double *) (feature + 5 + sizeof (double));
-// cout << "x,y: " << setprecision (16) << *x << ", " << *y << endl;
-// QPoint pt = paint.xForm (QPoint ((int) *x, (int) *y));
-// cout << "Plotting " << *x << ", " << *y << " at " << pt.
-// x () << ", " << pt.y () << endl;
-// paint.drawRect ((int) *x, mapWindow->bottom () - (int) *y, 15000,
-// 15000);
-// // free it
-// delete[]feature;
-// }
-// paint.end ();
-// }
-
-}
-
-
-void
-QgisApp::drawPoint (double x, double y)
-{
- QPainter paint;
- // QWMatrix mat (scaleFactor, 0, 0, scaleFactor, 0, 0);
- paint.begin (mapCanvas);
- // paint.setWorldMatrix(mat);
- paint.setWindow (*mapWindow);
-
- paint.setPen (Qt::blue);
- paint.drawPoint ((int)x, (int)y);
- paint.end ();
-}
-
-void QgisApp::drawLayers(){
- cout << "In QgisApp::drawLayers()" << endl;
- mapCanvas->render2();
-}
diff --git a/qgisapp.h b/qgisapp.h
deleted file mode 100644
index a08766df198..00000000000
--- a/qgisapp.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/***************************************************************************
- qgisapp.h - description
- -------------------
- begin : Sat Jun 22 2002
- copyright : (C) 2002 by Gary E.Sherman
- email : sherman@mrcc.com
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-
-#ifndef QGISAPP_H
-#define QGISAPP_H
-class QCanvas;
-class QRect;
-class QCanvasView;
-class QStringList;
-#include "qgisappbase.h"
-
-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();
- //! Zoom to full extent
- void zoomFull();
- //! 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);
- //! draw layers
- void drawLayers();
-private:
- //! 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;
-
-};
-
-#endif
diff --git a/qgisappbase.ui b/qgisappbase.ui
deleted file mode 100644
index 4552ae000d8..00000000000
--- a/qgisappbase.ui
+++ /dev/null
@@ -1,282 +0,0 @@
-
-QgisAppBase
-
-
- QgisAppBase
-
-
-
- 0
- 0
- 609
- 451
-
-
-
-
- Helvetica [Urw]
-
-
-
- Quantum GIS
-
-
-
- unnamed
-
-
- 3
-
-
- 6
-
-
-
- frameMain
-
-
- StyledPanel
-
-
- Raised
-
-
-
-
-
-
- menubar
-
-
-
- 10
-
-
-
- MenuBarPanel
-
-
- Raised
-
-
-
-
-
-
-
-
-
-
-
-
- Toolbar
-
-
- Toolbar
-
-
-
-
-
- mapNavigationToolbar
-
-
- Toolbar_2
-
-
-
-
-
-
-
-
- Toolbar_2
-
-
- Toolbar_2
-
-
-
-
-
-
-
-
- actionFileOpen
-
-
- image0
-
-
- Open Project
-
-
-
-
- actionFileExit
-
-
- Exit
-
-
- E&xit
-
-
-
-
- actionZoomIn
-
-
- image1
-
-
- Zoom In
-
-
- Zoom &In
-
-
-
-
- actionPan
-
-
- image2
-
-
- Pan
-
-
- &Pan
-
-
-
-
- actionZoomOut
-
-
- image3
-
-
- Zoom out
-
-
- Zoom &out
-
-
-
-
- actionAddLayer
-
-
- image4
-
-
- Add Layer
-
-
-
-
- drawAction
-
-
- image5
-
-
- Refresh
-
-
-
-
- actionZoomFullExtent
-
-
- image6
-
-
- Zoom to full extent
-
-
-
-
-
- 789c8d95496fe3461085effe1582eb66043514d9647723c8c1bb67b1c7f66c9e0972686ede77d9b23dc87f4ff7ab1645ca13247a06844fcda7aa7a45d16f564647fbbba395374bf7133739ad46d589bb1badd40f9797cf7ffef5c7cfa5e5548dfcdf384946e9f26f4bcb07935135dabbbe6a023079a0042fb003db4ce73630ed041e174a6b05de025b556a03de00d779a22bf066e034c933dd82d7c02ad72603af83755e9a02fc0c36796534f8055ce6ad71e8e7085ce9c4caf92ab82e52837afc4e588fadf4f3086e0a65643e036e7566310f7f0f9c255a597c3f4dc1e342db31cedf0bfbf14b9c5f82d3c25884c756586b2bf57f80336dacd43b04ab20f89f840b6765fe2b705e9436c7f51f84b5b5c88b914f56e832f234722dfd7002d6ba72d8175d834dd1cafcbc2bac1b8779a8015b9f9fcc8f7d654eb74ee6c17eb2322fb57cdf8db04e251f1e0b9bc4c93c2db8f279cafc7bc226759887185cfbfc6a9c6f0a9bcc61df8cfd668d514ef6790c6e7d9e32ef476153c839e37e5363a39dcc978253639cccb3dab1f4bb0fce3c4a5edb60654a27fd1e800b533be90ffb51d67fbfec03f7a372fefb8427e0b2e30770656c64dc6faaf62cf3dd467691efc04dc7d8bf6a7d3fc2d85f9e748cfcf3b1a9e2fc67e0b4e3fbc87564ec23cf3a3e07ab8e8f2337912fc079c7271d4bbe35b8e8f834721bb904eb8ef1fbc84dc795b04d22e3fecbed8c09fbc8cb2030f2d469101879974d1018f356491018fd57691018f9562a088cf92b1d04c63e2a1b04469e551904c6bc551d04c6bc751204c63c751a04465eb50a02238f5a07615e0db64138c7f3b42e83705e80f1c2399ebf4d1284f31c9c0681bf81551058817510f82bd80681333002047f01d741e0b781db2408fc199c0681f1bc6f5510f8135807c93f8fff12934868d1c38eddf0eab963e61b7abca3e4aaef1b56107ee5a9e16a66bea1433ee97bfc752d1ff3099fce7cafebfcc273e65de77c816a979e07155e7bfc15577ccd37d127d51612914c069e5bbef3bee0b8ef7539f0f53dfe64c20ffc182b4dbde65d56f344fafbf19f3ef173ac34e5175e8dbe79265d35f178c79a97549af23a6ff0266ff1367cb36a6e781f78dee1b7f04df91dbfe70fbccb7bfc91f7f920fadcf0dee143fec49ff90b7fe56ff01df177fec1098f7d8fa977055f2ff7e8095532569c73c11a3ec3b6d7a3239ee7173db10a11392aa9a21abe798f8e1a6ae9585cd1d3ab4227744a67744e17f0851e1d5dd2155dd38d74183338f4ea55a15bbaa37b9ad0037c8e1e694a4fb31cbafd107cbd2af4e035219f293dd30badce931bdca3f0a14abc3ebc7bcf1aad2f66bdf02b0ebe78bdaf72481bb4d977bcf62cfafcfbd6d0f16b4fcfb74d3b8b8e7ff7f472a1c55fdeff7b562d78fefe7de91fc88dca3a
-
-
- 789c85965b4f1e3f0ec6effb29507d57adfc9ff3245aed452950a09c0f8576b5174e3253a01c0abcb485d57ef7f53c0eb450d87d5d09fd9a38719ed8cefcf566ee706b7deecd5fafae67323b8e73f148aee6dea49bb3b3db7ffeeb1fff7ef5ba6ae6f45fe9fbb9eaf5df5ebdde9ecdc5b98d8bf36102d1f97354e0072e26ae3bb51e7c008eb5afddc4e4276e0a5f0ae6d341e6ca5816c1a51a36934b70a5568377c0f564e0f4c00d7817dc4e86f51db8932a603e7dccdc049bbf07ee27c3f8fa035bbc2bc6de8b9d671fec2703b3b1efc4f6fb0916b58071db2f4c86f16570943294e0137052333d97c0435bb476feafc63e08f6a399b19e07e38cf3e96c358c1f1afb68f305e769abc9301f7ab7f564985f666edb0ef3114fdb486b7ac91ab86d5d6b7af4c6a18aa6df5b70a766fa9c1a4b21380f41afd6071f23f6bf0587c930ffdb03639caec151d7373ddf677611f3f91c3cb66367f91226ee8aaeeaec3ca37128a2e9770c56b5a2cddf00d7adaf4cafc2580de7e10f999bcc0358a9b378a047871fd69b07f72a08f6a30eec824401ff00fbc9b01e81c36418bf310ebde949166f9c0cf3059c2603dbf906b511f32dbe211609e767d3639c0ce37bc6b14db83f463ef6455ff5960fa8dfbe9c0cf3978ca34b763f88b7af547f3bff6ae61871df8cfaebebc9307e65acfbd979510f282fd3f3ec81b11e9f666e7bd3f308dc8664f942ad712c93dd9faddff7a343bc7267ec2a67f9d8809d7701eb0bf4e9bd2b9de5c345e6c6d97e168fd7f3587ed97e12ab64eb231f5ce9b543219e5de3a801621cf9a9bb0fdef2e98b71ac23f4e726b337fdc9b856b6fd37c14de72aab17e8e9da380eb61efaa1eb5231d8fd5c662e337f063b4d2fabf7efc65192d5e302d877a9b178a0970b6eb47879d5d857def47b078edd68f3a53376aa38f6db30d6f687f8197abae4cbaccf8e712a92ed87fc57751a6ff791390ea61fef661e13ea25207f7dd1f50dcec7e837ba7af4a6cfb671aa4d1f81debe8ad1cecb35b8d6766af98d7ee8d180e0bf609cfa01f113f2dff7c965fe04761abfd5ef56e6c6f6e39dcc5d5e1ff5e5bd3670ebdfa8672fa94a56afe8dfdabd6bb1fcb778a35462f562f1c6d49a5e04fda54a71b0fa81fed2e87ea647056e53cae3c83fe9743ef24bd0cfa5ef5c7ebfe68dd360f309fd565c1a07cb77e829a28cf30aea55a2ae67f7bb9c390df63ea2df8b66a7ad27887feab6d67f04fd3954ba9ec5837843ddb7168fcc8c351ecb4fdc4f68fa2e8faf1aeb7dda79d18f423bd483e98b7842a70159fea33eb53b8db63f211f830cfd607aa29f84a0f761fa439fa0a7b371417f0dc3d0e4f3e3fec3e8aaac1ff23116831bad1e51afb11c2a9b4f7799ebec3f666e06dc3fa1bfc4fade9f173387d1e2c57ba8ddb24a561fc6dde0cc9ff1bda4ddb8b17e41e8975a0c2e9fef3c73182d1fb7324763311637daf70a9f18a73ebf07fbc6f7fb09fa490cbec8f3a1df545dd6cfe5da58e7db7dac64f639de7b961c1ffa511ceec7a97a60f807d45f1c631f4c4f7c4fa54ae3873e01f7939a3844d38b8c8734da7dce8cc762b4fa5fc85c66463da6761847d317f99e7a2d589c27d87a92dadcff0be3b11a2dffaf33d7a3e981f368758c161fe33d4a49e75b7da0de35fb877cdf97c61a0fe20d38df50a498f311effd50ea7ccb77d4a766cf9879cd58d7b7f9a83f7dfceb7c1e7cff69b6d7b9df207f351bfa117af266663fdaf706f454759d8d0bfaeb90f4beec3d46ffd168f27c41fee9eea5dd17233f74f730dafb87f752577359aff9ccd1c619ef85d2309a3fbe4747fc26de9edd1b130b078e9c7efddf9ff6cb87071ef90b1ff1319ff0573ee5b3ffe7c3e77cc1dff892aff89a677cc3dff907fffc5f3e7ccb77fc96e7f91d2ff0222ff17b5ee6155e7d3ec6ecf381d7d4639d377893b7789b777897f7789f3fbee4c3077ca8517d528fcf5c70c915d7dc70cb1df71c5ef071ec898948b8a0c0db1429d140237da1233a7ede874ee82b9dd2199dd3057d538f4bbaa26b9ad10d7da71f2ff8fca45bbaa3b7344fef6881166989ded332add02a7da0b5177cd6698336698bb6698776698ff6e9231dd0217da2cf54bca41b9554514d0db5d4514f4e1f51167d99443fa55ff29124838cf2458ee4584ee4ab9cca999ccb857cd3cfef3fbceef3402ee54aae652637f25d7ec84fb9953b792bf3f24e169e7afdca37599425792fcbb222abf241d6645d366453b664fba9d7e3bc961dd9953dd9978f534c722087f2493e3ff57ae2131f5921a57e2ffce19535a8a579b0fad7e8f35ed9a7e17569a5935e9c7afd16c7735ef73eeae1351a17f8b1cf735e0f3e5d3e43f7d4e791d7639f29aa18f415ffd3e7de2b04fdfbbbcf14551724c4e77ce03559fccde705dd1e79c5fb3cca3e8fefe5599fdfeef43f7f7ff55f91655a15
-
-
- 789c8d924d0a02310c85f73d4598ec8a383a2ec523282e0571f1a88a2e4641c7858877b73f1653db111f2d34f99a8426ad35ad9673d2b5ba76e88e86cc0117d2db5bdbded79bd943554d43764d685c0d543524438bf369e7ce6ccf3cf272269cb9f7f2378bfa8730b3db9c116658375020b05e47625442c06165d9bc1b312c105f1d510c4142f522812048492259a78f7c05713f11ef49eb4b2211977af0c9954c210dc9493e8577bac2e47c5bc5487ffd83e754bd008fb59390
-
-
- 789c85975973163d0e85eff9152974474de9ebb7f7aea9b920242c217b8004a6e642b6bb591308094b3235ff7dd4e73821eb4c44917ab065cbc792dcfcf568e9607b63e9d15f0f4e4eedf4635c8a1fecfbd2a3f4e3f0f0ec9ffffac7bf1f3c2ceb25ffb318baa5f2e1df1e3cdc395d8a4b9b5f8fc619cce72f49811f703173d5ba75e07d70ac86aa9f598699eb625818e6cb7ee6926cabe0851b36b36370e9568177c1d56ce074c935780fdccc86f57b706b65c07c7993b90e9cff0adccd86f18d4b66bc2fc8c3603ccf6bf0301b58c9436bdcef37d8dc02c6b95f980de3cfc1d1166101fe044e6ed4f329786c8a86e7ff4c1e82613f3925fb7930ae389fcf76c3f80179889c6f384f53ce86f9d0bba966c3fc45e6a669311ff134b535d4cbd6c14dd337d4a323873252bfc7e0d68dfa7c215b61388f40af6608438cd8ff0c1c66c3fc6f978c713901475f9f7a3ecbdc47ccd723f0d44c2df325ccdc166dd9f23c13391491fa7d04bb5a91f337c1553394d4ab20bbe13cfa32739d79043bb58c077ab4f8c17acbe0ce05c17ed282fb60d1c0bfc0c36c584fc061368cff20878e7a0ae38db361be81d36c609e6f749b309ff18db14838bf528f69368cbf22c726e1fe14f9d8155dd9311f50bfdd6236cc7f4a8e7de2fd20deae74fd79feb5cc31e2be15f5d755b361fc3bd9f7e379510f282fea7978c9584fbf646e3aeaf901dc84c47c91861c1789f7c7f5bb6eea11af9d93fbb2673ed6e07ee803d637e8d30dfda2673e7ccd5cf7dc8ff10c7e1ee617f7b35826ae8f7ce817837728c4b3478e1e20c6919fbefb38309fde936315a1bfd69907ea2fe4ca99fb6f81ebb62f592fd0b36fe234723df4c3be4dc5c8fb39cebcc8fc0edc7b7ab1de7f92a325d6e30a786853cd78a0571ffa89f1ea1a792807eaf7041cdb89f36593eced0ef12af4ebd3b0c87aec925391b83ef2ddd5a807ea9f398ed44bf7324f09f51190af43d17635cea3e82fbe7a1ca8c70e3955d4c3a0ef50c6c8f36905aebc7d329fd1ff06341cf8af905337227e41be0f5dea33bf05f71e3feb753b73cdfd7437739bd7473d0d83376cf66bd4ef60a94cac4ff46befd69531df196fb4d2581f8c37a6867a09f4b632c511f717f09e58358c03cf877e62b5ef4f7d4a709312e72bf2cf5af7477e19fab9756d9fdfaf65721a395fd06fad4fd3c87c87be66ce38bfa15e2dfa7abcefe799d3c8f711fdde3c3bb99ee13c73b765ff31f4e750fa7a8c07f186aa6b188f9d923d1ee627ee2bd45d9bc7d7c87ebf3c2ffa5168c66aa4de8827b41e10f31ff5e9dd69e2fe82fc0c367623f5453f09c1ef87f7017d829f8ee386fe1ac6b1cee7473e84a92fb37ec8cf588cfdc47a44bdc6c55872be9c67aeb2ff94b91e910f82fe12ab0b7f5dcd1c26c68bf7d0bb6599582fe476ece9aff85ef26e5cb35f08faa517479fcf7794394ccccfedcc916c64eb277eafe82772eaf27bf09a7cb19fa19fc43014793ef49bab8dfddc4ec83e9ff7f122f390e3bd60cbf1a11fc5f1625cca4b867f403dc62976817a22ff53e9f1439f80fb49751c23f512f29826dee729792a26d6cb4ae64566d4676ac669a2bec8f7d47901b3deb89ea526f7ff823c9513f3ff247335510f9cc7ab63627c8af728259fcffa40fd7bf68ff9be8fc91e0ffb2bee732c52ccf988f77e5cf87ce63bead3b367cabc4ef6f5391ff5e78f7f95cf83ef3fcff62af71fe4af674337414fddca3c4cfcde809eae6ecf7143bf1d93df17df63f4238f26cf37f41fdf7dc1fb52e487ef1e26be7f782f7db53eebb59c39725cf17e388d13fdf13d3ae167e69dd30b5351d3a051d39f7fbb6d7f7c74d449dfeb07fda89ff4b37ed1c3ffe7a347fa55bfe9b17ed7133dd51ffa537fe9efffe5a3677aae8f75599fe88aaeea537da6cff585aedd1d63f679a9ebeeb1a19bbaa5dbbaa3bbbaa7aff4b5beb9cf47f7f5c0a37aeb1eefb4d085965a69ad8db6da69b8c7a7d74154444c0b09ba2351928c32c97bf9201feff6914ff259bec8a11cc957f9e61ec7f25d4ee4547ec84ff9758fcf6f399373792ccbf2445664559eca33792e2f644d5ecafa3d3e1bb2295bb22d3bb22b7bf24a5ecb1bd99703792befa4b84f3759482995d4d2482b9df4fea8aaf9cb64fe297d9f8f251b6db2f7f6c13eda27fb6c5fecd08eecab7df3cfef5b5e177960c7f6dd4eecd47ed84ffb65bfedccceedb12ddb135bb9e9f527df6cd59eda337b6e2f6ccd5edaba6dd8a66dd9b6eddcf4ba9ad71ec7aeedd92b7b6d6fe6986cdf0eecadbdbbe975bd16b267e4dffe7fa9857f3fdcf2ca1a54565f5a75317a9f57f6a975c31a6badb3debde2953deff0baf0b9f418aefadced75e113142788febbbeaed235af6b3edc23f82b7ed3e78f5708fefbaa4ff608f1b64ff69a2d5ef1b953b79b37709147d9275eb7db3ed7f2e03f7f7ff05ff0ee59a6
-
-
- 789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523232520022630543251d2e253d856405bffcbc54105b19c8563600020b03103711c44d0303b04aac005546593911b74ce2d09151c60089046512a100641a14109419789f522203f6082e19385ba9d69a0b008e2682ef
-
-
- 789c759649531c490c85effc8a0e74734cc85595595b4cccc1066f98d52bf6c41cb23668f6a5b10d13f3df27f55e81a11bfae1083ea4cc94944ab59f3f9bec6e6f4c9e3d5fba9c85d9b49db4fbe162f2acbb3a3ebefefb9fbffe5d5aceb249fc49bd9b64cb7f2c2defcc26ed64f3f4a437d03a8224f818cb17706a02ef809d095c824b9371507065827d1b1c4cb00bb831810fc09d09e7af1ac7c32a9eaf3fc169e6931cfe87e0cc04fbaf918bd17f00fbd48ff1d7b79c7ad8b7c959cdf8f466e486f1c9393837c1be0b2eeef6afc82e4d5af823dfb434c1fe96ecb2d13e05d726d8bf92b396f94b060e26d87bb273633d184fe3fa6440fe01dc9a606fc86e48195f4bf629391c833b13ec7b645fa4b83f3d03f7be66fc81e70f26d8af8daddc4901fbd12d67e807edc8ae19eb2be43ce17e82fbccf0813d90f334657f7c067b13f83b38378107729170bda0be5965c27e3b643fd6575e816b13ecebe4a2cd18cf7b7030c1fe8e5c0c19ee43f7c9f10291bf6c815b13ecdfc8e5e0b87f49ae52c7fe9981bb2a73bcdf0d706f02339ec184f53fc89573ec97cb911bcffe3d1879f0a8bf7e24872467bf7d3076499e64bc7fe4e7d2ca3b9ed792eb3e67fdf19e5d2c98637e811c8a9cf95d8c5ce5ec97376017f3657e87e4c615bc2ff49ff38d1f79059c9bc0e8075714dd98af0797550c0076bc6f5799c0e82717eaccb31e29b8318191bf6b4dd80ffdedba581fda0b639f98c017e4d28ffbe33d631cb07f4fc965e2585f47ae0bd64bf0ded19ee41cec4c60bc1f9f9bc0a8572c4631ded716b94e3df3bf223745c9f8d06fbe34c17e422e3bc6af2fc9d19ff317f3ce5726bc47bc8f58fe66cc1ff3ccb726f06b7067823fea9b2726ecbf42ae72cffbfd04c600841def33cf9baea41dfd9f9726ec87f996f726f8e3bcc2b5b1c3c09b23bb8af5c17c297cb4f37cac8fcd37facb1ab83281d12f4530818fc86d31faa35e456702e33d15bd098cfa158309e765e4180fee47101fc637eb8bf784f4f87d83fe2e6b13d6e3fecbae6d2ace63ccd32a3581f1de309ef8de8ec86d57737ff41bae8ff1e3fba0aa4d60ccdbaa3381319feac604c679f83a65ff246067c2796be42e04e41fd05f2137c11ffd1d0613fc316f9ba44f1b7edfbd00677dd2b0fee4dc04c67b6b2a13fc67e43e6b78ff980f4dddfb86f303fdd4f47dde327ff43f9e2fe3c5bc6e9bbe6e397ff17edbbe6f5bee87f7dff921363018f3303ef7a4e3fb42fedd30b88ee761dec62fcb5bc63c1df031de993d948a066db4d54e7b1d1edae6fd754ff775aa077aa8477aac277aaa677afe947ff4bed04b9de995fe88bfffd45f7aad435c71f384ff7ef47ea12f75257add45127fbfd1d545ffb8e3545fe96b7da36f1772bae1fa07feefe2ee6bfa7e3ec7db5316fcd7754337754bb71ff3ff1d4f8cef5c77f4837ed44ffa59bfe857ddbd1fff23fedff4bb269a6aa64ebde65a68a9d5786a2d3a5f4f1d44244823ad74d26b2977bb47ef3dd997e97c3db1e2400ee568cefb584ee454cee47cbe9e71c5855ccaec81f795fc909ff24baee586673ca88f9d71dffb85bc9415599557f23aae786367ccddef9db7bc9577b216e33893f7b22e1bd17b53b664fbb1fee4ee71ff9df8ef837c944ff259bed85fb47ecaff2ea6afb22bdfe4fb427dea27fc1349e3fed9a2ffe28ae8edc44b2e8594f3fe5cf17b0de277b1f255ace6bd9deec71f5456838460bea189ff01684317ba5895f2717fdb35f461101ff6c27e984a15fd0f1ec6b9581fd90e87328deb8ec2f1624ecbfffdb9f43f0b1c269c
-
-
- 789c8d96db521c390c86ef798a297497da52667abadbeddada8b104242c2100810205b7ba1b6bb399f860142b6f6dd57fe6526a9307b981f427d23d9966559cecb178383adc9e0c5cba5db99cc4ec2201ccb74f022de5d5c3cfefec76f7f2e2d17c5407f46d578502cffb2b4bc3d1b84c1e6d5659780260a34c427b13c80db24d84fc02129315f261ec524d8d364548c9360ff04f62ac17cb789c7a324f01d38b9c35fcec1b5ca81cfc04ed580afc05e85f9e89b71537a9bef1a2ce3be44fc2ce05665f1067050215e41bce3a8b2fddf1837ded7f06fc19daa07c7c4e55085f56825735d225eda058f942d5ec9ec3213b8283560f83f1afb46309eb19f729c04fbe99c4bf091b1f782f9f83d181ff0f59c2bf867bbafc538dbbd88ad6ff15449188ffc6ab42eefe735b84902bf32f69d58fe7ab04fc2f8a339db7977604982ddc60795d5cb57e3d605abaf0a1c55761e164f6c2580c5f2df27c1fe21713594716bf13799ebd6f6b70e2ec4b596cf637029c1ec8cf8aa4665fe35d827c14e73b67afb0c6e93c0bd713b0a96ff1d704882fd63e668cce61f55b6bf7789eba196a7c55f808b24d84bf0b8f205ea99a6c66d65eb09f25d3749b03f18b73158bd7ab0a8bfeddfe66f5de1ac9e70ffea9004decf1c8df98bb1e61ffb6567acd7c7f283faadfbba77d62f38b11baaec3ee2beb95112e6f773c6fe04f74da3299cc587f9d375b7f804fd06e568f5db1987265afde0bc5da5c27d15dc1757abac7f5c80d3c7f2730f6e347e5b6f15ec9d383bff4363df78cbc75be3b60f960f9b4f54960f8bbf754d1e7f903964fbd058cbddea03fdc245d739bb3f164feffac6fa15eaa519051fadffa05ef5707501706d1c479de513fdb57141b2ff61e6182dfe11b891c6ee2b6f8245ed16ef46e63ecf67f62e09f1617d5f3485f56342bff7b596af9d47ccac1b026f83bd5e5fdbcf41e6a6b3f850efbe8d7587f367c4e7a31482f579621c7df6473f55abb3fe486b606d089dd51fce47aa183abb9f782f440b5e8c517fd274a3ceee2bea597c70d64f08ef91b4b1cfe3f7c0c1fbdceff78dbba18d67d4a3f46dd9da796e19ebfc966fd4473bd2f8ccbe61dc156667bc6f6dd16a89c09f8dc353ff43bd68379068f91b83459f5b3b9f2de3aeec2c3ed47babf5152c5f6799abccebc69debec3cf19eb551cad2e2dd31eeeaded65bcbec32a3df8571e733a3dfeaec7db4fed41aebfcb6bf37e0ba8bbdf533f4f3a0a7d5db79a33f85d0f5bddd4ff4b3d025c1be6d1c7dee2f66efa3443b1fcc1f35badef27b9f79dcdbfd467eb5da626ff584f745abc3e57a9919f7458e0ffd2f467d4e6c7ee43b6a34deee27ea5d4ff7e9bee13dd7ff0c14797dd44f57693cb6bfbdcca5c5c3e8df5d8acfce03efa966a3b1f518fda7c727f1f6ec494c2cdc72e0c8ddf76f7fd4777feef9888ff9844ff98ccff9822ff9ea9ffdf99a6f78cab73ce33bbee707fdf72b3ff2b7c5fefc8a57d4fe9a57f5f70daff15b7ec7ebfacd0abf5fe87fc41fe0bd8a111b3ce14dfec85bbccd9f9efbf30eefea5c33de83f767dee7033ee42f3cd411232e9ef91ff1984bae54c97b4bbd6b76dcb0e70d62a205fea724d46ac41b1428724d1df57444c74a4c273ffbd3299dd1395de81e0fe812de57744d3734a55bdea567f1d39de661aa71e81ee99e1ee82b3dd2377aa563a7b4b2283ff49a56e90dadd15b7a47ebf45ee7fe401b74ce239a2cf4dfa48fbca2316dd1367da27b3ea41df55ea15d9ad0dea2f3a5cfb44f0774485fa8550d694445f2e6551a53b9b07e76a8a29a1c35e485854468222d8d7584e3f6b97f9204aaf45276d2cb91ae59cab18e3be1553995b345fe3f4b479ceb880bb9e40bb99ae773625978fafba3d4ff5caee546a6fc28b74ffef3f99ef9a7efb006cb547fff239ebcc65d1e71cff1fff8cfd77830ff7f8fe7c9a26711ff7bbf3f6bf9af5f97fe06b3c5625f
-
-
-
-
- actionFileExit
- activated()
- QgisAppBase
- fileExit()
-
-
- actionFileOpen
- activated()
- QgisAppBase
- fileOpen()
-
-
- actionAddLayer
- activated()
- QgisAppBase
- addLayer()
-
-
- actionZoomOut
- activated()
- QgisAppBase
- zoomOut()
-
-
- actionZoomIn
- activated()
- QgisAppBase
- zoomIn()
-
-
- drawAction
- activated()
- QgisAppBase
- drawLayers()
-
-
- actionZoomFullExtent
- activated()
- QgisAppBase
- zoomFull()
-
-
-
- qgisappbase.ui.h
-
-
- fileExit()
- fileOpen()
- addLayer()
- zoomIn()
- zoomOut()
- init()
- drawLayers()
- zoomFull()
-
-
-
diff --git a/qgispoint.h b/qgispoint.h
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/qgscoordinatetransform.cpp b/qgscoordinatetransform.cpp
deleted file mode 100644
index 90fd06b2615..00000000000
--- a/qgscoordinatetransform.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/***************************************************************************
- qgscoordinatetransform.cpp - description
- -------------------
- begin : Sat Jun 22 2002
- copyright : (C) 2002 by Gary E.Sherman
- email : sherman@mrcc.com
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-#include
-#include
-
-#include "qgspoint.h"
-#include "qgscoordinatetransform.h"
-
-QgsCoordinateTransform::QgsCoordinateTransform(double mupp=0, double ymax = 0, double ymin=0, double xmin = 0) :
- mapUnitsPerPixel(mupp), yMax(ymax), yMin(ymin), xMin(xmin){
-}
-QgsCoordinateTransform::~QgsCoordinateTransform(){
-}
-QgsPoint QgsCoordinateTransform::transform(QgsPoint p){
- // transform x
- double dx = (p.x() - xMin)/mapUnitsPerPixel;
- double dy = yMax - ((p.y() - yMin))/mapUnitsPerPixel;
- // double dy = (yMax - (p.y() - yMin))/mapUnitsPerPixel;
- return QgsPoint(dx,dy);
-}
-
-QgsPoint QgsCoordinateTransform::transform(double x, double y){
- return(transform(QgsPoint(x,y)));
-}
-void QgsCoordinateTransform::setMapUnitsPerPixel(double mupp){
- mapUnitsPerPixel = mupp;
-}
-
-void QgsCoordinateTransform::setYmax(double ymax){
- yMax = ymax;
-}
-void QgsCoordinateTransform::setYmin(double ymin){
- yMin = ymin;
-}
-void QgsCoordinateTransform::setXmin(double xmin){
- xMin = xmin;
-}
-void QgsCoordinateTransform::setParameters(double mupp, double xmin,
- double ymin, double ymax){
- mapUnitsPerPixel = mupp;
- xMin = xmin;
- yMin = ymin;
- yMax = ymax;
-
-}
-QString QgsCoordinateTransform::showParameters(){
- QString rep;
- QTextOStream(&rep) << "Map units/pixel: " << mapUnitsPerPixel
- << " X minimum: " << xMin
- << " Y minimum: " << yMin
- << " Y maximum: " << yMax;
- return rep;
-
-}
diff --git a/qgscoordinatetransform.h b/qgscoordinatetransform.h
deleted file mode 100644
index cf1355f0699..00000000000
--- a/qgscoordinatetransform.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/***************************************************************************
- qgscoordinatetransform.h - description
- -------------------
- begin : Sat Jun 22 2002
- copyright : (C) 2002 by Gary E.Sherman
- email : sherman@mrcc.com
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-#ifndef QGSCOORDINATETRANSFORM_H
-#define QGSCOORDINATETRANSFORM_H
-class QgsPoint;
-
-class QgsCoordinateTransform{
- public:
- QgsCoordinateTransform(double mupp=0, double ymax = 0, double ymin=0,
- double xmin = 0);
- ~QgsCoordinateTransform();
- QgsPoint transform(QgsPoint p);
- QgsPoint transform(double x, double y);
- void setMapUnitsPerPixel(double mupp);
- void setYmax(double ymax);
- void setYmin(double ymin);
- void setXmin(double xmin);
- void setParameters(double mupp, double xmin, double ymin, double ymax);
- QString showParameters();
- private:
- double mapUnitsPerPixel;
- double yMax;
- double yMin;
- double xMin;
-
-};
-#endif // QGSCOORDINATETRANSFORM_H
diff --git a/qgsdatabase.cpp b/qgsdatabase.cpp
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/qgsdatabaselayer.cpp b/qgsdatabaselayer.cpp
deleted file mode 100644
index ecf331fff6e..00000000000
--- a/qgsdatabaselayer.cpp
+++ /dev/null
@@ -1,416 +0,0 @@
-/***************************************************************************
- qgsdatabaselayer.cpp - description
- -------------------
- begin : Sat Jun 22 2002
- copyright : (C) 2002 by Gary E.Sherman
- email : sherman@mrcc.com
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-#include
-#include
-#include
-#include
-#include "qgsrect.h"
-#include "qgspoint.h"
-#include
-#include
-#include "qgsdatabaselayer.h"
-
-QgsDatabaseLayer::QgsDatabaseLayer(const char *conninfo, QString table) :
- QgsMapLayer(QgsMapLayer::DATABASE, table),tableName(table){
- // create the database layer and get the needed information
- // about it from the database
- dataSource = conninfo;
- PgDatabase *pd = new PgDatabase(conninfo);
- if(pd->Status()==CONNECTION_OK){
- // get the geometry column
- QString sql = "select f_geometry_column from geometry_columns where f_table_name='"
- + tableName + "'";
- qWarning("Getting geometry column: " + sql);
- int result = pd->ExecTuplesOk((const char *) sql);
- if(result){
- geometryColumn = pd->GetValue(0,"f_geometry_column");
- // set the extent of the layer
- QString sql = "select xmax(extent(" + geometryColumn + ")) as xmax,"
- "xmin(extent(" + geometryColumn + ")) as xmin,"
- "ymax(extent(" + geometryColumn + ")) as ymax,"
- "ymin(extent(" + geometryColumn + ")) as ymin"
- " from " + tableName;
- qWarning("Getting extents: " + sql);
- result = pd->ExecTuplesOk((const char *)sql);
-
- if(result){
- QString vRight = pd->GetValue(0,"right");
- layerExtent.setXmax(QString(pd->GetValue(0,"xmax")).toDouble());
- layerExtent.setXmin(QString(pd->GetValue(0,"xmin")).toDouble());
- layerExtent.setYmax(QString(pd->GetValue(0,"ymax")).toDouble());
- layerExtent.setYmin(QString(pd->GetValue(0,"ymin")).toDouble());
- QString xMsg;
- QTextOStream(&xMsg).precision(18);
- QTextOStream(&xMsg).width(18);
- QTextOStream(&xMsg) << "Set extents to: " << layerExtent.xMin() << ", " <<
- layerExtent.yMin() << " " << layerExtent.xMax() << ", " << layerExtent.yMax();
- qWarning(xMsg);
-
- }else{
- QString msg = "Unable to access " + tableName;
- //QMessageBox::warning(this,"Connection Problem",msg);
- valid = false;
- }
-
- }else{
- QString msg = "Unable to get geometry information for " + tableName;
- //QMessageBox::warning(this,"Connection Problem",msg);
- valid = false;
- }
-
- delete pd;
- }
-}
-QgsDatabaseLayer::~QgsDatabaseLayer(){
-}
-QgsRect QgsDatabaseLayer::calculateExtent(){
- return layerExtent;
-}
-void QgsDatabaseLayer::draw(QPainter *p, QgsRect *viewExtent, int yTransform){
- // painter is active (begin has been called
- /* Steps to draw the layer
- 1. get the features in the view extent by SQL query
- 2. read WKB for a feature
- 3. transform
- 4. draw
- */
- cout << "Drawing layer using view extent " << viewExtent->stringRep() <<
- " with a y transform of " << yTransform << endl;
- PgCursor pgs(dataSource, "drawCursor");
- QString sql = "select asbinary(" + geometryColumn + ",'" + endianString();
- sql += "') as features from " + tableName;
- sql += " where " + geometryColumn;
- sql += " && GeometryFromText('BOX3D(" + viewExtent->stringRep();
- sql += ")'::box3d,-1)";
- qWarning(sql);
- pgs.Declare((const char *)sql, true);
- int res = pgs.Fetch();
- cout << "Number of matching records: " << pgs.Tuples() << endl;
- for (int idx = 0; idx < pgs.Tuples (); idx++)
- {
- // allocate memory for the item
- char *feature = new char[pgs.GetLength (idx, 0) + 1];
- memset (feature, '\0', pgs.GetLength (idx, 0) + 1);
- memcpy (feature, pgs.GetValue (idx, 0), pgs.GetLength (idx, 0));
- wkbType = (int)feature[1];
- //cout << "Feature type: " << wkbType << endl;
- // read each feature based on its type
- double *x;
- double *y;
- int *nPoints;
- int *numRings;
- int *numPolygons;
- int numPoints;
- int numLineStrings;
- int idx,jdx,kdx;
- char *ptr;
- char lsb;
- int ttype;
- QPointArray *pa;
- switch(wkbType){
- case WKBPoint:
- p->setPen(Qt::red);
- x = (double *) (feature + 5);
- y = (double *) (feature + 5 + sizeof (double));
- p->drawRect ((int) *x, yTransform - (int) *y, 15000, 15000);
- break;
- case WKBLineString:
- p->setPen(Qt::blue);
- // get number of points in the line
- numPoints = (int)(feature + 1 + sizeof(int));
- ptr = feature + 1 + 2 * sizeof(int);
- for(idx = 0; idx < numPoints; idx++){
- x = (double *) ptr;
- ptr += sizeof(double);
- y = (double *) ptr;
- ptr += sizeof(double);
- if(idx == 0)
- p->moveTo((int) *x, yTransform - (int) *y);
- else
- p->lineTo((int) *x, yTransform - (int) *y);
-
- }
- break;
- case WKBMultiLineString:
- p->setPen(Qt::blue);
- numLineStrings = (int)(feature[5]);
- ptr = feature+9;
- for(jdx = 0; jdx < numLineStrings; jdx++){
- // each of these is a wbklinestring so must handle as such
- lsb = *ptr;
- ptr += 5; // skip type since we know its 2
- nPoints = (int *)ptr;
- ptr += sizeof(int);
- for(idx = 0; idx < *nPoints; idx++){
- x = (double *) ptr;
- ptr += sizeof(double);
- y = (double *) ptr;
- ptr += sizeof(double);
- if(idx == 0)
- p->moveTo((int) *x, yTransform - (int) *y);
- else
- p->lineTo((int) *x, yTransform - (int) *y);
-
- }
- }
- break;
- case WKBPolygon:
- p->setPen(Qt::blue);
- // get number of rings in the polygon
- numRings = (int *)(feature + 1 + sizeof(int));
- ptr = feature + 1 + 2 * sizeof(int);
- for(idx = 0; idx < *numRings; idx++){
- // get number of points in the ring
- nPoints = (int *)ptr;
- ptr += 4;
- pa = new QPointArray(*nPoints);
- for(jdx = 0; jdx < *nPoints; jdx++){
- // add points to a point array for drawing the polygon
- x = (double *) ptr;
- ptr += sizeof(double);
- y = (double *) ptr;
- ptr += sizeof(double);
- pa->setPoint(jdx,(int)*x, yTransform - (int)*y);
- }
- // draw the ring
- p->drawPolygon(*pa);
-
- }
- break;
- case WKBMultiPolygon:
- p->setPen(Qt::darkGreen);
- QBrush brush(Qt::green);
- p->setBrush(brush);
- // get the number of polygons
- ptr = feature + 5;
- numPolygons = (int *)ptr;
- for(kdx = 0; kdx < *numPolygons; kdx++){
- //skip the endian and feature type info and
- // get number of rings in the polygon
- ptr = feature + 14;
- numRings = (int *)ptr;
- ptr += 4;
- for(idx = 0; idx < *numRings; idx++){
- // get number of points in the ring
- nPoints = (int *)ptr;
- ptr += 4;
- pa = new QPointArray(*nPoints);
- for(jdx = 0; jdx < *nPoints; jdx++){
- // add points to a point array for drawing the polygon
- x = (double *) ptr;
- ptr += sizeof(double);
- y = (double *) ptr;
- ptr += sizeof(double);
- pa->setPoint(jdx,(int)*x, yTransform - (int)*y);
- }
- // draw the ring
- p->drawPolygon(*pa);
- delete pa;
- }
- }
- break;
- }
-
- }
-
-
-
-}
-void QgsDatabaseLayer::draw(QPainter *p, QgsRect *viewExtent, QgsCoordinateTransform *cXf){
- // painter is active (begin has been called
- /* Steps to draw the layer
- 1. get the features in the view extent by SQL query
- 2. read WKB for a feature
- 3. transform
- 4. draw
- */
- PgCursor pgs(dataSource, "drawCursor");
- QString sql = "select asbinary(" + geometryColumn + ",'" + endianString();
- sql += "') as features from " + tableName;
- sql += " where " + geometryColumn;
- sql += " && GeometryFromText('BOX3D(" + viewExtent->stringRep();
- sql += ")'::box3d,-1)";
- qWarning(sql);
- pgs.Declare((const char *)sql, true);
- int res = pgs.Fetch();
- cout << "Number of matching records: " << pgs.Tuples() << endl;
- cout << "Using following transform parameters:\n" << cXf->showParameters()
- << endl;
- for (int idx = 0; idx < pgs.Tuples (); idx++)
- {
- // allocate memory for the item
- char *feature = new char[pgs.GetLength (idx, 0) + 1];
- memset (feature, '\0', pgs.GetLength (idx, 0) + 1);
- memcpy (feature, pgs.GetValue (idx, 0), pgs.GetLength (idx, 0));
- wkbType = (int)feature[1];
- //cout << "Feature type: " << wkbType << endl;
- // read each feature based on its type
- double *x;
- double *y;
- int *nPoints;
- int *numRings;
- int *numPolygons;
- int numPoints;
- int numLineStrings;
- int idx,jdx,kdx;
- char *ptr;
- char lsb;
- int ttype;
- QgsPoint pt;
- QPointArray *pa;
- switch(wkbType){
- case WKBPoint:
- p->setPen(Qt::red);
- x = (double *) (feature + 5);
- y = (double *) (feature + 5 + sizeof (double));
- pt = cXf->transform(*x,*y);
- p->drawRect (pt.xToInt(), pt.yToInt(), 5, 5);
- break;
- case WKBLineString:
- p->setPen(Qt::blue);
- // get number of points in the line
- numPoints = (int)(feature + 1 + sizeof(int));
- ptr = feature + 1 + 2 * sizeof(int);
- for(idx = 0; idx < numPoints; idx++){
- x = (double *) ptr;
- ptr += sizeof(double);
- y = (double *) ptr;
- ptr += sizeof(double);
- // transform the point
- pt = cXf->transform(*x, *y);
- if(idx == 0)
- p->moveTo(pt.xToInt(),pt.yToInt());
- else
- p->lineTo(pt.xToInt(),pt.yToInt());
-
- }
- break;
- case WKBMultiLineString:
- p->setPen(Qt::blue);
- numLineStrings = (int)(feature[5]);
- ptr = feature+9;
- for(jdx = 0; jdx < numLineStrings; jdx++){
- // each of these is a wbklinestring so must handle as such
- lsb = *ptr;
- ptr += 5; // skip type since we know its 2
- nPoints = (int *)ptr;
- ptr += sizeof(int);
- for(idx = 0; idx < *nPoints; idx++){
- x = (double *) ptr;
- ptr += sizeof(double);
- y = (double *) ptr;
- ptr += sizeof(double);
- // transform the point
- pt = cXf->transform(*x, *y);
- if(idx == 0)
- p->moveTo(pt.xToInt(),pt.yToInt());
- else
- p->lineTo(pt.xToInt(),pt.yToInt());
-
- }
- }
- break;
- case WKBPolygon:
- p->setPen(Qt::blue);
- // get number of rings in the polygon
- numRings = (int *)(feature + 1 + sizeof(int));
- ptr = feature + 1 + 2 * sizeof(int);
- for(idx = 0; idx < *numRings; idx++){
- // get number of points in the ring
- nPoints = (int *)ptr;
- ptr += 4;
- pa = new QPointArray(*nPoints);
- for(jdx = 0; jdx < *nPoints; jdx++){
- // add points to a point array for drawing the polygon
- x = (double *) ptr;
- ptr += sizeof(double);
- y = (double *) ptr;
- ptr += sizeof(double);
- pt = cXf->transform(*x, *y);
- pa->setPoint(jdx,pt.xToInt(), pt.yToInt());
- }
- // draw the ring
- p->drawPolygon(*pa);
-
- }
- break;
- case WKBMultiPolygon:
- p->setPen(Qt::darkGreen);
- QBrush brush(Qt::green);
- p->setBrush(brush);
- // get the number of polygons
- ptr = feature + 5;
- numPolygons = (int *)ptr;
- for(kdx = 0; kdx < *numPolygons; kdx++){
- //skip the endian and feature type info and
- // get number of rings in the polygon
- ptr = feature + 14;
- numRings = (int *)ptr;
- ptr += 4;
- for(idx = 0; idx < *numRings; idx++){
- // get number of points in the ring
- nPoints = (int *)ptr;
- ptr += 4;
- pa = new QPointArray(*nPoints);
- for(jdx = 0; jdx < *nPoints; jdx++){
- // add points to a point array for drawing the polygon
- x = (double *) ptr;
- ptr += sizeof(double);
- y = (double *) ptr;
- ptr += sizeof(double);
- // cout << "Transforming " << *x << "," << *y << " to ";
-
- pt = cXf->transform(*x, *y);
- //cout << pt.xToInt() << "," << pt.yToInt() << endl;
- pa->setPoint(jdx,pt.xToInt(), pt.yToInt());
-
- }
- // draw the ring
- p->drawPolygon(*pa);
- delete pa;
- }
- }
- break;
- }
-
- }
-
-
-
-}
-
-
-int QgsDatabaseLayer::endian(){
- char *chkEndian = new char[4];
- memset (chkEndian, '\0', 4);
- chkEndian[0] = 0xE8;
- int *ce = (int *) chkEndian;
- if(232 == *ce)
- return NDR;
- else
- return XDR;
-}
-QString QgsDatabaseLayer::endianString(){
- char *chkEndian = new char[4];
- memset (chkEndian, '\0', 4);
- chkEndian[0] = 0xE8;
- int *ce = (int *) chkEndian;
- if(232 == *ce)
- return QString("NDR");
- else
- return QString("XDR");
-}
diff --git a/qgsdatabaselayer.h b/qgsdatabaselayer.h
deleted file mode 100644
index 8869e2f15b9..00000000000
--- a/qgsdatabaselayer.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/***************************************************************************
- gsdatabaselayer.h - description
- -------------------
- begin : Fri Jun 28 2002
- copyright : (C) 2002 by Gary E.Sherman
- email : sherman@mrcc.com
-***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-
-#ifndef QGSDATABASELAYER_H
-#define QGSDATABASELAYER_H
-class QString;
-class QgsRect;
-
-#include "qgsmaplayer.h"
-
-/*! \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();
- virtual void draw(QPainter *, QgsRect *, int );
- virtual void draw(QPainter *, QgsRect *, QgsCoordinateTransform *cFx);
- private:
- //! Calculates extent of the layer using SQL and PostGIS functions
- QgsRect calculateExtent();
- //! Type geometry contained in the layer. This corresponds to one of the OGIS Simple geometry types
- QString type;
- //! WKB type
- int wkbType;
- //! Name of the database containing the layer (table)
- QString database;
- //! Name of the table containing the features
- QString tableName;
- //! Name of the column in the table that contains the geometry for the features
- QString geometryColumn;
- //OGIS WKB types
- enum WKBTYPE{
- WKBPoint=1,
- WKBLineString,
- WKBPolygon,
- WKBMultiPoint,
- WKBMultiLineString,
- WKBMultiPolygon
- };
- enum ENDIAN{
- NDR,
- XDR
- };
- // Returns the endian type for the client
- int endian();
- QString endianString();
-};
-
-#endif
diff --git a/qgsdatasource.cpp b/qgsdatasource.cpp
deleted file mode 100644
index ee5f31257a6..00000000000
--- a/qgsdatasource.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-/***************************************************************************
- qgsdatasource.cpp - description
- -------------------
- begin : Sat Jun 22 2002
- copyright : (C) 2002 by Gary E.Sherman
- email : sherman@mrcc.com
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-#include "qgsdatasource.h"
-QgsDataSource::QgsDataSource(){
-}
-QgsDataSource::~QgsDataSource(){
-}
diff --git a/qgsdatasource.h b/qgsdatasource.h
deleted file mode 100644
index 60e0adb346e..00000000000
--- a/qgsdatasource.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/***************************************************************************
- gsdatasource.h - description
- -------------------
- begin : Sun Jun 30 2002
- copyright : (C) 2002 by Gary E.Sherman
- email : sherman@mrcc.com
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-
-#ifndef QGSDATASOURCE_H
-#define QGSDATASOURCE_H
-#include
-
-/**Base class for spatial and tabular data
- *@author Gary E.Sherman
- */
-
-class QgsDataSource {
-public:
- QgsDataSource();
- ~QgsDataSource();
- protected:
- //! Path or uri of the datasource
- QString dataSource;
-};
-
-#endif
diff --git a/qgsdbsourceselect.cpp b/qgsdbsourceselect.cpp
deleted file mode 100644
index cf3c8d6a305..00000000000
--- a/qgsdbsourceselect.cpp
+++ /dev/null
@@ -1,129 +0,0 @@
-/***************************************************************************
- qgsdbsourceselect.h - description
- -------------------
- begin : Sat Jun 22 2002
- copyright : (C) 2002 by Gary E.Sherman
- email : sherman@mrcc.com
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include "xpm/point_layer.xpm"
-#include "xpm/line_layer.xpm"
-#include "xpm/polygon_layer.xpm"
-#include "qgsdbsourceselect.h"
-#include "qgsnewconnection.h"
-
-QgsDbSourceSelect::QgsDbSourceSelect():QgsDbSourceSelectBase(){
- QSettings settings;
- QStringList keys = settings.subkeyList("/Qgis/connections");
- QStringList::Iterator it = keys.begin();
- while( it != keys.end() ) {
- cmbConnections->insertItem(*it);
-
- ++it;
- }
-
-}
-QgsDbSourceSelect::~QgsDbSourceSelect(){
-}
-void QgsDbSourceSelect::addNewConnection(){
-
- QgsNewConnection *nc = new QgsNewConnection();
-
- if(nc->exec()){
- }
-}
-void QgsDbSourceSelect::editConnection(){
-
- QgsNewConnection *nc = new QgsNewConnection(cmbConnections->currentText());
-
- if(nc->exec()){
- nc->saveConnection();
- }
-}
-void QgsDbSourceSelect::addTables(){
- //store the table info
- for(int idx=0; idx numRows(); idx++){
- if(lstTables->isSelected(idx))
- m_selectedTables += lstTables->text(idx);
- }
- accept();
-}
-void QgsDbSourceSelect::dbConnect(){
- // populate the table list
- QSettings settings;
-
- QString key = "/Qgis/connections/" + cmbConnections->currentText();
- QString host = "host="+settings.readEntry(key+"/host");
- QString database = "dbname="+settings.readEntry(key+"/database");
- QString username = "user="+settings.readEntry(key+"/username");
- QString password = "password="+settings.readEntry(key+"/password");
- m_connInfo = host +" " + database + " " + username + " " + password;
- qDebug(m_connInfo);
- PgDatabase *pd = new PgDatabase((const char *)m_connInfo);
- cout << pd->ErrorMessage();
- if(pd->Status()==CONNECTION_OK){
- // clear the existing entries
- lstTables->clear();
- // create the pixmaps for the layer types
- QPixmap pxPoint;
- pxPoint = QPixmap(point_layer_xpm);
- QPixmap pxLine;
- pxLine = QPixmap(line_layer_xpm);
- QPixmap pxPoly;
- pxPoly = QPixmap(polygon_layer_xpm);
- qDebug("Connection succeeded");
- // get the list of tables
- QString sql = "select * from geometry_columns where f_table_schema ='"
- + settings.readEntry(key+"/database") + "'";
- sql += " order by f_table_name";
- qDebug("Fetching tables using: " + sql);
- int result = pd->ExecTuplesOk((const char *)sql);
- if(result){
- QString msg;
- QTextOStream(&msg) << "Fetched " << pd->Tuples() << " tables from database";
- qDebug( msg);
- for(int idx = 0; idx < pd->Tuples(); idx++){
- QString v = pd->GetValue(idx,"f_table_name");
- QString type = pd->GetValue(idx,"type");
- QPixmap *p;
- if(type == "POINT" || type == "MULTIPOINT")
- p = &pxPoint;
- else
- if(type == "MULTIPOLYGON" || type == "POLYGON")
- p = &pxPoly;
- else
- if(type == "LINESTRING" || type == "MULTILINESTRING")
- p = &pxLine;
- else
- p = 0;
- lstTables->insertItem(*p,v);
- }
- }else{
- qDebug( "Unable to get list of spatially enabled tables from geometry_columns table");
- qDebug( pd->ErrorMessage());
- }
- }else{
- qDebug( "Connection failed");
- }
-}
-QStringList QgsDbSourceSelect::selectedTables(){
- return m_selectedTables;
-}
-QString QgsDbSourceSelect::connInfo(){
- return m_connInfo;
-}
diff --git a/qgsdbsourceselect.h b/qgsdbsourceselect.h
deleted file mode 100644
index 722e5751089..00000000000
--- a/qgsdbsourceselect.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/***************************************************************************
- qgdbsourceselect.h - description
- -------------------
- begin : Sat Jun 22 2002
- copyright : (C) 2002 by Gary E.Sherman
- email : sherman@mrcc.com
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-
-#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;
- QStringList m_selectedTables;
-};
-
-
-#endif // QGSDBSOURCESELECT_H
diff --git a/qgsdbsourceselectbase.ui b/qgsdbsourceselectbase.ui
deleted file mode 100644
index eebd4d41382..00000000000
--- a/qgsdbsourceselectbase.ui
+++ /dev/null
@@ -1,239 +0,0 @@
-
-QgsDbSourceSelectBase
-
-
- QgsDbSourceSelectBase
-
-
-
- 0
- 0
- 305
- 338
-
-
-
-
- Helvetica [Urw]
- 10
-
-
-
- Add PostGIS Table(s)
-
-
- true
-
-
-
- unnamed
-
-
- 11
-
-
- 6
-
-
-
- Layout5
-
-
-
- unnamed
-
-
- 0
-
-
- 6
-
-
-
- btnAdd
-
-
- Add
-
-
- 0
-
-
- true
-
-
- true
-
-
-
-
- btnCancel
-
-
- Cancel
-
-
- 0
-
-
- true
-
-
-
-
- btnHelp
-
-
- Help
-
-
- 4144
-
-
- true
-
-
-
-
- Spacer1
-
-
- Vertical
-
-
- Fixed
-
-
-
- 20
- 100
-
-
-
-
-
-
-
- GroupBox1
-
-
- Connection Information
-
-
-
- unnamed
-
-
- 11
-
-
- 6
-
-
-
- cmbConnections
-
-
-
-
- btnConnect
-
-
- Connect
-
-
-
-
- btnEdit
-
-
- Edit
-
-
-
-
- btnNew
-
-
- New
-
-
-
-
-
-
- TextLabel3_2_2
-
-
-
- 11
-
-
-
- Tables
-
-
-
-
- lstTables
-
-
- Extended
-
-
-
-
-
-
- btnCancel
- clicked()
- QgsDbSourceSelectBase
- reject()
-
-
- btnConnect
- clicked()
- QgsDbSourceSelectBase
- dbConnect()
-
-
- btnAdd
- clicked()
- QgsDbSourceSelectBase
- addTables()
-
-
- btnNew
- clicked()
- QgsDbSourceSelectBase
- addNewConnection()
-
-
- btnEdit
- clicked()
- QgsDbSourceSelectBase
- editConnection()
-
-
-
- cmbConnections
- btnConnect
- btnNew
- btnEdit
- lstTables
- btnAdd
- btnCancel
- btnHelp
-
-
- qgsdbsourceselectbase.ui.h
-
-
- addNewConnection()
- addTables()
- dbConnect()
- init()
- editConnection()
-
-
-
diff --git a/qgslinesymbol.h b/qgslinesymbol.h
deleted file mode 100644
index 3b6a8630f7c..00000000000
--- a/qgslinesymbol.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/***************************************************************************
- qgslinesymbol.h - description
- -------------------
- begin : Sat Jun 22 2002
- copyright : (C) 2002 by Gary E.Sherman
- email : sherman@mrcc.com
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-
-#ifndef QGSLINESYMBOL_H
-#define QGSLINESYMBOL_H
-
-class QString;
-
-/*! \class QgsLineSymbol
- * \brief Symbol for displaying lines
- */
-class QgsLineSymbol : public QgsSymbol{
- public:
- //! Constructor
- QgsLineSymbol();
- //! Destructor
- ~QgsLineSymbol();
- /*! Comparison operator
- @return True if symbols are equal
- */
- bool operator==(const QgsLineSymbol &r1);
- /*! Assignment operator
- * @param r1 QgsPolygonSymbol to assign from
- */
- QgsLineSymbol & operator=(const QgsLineSymbol &r1);
- private:
-
-};
-#endif // QGSLINESYMBOL_H
diff --git a/qgsmapcanvas.cpp b/qgsmapcanvas.cpp
deleted file mode 100644
index 8fe5b6b0dde..00000000000
--- a/qgsmapcanvas.cpp
+++ /dev/null
@@ -1,152 +0,0 @@
-/***************************************************************************
- qgsmapcanvas.cpp - description
- -------------------
- begin : Sun Jun 30 2002
- copyright : (C) 2002 by Gary E.Sherman
- email : sherman@mrcc.com
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-#include
-#include
-#include
-#include "qgsrect.h"
-#include "qgsmaplayer.h"
-#include "qgsdatabaselayer.h"
-#include "qgscoordinatetransform.h"
-#include "qgsmapcanvas.h"
-
-QgsMapCanvas::QgsMapCanvas(QWidget *parent, const char *name ) : QWidget(parent,name) {
- mapWindow = new QRect();
- coordXForm = new QgsCoordinateTransform();
-}
-QgsMapCanvas::~QgsMapCanvas(){
- delete coordXForm;
- delete mapWindow;
-}
-void QgsMapCanvas::addLayer(QgsMapLayer *lyr){
- layers[lyr->name()] = lyr;
- // update extent if warranted
- if(layers.size() == 1){
- fullExtent = lyr->extent();
- fullExtent.scale(1.1);
- currentExtent = fullExtent;
-
- }
-
- // set zpos to something...
- //lyr->zpos = 0;
-}
-void QgsMapCanvas::render2(){
- QPainter *paint = new QPainter();
- paint->begin(this);
- //currentExtent = fullExtent;
- QRect v = rect();// paint->viewport();
- // calculate the translation and scaling parameters
- double muppX, muppY;
- muppY = currentExtent.height()/height();
- muppX = currentExtent.width()/width();
- cout << "MuppX is: " << muppX << "\nMuppY is: " << muppY << endl;
- m_mupp = muppY > muppX?muppY:muppX;
- // calculate the actual extent of the mapCanvas
- double dxmin,dxmax,dymin,dymax,whitespace;
- if(muppY > muppX){
- dymin = currentExtent.yMin();
- dymax = currentExtent.yMax();
- whitespace = ((width() *m_mupp) - currentExtent.width())/2;
- dxmin = currentExtent.xMin() - whitespace;
- dxmax = currentExtent.xMax() + whitespace;
- }else{
- dxmin = currentExtent.xMin();
- dxmax = currentExtent.xMax();
- whitespace = ((height() *m_mupp) - currentExtent.height())/2;
- dymin = currentExtent.yMin() - whitespace;
- dymax = currentExtent.yMax() + whitespace;
-
- }
- cout << "dxmin: " << dxmin << endl << "dymin: " << dymin << endl << "dymax: " << dymax << endl << "whitespace: " << whitespace << endl;
- coordXForm->setParameters(m_mupp, dxmin,dymin,height()); //currentExtent.xMin(), currentExtent.yMin(), currentExtent.yMax());
- // update the currentExtent to match the device coordinates
- currentExtent.setXmin(dxmin);
- currentExtent.setXmax(dxmax);
- currentExtent.setYmin(dymin);
- currentExtent.setYmax(dymax);
- // render all layers in the stack, starting at the base
- map::iterator mi = layers.begin();
- while(mi != layers.end()){
- QgsMapLayer *ml = (*mi).second;
- // QgsDatabaseLayer *dbl = (QgsDatabaseLayer *)&ml;
- ml->draw(paint, ¤tExtent, coordXForm);
- mi++;
- // mi.draw(p, &fullExtent);
- }
- paint->end();
-
-}
-void QgsMapCanvas::render(){
- QPainter *paint = new QPainter();
- paint->begin(this);
- currentExtent = fullExtent;
- mapWindow->setLeft(currentExtent.xMin());
- mapWindow->setBottom(currentExtent.yMin());
-
- // determine the dominate direction for the mapcanvas
- if (width () > height ())
- {
- mapWindow->setWidth(currentExtent.width());
- mapWindow->setHeight(currentExtent.width());
- }
- else
- {
- mapWindow->setWidth(currentExtent.height());
- mapWindow->setHeight(currentExtent.height());
- }
-
- paint->setWindow(*mapWindow);
-
- QRect v = paint->viewport ();
- int d = QMIN (v.width (), v.height ());
- int dm = QMAX(v.width(), v.height());
- paint->setViewport (v.left () + (v.width () - d) / 2,
- v.top () + (v.height () - d) / 2, d, d);
-
- // render all layers in the stack, starting at the base
- map::iterator mi = layers.begin();
- int yTransform = currentExtent.yMax();//mapWindow->bottom() - abs(mapWindow->height() - currentExtent.height())/2;
- while(mi != layers.end()){
- QgsMapLayer *ml = (*mi).second;
- // QgsDatabaseLayer *dbl = (QgsDatabaseLayer *)&ml;
- ml->draw(paint, ¤tExtent, yTransform);
- mi++;
- // mi.draw(p, &fullExtent);
- }
- paint->end();
-}
-void QgsMapCanvas::paintEvent(QPaintEvent *pe){
- render2();
-}
-QgsRect QgsMapCanvas::extent(){
- return currentExtent;
-}
-void QgsMapCanvas::setExtent(QgsRect r){
- currentExtent = r;
-}
-void QgsMapCanvas::clear(){
- QPainter *p = new QPainter();
- p->begin(this);
- p->eraseRect(this->rect());
- p->end();
-
-}
-void QgsMapCanvas::zoomFullExtent(){
- currentExtent = fullExtent;
- clear();
- render2();
-}
diff --git a/qgsmapcanvas.h b/qgsmapcanvas.h
deleted file mode 100644
index 6733615d55e..00000000000
--- a/qgsmapcanvas.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/***************************************************************************
- qgsmapcanvas.h - description
- -------------------
- begin : Sun Jun 30 2002
- copyright : (C) 2002 by Gary E.Sherman
- email : sherman@mrcc.com
-***************************************************************************/
-
-/***************************************************************************
- * *
- * 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. *
- * *
- ***************************************************************************/
-
-#ifndef QGSMAPCANVAS_H
-#define QGSMAPCANVAS_H
-#include