Skip to content

Commit

Permalink
Branch for 0.9.0 release
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/branches/Release-0_9_0@7220 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Sep 24, 2007
2 parents 251bf75 + 5060577 commit b41ce99
Show file tree
Hide file tree
Showing 190 changed files with 1,816 additions and 7,150 deletions.
10 changes: 5 additions & 5 deletions debian/control
Expand Up @@ -3,11 +3,11 @@ Section: science
Priority: extra
Maintainer: Debian GIS Project <pkg-grass-devel@lists.alioth.debian.org>
Uploaders: Francesco Paolo Lovergine <frankie@debian.org>
Build-Depends: debhelper (>= 5.0.0), libgdal1-dev, libpq-dev,
Build-Depends: debhelper (>= 5.0.0), libgdal1-dev | libgdal1-1.3.2-dev , libpq-dev,
libgeos-dev (>= 2.0.1-1), dpatch, grass-dev, libsqlite3-dev, libgsl0-dev, proj, libexpat1-dev,
flex, bison, python-dev, cmake (>=2.4.3) , python-sip4-dev, python-qt4-dev,
sharutils, sip4 (>= 4.7), libqt4-core (>=4.2.0), libqt4-dev (>=4.2.0), libqt4-gui (>=4.2.0),
libqt4-qt3support (>=4.2.0), libqt4-sql (>=4.2.0), python-qt4 (>=4.2.0), python-qt4-dev (>=4.2.0)
sharutils, sip4 (>= 4.4), libqt4-core (>=4.2.0), libqt4-dev (>=4.2.0), libqt4-gui (>=4.2.0),
libqt4-qt3support (>=4.2.0), libqt4-sql (>=4.2.0), python-qt4 (>=4.0.0), python-qt4-dev (>=4.0.0)
Standards-Version: 3.7.2

Package: qgis
Expand Down Expand Up @@ -43,7 +43,7 @@ Description: QGIS Geographic Information System - shared library

Package: libqgis1-dev
Architecture: any
Depends: qgis (= ${Source-Version}), libgdal1-dev, libpq-dev | postgresql-dev, libgeos-dev (>= 2.0.1-1), grass-dev, libsqlite3-dev, libgsl0-dev, proj, libexpat1-dev, libqt4-core (>=4.2.0), libqt4-dev (>=4.2.0), libqt4-gui (>=4.2.0), libqt4-qt3support (>=4.2.0), libqt4-sql (>=4.2.0), python-qt4 (>=4.2.0), python-qt4-dev (>=4.2.0), qt4-designer (>=4.2.0)
Depends: qgis (= ${Source-Version}), libgdal1-dev | libgdal1-1.3.2-dev , libpq-dev | postgresql-dev, libgeos-dev (>= 2.0.1-1), grass-dev, libsqlite3-dev, libgsl0-dev, proj, libexpat1-dev, libqt4-core (>=4.2.0), libqt4-dev (>=4.2.0), libqt4-gui (>=4.2.0), libqt4-qt3support (>=4.2.0), libqt4-sql (>=4.2.0), python-qt4 (>=4.0.0), python-qt4-dev (>=4.0.0), qt4-designer (>=4.2.0)
Provides: libqgis-dev
Conflicts: libqgis-dev, qgis-dev
Replaces: qgis-dev
Expand All @@ -60,7 +60,7 @@ Description: QGIS Geographic Information System - development files

Package: qgis-plugin-grass
Architecture: any
Depends: qgis (= ${Source-Version}), libgdal1-1.4.0-grass
Depends: qgis (= ${Source-Version}), libgdal1-1.4.0-grass | libgdal1-1.3.2-grass
Description: Plugin for accessing GRASS data from QGIS
This plugin enables a GRASS data access toolbox in the QGIS
geographic data viewer.
Expand Down
1 change: 0 additions & 1 deletion debian/libqgis1.substvars

This file was deleted.

1 change: 0 additions & 1 deletion debian/qgis-plugin-grass.substvars

This file was deleted.

1 change: 0 additions & 1 deletion debian/qgis.substvars

This file was deleted.

5 changes: 4 additions & 1 deletion debian/rules
Expand Up @@ -29,7 +29,10 @@ CMakeCache.txt: CMakeLists.txt
dh_testdir
# Add here commands to configure the package.
uudecode -o $(CURDIR)/src/plugins/georeferencer/pencil.png $(CURDIR)/debian/pencil.uu
cmake -D CMAKE_INSTALL_PREFIX=/usr -D GDAL_INCLUDE_DIR=/usr/include/gdal .
cmake -D CMAKE_INSTALL_PREFIX=/usr \
-D GDAL_INCLUDE_DIR=/usr/include/gdal \
-D GDAL_LIBRARY=/usr/lib/libgdal1.3.2.so \
.

build: patch build-stamp

Expand Down
3 changes: 2 additions & 1 deletion src/app/composer/qgscomposer.cpp
Expand Up @@ -674,7 +674,7 @@ void QgsComposer::on_mActionExportAsImage_activated(void)

//find out the last used filter
QSettings myQSettings; // where we keep last used filter in persistant state
QString myLastUsedFormat = myQSettings.readEntry("/UI/lastSaveAsImageFormat", "PNG" ); //<- BUG #729 is probably here
QString myLastUsedFormat = myQSettings.readEntry("/UI/lastSaveAsImageFormat", "png" );
QString myLastUsedFile = myQSettings.readEntry("/UI/lastSaveAsImageFile","qgis.png");
QFileInfo file(myLastUsedFile);

Expand All @@ -686,6 +686,7 @@ void QgsComposer::on_mActionExportAsImage_activated(void)
{
QString myFormat=QString(QImageWriter::supportedImageFormats().at( myCounterInt ));
QString myFilter = myFormat + " " + tr("format") + " (*." + myFormat.lower() + " *." + myFormat.upper() + ")";

if ( myCounterInt > 0 ) myFilters += ";;";
myFilters += myFilter;
myFilterMap[myFilter] = myFormat;
Expand Down
5 changes: 4 additions & 1 deletion src/app/composer/qgscomposermap.cpp
Expand Up @@ -32,8 +32,10 @@
#include <cmath>

QgsComposerMap::QgsComposerMap ( QgsComposition *composition, int id, int x, int y, int width, int height )
: QWidget(), QGraphicsRectItem(x,y,width,height,0)
: QWidget(), QGraphicsRectItem(0,0,width,height,0)
{
std::cout << "QgsComposerMap::QgsComposerMap()" << std::endl;

setupUi(this);

mComposition = composition;
Expand All @@ -47,6 +49,7 @@ QgsComposerMap::QgsComposerMap ( QgsComposition *composition, int id, int x, int
// Add to scene
mComposition->canvas()->addItem(this);

QGraphicsRectItem::setPos(x, y);
QGraphicsRectItem::show();

writeSettings();
Expand Down
8 changes: 6 additions & 2 deletions src/app/composer/qgscomposervectorlegend.cpp
Expand Up @@ -48,7 +48,10 @@ QgsComposerVectorLegend::QgsComposerVectorLegend ( QgsComposition *composition,

init();

// Font and pen
// Font and pen
if(fontSize < 6){
fontSize = 6;
}
mFont.setPointSize ( fontSize );

// Set map to the first available if any
Expand Down Expand Up @@ -160,6 +163,7 @@ QRectF QgsComposerVectorLegend::render ( QPainter *p )
}

std::cout << "mComposition->scale() = " << mComposition->scale() << std::endl;

// Font size in canvas units
float titleSize = 25.4 * mComposition->scale() * mTitleFont.pointSizeFloat() / 72;
float sectionSize = 25.4 * mComposition->scale() * mSectionFont.pointSizeFloat() / 72;
Expand Down Expand Up @@ -393,7 +397,7 @@ std::cout << "widthScale: " << widthScale << std::endl;
painter->drawLine ( mMargin, localHeight+mSymbolHeight/2,
mMargin+mSymbolWidth, localHeight+mSymbolHeight/2 );
} else if ( vector->vectorType() == QGis::Polygon ) {
pen.setWidth(0); //use a cosmetic pen to outline the fill box
//pen.setWidth(0); //use a cosmetic pen to outline the fill box
pen.setCapStyle(Qt::FlatCap);
painter->setPen ( pen );
painter->drawRect ( mMargin, localHeight, mSymbolWidth, mSymbolHeight );
Expand Down
16 changes: 16 additions & 0 deletions src/app/legend/qgslegend.cpp
Expand Up @@ -1356,6 +1356,22 @@ void QgsLegend::updateOverview()
mMapCanvas->updateOverview();
}

void QgsLegend::setOverviewAllLayers(bool inOverview)
{
QTreeWidgetItem* theItem = firstItem();
while(theItem)
{
QgsLegendLayerFile* llf = dynamic_cast<QgsLegendLayerFile*>(theItem);
if(llf)
{
llf->setInOverview(inOverview);
}
theItem = nextItem(theItem);
}
updateMapCanvasLayerSet();
updateOverview();
}

std::deque<QString> QgsLegend::layerIDs()
{
std::deque<QString> layers;
Expand Down
3 changes: 3 additions & 0 deletions src/app/legend/qgslegend.h
Expand Up @@ -147,6 +147,9 @@ class QgsLegend : public QTreeWidget
/**Updates overview*/
void updateOverview();

/**Show/remove all layer in/from overview*/
void setOverviewAllLayers(bool inOverview);

/**Adds an entry to mPixmapWidthValues*/
void addPixmapWidthValue(int width);

Expand Down
38 changes: 12 additions & 26 deletions src/app/qgisapp.cpp
Expand Up @@ -2355,7 +2355,7 @@ findMissingFile_( QString const & fileFilters, QDomNode & layerNode )

QStringList selectedFiles;
QString enc;
QString title( QObject::trUtf8("Open an OGR Supported Layer") );
QString title( QObject::tr("Where is '") + originalDataSource.fileName() + "'? (" + QObject::tr("original location: ") + originalDataSource.absoluteFilePath() + ")");

openFilesRememberingFilter_(memoryQualifier,
myFileFilters,
Expand Down Expand Up @@ -3219,40 +3219,26 @@ void QgisApp::saveMapAsImage(QString theImageFileNameQString, QPixmap * theQPixm
//reimplements method from base (gui) class
void QgisApp::addAllToOverview()
{
// TODO: move to legend
/*
std::map<QString, QgsMapLayer *> myMapLayers = QgsMapLayerRegistry::instance()->mapLayers();
std::map<QString, QgsMapLayer *>::iterator myMapIterator;
for ( myMapIterator = myMapLayers.begin(); myMapIterator != myMapLayers.end(); ++myMapIterator )
{
QgsMapLayer * myMapLayer = myMapIterator->second;
myMapLayer->inOverview(true); // won't do anything if already in overview
}
mMapCanvas->updateOverview();
if(mMapLegend)
{
mMapLegend->setOverviewAllLayers(true);
}

// notify the project we've made a change
QgsProject::instance()->dirty(true);
*/
}

//reimplements method from base (gui) class
void QgisApp::removeAllFromOverview()
{
// TODO: move to legend
/*
std::map<QString, QgsMapLayer *> myMapLayers = QgsMapLayerRegistry::instance()->mapLayers();
std::map<QString, QgsMapLayer *>::iterator myMapIterator;
for ( myMapIterator = myMapLayers.begin(); myMapIterator != myMapLayers.end(); ++myMapIterator )
{
QgsMapLayer * myMapLayer = myMapIterator->second;
myMapLayer->inOverview(false);
}
mMapCanvas->updateOverview();
if(mMapLegend)
{
mMapLegend->setOverviewAllLayers(false);
}

// notify the project we've made a change
QgsProject::instance()->dirty(true);
*/
} // QgisApp::removeAllFromOverview()
}


//reimplements method from base (gui) class
Expand Down
78 changes: 34 additions & 44 deletions src/app/qgsattributetable.cpp
Expand Up @@ -426,10 +426,29 @@ bool QgsAttributeTable::commitChanges(QgsVectorLayer* layer)
{
deletedIds.insert(provider->indexFromFieldName(*it));
}

QgsChangedAttributesMap attributeChanges; //convert mChangedValues to QgsChangedAttributesMap
int fieldIndex;

QMap<int, QMap<QString, QString> >::const_iterator att_it = mChangedValues.constBegin();
for(; att_it != mChangedValues.constEnd(); ++att_it)
{
QgsAttributeMap newAttMap;
QMap<QString, QString>::const_iterator record_it = att_it->constBegin();
for(; record_it != att_it->constEnd(); ++record_it)
{
fieldIndex = provider->indexFromFieldName(record_it.key());
if(fieldIndex != -1)
{
newAttMap.insert(fieldIndex, record_it.value());
}
}
attributeChanges.insert(att_it.key(), newAttMap);
}

isSuccessful = layer->commitAttributeChanges(deletedIds,
mAddedAttributes,
mChangedValues);
attributeChanges);
}
}

Expand Down Expand Up @@ -528,52 +547,23 @@ void QgsAttributeTable::putFeatureInTable(int row, QgsFeature& fet)
}
}

int QgsAttributeTable::colIndexFromFieldIndex(int fieldId)
{
int colIndex = 1; // index 0 is feature ID
QgsFieldMap::const_iterator it;
for (it = mFields.begin(); it != mFields.end(); ++it, ++colIndex)
{
if (it.key() == fieldId)
return colIndex;
}
return -1;
}

int QgsAttributeTable::fieldIndexFromColIndex(int colIndex)
{
colIndex--; // first one is feature ID
QgsFieldMap::const_iterator it;
for (it = mFields.begin(); it != mFields.end(); ++it, --colIndex)
{
if (colIndex == 0)
return it.key();
}
return -1;
}

void QgsAttributeTable::storeChangedValue(int row, int column)
{
//id column is not editable
if(column>0)
//id column is not editable
if(column>0)
{
//find feature id
int id=text(row,0).toInt();
int field = fieldIndexFromColIndex(column);

QgsDebugMsg("feature id: " + QString::number(id));
QgsDebugMsg("attribute: " + QString::number(field) + ": " + mFields[field].name());

// add empty map for feature if doesn't exist
if (!mChangedValues.contains(id))
{
mChangedValues.insert(id, QgsAttributeMap());
}

mChangedValues[id].insert(field, QVariant(text(row,column)) );

QgsDebugMsg("value: " + text(row,column));
mEdited=true;
//find feature id
int id=text(row,0).toInt();
QString field = horizontalHeader()->label(column);

// add empty map for feature if doesn't exist
if (!mChangedValues.contains(id))
{
mChangedValues.insert(id, QMap<QString, QString>());
}

mChangedValues[id].insert(field, text(row,column));
mEdited=true;
}
}

Expand Down
8 changes: 2 additions & 6 deletions src/app/qgsattributetable.h
Expand Up @@ -133,7 +133,8 @@ class QgsAttributeTable:public Q3Table
QSet<QString> mDeletedAttributes;
/**Nested map containing the changed attribute values. The int is the feature id,
the first QString the attribute name and the second QString the new value*/
QgsChangedAttributesMap mChangedValues;
QMap<int, QMap<QString, QString> > mChangedValues;

/**Stors the numbers of the last selected rows. This is used to check for selection changes before emit repaintRequested()*/
std::set<int> mLastSelectedRows;

Expand All @@ -154,11 +155,6 @@ class QgsAttributeTable:public Q3Table
/**This function compares the current selection and the selection of the last repaint. Returns true if there are differences in the selection.
Also, mLastSelectedRows is updated*/
bool checkSelectionChanges();

/** returns column index for field index or -1 on invalid field index */
int colIndexFromFieldIndex(int fieldId);
/** returns field index for a column or -1 when on invalid column */
int fieldIndexFromColIndex(int colIndex);

signals:

Expand Down
29 changes: 18 additions & 11 deletions src/app/qgscustomprojectiondialog.cpp
@@ -1,14 +1,21 @@
//
// C++ Implementation: qgscustomprojectiondialog
//
// Description:
//
//
// Author: Tim Sutton tim@linfiniti.com, (C) 2005
//
// Copyright: See COPYING file that comes with this distribution
//
//
/***************************************************************************
qgscustomprojectiondialog.cpp
-------------------
begin : 2005
copyright : (C) 2005 by Tim Sutton
email : tim@linfiniti.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 "qgscustomprojectiondialog.h"

//qgis includes
Expand Down
28 changes: 17 additions & 11 deletions src/app/qgscustomprojectiondialog.h
@@ -1,14 +1,20 @@
//
// C++ Interface: qgscustomprojectiondialog
//
// Description:
//
//
// Author: Tim Sutton tim@linfiniti.com, (C) 2005
//
// Copyright: See COPYING file that comes with this distribution
//
//
/***************************************************************************
qgscustomprojectiondialog.h
-------------------
begin : 2005
copyright : (C) 2005 by Tim Sutton
email : tim@linfiniti.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 QGSCUSTOMPROJECTIONDIALOG_H
#define QGSCUSTOMPROJECTIONDIALOG_H

Expand Down

0 comments on commit b41ce99

Please sign in to comment.