[QGIS Commit] r14436 - in trunk/qgis: src/app src/app/legend
src/core/raster src/core/symbology-ng src/gui
src/gui/symbology-ng src/providers/spatialite tests/src/core
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Tue Oct 26 05:09:51 EDT 2010
Author: jef
Date: 2010-10-26 02:09:51 -0700 (Tue, 26 Oct 2010)
New Revision: 14436
Modified:
trunk/qgis/src/app/legend/qgslegendlayer.cpp
trunk/qgis/src/app/qgsrasterlayerproperties.cpp
trunk/qgis/src/app/qgsspatialitesourceselect.cpp
trunk/qgis/src/core/raster/qgsrasterlayer.h
trunk/qgis/src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp
trunk/qgis/src/gui/qgisgui.cpp
trunk/qgis/src/gui/qgisgui.h
trunk/qgis/src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.cpp
trunk/qgis/src/gui/symbology-ng/qgscolorrampcombobox.cpp
trunk/qgis/src/gui/symbology-ng/qgsgraduatedsymbolrendererv2widget.cpp
trunk/qgis/src/gui/symbology-ng/qgsstylev2managerdialog.cpp
trunk/qgis/src/providers/spatialite/qgsspatialiteprovider.cpp
trunk/qgis/src/providers/spatialite/qgsspatialiteprovider.h
trunk/qgis/tests/src/core/testqgsvectorlayer.cpp
Log:
automatic indentation update (r14312-r14435)
Modified: trunk/qgis/src/app/legend/qgslegendlayer.cpp
===================================================================
--- trunk/qgis/src/app/legend/qgslegendlayer.cpp 2010-10-26 08:58:16 UTC (rev 14435)
+++ trunk/qgis/src/app/legend/qgslegendlayer.cpp 2010-10-26 09:09:51 UTC (rev 14436)
@@ -61,11 +61,11 @@
Qt::ItemFlags flags = Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable;
QgsVectorLayer *vlayer = qobject_cast<QgsVectorLayer *>( layer );
- if( !vlayer || vlayer->geometryType() != QGis::NoGeometry )
+ if ( !vlayer || vlayer->geometryType() != QGis::NoGeometry )
{
flags |= Qt::ItemIsUserCheckable;
}
-
+
setFlags( flags );
setCheckState( 0, Qt::Checked );
@@ -105,7 +105,7 @@
void QgsLegendLayer::setCheckState( int column, Qt::CheckState state )
{
- if( flags() & Qt::ItemIsUserCheckable )
+ if ( flags() & Qt::ItemIsUserCheckable )
{
QTreeWidgetItem::setCheckState( column, state );
}
Modified: trunk/qgis/src/app/qgsrasterlayerproperties.cpp
===================================================================
--- trunk/qgis/src/app/qgsrasterlayerproperties.cpp 2010-10-26 08:58:16 UTC (rev 14435)
+++ trunk/qgis/src/app/qgsrasterlayerproperties.cpp 2010-10-26 09:09:51 UTC (rev 14436)
@@ -205,7 +205,7 @@
pbtnLoadColorMapFromFile->setIcon( QgisApp::getThemeIcon( "/mActionFileOpen.png" ) );
mSaveAsImageButton->setIcon( QgisApp::getThemeIcon( "/mActionFileSave.png" ) );
-
+
mMapCanvas = theCanvas;
mPixelSelectorTool = 0;
if ( mMapCanvas )
@@ -1863,16 +1863,16 @@
QgsDebugMsg( "entered." );
//ensure all children get removed
mpPlot->setAutoDelete( true );
- mpPlot->setTitle( QObject::tr( "Raster Histogram") );
+ mpPlot->setTitle( QObject::tr( "Raster Histogram" ) );
mpPlot->insertLegend( new QwtLegend(), QwtPlot::BottomLegend );
// Set axis titles
- mpPlot->setAxisTitle( QwtPlot::xBottom, QObject::tr("Pixel Value") );
- mpPlot->setAxisTitle( QwtPlot::yLeft, QObject::tr("Frequency") );
+ mpPlot->setAxisTitle( QwtPlot::xBottom, QObject::tr( "Pixel Value" ) );
+ mpPlot->setAxisTitle( QwtPlot::yLeft, QObject::tr( "Frequency" ) );
mpPlot->setAxisAutoScale( QwtPlot::yLeft );
// x axis scale only set after computing global min/max across bands (see below)
// add a grid
QwtPlotGrid * myGrid = new QwtPlotGrid();
- myGrid->attach(mpPlot);
+ myGrid->attach( mpPlot );
// Explanation:
// We use the gdal histogram creation routine is called for each selected
// layer. Currently the hist is hardcoded
@@ -1921,8 +1921,8 @@
myX2Data.append( double( myBin ) );
myY2Data.append( double( myBinValue ) );
}
- mypCurve->setData(myX2Data,myY2Data);
- mypCurve->attach(mpPlot);
+ mypCurve->setData( myX2Data, myY2Data );
+ mypCurve->attach( mpPlot );
if ( myFirstIteration || myGlobalMin < myRasterBandStats.minimumValue )
{
myGlobalMin = myRasterBandStats.minimumValue;
@@ -1936,13 +1936,13 @@
// for x axis use band pixel values rather than gdal hist. bin values
// subtract -0.5 to prevent rounding errors
// see http://www.gdal.org/classGDALRasterBand.html#3f8889607d3b2294f7e0f11181c201c8
- mpPlot->setAxisScale ( QwtPlot::xBottom,
- myGlobalMin - 0.5,
- myGlobalMax + 0.5 );
+ mpPlot->setAxisScale( QwtPlot::xBottom,
+ myGlobalMin - 0.5,
+ myGlobalMax + 0.5 );
mpPlot->replot();
disconnect( mRasterLayer, SIGNAL( progressUpdate( int ) ), mHistogramProgress, SLOT( setValue( int ) ) );
mHistogramProgress->hide();
- mpPlot->canvas()->setCursor(Qt::ArrowCursor);
+ mpPlot->canvas()->setCursor( Qt::ArrowCursor );
QApplication::restoreOverrideCursor();
}
@@ -1952,18 +1952,18 @@
{
return;
}
-
- QPixmap myPixmap(600, 600);
- myPixmap.fill(Qt::white); // Qt::transparent ?
+ QPixmap myPixmap( 600, 600 );
+ myPixmap.fill( Qt::white ); // Qt::transparent ?
+
QwtPlotPrintFilter myFilter;
int myOptions = QwtPlotPrintFilter::PrintAll;
myOptions &= ~QwtPlotPrintFilter::PrintBackground;
myOptions |= QwtPlotPrintFilter::PrintFrameWithScales;
- myFilter.setOptions(myOptions);
+ myFilter.setOptions( myOptions );
- mpPlot->print(myPixmap, myFilter);
- QPair< QString,QString> myFileNameAndFilter = QgisGui::getSaveAsImageName( this, tr( "Choose a file name to save the map image as" ) );
+ mpPlot->print( myPixmap, myFilter );
+ QPair< QString, QString> myFileNameAndFilter = QgisGui::getSaveAsImageName( this, tr( "Choose a file name to save the map image as" ) );
if ( myFileNameAndFilter.first != "" )
{
myPixmap.save( myFileNameAndFilter.first );
Modified: trunk/qgis/src/app/qgsspatialitesourceselect.cpp
===================================================================
--- trunk/qgis/src/app/qgsspatialitesourceselect.cpp 2010-10-26 08:58:16 UTC (rev 14435)
+++ trunk/qgis/src/app/qgsspatialitesourceselect.cpp 2010-10-26 09:09:51 UTC (rev 14436)
@@ -700,7 +700,7 @@
return exists;
}
-bool QgsSpatiaLiteSourceSelect::isRasterlite1Datasource (sqlite3 * handle, const char *table)
+bool QgsSpatiaLiteSourceSelect::isRasterlite1Datasource( sqlite3 * handle, const char *table )
{
// testing for RasterLite-1 datasources
int ret;
@@ -713,12 +713,12 @@
char table_raster[4192];
char sql[4192];
- strcpy ( table_raster, table );
+ strcpy( table_raster, table );
len = strlen( table_raster );
- if (strlen( table_raster ) < 9)
- return false;
- if (strcmp( table_raster + len - 9, "_metadata" ) != 0)
- return false;
+ if ( strlen( table_raster ) < 9 )
+ return false;
+ if ( strcmp( table_raster + len - 9, "_metadata" ) != 0 )
+ return false;
// ok, possible candidate
strcpy( table_raster + len - 9, "_rasters" );
Modified: trunk/qgis/src/core/raster/qgsrasterlayer.h
===================================================================
--- trunk/qgis/src/core/raster/qgsrasterlayer.h 2010-10-26 08:58:16 UTC (rev 14435)
+++ trunk/qgis/src/core/raster/qgsrasterlayer.h 2010-10-26 09:09:51 UTC (rev 14436)
@@ -619,7 +619,7 @@
/** \brief Draws a thumbnail of the rasterlayer into the supplied pixmap pointer */
void thumbnailAsPixmap( QPixmap * theQPixmap );
- /** \brief Draws a thumbnail of the rasterlayer into the supplied QImage pointer
+ /** \brief Draws a thumbnail of the rasterlayer into the supplied QImage pointer
* @note added in QGIS 1.6
* */
void thumbnailAsImage( QImage * thepImage );
Modified: trunk/qgis/src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp
===================================================================
--- trunk/qgis/src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp 2010-10-26 08:58:16 UTC (rev 14435)
+++ trunk/qgis/src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp 2010-10-26 09:09:51 UTC (rev 14436)
@@ -327,10 +327,10 @@
for ( int i = 1; i < classes; i++ )
{
- if( n > 1 )
+ if ( n > 1 )
{
double q = i / ( double ) classes;
- double a = q * (n-1);
+ double a = q * ( n - 1 );
int aa = ( int )( a );
double r = a - aa;
Modified: trunk/qgis/src/gui/qgisgui.cpp
===================================================================
--- trunk/qgis/src/gui/qgisgui.cpp 2010-10-26 08:58:16 UTC (rev 14435)
+++ trunk/qgis/src/gui/qgisgui.cpp 2010-10-26 09:09:51 UTC (rev 14436)
@@ -38,7 +38,7 @@
haveLastUsedFilter = settings.contains( "/UI/" + filterName );
QString lastUsedFilter = settings.value( "/UI/" + filterName,
- QVariant( QString::null ) ).toString();
+ QVariant( QString::null ) ).toString();
QString lastUsedDir = settings.value( "/UI/" + filterName + "Dir", "." ).toString();
@@ -129,8 +129,8 @@
//create a file dialog using the the filter list generated above
std::auto_ptr < QFileDialog > myQFileDialog( new QFileDialog( theParent,
- QObject::tr( "Choose a file name to save the map image as" ),
- myLastUsedDir, myFilters ) );
+ QObject::tr( "Choose a file name to save the map image as" ),
+ myLastUsedDir, myFilters ) );
// allow for selection of more than one file
myQFileDialog->setFileMode( QFileDialog::AnyFile );
@@ -168,7 +168,7 @@
myPair.first = myOutputFileName;
myPair.second = myFilterMap[myFilterString];
return myPair;
- } //
+ } //
QString createFileFilter_( QString const &longName, QString const &glob )
{
Modified: trunk/qgis/src/gui/qgisgui.h
===================================================================
--- trunk/qgis/src/gui/qgisgui.h 2010-10-26 08:58:16 UTC (rev 14435)
+++ trunk/qgis/src/gui/qgisgui.h 2010-10-26 09:09:51 UTC (rev 14436)
@@ -76,7 +76,7 @@
QString const &filters, QStringList & selectedFiles, QString& enc, QString &title,
bool cancelAll = false );
- /** A helper function to get an image name from the user. It will nicely
+ /** A helper function to get an image name from the user. It will nicely
* provide filters with all available writable image formats.
* @param QWidget - widget that should act as the parent for the file dialog
* @param QString the message to display to the user
@@ -84,8 +84,8 @@
* the file type
* @note added in 1.6
*/
- QPair<QString, QString> GUI_EXPORT getSaveAsImageName( QWidget * theParent, QString theMessage );
-
+ QPair<QString, QString> GUI_EXPORT getSaveAsImageName( QWidget * theParent, QString theMessage );
+
/**
Convenience function for readily creating file filters.
Modified: trunk/qgis/src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.cpp
===================================================================
--- trunk/qgis/src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.cpp 2010-10-26 08:58:16 UTC (rev 14435)
+++ trunk/qgis/src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.cpp 2010-10-26 09:09:51 UTC (rev 14436)
@@ -24,12 +24,12 @@
}
QgsCategorizedSymbolRendererV2Widget::QgsCategorizedSymbolRendererV2Widget( QgsVectorLayer* layer, QgsStyleV2* style, QgsFeatureRendererV2* renderer )
- : QgsRendererV2Widget( layer, style )
+ : QgsRendererV2Widget( layer, style )
{
// try to recognize the previous renderer
// (null renderer means "no previous renderer")
- if( !renderer || renderer->type() != "categorizedSymbol" )
+ if ( !renderer || renderer->type() != "categorizedSymbol" )
{
// we're not going to use it - so let's delete the renderer
delete renderer;
@@ -102,7 +102,7 @@
connect( cboCategorizedColumn, SIGNAL( currentIndexChanged( int ) ), this, SLOT( categoryColumnChanged() ) );
// set source symbol
- if( mRenderer->sourceSymbol() )
+ if ( mRenderer->sourceSymbol() )
{
delete mCategorizedSymbol;
mCategorizedSymbol = mRenderer->sourceSymbol()->clone();
@@ -110,7 +110,7 @@
}
// set source color ramp
- if( mRenderer->sourceColorRamp() )
+ if ( mRenderer->sourceColorRamp() )
{
cboCategorizedColorRamp->setSourceColorRamp( mRenderer->sourceColorRamp() );
}
@@ -125,7 +125,7 @@
void QgsCategorizedSymbolRendererV2Widget::changeCategorizedSymbol()
{
QgsSymbolV2SelectorDialog dlg( mCategorizedSymbol, mStyle, this );
- if( !dlg.exec() )
+ if ( !dlg.exec() )
return;
updateCategorizedSymbolIcon();
@@ -150,7 +150,7 @@
// TODO: sort?? utils.sortVariantList(keys);
- for( i = 0; i < count; i++ )
+ for ( i = 0; i < count; i++ )
{
const QgsRendererCategoryV2 &cat = mRenderer->categories()[i];
addCategory( cat );
@@ -166,7 +166,7 @@
cboCategorizedColumn->clear();
const QgsFieldMap& flds = mLayer->pendingFields();
QgsFieldMap::ConstIterator it = flds.begin();
- for( ; it != flds.end(); ++it )
+ for ( ; it != flds.end(); ++it )
{
cboCategorizedColumn->addItem( it->name() );
}
@@ -196,21 +196,21 @@
void QgsCategorizedSymbolRendererV2Widget::categoriesDoubleClicked( const QModelIndex & idx )
{
- if( idx.isValid() && idx.column() == 0 )
+ if ( idx.isValid() && idx.column() == 0 )
changeCategorySymbol();
}
void QgsCategorizedSymbolRendererV2Widget::changeCategorySymbol()
{
QVariant k = currentCategory();
- if( !k.isValid() )
+ if ( !k.isValid() )
return;
int catIdx = mRenderer->categoryIndexForValue( k );
QgsSymbolV2* newSymbol = mRenderer->categories()[catIdx].symbol()->clone();
QgsSymbolV2SelectorDialog dlg( newSymbol, mStyle, this );
- if( !dlg.exec() )
+ if ( !dlg.exec() )
{
delete newSymbol;
return;
@@ -228,7 +228,7 @@
int num = values.count();
- for( int i = 0; i < num; i++ )
+ for ( int i = 0; i < num; i++ )
{
QVariant value = values[i];
double x = i / ( double ) num;
@@ -253,9 +253,9 @@
QgsVectorColorRampV2* ramp = cboCategorizedColorRamp->currentColorRamp();
- if( ramp == NULL )
+ if ( ramp == NULL )
{
- if( cboCategorizedColorRamp->count() == 0 )
+ if ( cboCategorizedColorRamp->count() == 0 )
QMessageBox::critical( this, tr( "Error" ), tr( "There are no available color ramps. You can add them in Style Manager." ) );
else
QMessageBox::critical( this, tr( "Error" ), tr( "The selected color ramp is not available." ) );
@@ -265,9 +265,9 @@
QgsCategoryList cats;
_createCategories( cats, unique_vals, mCategorizedSymbol, ramp );
- if( !mOldClassificationAttribute.isEmpty() &&
- attrName != mOldClassificationAttribute &&
- mRenderer->categories().count() > 0 )
+ if ( !mOldClassificationAttribute.isEmpty() &&
+ attrName != mOldClassificationAttribute &&
+ mRenderer->categories().count() > 0 )
{
int res = QMessageBox::question( this,
tr( "Confirm Delete" ),
@@ -275,24 +275,24 @@
"Should the existing classes be deleted before classification?" )
.arg( mOldClassificationAttribute ).arg( attrName ),
QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel );
- if( res == QMessageBox::Cancel )
+ if ( res == QMessageBox::Cancel )
return;
bool deleteExisting = ( res == QMessageBox::Yes );
- if( !deleteExisting )
+ if ( !deleteExisting )
{
QgsCategoryList prevCats = mRenderer->categories();
- for( int i = 0; i < cats.size(); ++i )
+ for ( int i = 0; i < cats.size(); ++i )
{
bool contains = false;
QVariant value = cats.at( i ).value();
- for( int j = 0; j < prevCats.size() && !contains; ++j )
+ for ( int j = 0; j < prevCats.size() && !contains; ++j )
{
- if( prevCats.at( j ).value() == value )
+ if ( prevCats.at( j ).value() == value )
contains = true;
}
- if( !contains )
+ if ( !contains )
prevCats.append( cats.at( i ) );
}
cats = prevCats;
@@ -328,7 +328,7 @@
int QgsCategorizedSymbolRendererV2Widget::currentCategoryRow()
{
QModelIndex idx = viewCategories->selectionModel()->currentIndex();
- if( !idx.isValid() )
+ if ( !idx.isValid() )
return -1;
return idx.row();
}
@@ -336,7 +336,7 @@
QVariant QgsCategorizedSymbolRendererV2Widget::currentCategory()
{
int row = currentCategoryRow();
- if( row == -1 )
+ if ( row == -1 )
return QVariant();
QStandardItemModel* m = qobject_cast<QStandardItemModel*>( viewCategories->model() );
return m->item( row, 1 )->data();
@@ -345,11 +345,11 @@
void QgsCategorizedSymbolRendererV2Widget::deleteCategory()
{
QVariant k = currentCategory();
- if( !k.isValid() )
+ if ( !k.isValid() )
return;
int idx = mRenderer->categoryIndexForValue( k );
- if( idx < 0 )
+ if ( idx < 0 )
return;
mRenderer->deleteCategory( idx );
@@ -367,19 +367,19 @@
{
int idx = item->row();
QString newtext = item->text();
- if( item->column() == 1 )
+ if ( item->column() == 1 )
{
QVariant value = newtext;
// try to preserve variant type for this value
QVariant::Type t = item->data().type();
- if( t == QVariant::Int )
+ if ( t == QVariant::Int )
value = newtext.toInt();
- else if( t == QVariant::Double )
+ else if ( t == QVariant::Double )
value = newtext.toDouble();
mRenderer->updateCategoryValue( idx, value );
item->setData( value );
}
- else if( item->column() == 2 )
+ else if ( item->column() == 2 )
{
mRenderer->updateCategoryLabel( idx, newtext );
}
Modified: trunk/qgis/src/gui/symbology-ng/qgscolorrampcombobox.cpp
===================================================================
--- trunk/qgis/src/gui/symbology-ng/qgscolorrampcombobox.cpp 2010-10-26 08:58:16 UTC (rev 14435)
+++ trunk/qgis/src/gui/symbology-ng/qgscolorrampcombobox.cpp 2010-10-26 09:09:51 UTC (rev 14436)
@@ -8,7 +8,7 @@
QSize QgsColorRampComboBox::rampIconSize( 50, 16 );
QgsColorRampComboBox::QgsColorRampComboBox( QWidget *parent ) :
- QComboBox( parent ), mStyle( NULL ), mSourceColorRamp( NULL )
+ QComboBox( parent ), mStyle( NULL ), mSourceColorRamp( NULL )
{
}
@@ -19,7 +19,7 @@
void QgsColorRampComboBox::populate( QgsStyleV2* style )
{
- if( count() != 0 )
+ if ( count() != 0 )
return; // already populated!
mStyle = style;
@@ -27,7 +27,7 @@
setIconSize( rampIconSize );
QStringList rampNames = mStyle->colorRampNames();
- for( QStringList::iterator it = rampNames.begin(); it != rampNames.end(); ++it )
+ for ( QStringList::iterator it = rampNames.begin(); it != rampNames.end(); ++it )
{
QgsVectorColorRampV2* ramp = style->colorRamp( *it );
QIcon icon = QgsSymbolLayerV2Utils::colorRampPreviewIcon( ramp, rampIconSize );
@@ -44,7 +44,7 @@
QgsVectorColorRampV2* QgsColorRampComboBox::currentColorRamp()
{
QString rampName = currentText();
- if( rampName == "[source]" && mSourceColorRamp )
+ if ( rampName == "[source]" && mSourceColorRamp )
return mSourceColorRamp->clone();
else
return mStyle->colorRamp( rampName );
@@ -55,7 +55,7 @@
mSourceColorRamp = sourceRamp->clone();
QIcon icon = QgsSymbolLayerV2Utils::colorRampPreviewIcon( mSourceColorRamp, rampIconSize );
- if( itemText( 0 ) == "[source]" )
+ if ( itemText( 0 ) == "[source]" )
setItemIcon( 0, icon );
else
insertItem( 0, icon, "[source]" );
@@ -64,12 +64,12 @@
void QgsColorRampComboBox::colorRampChanged( int index )
{
- if( index != count() - 1 )
+ if ( index != count() - 1 )
return;
// last item: "new color ramp..."
QString rampName = QgsStyleV2ManagerDialog::addColorRampStatic( this, mStyle );
- if( rampName.isEmpty() )
+ if ( rampName.isEmpty() )
return;
// put newly added ramp into the combo
Modified: trunk/qgis/src/gui/symbology-ng/qgsgraduatedsymbolrendererv2widget.cpp
===================================================================
--- trunk/qgis/src/gui/symbology-ng/qgsgraduatedsymbolrendererv2widget.cpp 2010-10-26 08:58:16 UTC (rev 14435)
+++ trunk/qgis/src/gui/symbology-ng/qgsgraduatedsymbolrendererv2widget.cpp 2010-10-26 09:09:51 UTC (rev 14436)
@@ -25,12 +25,12 @@
}
QgsGraduatedSymbolRendererV2Widget::QgsGraduatedSymbolRendererV2Widget( QgsVectorLayer* layer, QgsStyleV2* style, QgsFeatureRendererV2* renderer )
- : QgsRendererV2Widget( layer, style )
+ : QgsRendererV2Widget( layer, style )
{
// try to recognize the previous renderer
// (null renderer means "no previous renderer")
- if( !renderer || renderer->type() != "graduatedSymbol" )
+ if ( !renderer || renderer->type() != "graduatedSymbol" )
{
// we're not going to use it - so let's delete the renderer
delete renderer;
@@ -98,9 +98,9 @@
populateRanges();
// update UI from the graduated renderer (update combo boxes, view)
- if( mRenderer->mode() < cboGraduatedMode->count() )
+ if ( mRenderer->mode() < cboGraduatedMode->count() )
cboGraduatedMode->setCurrentIndex( mRenderer->mode() );
- if( mRenderer->ranges().count() )
+ if ( mRenderer->ranges().count() )
spinGraduatedClasses->setValue( mRenderer->ranges().count() );
// set column
@@ -111,7 +111,7 @@
connect( cboGraduatedColumn, SIGNAL( currentIndexChanged( int ) ), this, SLOT( graduatedColumnChanged() ) );
// set source symbol
- if( mRenderer->sourceSymbol() )
+ if ( mRenderer->sourceSymbol() )
{
delete mGraduatedSymbol;
mGraduatedSymbol = mRenderer->sourceSymbol()->clone();
@@ -119,7 +119,7 @@
}
// set source color ramp
- if( mRenderer->sourceColorRamp() )
+ if ( mRenderer->sourceColorRamp() )
{
cboGraduatedColorRamp->setSourceColorRamp( mRenderer->sourceColorRamp() );
}
@@ -133,9 +133,9 @@
cboGraduatedColumn->clear();
const QgsFieldMap& flds = mLayer->pendingFields();
QgsFieldMap::ConstIterator it = flds.begin();
- for( ; it != flds.end(); ++it )
+ for ( ; it != flds.end(); ++it )
{
- if( it->type() == QVariant::Double || it->type() == QVariant::Int )
+ if ( it->type() == QVariant::Double || it->type() == QVariant::Int )
cboGraduatedColumn->addItem( it->name() );
}
}
@@ -154,9 +154,9 @@
QgsVectorColorRampV2* ramp = cboGraduatedColorRamp->currentColorRamp();
- if( ramp == NULL )
+ if ( ramp == NULL )
{
- if( cboGraduatedColorRamp->count() == 0 )
+ if ( cboGraduatedColorRamp->count() == 0 )
QMessageBox::critical( this, tr( "Error" ), tr( "There are no available color ramps. You can add them in Style Manager." ) );
else
QMessageBox::critical( this, tr( "Error" ), tr( "The selected color ramp is not available." ) );
@@ -164,13 +164,13 @@
}
QgsGraduatedSymbolRendererV2::Mode mode;
- if( cboGraduatedMode->currentIndex() == 0 )
+ if ( cboGraduatedMode->currentIndex() == 0 )
mode = QgsGraduatedSymbolRendererV2::EqualInterval;
- else if( cboGraduatedMode->currentIndex() == 2 )
+ else if ( cboGraduatedMode->currentIndex() == 2 )
mode = QgsGraduatedSymbolRendererV2::Jenks;
- else if( cboGraduatedMode->currentIndex() == 3 )
+ else if ( cboGraduatedMode->currentIndex() == 3 )
mode = QgsGraduatedSymbolRendererV2::StdDev;
- else if( cboGraduatedMode->currentIndex() == 4 )
+ else if ( cboGraduatedMode->currentIndex() == 4 )
mode = QgsGraduatedSymbolRendererV2::Pretty;
else // default should be quantile for now
mode = QgsGraduatedSymbolRendererV2::Quantile;
@@ -186,7 +186,7 @@
void QgsGraduatedSymbolRendererV2Widget::changeGraduatedSymbol()
{
QgsSymbolV2SelectorDialog dlg( mGraduatedSymbol, mStyle, this );
- if( !dlg.exec() )
+ if ( !dlg.exec() )
return;
updateGraduatedSymbolIcon();
@@ -214,7 +214,7 @@
int i, count = mRenderer->ranges().count();
- for( i = 0; i < count; i++ )
+ for ( i = 0; i < count; i++ )
{
const QgsRendererRangeV2& range = mRenderer->ranges()[i];
QString rangeStr = QString::number( range.lowerValue(), 'f', 4 ) + " - " + QString::number( range.upperValue(), 'f', 4 );
@@ -242,7 +242,7 @@
int QgsRendererV2PropertiesDialog::currentRangeRow()
{
QModelIndex idx = viewGraduated->selectionModel()->currentIndex();
- if( !idx.isValid() )
+ if ( !idx.isValid() )
return -1;
return idx.row();
}
@@ -250,15 +250,15 @@
void QgsGraduatedSymbolRendererV2Widget::rangesDoubleClicked( const QModelIndex & idx )
{
- if( idx.isValid() && idx.column() == 0 )
+ if ( idx.isValid() && idx.column() == 0 )
changeRangeSymbol( idx.row() );
- if( idx.isValid() && idx.column() == 1 )
+ if ( idx.isValid() && idx.column() == 1 )
changeRange( idx.row() );
}
void QgsGraduatedSymbolRendererV2Widget::rangesClicked( const QModelIndex & idx )
{
- if( !idx.isValid() )
+ if ( !idx.isValid() )
mRowSelected = -1;
else
mRowSelected = idx.row();
@@ -269,7 +269,7 @@
QgsSymbolV2* newSymbol = mRenderer->ranges()[rangeIdx].symbol()->clone();
QgsSymbolV2SelectorDialog dlg( newSymbol, mStyle, this );
- if( !dlg.exec() )
+ if ( !dlg.exec() )
{
delete newSymbol;
return;
@@ -288,7 +288,7 @@
dialog.setLowerValue( QString( "%1" ).arg( range.lowerValue() ) );
dialog.setUpperValue( QString( "%1" ).arg( range.upperValue() ) );
- if( dialog.exec() == QDialog::Accepted )
+ if ( dialog.exec() == QDialog::Accepted )
{
double lowerValue = dialog.lowerValue().toDouble();
double upperValue = dialog.upperValue().toDouble();
@@ -315,7 +315,7 @@
void QgsGraduatedSymbolRendererV2Widget::changeCurrentValue( QStandardItem * item )
{
- if( item->column() == 2 )
+ if ( item->column() == 2 )
{
QString label = item->text();
int idx = item->row();
Modified: trunk/qgis/src/gui/symbology-ng/qgsstylev2managerdialog.cpp
===================================================================
--- trunk/qgis/src/gui/symbology-ng/qgsstylev2managerdialog.cpp 2010-10-26 08:58:16 UTC (rev 14435)
+++ trunk/qgis/src/gui/symbology-ng/qgsstylev2managerdialog.cpp 2010-10-26 09:09:51 UTC (rev 14436)
@@ -21,7 +21,7 @@
QgsStyleV2ManagerDialog::QgsStyleV2ManagerDialog( QgsStyleV2* style, QWidget* parent )
- : QDialog( parent ), mStyle( style ), mModified( false )
+ : QDialog( parent ), mStyle( style ), mModified( false )
{
setupUi( this );
@@ -52,7 +52,7 @@
void QgsStyleV2ManagerDialog::onFinished()
{
- if( mModified )
+ if ( mModified )
{
mStyle->save();
}
@@ -66,9 +66,9 @@
int markerCount = 0, lineCount = 0, fillCount = 0;
QStringList symbolNames = mStyle->symbolNames();
- for( int i = 0; i < symbolNames.count(); ++i )
+ for ( int i = 0; i < symbolNames.count(); ++i )
{
- switch( mStyle->symbolRef( symbolNames[i] )->type() )
+ switch ( mStyle->symbolRef( symbolNames[i] )->type() )
{
case QgsSymbolV2::Marker: markerCount++; break;
case QgsSymbolV2::Line: lineCount++; break;
@@ -94,11 +94,11 @@
// get current symbol type
int itemType = currentItemType();
- if( itemType < 3 )
+ if ( itemType < 3 )
{
populateSymbols( itemType );
}
- else if( itemType == 3 )
+ else if ( itemType == 3 )
{
populateColorRamps();
}
@@ -115,11 +115,11 @@
QStringList symbolNames = mStyle->symbolNames();
- for( int i = 0; i < symbolNames.count(); ++i )
+ for ( int i = 0; i < symbolNames.count(); ++i )
{
QString name = symbolNames[i];
QgsSymbolV2* symbol = mStyle->symbol( name );
- if( symbol->type() == type )
+ if ( symbol->type() == type )
{
QStandardItem* item = new QStandardItem( name );
QIcon icon = QgsSymbolLayerV2Utils::symbolPreviewIcon( symbol, listItems->iconSize() );
@@ -139,7 +139,7 @@
QStringList colorRamps = mStyle->colorRampNames();
- for( int i = 0; i < colorRamps.count(); ++i )
+ for ( int i = 0; i < colorRamps.count(); ++i )
{
QString name = colorRamps[i];
QgsVectorColorRampV2* ramp = mStyle->colorRamp( name );
@@ -161,18 +161,18 @@
QString QgsStyleV2ManagerDialog::currentItemName()
{
QModelIndex index = listItems->selectionModel()->currentIndex();
- if( !index.isValid() )
+ if ( !index.isValid() )
return QString();
return index.model()->data( index, 0 ).toString();
}
void QgsStyleV2ManagerDialog::addItem()
{
- if( currentItemType() < 3 )
+ if ( currentItemType() < 3 )
{
addSymbol();
}
- else if( currentItemType() == 3 )
+ else if ( currentItemType() == 3 )
{
addColorRamp();
}
@@ -189,7 +189,7 @@
{
// create new symbol with current type
QgsSymbolV2* symbol;
- switch( currentItemType() )
+ switch ( currentItemType() )
{
case QgsSymbolV2::Marker: symbol = new QgsMarkerSymbolV2(); break;
case QgsSymbolV2::Line: symbol = new QgsLineSymbolV2(); break;
@@ -199,7 +199,7 @@
// get symbol design
QgsSymbolV2PropertiesDialog dlg( symbol, this );
- if( dlg.exec() == 0 )
+ if ( dlg.exec() == 0 )
{
delete symbol;
return false;
@@ -209,7 +209,7 @@
bool ok;
QString name = QInputDialog::getText( this, tr( "Symbol name" ),
tr( "Please enter name for new symbol:" ), QLineEdit::Normal, tr( "new symbol" ), &ok );
- if( !ok || name.isEmpty() )
+ if ( !ok || name.isEmpty() )
{
delete symbol;
return false;
@@ -230,37 +230,37 @@
bool ok;
QString rampType = QInputDialog::getItem( parent, tr( "Color ramp type" ),
tr( "Please select color ramp type:" ), rampTypes, 0, false, &ok );
- if( !ok || rampType.isEmpty() )
+ if ( !ok || rampType.isEmpty() )
return QString();
QgsVectorColorRampV2 *ramp = NULL;
- if( rampType == tr( "Gradient" ) )
+ if ( rampType == tr( "Gradient" ) )
{
QgsVectorGradientColorRampV2* gradRamp = new QgsVectorGradientColorRampV2();
QgsVectorGradientColorRampV2Dialog dlg( gradRamp, parent );
- if( !dlg.exec() )
+ if ( !dlg.exec() )
{
delete gradRamp;
return QString();
}
ramp = gradRamp;
}
- else if( rampType == tr( "Random" ) )
+ else if ( rampType == tr( "Random" ) )
{
QgsVectorRandomColorRampV2* randRamp = new QgsVectorRandomColorRampV2();
QgsVectorRandomColorRampV2Dialog dlg( randRamp, parent );
- if( !dlg.exec() )
+ if ( !dlg.exec() )
{
delete randRamp;
return QString();
}
ramp = randRamp;
}
- else if( rampType == tr( "ColorBrewer" ) )
+ else if ( rampType == tr( "ColorBrewer" ) )
{
QgsVectorColorBrewerColorRampV2* brewerRamp = new QgsVectorColorBrewerColorRampV2();
QgsVectorColorBrewerColorRampV2Dialog dlg( brewerRamp, parent );
- if( !dlg.exec() )
+ if ( !dlg.exec() )
{
delete brewerRamp;
return QString();
@@ -275,9 +275,9 @@
// get name
QString name = QInputDialog::getText( parent, tr( "Color ramp name" ),
tr( "Please enter name for new color ramp:" ), QLineEdit::Normal, tr( "new color ramp" ), &ok );
- if( !ok || name.isEmpty() )
+ if ( !ok || name.isEmpty() )
{
- if( ramp )
+ if ( ramp )
delete ramp;
return QString();
}
@@ -291,7 +291,7 @@
bool QgsStyleV2ManagerDialog::addColorRamp()
{
QString rampName = addColorRampStatic( this , mStyle );
- if( !rampName.isEmpty() )
+ if ( !rampName.isEmpty() )
{
mModified = true;
return true;
@@ -303,11 +303,11 @@
void QgsStyleV2ManagerDialog::editItem()
{
- if( currentItemType() < 3 )
+ if ( currentItemType() < 3 )
{
editSymbol();
}
- else if( currentItemType() == 3 )
+ else if ( currentItemType() == 3 )
{
editColorRamp();
}
@@ -322,14 +322,14 @@
bool QgsStyleV2ManagerDialog::editSymbol()
{
QString symbolName = currentItemName();
- if( symbolName.isEmpty() )
+ if ( symbolName.isEmpty() )
return false;
QgsSymbolV2* symbol = mStyle->symbol( symbolName );
// let the user edit the symbol and update list when done
QgsSymbolV2PropertiesDialog dlg( symbol, this );
- if( dlg.exec() == 0 )
+ if ( dlg.exec() == 0 )
{
delete symbol;
return false;
@@ -344,36 +344,36 @@
bool QgsStyleV2ManagerDialog::editColorRamp()
{
QString name = currentItemName();
- if( name.isEmpty() )
+ if ( name.isEmpty() )
return false;
QgsVectorColorRampV2* ramp = mStyle->colorRamp( name );
- if( ramp->type() == "gradient" )
+ if ( ramp->type() == "gradient" )
{
QgsVectorGradientColorRampV2* gradRamp = static_cast<QgsVectorGradientColorRampV2*>( ramp );
QgsVectorGradientColorRampV2Dialog dlg( gradRamp, this );
- if( !dlg.exec() )
+ if ( !dlg.exec() )
{
delete ramp;
return false;
}
}
- else if( ramp->type() == "random" )
+ else if ( ramp->type() == "random" )
{
QgsVectorRandomColorRampV2* randRamp = static_cast<QgsVectorRandomColorRampV2*>( ramp );
QgsVectorRandomColorRampV2Dialog dlg( randRamp, this );
- if( !dlg.exec() )
+ if ( !dlg.exec() )
{
delete ramp;
return false;
}
}
- else if( ramp->type() == "colorbrewer" )
+ else if ( ramp->type() == "colorbrewer" )
{
QgsVectorColorBrewerColorRampV2* brewerRamp = static_cast<QgsVectorColorBrewerColorRampV2*>( ramp );
QgsVectorColorBrewerColorRampV2Dialog dlg( brewerRamp, this );
- if( !dlg.exec() )
+ if ( !dlg.exec() )
{
delete ramp;
return false;
@@ -392,11 +392,11 @@
void QgsStyleV2ManagerDialog::removeItem()
{
- if( currentItemType() < 3 )
+ if ( currentItemType() < 3 )
{
removeSymbol();
}
- else if( currentItemType() == 3 )
+ else if ( currentItemType() == 3 )
{
removeColorRamp();
}
@@ -412,7 +412,7 @@
bool QgsStyleV2ManagerDialog::removeSymbol()
{
QString symbolName = currentItemName();
- if( symbolName.isEmpty() )
+ if ( symbolName.isEmpty() )
return false;
// delete from style and update list
@@ -424,7 +424,7 @@
bool QgsStyleV2ManagerDialog::removeColorRamp()
{
QString rampName = currentItemName();
- if( rampName.isEmpty() )
+ if ( rampName.isEmpty() )
return false;
mStyle->removeColorRamp( rampName );
Modified: trunk/qgis/src/providers/spatialite/qgsspatialiteprovider.cpp
===================================================================
--- trunk/qgis/src/providers/spatialite/qgsspatialiteprovider.cpp 2010-10-26 08:58:16 UTC (rev 14435)
+++ trunk/qgis/src/providers/spatialite/qgsspatialiteprovider.cpp 2010-10-26 09:09:51 UTC (rev 14436)
@@ -186,8 +186,9 @@
fieldType = QVariant::Int;
}
else if ( strcasecmp( type, "real" ) == 0 ||
- strcasecmp( type, "double" ) == 0 ||
- strcasecmp( type, "double precision" ) == 0 || strcasecmp( type, "float" ) == 0 )
+ strcasecmp( type, "double" ) == 0 ||
+ strcasecmp( type, "double precision" ) == 0 ||
+ strcasecmp( type, "float" ) == 0 )
{
fieldType = QVariant::Double;
}
@@ -198,72 +199,73 @@
}
sqlite3_free_table( results );
}
- else
- {
- sql = QString( "select * from %1 limit 1" ).arg( mQuery );
+ else
+ {
+ sql = QString( "select * from %1 limit 1" ).arg( mQuery );
- if ( sqlite3_prepare_v2( sqliteHandle, sql.toUtf8().constData(), -1, &stmt, NULL ) != SQLITE_OK )
- {
- // some error occurred
- QgsDebugMsg( QString( "SQLite error: %1\n\nSQL: %2" )
- .arg( sql )
- .arg( QString::fromUtf8( sqlite3_errmsg( sqliteHandle ) ) ) );
- return;
- }
+ if ( sqlite3_prepare_v2( sqliteHandle, sql.toUtf8().constData(), -1, &stmt, NULL ) != SQLITE_OK )
+ {
+ // some error occurred
+ QgsDebugMsg( QString( "SQLite error: %1\n\nSQL: %2" )
+ .arg( sql )
+ .arg( QString::fromUtf8( sqlite3_errmsg( sqliteHandle ) ) ) );
+ return;
+ }
- ret = sqlite3_step( stmt );
- if ( ret == SQLITE_DONE )
- {
- // there are no rows to fetch
- sqlite3_finalize( stmt );
- return;
- }
+ ret = sqlite3_step( stmt );
+ if ( ret == SQLITE_DONE )
+ {
+ // there are no rows to fetch
+ sqlite3_finalize( stmt );
+ return;
+ }
- if ( ret == SQLITE_ROW )
- {
- // one valid row has been fetched from the result set
- columns = sqlite3_column_count( stmt );
- for ( i = 0; i < columns; i++ )
- {
- QString name = QString::fromUtf8( sqlite3_column_name( stmt, i ) );
- const char *type = sqlite3_column_decltype( stmt, i );
- if ( type == NULL )
- type = "TEXT";
+ if ( ret == SQLITE_ROW )
+ {
+ // one valid row has been fetched from the result set
+ columns = sqlite3_column_count( stmt );
+ for ( i = 0; i < columns; i++ )
+ {
+ QString name = QString::fromUtf8( sqlite3_column_name( stmt, i ) );
+ const char *type = sqlite3_column_decltype( stmt, i );
+ if ( type == NULL )
+ type = "TEXT";
- if ( name != mPrimaryKey )
- {
- pkCount++;
- pkName = name;
- }
+ if ( name != mPrimaryKey )
+ {
+ pkCount++;
+ pkName = name;
+ }
- if ( name != mGeometryColumn )
- {
- // for sure any SQLite value can be represented as SQLITE_TEXT
- QVariant::Type fieldType = QVariant::String;
+ if ( name != mGeometryColumn )
+ {
+ // for sure any SQLite value can be represented as SQLITE_TEXT
+ QVariant::Type fieldType = QVariant::String;
- // making some assumptions in order to guess a more realistic type
- if ( strcasecmp( type, "int" ) == 0 ||
- strcasecmp( type, "integer" ) == 0 ||
- strcasecmp( type, "bigint" ) == 0 ||
- strcasecmp( type, "smallint" ) == 0 ||
- strcasecmp( type, "tinyint" ) == 0 ||
- strcasecmp( type, "boolean" ) == 0 )
- {
- fieldType = QVariant::Int;
- }
- else if ( strcasecmp( type, "real" ) == 0 ||
- strcasecmp( type, "double" ) == 0 ||
- strcasecmp( type, "double precision" ) == 0 || strcasecmp( type, "float" ) == 0 )
- {
- fieldType = QVariant::Double;
- }
+ // making some assumptions in order to guess a more realistic type
+ if ( strcasecmp( type, "int" ) == 0 ||
+ strcasecmp( type, "integer" ) == 0 ||
+ strcasecmp( type, "bigint" ) == 0 ||
+ strcasecmp( type, "smallint" ) == 0 ||
+ strcasecmp( type, "tinyint" ) == 0 ||
+ strcasecmp( type, "boolean" ) == 0 )
+ {
+ fieldType = QVariant::Int;
+ }
+ else if ( strcasecmp( type, "real" ) == 0 ||
+ strcasecmp( type, "double" ) == 0 ||
+ strcasecmp( type, "double precision" ) == 0 ||
+ strcasecmp( type, "float" ) == 0 )
+ {
+ fieldType = QVariant::Double;
+ }
- attributeFields.insert( fldNo++, QgsField( name, fieldType, type, 0, 0, "" ) );
- }
- }
- }
- sqlite3_finalize( stmt );
- }
+ attributeFields.insert( fldNo++, QgsField( name, fieldType, type, 0, 0, "" ) );
+ }
+ }
+ }
+ sqlite3_finalize( stmt );
+ }
if ( pkCount == 1 )
{
@@ -295,9 +297,9 @@
feature.setValid( false );
- QString primaryKey = !isQuery ? "ROWID" : quotedIdentifier( mPrimaryKey );
+ QString primaryKey = !isQuery ? "ROWID" : quotedIdentifier( mPrimaryKey );
- QString sql = QString( "SELECT %1" ).arg( primaryKey );
+ QString sql = QString( "SELECT %1" ).arg( primaryKey );
for ( QgsAttributeList::const_iterator it = fetchAttributes.constBegin(); it != fetchAttributes.constEnd(); ++it )
{
const QgsField & fld = field( *it );
@@ -308,10 +310,10 @@
{
sql += QString( ", AsBinary(%1)" ).arg( quotedIdentifier( mGeometryColumn ) );
}
- sql += QString( " FROM %1 WHERE %2 = %3" )
- .arg( mQuery )
- .arg( primaryKey )
- .arg( featureId );
+ sql += QString( " FROM %1 WHERE %2 = %3" )
+ .arg( mQuery )
+ .arg( primaryKey )
+ .arg( featureId );
if ( sqlite3_prepare_v2( sqliteHandle, sql.toUtf8().constData(), -1, &stmt, NULL ) != SQLITE_OK )
{
@@ -601,9 +603,9 @@
sqliteStatement = NULL;
}
- QString primaryKey = !isQuery ? "ROWID" : quotedIdentifier( mPrimaryKey );
+ QString primaryKey = !isQuery ? "ROWID" : quotedIdentifier( mPrimaryKey );
- QString sql = QString( "SELECT %1" ).arg( primaryKey );
+ QString sql = QString( "SELECT %1" ).arg( primaryKey );
for ( QgsAttributeList::const_iterator it = fetchAttributes.constBegin(); it != fetchAttributes.constEnd(); ++it )
{
const QgsField & fld = field( *it );
@@ -650,10 +652,10 @@
mbrFilter += QString( "ymin <= %1 AND " ).arg( QString::number( rect.yMaximum(), 'f', 6 ) );
mbrFilter += QString( "ymax >= %1" ).arg( QString::number( rect.yMinimum(), 'f', 6 ) );
QString idxName = QString( "idx_%1_%2" ).arg( mIndexTable ).arg( mIndexGeometry );
- whereClause += QString( "%1 IN (SELECT pkid FROM %2 WHERE %3)" )
- .arg( quotedIdentifier( primaryKey ) )
- .arg( quotedIdentifier( idxName ) )
- .arg( mbrFilter );
+ whereClause += QString( "%1 IN (SELECT pkid FROM %2 WHERE %3)" )
+ .arg( quotedIdentifier( primaryKey ) )
+ .arg( quotedIdentifier( idxName ) )
+ .arg( mbrFilter );
}
else if ( spatialIndexMbrCache )
{
@@ -663,10 +665,10 @@
arg( QString::number( rect.yMinimum(), 'f', 6 ) ).
arg( QString::number( rect.xMaximum(), 'f', 6 ) ).arg( QString::number( rect.yMaximum(), 'f', 6 ) );
QString idxName = QString( "cache_%1_%2" ).arg( mIndexTable ).arg( mIndexGeometry );
- whereClause += QString( "%1 IN (SELECT rowid FROM %2 WHERE mbr = FilterMbrIntersects(%3))" )
- .arg( quotedIdentifier( primaryKey ) )
- .arg( quotedIdentifier( idxName ) )
- .arg( mbr );
+ whereClause += QString( "%1 IN (SELECT rowid FROM %2 WHERE mbr = FilterMbrIntersects(%3))" )
+ .arg( quotedIdentifier( primaryKey ) )
+ .arg( quotedIdentifier( idxName ) )
+ .arg( mbr );
}
else
{
@@ -798,7 +800,7 @@
// get the field name
const QgsField & fld = field( index );
- QString sql = QString( "SELECT Min(%1) FROM %2" ).arg( quotedIdentifier( fld.name() ) ).arg( mQuery );
+ QString sql = QString( "SELECT Min(%1) FROM %2" ).arg( quotedIdentifier( fld.name() ) ).arg( mQuery );
if ( !mSubsetString.isEmpty() )
{
@@ -853,7 +855,7 @@
// get the field name
const QgsField & fld = field( index );
- QString sql = QString( "SELECT Max(%1) FROM %2" ).arg( quotedIdentifier( fld.name() ) ).arg( mQuery );
+ QString sql = QString( "SELECT Max(%1) FROM %2" ).arg( quotedIdentifier( fld.name() ) ).arg( mQuery );
if ( !mSubsetString.isEmpty() )
{
@@ -906,7 +908,7 @@
// get the field name
const QgsField & fld = field( index );
- sql = QString( "SELECT DISTINCT %1 FROM %2 ORDER BY %1" ).arg( quotedIdentifier( fld.name() ) ).arg( mQuery );
+ sql = QString( "SELECT DISTINCT %1 FROM %2 ORDER BY %1" ).arg( quotedIdentifier( fld.name() ) ).arg( mQuery );
if ( !mSubsetString.isEmpty() )
{
@@ -1682,48 +1684,48 @@
}
sqlite3_free_table( results );
- // checking if this one is a select query
- if ( mQuery.startsWith( "(select", Qt::CaseInsensitive ) &&
- mQuery.endsWith( ")" ) )
- {
- // get a new alias for the subquery
- int index = 0;
- QString alias;
- QRegExp regex;
- do
- {
- alias = QString( "subQuery_%1" ).arg( QString::number( index++ ) );
- QString pattern = QString( "(\\\"?)%1\\1" ).arg( QRegExp::escape( alias ) );
- regex.setPattern( pattern );
- regex.setCaseSensitivity( Qt::CaseInsensitive );
- }
- while ( mQuery.contains( regex ) );
+ // checking if this one is a select query
+ if ( mQuery.startsWith( "(select", Qt::CaseInsensitive ) &&
+ mQuery.endsWith( ")" ) )
+ {
+ // get a new alias for the subquery
+ int index = 0;
+ QString alias;
+ QRegExp regex;
+ do
+ {
+ alias = QString( "subQuery_%1" ).arg( QString::number( index++ ) );
+ QString pattern = QString( "(\\\"?)%1\\1" ).arg( QRegExp::escape( alias ) );
+ regex.setPattern( pattern );
+ regex.setCaseSensitivity( Qt::CaseInsensitive );
+ }
+ while ( mQuery.contains( regex ) );
- // convert the custom query into a subquery
- mQuery = QString( "%1 as %2" )
- .arg( mQuery )
- .arg( quotedIdentifier( alias ) );
+ // convert the custom query into a subquery
+ mQuery = QString( "%1 as %2" )
+ .arg( mQuery )
+ .arg( quotedIdentifier( alias ) );
- sql = QString( "SELECT 0 FROM %1 LIMIT 1" ).arg( mQuery );
- ret = sqlite3_get_table( sqliteHandle, sql.toUtf8().constData(), &results, &rows, &columns, &errMsg );
- if ( ret == SQLITE_OK && rows == 1 )
- {
- isQuery = true;
- mReadOnly = true;
- count++;
- }
- if ( errMsg )
- {
- QgsDebugMsg( QString( "sqlite error %1 [%2]" ).arg( sql ).arg( errMsg ) );
- sqlite3_free( errMsg );
- errMsg = 0;
- }
- sqlite3_free_table( results );
- }
- else
- {
- mQuery = quotedIdentifier( mTableName );
- }
+ sql = QString( "SELECT 0 FROM %1 LIMIT 1" ).arg( mQuery );
+ ret = sqlite3_get_table( sqliteHandle, sql.toUtf8().constData(), &results, &rows, &columns, &errMsg );
+ if ( ret == SQLITE_OK && rows == 1 )
+ {
+ isQuery = true;
+ mReadOnly = true;
+ count++;
+ }
+ if ( errMsg )
+ {
+ QgsDebugMsg( QString( "sqlite error %1 [%2]" ).arg( sql ).arg( errMsg ) );
+ sqlite3_free( errMsg );
+ errMsg = 0;
+ }
+ sqlite3_free_table( results );
+ }
+ else
+ {
+ mQuery = quotedIdentifier( mTableName );
+ }
// checking for validity
return count == 1;
@@ -1738,8 +1740,8 @@
ret = getViewGeometryDetails();
if ( mVShapeBased )
ret = getVShapeGeometryDetails();
- if ( isQuery )
- ret = getQueryGeometryDetails();
+ if ( isQuery )
+ ret = getQueryGeometryDetails();
return ret;
}
@@ -1978,122 +1980,122 @@
return false;
}
-bool QgsSpatiaLiteProvider::getQueryGeometryDetails()
-{
- int ret;
- int i;
- char **results;
- int rows;
- int columns;
- char *errMsg = NULL;
-
- QString fType( "" );
- QString xSrid( "" );
-
- // get stuff from the relevant column instead. This may (will?)
- // fail if there is no data in the relevant table.
- QString sql = QString( "select srid(%1), geometrytype(%1) from %2" )
- .arg( quotedIdentifier( mGeometryColumn ) )
- .arg( mQuery );
-
- //it is possible that the where clause restricts the feature type
- if ( !mSubsetString.isEmpty() )
- {
- sql += " WHERE " + mSubsetString;
- }
-
- sql += " limit 1";
-
- ret = sqlite3_get_table( sqliteHandle, sql.toUtf8().constData(), &results, &rows, &columns, &errMsg );
- if ( ret != SQLITE_OK )
- goto error;
- if ( rows < 1 )
- ;
- else
- {
- for ( i = 1; i <= rows; i++ )
- {
- xSrid = results[( i * columns ) + 0];
- fType = results[( i * columns ) + 1];
- }
- }
- sqlite3_free_table( results );
-
- if ( !xSrid.isEmpty() && !fType.isEmpty() )
- {
- if ( fType == "GEOMETRY" )
- {
- // check to see if there is a unique geometry type
- sql = QString( "select distinct "
- "case"
- " when geometrytype(%1) IN ('POINT','MULTIPOINT') THEN 'POINT'"
- " when geometrytype(%1) IN ('LINESTRING','MULTILINESTRING') THEN 'LINESTRING'"
- " when geometrytype(%1) IN ('POLYGON','MULTIPOLYGON') THEN 'POLYGON'"
- " end "
- "from %2" )
- .arg( quotedIdentifier( mGeometryColumn ) )
- .arg( mQuery );
-
- if ( !mSubsetString.isEmpty() )
- sql += " where " + mSubsetString;
-
- ret = sqlite3_get_table( sqliteHandle, sql.toUtf8().constData(), &results, &rows, &columns, &errMsg );
- if ( ret != SQLITE_OK )
- goto error;
- if ( rows != 1 )
- ;
- else
- {
- for ( i = 1; i <= rows; i++ )
- {
- fType = results[( 1 * columns ) + 0];
- }
- }
- sqlite3_free_table( results );
- }
-
- if ( fType == "POINT" )
- {
- geomType = QGis::WKBPoint;
- }
- else if ( fType == "MULTIPOINT" )
- {
- geomType = QGis::WKBMultiPoint;
- }
- else if ( fType == "LINESTRING" )
- {
- geomType = QGis::WKBLineString;
- }
- else if ( fType == "MULTILINESTRING" )
- {
- geomType = QGis::WKBMultiLineString;
- }
- else if ( fType == "POLYGON" )
- {
- geomType = QGis::WKBPolygon;
- }
- else if ( fType == "MULTIPOLYGON" )
- {
- geomType = QGis::WKBMultiPolygon;
- }
- mSrid = xSrid.toInt();
- }
-
- if ( geomType == QGis::WKBUnknown || mSrid < 0 )
- goto error;
-
- return getSridDetails();
-
-error:
- // unexpected error
- if ( errMsg != NULL )
- {
- QgsDebugMsg( QString( "SQL error: %1\n\n%2" ).arg( sql ).arg( errMsg ? QString::fromUtf8( errMsg ) : "unknown cause" ) );
- sqlite3_free( errMsg );
- }
- return false;
-}
-
+bool QgsSpatiaLiteProvider::getQueryGeometryDetails()
+{
+ int ret;
+ int i;
+ char **results;
+ int rows;
+ int columns;
+ char *errMsg = NULL;
+
+ QString fType( "" );
+ QString xSrid( "" );
+
+ // get stuff from the relevant column instead. This may (will?)
+ // fail if there is no data in the relevant table.
+ QString sql = QString( "select srid(%1), geometrytype(%1) from %2" )
+ .arg( quotedIdentifier( mGeometryColumn ) )
+ .arg( mQuery );
+
+ //it is possible that the where clause restricts the feature type
+ if ( !mSubsetString.isEmpty() )
+ {
+ sql += " WHERE " + mSubsetString;
+ }
+
+ sql += " limit 1";
+
+ ret = sqlite3_get_table( sqliteHandle, sql.toUtf8().constData(), &results, &rows, &columns, &errMsg );
+ if ( ret != SQLITE_OK )
+ goto error;
+ if ( rows < 1 )
+ ;
+ else
+ {
+ for ( i = 1; i <= rows; i++ )
+ {
+ xSrid = results[( i * columns ) + 0];
+ fType = results[( i * columns ) + 1];
+ }
+ }
+ sqlite3_free_table( results );
+
+ if ( !xSrid.isEmpty() && !fType.isEmpty() )
+ {
+ if ( fType == "GEOMETRY" )
+ {
+ // check to see if there is a unique geometry type
+ sql = QString( "select distinct "
+ "case"
+ " when geometrytype(%1) IN ('POINT','MULTIPOINT') THEN 'POINT'"
+ " when geometrytype(%1) IN ('LINESTRING','MULTILINESTRING') THEN 'LINESTRING'"
+ " when geometrytype(%1) IN ('POLYGON','MULTIPOLYGON') THEN 'POLYGON'"
+ " end "
+ "from %2" )
+ .arg( quotedIdentifier( mGeometryColumn ) )
+ .arg( mQuery );
+
+ if ( !mSubsetString.isEmpty() )
+ sql += " where " + mSubsetString;
+
+ ret = sqlite3_get_table( sqliteHandle, sql.toUtf8().constData(), &results, &rows, &columns, &errMsg );
+ if ( ret != SQLITE_OK )
+ goto error;
+ if ( rows != 1 )
+ ;
+ else
+ {
+ for ( i = 1; i <= rows; i++ )
+ {
+ fType = results[( 1 * columns ) + 0];
+ }
+ }
+ sqlite3_free_table( results );
+ }
+
+ if ( fType == "POINT" )
+ {
+ geomType = QGis::WKBPoint;
+ }
+ else if ( fType == "MULTIPOINT" )
+ {
+ geomType = QGis::WKBMultiPoint;
+ }
+ else if ( fType == "LINESTRING" )
+ {
+ geomType = QGis::WKBLineString;
+ }
+ else if ( fType == "MULTILINESTRING" )
+ {
+ geomType = QGis::WKBMultiLineString;
+ }
+ else if ( fType == "POLYGON" )
+ {
+ geomType = QGis::WKBPolygon;
+ }
+ else if ( fType == "MULTIPOLYGON" )
+ {
+ geomType = QGis::WKBMultiPolygon;
+ }
+ mSrid = xSrid.toInt();
+ }
+
+ if ( geomType == QGis::WKBUnknown || mSrid < 0 )
+ goto error;
+
+ return getSridDetails();
+
+error:
+ // unexpected error
+ if ( errMsg != NULL )
+ {
+ QgsDebugMsg( QString( "SQL error: %1\n\n%2" ).arg( sql ).arg( errMsg ? QString::fromUtf8( errMsg ) : "unknown cause" ) );
+ sqlite3_free( errMsg );
+ }
+ return false;
+}
+
bool QgsSpatiaLiteProvider::getSridDetails()
{
int ret;
@@ -2140,9 +2142,9 @@
int columns;
char *errMsg = NULL;
- QString sql = QString( "SELECT Min(MbrMinX(%1)), Min(MbrMinY(%1)), "
- "Max(MbrMaxX(%1)), Max(MbrMaxY(%1)), Count(*) " "FROM %2" )
- .arg( quotedIdentifier( mGeometryColumn ) )
+ QString sql = QString( "SELECT Min(MbrMinX(%1)), Min(MbrMinY(%1)), "
+ "Max(MbrMaxX(%1)), Max(MbrMaxY(%1)), Count(*) " "FROM %2" )
+ .arg( quotedIdentifier( mGeometryColumn ) )
.arg( mQuery );
if ( !mSubsetString.isEmpty() )
Modified: trunk/qgis/src/providers/spatialite/qgsspatialiteprovider.h
===================================================================
--- trunk/qgis/src/providers/spatialite/qgsspatialiteprovider.h 2010-10-26 08:58:16 UTC (rev 14435)
+++ trunk/qgis/src/providers/spatialite/qgsspatialiteprovider.h 2010-10-26 09:09:51 UTC (rev 14436)
@@ -266,11 +266,11 @@
* Flag indicating if the layer data source is a valid SpatiaLite layer
*/
bool valid;
- /**
- * Flag indicating if the layer data source is based on a query
- */
- bool isQuery;
/**
+ * Flag indicating if the layer data source is based on a query
+ */
+ bool isQuery;
+ /**
* Flag indicating if the layer data source is based on a plain Table
*/
bool mTableBased;
Modified: trunk/qgis/tests/src/core/testqgsvectorlayer.cpp
===================================================================
--- trunk/qgis/tests/src/core/testqgsvectorlayer.cpp 2010-10-26 08:58:16 UTC (rev 14435)
+++ trunk/qgis/tests/src/core/testqgsvectorlayer.cpp 2010-10-26 09:09:51 UTC (rev 14436)
@@ -39,7 +39,7 @@
*/
class TestQgsVectorLayer: public QObject
{
- Q_OBJECT;
+ Q_OBJECT;
private:
bool mTestHasError;
QgsMapRenderer * mpMapRenderer;
@@ -79,7 +79,7 @@
QString myDbfFileName = mTestDataDir + "nonspatial.dbf";
QFileInfo myDbfFileInfo( myDbfFileName );
mpNonSpatialLayer = new QgsVectorLayer( myDbfFileInfo.filePath(),
- myDbfFileInfo.completeBaseName(), "ogr" );
+ myDbfFileInfo.completeBaseName(), "ogr" );
// Register the layer with the registry
QgsMapLayerRegistry::instance()->addMapLayer( mpNonSpatialLayer );
//
@@ -88,7 +88,7 @@
QString myPointsFileName = mTestDataDir + "points.shp";
QFileInfo myPointFileInfo( myPointsFileName );
mpPointsLayer = new QgsVectorLayer( myPointFileInfo.filePath(),
- myPointFileInfo.completeBaseName(), "ogr" );
+ myPointFileInfo.completeBaseName(), "ogr" );
// Register the layer with the registry
QgsMapLayerRegistry::instance()->addMapLayer( mpPointsLayer );
@@ -98,7 +98,7 @@
QString myPolysFileName = mTestDataDir + "polys.shp";
QFileInfo myPolyFileInfo( myPolysFileName );
mpPolysLayer = new QgsVectorLayer( myPolyFileInfo.filePath(),
- myPolyFileInfo.completeBaseName(), "ogr" );
+ myPolyFileInfo.completeBaseName(), "ogr" );
// Register the layer with the registry
QgsMapLayerRegistry::instance()->addMapLayer( mpPolysLayer );
@@ -109,7 +109,7 @@
QString myLinesFileName = mTestDataDir + "lines.shp";
QFileInfo myLineFileInfo( myLinesFileName );
mpLinesLayer = new QgsVectorLayer( myLineFileInfo.filePath(),
- myLineFileInfo.completeBaseName(), "ogr" );
+ myLineFileInfo.completeBaseName(), "ogr" );
// Register the layer with the registry
QgsMapLayerRegistry::instance()->addMapLayer( mpLinesLayer );
//
@@ -125,527 +125,527 @@
mpMapRenderer->setLayerSet( myLayers );
mReport += "<h1>Vector Renderer Tests</h1>\n";
}
- // will be called after the last testfunction was executed.
- void cleanupTestCase()
- {
- QString myReportFile = QDir::tempPath() + QDir::separator() + "renderertest.html";
- QFile myFile( myReportFile );
- if ( myFile.open( QIODevice::WriteOnly ) )
+ // will be called after the last testfunction was executed.
+ void cleanupTestCase()
{
- QTextStream myQTextStream( &myFile );
- myQTextStream << mReport;
- myFile.close();
- QDesktopServices::openUrl( "file://" + myReportFile );
+ QString myReportFile = QDir::tempPath() + QDir::separator() + "renderertest.html";
+ QFile myFile( myReportFile );
+ if ( myFile.open( QIODevice::WriteOnly ) )
+ {
+ QTextStream myQTextStream( &myFile );
+ myQTextStream << mReport;
+ myFile.close();
+ QDesktopServices::openUrl( "file://" + myReportFile );
+ }
+
}
+ void init() {};// will be called before each testfunction is executed.
+ void cleanup() {};// will be called after every testfunction.
- }
- void init() {};// will be called before each testfunction is executed.
- void cleanup() {};// will be called after every testfunction.
+ void QgsVectorLayerNonSpatialIterator()
+ {
+ QgsVectorDataProvider * myProvider = mpNonSpatialLayer->dataProvider();
+ QgsFeature f;
+ QgsAttributeList myList;
+ myList << 0 << 1 << 2 << 3;
+ int myCount = 0;
+ myProvider->select( myList );
+ while ( myProvider->nextFeature( f ) )
+ {
+ qDebug( "Getting feature from provider" );
+ myCount++;
+ }
+ QVERIFY( myCount == 3 );
+ };
- void QgsVectorLayerNonSpatialIterator()
- {
- QgsVectorDataProvider * myProvider = mpNonSpatialLayer->dataProvider();
- QgsFeature f;
- QgsAttributeList myList;
- myList << 0 << 1 << 2 << 3;
- int myCount = 0;
- myProvider->select( myList );
- while ( myProvider->nextFeature( f ) )
+ void QgsVectorLayerstorageType()
{
- qDebug("Getting feature from provider");
- myCount++;
- }
- QVERIFY( myCount == 3 );
- };
- void QgsVectorLayerstorageType()
- {
+ };
+ void QgsVectorLayercapabilitiesString()
+ {
- };
- void QgsVectorLayercapabilitiesString()
- {
+ };
+ void QgsVectorLayerdataComment()
+ {
- };
- void QgsVectorLayerdataComment()
- {
+ };
+ void QgsVectorLayerproviderType()
+ {
- };
- void QgsVectorLayerproviderType()
- {
+ };
+ void QgsVectorLayersetDisplayField()
+ {
- };
- void QgsVectorLayersetDisplayField()
- {
+ };
+ void QgsVectorLayerdrawLabels()
+ {
- };
- void QgsVectorLayerdrawLabels()
- {
+ };
+ void QgsVectorLayerdrawLineString()
+ {
- };
- void QgsVectorLayerdrawLineString()
- {
+ };
+ void QgsVectorLayerdrawPolygon()
+ {
- };
- void QgsVectorLayerdrawPolygon()
- {
+ };
+ void QgsVectorLayerdrawRendererV2()
+ {
- };
- void QgsVectorLayerdrawRendererV2()
- {
+ };
+ void QgsVectorLayerdrawRendererV2Levels()
+ {
- };
- void QgsVectorLayerdrawRendererV2Levels()
- {
+ };
+ void QgsVectorLayerreload()
+ {
- };
- void QgsVectorLayerreload()
- {
+ };
+ void QgsVectorLayerdraw()
+ {
- };
- void QgsVectorLayerdraw()
- {
+ };
+ void QgsVectorLayerdeleteCachedGeometries()
+ {
- };
- void QgsVectorLayerdeleteCachedGeometries()
- {
+ };
+ void QgsVectorLayerdrawVertexMarker()
+ {
- };
- void QgsVectorLayerdrawVertexMarker()
- {
+ };
+ void QgsVectorLayerselect()
+ {
- };
- void QgsVectorLayerselect()
- {
+ };
+ void QgsVectorLayerinvertSelection()
+ {
- };
- void QgsVectorLayerinvertSelection()
- {
+ };
+ void QgsVectorLayerinvertSelectionInRectangle()
+ {
- };
- void QgsVectorLayerinvertSelectionInRectangle()
- {
+ };
+ void QgsVectorLayerremoveSelection()
+ {
- };
- void QgsVectorLayerremoveSelection()
- {
+ };
+ void QgsVectorLayertriggerRepaint()
+ {
- };
- void QgsVectorLayertriggerRepaint()
- {
+ };
+ void QgsVectorLayerdataProvider()
+ {
- };
- void QgsVectorLayerdataProvider()
- {
+ };
+ void QgsVectorLayersetProviderEncoding()
+ {
- };
- void QgsVectorLayersetProviderEncoding()
- {
+ };
+ void QgsVectorLayerrenderer()
+ {
- };
- void QgsVectorLayerrenderer()
- {
+ };
+ void QgsVectorLayersetRenderer()
+ {
- };
- void QgsVectorLayersetRenderer()
- {
+ };
+ void QgsVectorLayergeometryType()
+ {
- };
- void QgsVectorLayergeometryType()
- {
+ };
+ void QgsVectorLayerwkbType()
+ {
- };
- void QgsVectorLayerwkbType()
- {
+ };
+ void QgsVectorLayerboundingBoxOfSelected()
+ {
- };
- void QgsVectorLayerboundingBoxOfSelected()
- {
+ };
+ void QgsVectorLayerfeatureCount()
+ {
- };
- void QgsVectorLayerfeatureCount()
- {
+ };
+ void QgsVectorLayerupdateFeatureCount()
+ {
- };
- void QgsVectorLayerupdateFeatureCount()
- {
+ };
+ void QgsVectorLayerupdateExtents()
+ {
- };
- void QgsVectorLayerupdateExtents()
- {
+ };
+ void QgsVectorLayersubsetString()
+ {
- };
- void QgsVectorLayersubsetString()
- {
+ };
+ void QgsVectorLayersetSubsetString()
+ {
- };
- void QgsVectorLayersetSubsetString()
- {
+ };
+ void QgsVectorLayerupdateFeatureAttributes()
+ {
- };
- void QgsVectorLayerupdateFeatureAttributes()
- {
+ };
+ void QgsVectorLayerupdateFeatureGeometry()
+ {
- };
- void QgsVectorLayerupdateFeatureGeometry()
- {
+ };
+ void QgsVectorLayernextFeature()
+ {
- };
- void QgsVectorLayernextFeature()
- {
+ };
+ void QgsVectorLayerfeatureAtId()
+ {
- };
- void QgsVectorLayerfeatureAtId()
- {
+ };
+ void QgsVectorLayeraddFeature()
+ {
- };
- void QgsVectorLayeraddFeature()
- {
+ };
+ void QgsVectorLayerinsertVertex()
+ {
- };
- void QgsVectorLayerinsertVertex()
- {
+ };
+ void QgsVectorLayermoveVertex()
+ {
- };
- void QgsVectorLayermoveVertex()
- {
+ };
+ void QgsVectorLayerdeleteVertex()
+ {
- };
- void QgsVectorLayerdeleteVertex()
- {
+ };
+ void QgsVectorLayerdeleteSelectedFeatures()
+ {
- };
- void QgsVectorLayerdeleteSelectedFeatures()
- {
+ };
+ void QgsVectorLayeraddRing()
+ {
- };
- void QgsVectorLayeraddRing()
- {
+ };
+ void QgsVectorLayeraddIsland()
+ {
- };
- void QgsVectorLayeraddIsland()
- {
+ };
+ void QgsVectorLayertranslateFeature()
+ {
- };
- void QgsVectorLayertranslateFeature()
- {
+ };
+ void QgsVectorLayersplitFeatures()
+ {
- };
- void QgsVectorLayersplitFeatures()
- {
+ };
+ void QgsVectorLayerremovePolygonIntersections()
+ {
- };
- void QgsVectorLayerremovePolygonIntersections()
- {
+ };
+ void QgsVectorLayeraddTopologicalPoints()
+ {
- };
- void QgsVectorLayeraddTopologicalPoints()
- {
+ };
+ void QgsVectorLayerlabel()
+ {
- };
- void QgsVectorLayerlabel()
- {
+ };
+ void QgsVectorLayerenableLabels()
+ {
- };
- void QgsVectorLayerenableLabels()
- {
+ };
+ void QgsVectorLayerhasLabelsEnabled()
+ {
- };
- void QgsVectorLayerhasLabelsEnabled()
- {
+ };
+ void QgsVectorLayerstartEditing()
+ {
- };
- void QgsVectorLayerstartEditing()
- {
+ };
+ void QgsVectorLayerreadXml()
+ {
- };
- void QgsVectorLayerreadXml()
- {
+ };
+ void QgsVectorLayersetDataProvider()
+ {
- };
- void QgsVectorLayersetDataProvider()
- {
+ };
+ void QgsVectorLayerwriteXml()
+ {
- };
- void QgsVectorLayerwriteXml()
- {
+ };
+ void QgsVectorLayerreadSymbology()
+ {
- };
- void QgsVectorLayerreadSymbology()
- {
+ };
+ void QgsVectorLayerwriteSymbology()
+ {
- };
- void QgsVectorLayerwriteSymbology()
- {
+ };
+ void QgsVectorLayerchangeGeometry()
+ {
- };
- void QgsVectorLayerchangeGeometry()
- {
+ };
+ void QgsVectorLayerchangeAttributeValue()
+ {
- };
- void QgsVectorLayerchangeAttributeValue()
- {
+ };
+ void QgsVectorLayeraddAttribute()
+ {
- };
- void QgsVectorLayeraddAttribute()
- {
+ };
+ void QgsVectorLayeraddAttributeAlias()
+ {
- };
- void QgsVectorLayeraddAttributeAlias()
- {
+ };
+ void QgsVectorLayerattributeAlias()
+ {
- };
- void QgsVectorLayerattributeAlias()
- {
+ };
+ void QgsVectorLayerattributeDisplayName()
+ {
- };
- void QgsVectorLayerattributeDisplayName()
- {
+ };
+ void QgsVectorLayerdeleteAttribute()
+ {
- };
- void QgsVectorLayerdeleteAttribute()
- {
+ };
+ void QgsVectorLayerdeleteFeature()
+ {
- };
- void QgsVectorLayerdeleteFeature()
- {
+ };
+ void QgsVectorLayerpendingFields()
+ {
- };
- void QgsVectorLayerpendingFields()
- {
+ };
+ void QgsVectorLayerpendingAllAttributesList()
+ {
- };
- void QgsVectorLayerpendingAllAttributesList()
- {
+ };
+ void QgsVectorLayerpendingFeatureCount()
+ {
- };
- void QgsVectorLayerpendingFeatureCount()
- {
+ };
+ void QgsVectorLayercommitChanges()
+ {
- };
- void QgsVectorLayercommitChanges()
- {
+ };
+ void QgsVectorLayercommitErrors()
+ {
- };
- void QgsVectorLayercommitErrors()
- {
+ };
+ void QgsVectorLayerrollBack()
+ {
- };
- void QgsVectorLayerrollBack()
- {
+ };
+ void QgsVectorLayersetSelectedFeatures()
+ {
- };
- void QgsVectorLayersetSelectedFeatures()
- {
+ };
+ void QgsVectorLayerselectedFeatureCount()
+ {
- };
- void QgsVectorLayerselectedFeatureCount()
- {
+ };
+ void QgsVectorLayerselectedFeaturesIds()
+ {
- };
- void QgsVectorLayerselectedFeaturesIds()
- {
+ };
+ void QgsVectorLayerselectedFeatures()
+ {
- };
- void QgsVectorLayerselectedFeatures()
- {
+ };
+ void QgsVectorLayeraddFeatures()
+ {
- };
- void QgsVectorLayeraddFeatures()
- {
+ };
+ void QgsVectorLayercopySymbologySettings()
+ {
- };
- void QgsVectorLayercopySymbologySettings()
- {
+ };
+ void QgsVectorLayerhasCompatibleSymbology()
+ {
- };
- void QgsVectorLayerhasCompatibleSymbology()
- {
+ };
+ void QgsVectorLayersnapPoint()
+ {
- };
- void QgsVectorLayersnapPoint()
- {
+ };
+ void QgsVectorLayersnapWithContext()
+ {
- };
- void QgsVectorLayersnapWithContext()
- {
+ };
+ void QgsVectorLayersnapToGeometry()
+ {
- };
- void QgsVectorLayersnapToGeometry()
- {
+ };
+ void QgsVectorLayerinsertSegmentVerticesForSnap()
+ {
- };
- void QgsVectorLayerinsertSegmentVerticesForSnap()
- {
+ };
+ void QgsVectorLayerboundingBoxFromPointList()
+ {
- };
- void QgsVectorLayerboundingBoxFromPointList()
- {
+ };
+ void QgsVectorLayercurrentVertexMarkerType()
+ {
- };
- void QgsVectorLayercurrentVertexMarkerType()
- {
+ };
+ void QgsVectorLayercurrentVertexMarkerSize()
+ {
- };
- void QgsVectorLayercurrentVertexMarkerSize()
- {
+ };
+ void QgsVectorLayerdrawFeature()
+ {
- };
- void QgsVectorLayerdrawFeature()
- {
+ };
+ void QgsVectorLayersetCoordinateSystem()
+ {
- };
- void QgsVectorLayersetCoordinateSystem()
- {
+ };
+ void QgsVectorLayertransformPoint()
+ {
- };
- void QgsVectorLayertransformPoint()
- {
+ };
+ void QgsVectorLayertransformPoints()
+ {
- };
- void QgsVectorLayertransformPoints()
- {
+ };
+ void QgsVectorLayerdisplayField()
+ {
- };
- void QgsVectorLayerdisplayField()
- {
+ };
+ void QgsVectorLayerisEditable()
+ {
- };
- void QgsVectorLayerisEditable()
- {
+ };
+ void QgsVectorLayerisModified()
+ {
- };
- void QgsVectorLayerisModified()
- {
+ };
+ void QgsVectorLayersetModified()
+ {
- };
- void QgsVectorLayersetModified()
- {
+ };
+ void QgsVectorLayereditType()
+ {
- };
- void QgsVectorLayereditType()
- {
+ };
+ void QgsVectorLayersetEditType()
+ {
- };
- void QgsVectorLayersetEditType()
- {
+ };
+ void QgsVectorLayereditForm()
+ {
- };
- void QgsVectorLayereditForm()
- {
+ };
+ void QgsVectorLayersetEditForm()
+ {
- };
- void QgsVectorLayersetEditForm()
- {
+ };
+ void QgsVectorLayersetAnnotationForm()
+ {
- };
- void QgsVectorLayersetAnnotationForm()
- {
+ };
+ void QgsVectorLayereditFormInit()
+ {
- };
- void QgsVectorLayereditFormInit()
- {
+ };
+ void QgsVectorLayersetEditFormInit()
+ {
- };
- void QgsVectorLayersetEditFormInit()
- {
+ };
+ void QgsVectorLayervalueMap()
+ {
- };
- void QgsVectorLayervalueMap()
- {
+ };
+ void QgsVectorLayerrange()
+ {
- };
- void QgsVectorLayerrange()
- {
+ };
+ void QgsVectorLayeraddOverlay()
+ {
- };
- void QgsVectorLayeraddOverlay()
- {
+ };
+ void QgsVectorLayerremoveOverlay()
+ {
- };
- void QgsVectorLayerremoveOverlay()
- {
+ };
+ void QgsVectorLayervectorOverlays()
+ {
- };
- void QgsVectorLayervectorOverlays()
- {
+ };
+ void QgsVectorLayerfindOverlayByType()
+ {
- };
- void QgsVectorLayerfindOverlayByType()
- {
+ };
+ void QgsVectorLayerrendererV2()
+ {
- };
- void QgsVectorLayerrendererV2()
- {
+ };
+ void QgsVectorLayersetRendererV2()
+ {
- };
- void QgsVectorLayersetRendererV2()
- {
+ };
+ void QgsVectorLayerisUsingRendererV2()
+ {
- };
- void QgsVectorLayerisUsingRendererV2()
- {
+ };
+ void QgsVectorLayersetUsingRendererV2()
+ {
- };
- void QgsVectorLayersetUsingRendererV2()
- {
+ };
+ void QgsVectorLayereditGeometryChange()
+ {
- };
- void QgsVectorLayereditGeometryChange()
- {
+ };
+ void QgsVectorLayereditFeatureAdd()
+ {
- };
- void QgsVectorLayereditFeatureAdd()
- {
+ };
+ void QgsVectorLayereditFeatureDelete()
+ {
- };
- void QgsVectorLayereditFeatureDelete()
- {
+ };
+ void QgsVectorLayereditAttributeChange()
+ {
- };
- void QgsVectorLayereditAttributeChange()
- {
+ };
+ void QgsVectorLayerbeginEditCommand()
+ {
- };
- void QgsVectorLayerbeginEditCommand()
- {
+ };
+ void QgsVectorLayerendEditCommand()
+ {
- };
- void QgsVectorLayerendEditCommand()
- {
+ };
+ void QgsVectorLayerdestroyEditCommand()
+ {
- };
- void QgsVectorLayerdestroyEditCommand()
- {
+ };
+ void QgsVectorLayerredoEditCommand()
+ {
- };
- void QgsVectorLayerredoEditCommand()
- {
+ };
+ void QgsVectorLayerundoEditCommand()
+ {
- };
- void QgsVectorLayerundoEditCommand()
- {
+ };
+ void QgsVectorLayersetCheckedState()
+ {
- };
- void QgsVectorLayersetCheckedState()
- {
+ };
+ void QgsVectorLayercheckedState()
+ {
- };
- void QgsVectorLayercheckedState()
- {
+ };
+ void QgsVectorLayerfieldNameIndex()
+ {
- };
- void QgsVectorLayerfieldNameIndex()
- {
+ };
+ void QgsVectorLayerstopRendererV2()
+ {
- };
- void QgsVectorLayerstopRendererV2()
- {
+ };
- };
-
};
-QTEST_MAIN(TestQgsVectorLayer)
+QTEST_MAIN( TestQgsVectorLayer )
#include "moc_testqgsvectorlayer.cxx"
More information about the QGIS-commit
mailing list