mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
cleanup cleanup
- remove method names from QgsDebugMsg calls as they are already included in the output - replace filename with file name in strings and comments instead of fileName (same for layerName) - fix debugging output in interpolation plugin (QgsDebugMsg migration ate the last argument where std::flush was used) - fix some common typos git-svn-id: http://svn.osgeo.org/qgis/trunk@9150 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
f3fd51cab5
commit
db574063e5
@ -3,7 +3,7 @@
|
||||
|
||||
QGIS_DEBUG is an int describing what debug messages are written to the console. If the debug level of a message is <= QGIS_DEBUG, the message is written to the console. It the variable QGIS_DEBUG is not defined, it defaults to 1 for debug mode and to 0 for release mode
|
||||
|
||||
QGIS_DEBUG_FILE may contain a fileName. Only the messages from this file are printed (provided they have the right debuglevel). If QGIS_DEBUG_FILE is not set, messages from all files are printed
|
||||
QGIS_DEBUG_FILE may contain a file name. Only the messages from this file are printed (provided they have the right debuglevel). If QGIS_DEBUG_FILE is not set, messages from all files are printed
|
||||
*/
|
||||
|
||||
class QgsLogger
|
||||
@ -17,7 +17,7 @@ class QgsLogger
|
||||
/**Goes to qDebug.
|
||||
@param msg the message to be printed
|
||||
@param debuglevel
|
||||
@param file fileName where the message comes from
|
||||
@param file file name where the message comes from
|
||||
@param function function where the message comes from
|
||||
@param line place in file where the message comes from*/
|
||||
static void debug(const QString& msg, int debuglevel = 1, const char* file = NULL, const char* function = NULL, int line = -1);
|
||||
|
@ -26,7 +26,7 @@ public:
|
||||
*/
|
||||
QPicture pictureMarker (QString fullName, int size, QPen pen, QBrush brush, bool qtBug = true );
|
||||
|
||||
/** Returns a pixmap given a fileName of a svg marker
|
||||
/** Returns a pixmap given a file name of a svg marker
|
||||
* NOTE: this method needs to be public static for QgsMarkerDialog::visualizeMarkers */
|
||||
static void svgMarker (QPainter * thepPainter, QString name, int size );
|
||||
};
|
||||
|
@ -21,7 +21,7 @@ public:
|
||||
static void buildSupportedRasterFileFilter(QString & fileFilters);
|
||||
static void registerGdalDrivers();
|
||||
|
||||
/** This helper checks to see whether the fileName appears to be a valid
|
||||
/** This helper checks to see whether the file name appears to be a valid
|
||||
raster file name */
|
||||
static bool isValidRasterFileName(const QString & theFileNameQString);
|
||||
|
||||
|
@ -104,7 +104,7 @@ QgsComposer::QgsComposer( QgisApp *qgis ): QMainWindow()
|
||||
mQgis = qgis;
|
||||
mFirstTime = true;
|
||||
|
||||
QgsDebugMsg( "QgsComposer::QgsComposer" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
setMouseTracking( true );
|
||||
//mSplitter->setMouseTracking(true);
|
||||
@ -788,7 +788,7 @@ void QgsComposer::on_mActionExportAsImage_activated( void )
|
||||
std::auto_ptr < QFileDialog > myQFileDialog(
|
||||
new QFileDialog(
|
||||
this,
|
||||
tr( "Choose a fileName to save the map image as" ),
|
||||
tr( "Choose a file name to save the map image as" ),
|
||||
file.path(),
|
||||
myFilters
|
||||
)
|
||||
@ -804,7 +804,7 @@ void QgsComposer::on_mActionExportAsImage_activated( void )
|
||||
// set the 'Open' button to something that makes more sense
|
||||
myQFileDialog->setAcceptMode( QFileDialog::AcceptSave );
|
||||
|
||||
//prompt the user for a fileName
|
||||
//prompt the user for a file name
|
||||
QString myOutputFileNameQString; // = myQFileDialog->getSaveFileName(); //delete this
|
||||
|
||||
int result = myQFileDialog->exec();
|
||||
@ -881,7 +881,7 @@ void QgsComposer::on_mActionExportAsSVG_activated( void )
|
||||
}
|
||||
QString myLastUsedFile = myQSettings.value( "/UI/lastSaveAsSvgFile", "qgis.svg" ).toString();
|
||||
QFileInfo file( myLastUsedFile );
|
||||
QFileDialog *myQFileDialog = new QFileDialog( this, tr( "Choose a fileName to save the map as" ),
|
||||
QFileDialog *myQFileDialog = new QFileDialog( this, tr( "Choose a file name to save the map as" ),
|
||||
file.path(), tr( "SVG Format" ) + " (*.svg *SVG)" );
|
||||
myQFileDialog->selectFile( file.fileName() );
|
||||
myQFileDialog->setFileMode( QFileDialog::AnyFile );
|
||||
@ -1074,7 +1074,7 @@ void QgsComposer::on_closePButton_clicked()
|
||||
|
||||
void QgsComposer::projectRead( void )
|
||||
{
|
||||
QgsDebugMsg( "QgsComposer::projectRead" );
|
||||
QgsDebugMsg( "entered." );
|
||||
//if ( mComposition ) delete mComposition;
|
||||
//mComposition = new QgsComposition( this, 1 );
|
||||
|
||||
@ -1115,7 +1115,7 @@ void QgsComposer::projectRead( void )
|
||||
|
||||
void QgsComposer::newProject( void )
|
||||
{
|
||||
QgsDebugMsg( "QgsComposer::newProject" );
|
||||
QgsDebugMsg( "entered." );
|
||||
//if ( mComposition ) delete mComposition;
|
||||
|
||||
//mComposition = new QgsComposition( this, 1 );
|
||||
|
@ -1795,12 +1795,12 @@ void QgsLegend::legendLayerZoomNative()
|
||||
if ( layer )
|
||||
{
|
||||
QgsDebugMsg( "Raster units per pixel : " + QString::number( layer->rasterUnitsPerPixel() ) );
|
||||
QgsDebugMsg( "MapUnitsPerPixel before : " + QString::number( mMapCanvas->mapUnitsPerPixel() ) );
|
||||
QgsDebugMsg( "MapUnitsPerPixel before : " + QString::number( mMapCanvas->mapUnitsPerPixel() ) );
|
||||
|
||||
mMapCanvas->zoom( fabs( layer->rasterUnitsPerPixel() / mMapCanvas->mapUnitsPerPixel() ) );
|
||||
mMapCanvas->refresh();
|
||||
|
||||
QgsDebugMsg( "MapUnitsPerPixel after : " + QString::number( mMapCanvas->mapUnitsPerPixel() ) );
|
||||
QgsDebugMsg( "MapUnitsPerPixel after : " + QString::number( mMapCanvas->mapUnitsPerPixel() ) );
|
||||
|
||||
// notify the project we've made a change
|
||||
QgsProject::instance()->dirty( true );
|
||||
|
@ -84,7 +84,7 @@ void usage( std::string const & appName )
|
||||
<< "raster and vector data.\n"
|
||||
<< "Usage: " << appName << " [options] [FILES]\n"
|
||||
<< " options:\n"
|
||||
<< "\t[--snapshot fileName]\temit snapshot of loaded datasets to given file\n"
|
||||
<< "\t[--snapshot filename]\temit snapshot of loaded datasets to given file\n"
|
||||
<< "\t[--lang language]\tuse language for interface text\n"
|
||||
<< "\t[--project projectfile]\tload the given QGIS project\n"
|
||||
<< "\t[--extent xmin,ymin,xmax,ymax]\tset initial map extent\n"
|
||||
@ -583,7 +583,7 @@ int main( int argc, char *argv[] )
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
// autoload any fileNames that were passed in on the command line
|
||||
// autoload any file names that were passed in on the command line
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
QgsDebugMsg( QString( "Number of files in myFileList: %1" ).arg( myFileList.count() ) );
|
||||
for ( QStringList::Iterator myIterator = myFileList.begin(); myIterator != myFileList.end(); ++myIterator )
|
||||
|
@ -1981,7 +1981,7 @@ static void openFilesRememberingFilter_( QString const &filterName,
|
||||
|
||||
|
||||
/**
|
||||
This method prompts the user for a list of vector fileNames with a dialog.
|
||||
This method prompts the user for a list of vector file names with a dialog.
|
||||
*/
|
||||
void QgisApp::addVectorLayer()
|
||||
{
|
||||
@ -2080,7 +2080,7 @@ bool QgisApp::addVectorLayers( QStringList const & theLayerQStringList, const QS
|
||||
|
||||
|
||||
|
||||
/** This helper checks to see whether the fileName appears to be a valid vector file name */
|
||||
/** This helper checks to see whether the file name appears to be a valid vector file name */
|
||||
bool QgisApp::isValidVectorFileName( QString theFileNameQString )
|
||||
{
|
||||
return ( theFileNameQString.toLower().endsWith( ".shp" ) );
|
||||
@ -2879,7 +2879,7 @@ bool QgisApp::fileSave()
|
||||
return false;
|
||||
}
|
||||
|
||||
// if we don't have a fileName, then obviously we need to get one; note
|
||||
// if we don't have a file name, then obviously we need to get one; note
|
||||
// that the project file name is reset to null in fileNew()
|
||||
QFileInfo fullPath;
|
||||
|
||||
@ -2970,7 +2970,7 @@ void QgisApp::fileSaveAs()
|
||||
QString lastUsedDir = settings.value( "/UI/lastProjectDir", "." ).toString();
|
||||
|
||||
auto_ptr<QFileDialog> saveFileDialog( new QFileDialog( this,
|
||||
tr( "Choose a fileName to save the QGIS project file as" ),
|
||||
tr( "Choose a file name to save the QGIS project file as" ),
|
||||
lastUsedDir, QObject::tr( "QGis files (*.qgs)" ) ) );
|
||||
|
||||
saveFileDialog->setFileMode( QFileDialog::AnyFile );
|
||||
@ -2979,7 +2979,7 @@ void QgisApp::fileSaveAs()
|
||||
|
||||
saveFileDialog->setConfirmOverwrite( true );
|
||||
|
||||
// if we don't have a fileName, then obviously we need to get one; note
|
||||
// if we don't have a file name, then obviously we need to get one; note
|
||||
// that the project file name is reset to null in fileNew()
|
||||
QFileInfo fullPath;
|
||||
|
||||
@ -3211,7 +3211,7 @@ void QgisApp::saveMapAsImage()
|
||||
|
||||
//create a file dialog using the the filter list generated above
|
||||
std::auto_ptr < QFileDialog > myQFileDialog( new QFileDialog( this,
|
||||
tr( "Choose a fileName to save the map image as" ),
|
||||
tr( "Choose a file name to save the map image as" ),
|
||||
myLastUsedDir, myFilters ) );
|
||||
|
||||
// allow for selection of more than one file
|
||||
@ -3314,10 +3314,10 @@ void QgisApp::toggleFullScreen()
|
||||
// would otherwise cause two re-renders of the map, which can take a
|
||||
// long time.
|
||||
bool renderFlag = getMapCanvas()->renderFlag();
|
||||
getMapCanvas()->setRenderFlag(false);
|
||||
getMapCanvas()->setRenderFlag( false );
|
||||
showNormal();
|
||||
showMaximized();
|
||||
getMapCanvas()->setRenderFlag(renderFlag);
|
||||
getMapCanvas()->setRenderFlag( renderFlag );
|
||||
mPrevScreenModeMaximized = false;
|
||||
}
|
||||
else
|
||||
|
@ -80,14 +80,14 @@ class QgisApp : public QMainWindow
|
||||
QgsVectorLayer* addVectorLayer( QString vectorLayerPath, QString baseName, QString providerKey );
|
||||
|
||||
/** \brief overloaded vesion of the privat addLayer method that takes a list of
|
||||
* fileNames instead of prompting user with a dialog.
|
||||
* file names instead of prompting user with a dialog.
|
||||
@param enc encoding type for the layer
|
||||
@returns true if successfully added layer
|
||||
*/
|
||||
bool addVectorLayers( QStringList const & theLayerQStringList, const QString& enc );
|
||||
|
||||
/** overloaded vesion of the private addRasterLayer()
|
||||
Method that takes a list of fileNames instead of prompting
|
||||
Method that takes a list of file names instead of prompting
|
||||
user with a dialog.
|
||||
@returns true if successfully added layer(s)
|
||||
*/
|
||||
@ -178,7 +178,7 @@ class QgisApp : public QMainWindow
|
||||
public slots:
|
||||
//! About QGis
|
||||
void about();
|
||||
//! Add a raster layer to the map (will prompt user for fileName using dlg )
|
||||
//! Add a raster layer to the map (will prompt user for file name using dlg )
|
||||
void addRasterLayer();
|
||||
//#ifdef HAVE_POSTGRESQL
|
||||
//! Add a databaselayer to the map
|
||||
@ -452,7 +452,7 @@ class QgisApp : public QMainWindow
|
||||
*/
|
||||
bool addRasterLayer( QgsRasterLayer * theRasterLayer );
|
||||
//@todo We should move these next two into vector layer class
|
||||
/** This helper checks to see whether the fileName appears to be a valid vector file name */
|
||||
/** This helper checks to see whether the file name appears to be a valid vector file name */
|
||||
bool isValidVectorFileName( QString theFileNameQString );
|
||||
/** Overloaded version of the above function provided for convenience that takes a qstring pointer */
|
||||
bool isValidVectorFileName( QString * theFileNameQString );
|
||||
|
@ -46,7 +46,7 @@ void QgsClipboard::replaceWithCopyOf( const QgsFieldMap& fields, QgsFeatureList&
|
||||
|
||||
// Replace the QGis clipboard.
|
||||
mFeatureClipboard = features;
|
||||
QgsDebugMsg( "QgsClipboard::replaceWith: replaced QGis clipboard." );
|
||||
QgsDebugMsg( "replaced QGis clipboard." );
|
||||
|
||||
// Replace the system clipboard.
|
||||
|
||||
@ -76,14 +76,11 @@ void QgsClipboard::replaceWithCopyOf( const QgsFieldMap& fields, QgsFeatureList&
|
||||
else
|
||||
textFields += "NULL";
|
||||
|
||||
#ifdef QGISDEBUG
|
||||
// QgsDebugMsg("QgsClipboard::replaceWithCopyOf: about to traverse fields.");
|
||||
#endif
|
||||
// QgsDebugMsg("about to traverse fields.");
|
||||
//
|
||||
for ( QgsAttributeMap::iterator it2 = attributes.begin(); it2 != attributes.end(); ++it2 )
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
// QgsDebugMsg(QString("QgsClipboard::replaceWithCopyOf: inspecting field '%1'.").arg(it2->toString()));
|
||||
#endif
|
||||
// QgsDebugMsg(QString("inspecting field '%1'.").arg(it2->toString()));
|
||||
textFields += it2->toString();
|
||||
}
|
||||
|
||||
@ -108,14 +105,13 @@ void QgsClipboard::replaceWithCopyOf( const QgsFieldMap& fields, QgsFeatureList&
|
||||
cb->setText( textCopy, QClipboard::Selection );
|
||||
cb->setText( textCopy, QClipboard::Clipboard );
|
||||
|
||||
QgsDebugMsg( QString( "QgsClipboard::replaceWith: replaced system clipboard with: %1." ).arg( textCopy ) );
|
||||
|
||||
QgsDebugMsg( QString( "replaced system clipboard with: %1." ).arg( textCopy ) );
|
||||
}
|
||||
|
||||
QgsFeatureList QgsClipboard::copyOf()
|
||||
{
|
||||
|
||||
QgsDebugMsg( "QgsClipboard::copyOf: returning clipboard." );
|
||||
QgsDebugMsg( "returning clipboard." );
|
||||
|
||||
//TODO: Slurp from the system clipboard as well.
|
||||
|
||||
@ -129,13 +125,13 @@ void QgsClipboard::clear()
|
||||
{
|
||||
mFeatureClipboard.clear();
|
||||
|
||||
QgsDebugMsg( "QgsClipboard::clear: cleared clipboard." );
|
||||
QgsDebugMsg( "cleared clipboard." );
|
||||
}
|
||||
|
||||
void QgsClipboard::insert( QgsFeature& feature )
|
||||
{
|
||||
mFeatureClipboard.push_back( feature );
|
||||
|
||||
QgsDebugMsg( "QgsClipboard::insert: inserted " + feature.geometry()->exportToWkt() );
|
||||
QgsDebugMsg( "inserted " + feature.geometry()->exportToWkt() );
|
||||
}
|
||||
|
||||
|
@ -392,7 +392,7 @@ QString QgsCustomProjectionDialog::getEllipsoidAcronym( QString theEllipsoidName
|
||||
|
||||
void QgsCustomProjectionDialog::on_pbnFirst_clicked()
|
||||
{
|
||||
QgsDebugMsg( "QgsCustomProjectionDialog::on_pbnFirst_clicked()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
sqlite3 *myDatabase;
|
||||
const char *myTail;
|
||||
sqlite3_stmt *myPreparedStatement;
|
||||
@ -460,7 +460,7 @@ void QgsCustomProjectionDialog::on_pbnFirst_clicked()
|
||||
|
||||
void QgsCustomProjectionDialog::on_pbnPrevious_clicked()
|
||||
{
|
||||
QgsDebugMsg( "QgsCustomProjectionDialog::on_pbnPrevious_clicked()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
if ( mCurrentRecordLong <= 1 )
|
||||
{
|
||||
return;
|
||||
@ -533,7 +533,7 @@ void QgsCustomProjectionDialog::on_pbnPrevious_clicked()
|
||||
|
||||
void QgsCustomProjectionDialog::on_pbnNext_clicked()
|
||||
{
|
||||
QgsDebugMsg( "QgsCustomProjectionDialog::on_pbnNext_clicked()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
if ( mCurrentRecordLong >= mRecordCountLong )
|
||||
{
|
||||
return;
|
||||
@ -606,7 +606,7 @@ void QgsCustomProjectionDialog::on_pbnNext_clicked()
|
||||
|
||||
void QgsCustomProjectionDialog::on_pbnLast_clicked()
|
||||
{
|
||||
QgsDebugMsg( "QgsCustomProjectionDialog::on_pbnLast_clicked()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
sqlite3 *myDatabase;
|
||||
const char *myTail;
|
||||
sqlite3_stmt *myPreparedStatement;
|
||||
@ -710,7 +710,7 @@ void QgsCustomProjectionDialog::on_pbnNew_clicked()
|
||||
|
||||
void QgsCustomProjectionDialog::on_pbnSave_clicked()
|
||||
{
|
||||
QgsDebugMsg( "QgsCustomProjectionDialog::on_pbnSave_clicked()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
QString myName = leName->text();
|
||||
QString myParameters = leParameters->text();
|
||||
@ -830,7 +830,7 @@ void QgsCustomProjectionDialog::on_pbnSave_clicked()
|
||||
myResult = sqlite3_open( QgsApplication::qgisUserDbFilePath().toUtf8().data(), &myDatabase );
|
||||
if ( myResult != SQLITE_OK )
|
||||
{
|
||||
QgsDebugMsg( QString( "Can't open database: %1 /n please notify QGIS developers of this error \n %2 (file name) " ).arg( sqlite3_errmsg( myDatabase ) ).arg( QgsApplication::qgisUserDbFilePath() ) );
|
||||
QgsDebugMsg( QString( "Can't open database: %1 \n please notify QGIS developers of this error \n %2 (file name) " ).arg( sqlite3_errmsg( myDatabase ) ).arg( QgsApplication::qgisUserDbFilePath() ) );
|
||||
// XXX This will likely never happen since on open, sqlite creates the
|
||||
// database if it does not exist.
|
||||
assert( myResult == SQLITE_OK );
|
||||
@ -859,7 +859,7 @@ void QgsCustomProjectionDialog::on_pbnSave_clicked()
|
||||
|
||||
void QgsCustomProjectionDialog::on_pbnCalculate_clicked()
|
||||
{
|
||||
QgsDebugMsg( "QgsCustomProjectionDialog::on_pbnCalculate_clicked()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
|
||||
//
|
||||
|
@ -36,7 +36,7 @@ QgsLabelDialog::QgsLabelDialog( QgsLabel *label, QWidget *parent )
|
||||
mFont( "Helvetica" )
|
||||
{
|
||||
setupUi( this );
|
||||
QgsDebugMsg( QString( "%1:%2QgsLabelDialog::QgsLabelDialog()" ).arg( __FILE__ ).arg( __LINE__ ) );
|
||||
QgsDebugMsg( "entering." );
|
||||
|
||||
Q_ASSERT( label );
|
||||
|
||||
@ -53,7 +53,7 @@ QgsLabelDialog::QgsLabelDialog( QgsLabel *label, QWidget *parent )
|
||||
|
||||
void QgsLabelDialog::init( )
|
||||
{
|
||||
QgsDebugMsg( QString( "%1:%2QgsLabelDialog::init()" ).arg( __FILE__ ).arg( __LINE__ ) );
|
||||
QgsDebugMsg( "entering." );
|
||||
QgsLabelAttributes * myLabelAttributes = mLabel->layerAttributes();
|
||||
//populate a string list with all the field names which will be used to set up the
|
||||
//data bound combos
|
||||
@ -248,7 +248,8 @@ void QgsLabelDialog::init( )
|
||||
|
||||
void QgsLabelDialog::changeFont( void )
|
||||
{
|
||||
QgsDebugMsg( "QgsLabelDialog::changeFont()" );
|
||||
QgsDebugMsg( "entering." );
|
||||
|
||||
bool resultFlag;
|
||||
mFont = QFontDialog::getFont( &resultFlag, mFont, this );
|
||||
if ( resultFlag )
|
||||
@ -265,7 +266,8 @@ void QgsLabelDialog::changeFont( void )
|
||||
|
||||
void QgsLabelDialog::changeFontColor( void )
|
||||
{
|
||||
QgsDebugMsg( "QgsLabelDialog::changeFontColor()" );
|
||||
QgsDebugMsg( "entering." );
|
||||
|
||||
mFontColor = QColorDialog::getColor( mFontColor );
|
||||
QPalette palette = lblSample->palette();
|
||||
palette.setColor( lblSample->foregroundRole(), mFontColor );
|
||||
@ -274,7 +276,8 @@ void QgsLabelDialog::changeFontColor( void )
|
||||
|
||||
void QgsLabelDialog::changeBufferColor( void )
|
||||
{
|
||||
QgsDebugMsg( "QgsLabelDialog::changeBufferColor()" );
|
||||
QgsDebugMsg( "entering." );
|
||||
|
||||
mBufferColor = QColorDialog::getColor( mBufferColor );
|
||||
QPalette palette = lblSample->palette();
|
||||
palette.setColor( lblSample->backgroundRole(), mBufferColor );
|
||||
@ -296,12 +299,12 @@ int QgsLabelDialog::itemNoForField( QString theFieldName, QStringList theFieldLi
|
||||
|
||||
QgsLabelDialog::~QgsLabelDialog()
|
||||
{
|
||||
QgsDebugMsg( "QgsLabelDialog::~QgsLabelDialog()" );
|
||||
QgsDebugMsg( "entering." );
|
||||
}
|
||||
|
||||
void QgsLabelDialog::apply()
|
||||
{
|
||||
QgsDebugMsg( "QgsLabelDialog::apply()" );
|
||||
QgsDebugMsg( "entering." );
|
||||
|
||||
//set the label props that are NOT bound to a field in the attributes tbl
|
||||
//All of these are set in the layerAttributes member of the layer
|
||||
|
@ -353,7 +353,7 @@ void QgsMapserverExport::on_btnChooseFile_clicked()
|
||||
{
|
||||
QString s = QFileDialog::getSaveFileName(
|
||||
this,
|
||||
"Choose a fileName for the exported map file",
|
||||
"Choose a file name for the exported map file",
|
||||
"./",
|
||||
"Mapserver files (*.map)" );
|
||||
txtMapFilePath->setText( s );
|
||||
|
@ -111,7 +111,7 @@ void QgsMapToolIdentify::canvasReleaseEvent( QMouseEvent * e )
|
||||
}
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( "QgsMapToolIdentify::canvasReleaseEvent: unknown layer type!" );
|
||||
QgsDebugMsg( "unknown layer type!" );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,7 @@ void QgsMapToolMoveFeature::canvasPressEvent( QMouseEvent * e )
|
||||
|
||||
void QgsMapToolMoveFeature::canvasReleaseEvent( QMouseEvent * e )
|
||||
{
|
||||
//QgsDebugMsg("QgsMapToolMoveFeature::canvasReleaseEvent");
|
||||
//QgsDebugMsg("entering.");
|
||||
if ( !mRubberBand )
|
||||
{
|
||||
return;
|
||||
|
@ -182,7 +182,7 @@ void QgsMeasureTool::canvasReleaseEvent( QMouseEvent * e )
|
||||
|
||||
void QgsMeasureTool::addPoint( QgsPoint &point )
|
||||
{
|
||||
QgsDebugMsg( QString::number( point.x() ) + ", " + QString::number( point.y() ) );
|
||||
QgsDebugMsg( "point=" + point.toString() );
|
||||
|
||||
if ( mWrongProjectProjection )
|
||||
{
|
||||
|
@ -38,7 +38,7 @@ QgsPasteTransformations::QgsPasteTransformations()
|
||||
it != mapLayers.end();
|
||||
++it )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsPasteTransformations::QgsPasteTransformations: QgsMapLayerRegistry has %1." ).arg( it.value()->name() ) );
|
||||
QgsDebugMsg( QString( "QgsMapLayerRegistry has %1." ).arg( it.value()->name() ) );
|
||||
|
||||
// TODO: Test if a VECTOR or DATABASE layer only (not RASTER)
|
||||
|
||||
@ -89,7 +89,7 @@ void QgsPasteTransformations::addNewTransfer()
|
||||
|
||||
void QgsPasteTransformations::sourceChanged( const QString& layerName )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsPasteTransformations::sourceChanged: Source changed to %1." ).arg( layerName ) );
|
||||
QgsDebugMsg( QString( "Source changed to %1." ).arg( layerName ) );
|
||||
|
||||
layerChanged( layerName, &mSourceFields );
|
||||
|
||||
@ -98,7 +98,7 @@ void QgsPasteTransformations::sourceChanged( const QString& layerName )
|
||||
|
||||
void QgsPasteTransformations::destinationChanged( const QString& layerName )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsPasteTransformations::destinationChanged: Destination changed to %1." ).arg( layerName ) );
|
||||
QgsDebugMsg( QString( "Destination changed to %1." ).arg( layerName ) );
|
||||
|
||||
layerChanged( layerName, &mDestinationFields );
|
||||
|
||||
@ -108,7 +108,7 @@ void QgsPasteTransformations::destinationChanged( const QString& layerName )
|
||||
void QgsPasteTransformations::addTransfer( const QString& sourceSelectedFieldName,
|
||||
const QString& destinationSelectedFieldName )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsPasteTransformations::addTransfer: From %1 to %2." ).arg( sourceSelectedFieldName ).arg( destinationSelectedFieldName ) );
|
||||
QgsDebugMsg( QString( "From %1 to %2." ).arg( sourceSelectedFieldName ).arg( destinationSelectedFieldName ) );
|
||||
|
||||
int newRow = gridLayout->rowCount();
|
||||
|
||||
@ -173,7 +173,7 @@ void QgsPasteTransformations::addTransfer( const QString& sourceSelectedFieldNam
|
||||
void QgsPasteTransformations::layerChanged( const QString& layerName, std::vector<QString>* fields )
|
||||
{
|
||||
// Fetch the fields that will be populated into the Transfer rows.
|
||||
QgsDebugMsg( QString( "QgsPasteTransformations::layerChanged: Layer changed to %1." ).arg( layerName ) );
|
||||
QgsDebugMsg( QString( "Layer changed to %1." ).arg( layerName ) );
|
||||
|
||||
/*
|
||||
// XXX What does this code do??? [MD]
|
||||
@ -186,7 +186,7 @@ void QgsPasteTransformations::layerChanged( const QString& layerName, std::vecto
|
||||
it != layerFields.end();
|
||||
++it )
|
||||
{
|
||||
QgsDebugMsg(QString("QgsPasteTransformations::layerChanged: Got field %1.").arg(it->name()));
|
||||
QgsDebugMsg(QString("Got field %1.").arg(it->name()));
|
||||
|
||||
fields->push_back(it->name());
|
||||
}
|
||||
@ -199,7 +199,7 @@ void QgsPasteTransformations::layerChanged( const QString& layerName, std::vecto
|
||||
void QgsPasteTransformations::restoreTransfers( const QString& sourceLayerName,
|
||||
const QString& destinationLayerName )
|
||||
{
|
||||
QgsDebugMsg( "QgsPasteTransformations::restoreTransfers: Entered." );
|
||||
QgsDebugMsg( "entered." );
|
||||
QSettings settings;
|
||||
QString baseKey = "/Qgis/paste-transformations"; // TODO: promote to static member
|
||||
|
||||
@ -210,7 +210,7 @@ void QgsPasteTransformations::restoreTransfers( const QString& sourceLayerName,
|
||||
it != sourceLayers.end();
|
||||
++it )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsPasteTransformations::restoreTransfers: Testing source '%1' with '%2'." ).arg(( *it ) ).arg( sourceLayerName ) );
|
||||
QgsDebugMsg( QString( "testing source '%1' with '%2'." ).arg(( *it ) ).arg( sourceLayerName ) );
|
||||
if (( sourceLayerName == ( *it ) ) )
|
||||
{
|
||||
// Go through destination layers defined for this source layer.
|
||||
@ -220,10 +220,10 @@ void QgsPasteTransformations::restoreTransfers( const QString& sourceLayerName,
|
||||
it2 != destinationLayers.end();
|
||||
++it2 )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsPasteTransformations::restoreTransfers: Testing destination '%1' with '%2'." ).arg(( *it2 ) ).arg( destinationLayerName ) );
|
||||
QgsDebugMsg( QString( "testing destination '%1' with '%2'." ).arg(( *it2 ) ).arg( destinationLayerName ) );
|
||||
if (( destinationLayerName == ( *it2 ) ) )
|
||||
{
|
||||
QgsDebugMsg( "QgsPasteTransformations::restoreTransfers:going through transfers." );
|
||||
QgsDebugMsg( "going through transfers." );
|
||||
// Go through Transfers for this source/destination layer pair.
|
||||
settings.beginGroup( *it2 );
|
||||
QStringList transfers = settings.childKeys();
|
||||
@ -231,7 +231,7 @@ void QgsPasteTransformations::restoreTransfers( const QString& sourceLayerName,
|
||||
it3 != transfers.end();
|
||||
++it3 )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsPasteTransformations::restoreTransfers: setting transfer for %1." ).arg(( *it3 ) ) );
|
||||
QgsDebugMsg( QString( "setting transfer for %1." ).arg(( *it3 ) ) );
|
||||
QString destinationField = settings.value( *it3 ).toString();
|
||||
addTransfer(( *it3 ), destinationField );
|
||||
}
|
||||
@ -253,7 +253,7 @@ QString QgsPasteTransformations::pasteTo( const QString& sourceLayerName,
|
||||
// TODO: Adjust QgsVectorLayer::addFeature to complete the usefulness of this function
|
||||
// TODO: Cache previous results as this will be called once per pasted feature.
|
||||
|
||||
QgsDebugMsg( "QgsPasteTransformations::pasteTo: Entered." );
|
||||
QgsDebugMsg( "entered." );
|
||||
QSettings settings;
|
||||
QString baseKey = "/Qgis/paste-transformations"; // TODO: promote to static member
|
||||
|
||||
@ -265,7 +265,7 @@ QString QgsPasteTransformations::pasteTo( const QString& sourceLayerName,
|
||||
destinationField = sourceFieldName;
|
||||
}
|
||||
|
||||
QgsDebugMsg( QString( "QgsPasteTransformations::pasteTo: Returning '%1'." ).arg( destinationField ) );
|
||||
QgsDebugMsg( QString( "returning '%1'." ).arg( destinationField ) );
|
||||
|
||||
return destinationField;
|
||||
}
|
||||
|
@ -115,14 +115,14 @@ void QgsPluginManager::setTable()
|
||||
void QgsPluginManager::resizeColumnsToContents()
|
||||
{
|
||||
// Resize columns to contents.
|
||||
QgsDebugMsg( "QgsPluginManager::resizeColumnsToContents\n" );
|
||||
QgsDebugMsg( "entered." );
|
||||
}
|
||||
|
||||
void QgsPluginManager::sortModel( int column )
|
||||
{
|
||||
// Sort column ascending.
|
||||
mModelPlugins->sort( column );
|
||||
QgsDebugMsg( "QgsPluginManager::sortModel\n" );
|
||||
QgsDebugMsg( "entered." );
|
||||
}
|
||||
|
||||
void QgsPluginManager::getPythonPluginDescriptions()
|
||||
|
@ -463,15 +463,15 @@ void QgsRasterLayerProperties::setMinimumMaximumEstimateWarning()
|
||||
*/
|
||||
void QgsRasterLayerProperties::sync()
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayerProperties::sync called" );
|
||||
QgsDebugMsg( "called." );
|
||||
cboxShowDebugInfo->hide();
|
||||
|
||||
QgsDebugMsg( "QgsRasterLayerProperties::sync populate symbology tab" );
|
||||
QgsDebugMsg( "sync populate symbology tab" );
|
||||
/*
|
||||
* Symbology Tab
|
||||
*/
|
||||
//decide whether user can change rgb settings
|
||||
QgsDebugMsg( "QgsRasterLayerProperties::sync DrawingStyle = " + QString::number( mRasterLayer->getDrawingStyle() ) );
|
||||
QgsDebugMsg( "DrawingStyle = " + QString::number( mRasterLayer->getDrawingStyle() ) );
|
||||
switch ( mRasterLayer->getDrawingStyle() )
|
||||
{
|
||||
case QgsRasterLayer::SINGLE_BAND_GRAY:
|
||||
@ -583,7 +583,7 @@ void QgsRasterLayerProperties::sync()
|
||||
//
|
||||
// Populate the various controls on the form
|
||||
//
|
||||
QgsDebugMsg( "QgsRasterLayerProperties::sync colorShadingAlgorithm = " + QString::number( mRasterLayer->getColorShadingAlgorithm() ) );
|
||||
QgsDebugMsg( "colorShadingAlgorithm = " + QString::number( mRasterLayer->getColorShadingAlgorithm() ) );
|
||||
if ( mRasterLayer->getDrawingStyle() == QgsRasterLayer::SINGLE_BAND_PSEUDO_COLOR ||
|
||||
mRasterLayer->getDrawingStyle() == QgsRasterLayer::PALETTED_SINGLE_BAND_PSEUDO_COLOR ||
|
||||
mRasterLayer->getDrawingStyle() == QgsRasterLayer::MULTI_BAND_SINGLE_BAND_PSEUDO_COLOR )
|
||||
@ -749,7 +749,7 @@ void QgsRasterLayerProperties::sync()
|
||||
|
||||
|
||||
|
||||
QgsDebugMsg( "QgsRasterLayerProperties::sync populate transparency tab" );
|
||||
QgsDebugMsg( "populate transparency tab" );
|
||||
/*
|
||||
* Transparent Pixel Tab
|
||||
*/
|
||||
@ -784,13 +784,13 @@ void QgsRasterLayerProperties::sync()
|
||||
syncColormapTab();
|
||||
}
|
||||
|
||||
QgsDebugMsg( "QgsRasterLayerProperties::sync populate general tab" );
|
||||
QgsDebugMsg( "populate general tab" );
|
||||
/*
|
||||
* General Tab
|
||||
*/
|
||||
cboxShowDebugInfo->hide();
|
||||
|
||||
//these properties (layerName and label) are provided by the qgsmaplayer superclass
|
||||
//these properties (layer name and label) are provided by the qgsmaplayer superclass
|
||||
leLayerSource->setText( mRasterLayer->source() );
|
||||
leDisplayName->setText( mRasterLayer->name() );
|
||||
|
||||
@ -834,7 +834,7 @@ void QgsRasterLayerProperties::sync()
|
||||
pixmapPalette->setScaledContents( true );
|
||||
pixmapPalette->repaint();
|
||||
|
||||
QgsDebugMsg( "QgsRasterLayerProperties::sync populate metadata tab" );
|
||||
QgsDebugMsg( "populate metadata tab" );
|
||||
/*
|
||||
* Metadata Tab
|
||||
*/
|
||||
@ -847,7 +847,7 @@ void QgsRasterLayerProperties::sync()
|
||||
|
||||
void QgsRasterLayerProperties::syncColormapTab()
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayerProperties::sync populate color ramp tab" );
|
||||
QgsDebugMsg( "populate color ramp tab" );
|
||||
if ( !mRasterLayerIsGdal )
|
||||
{
|
||||
return;
|
||||
@ -953,7 +953,7 @@ bool QgsRasterLayerProperties::validUserDefinedMinMax()
|
||||
*/
|
||||
void QgsRasterLayerProperties::apply()
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayerProperties::apply processing symbology tab" );
|
||||
QgsDebugMsg( "apply processing symbology tab" );
|
||||
/*
|
||||
* Symbology Tab
|
||||
*/
|
||||
@ -968,7 +968,7 @@ void QgsRasterLayerProperties::apply()
|
||||
|
||||
if ( cboxColorMap->currentText() != tr( "Grayscale" ) )
|
||||
{
|
||||
QgsDebugMsg( "Setting Raster Drawing Style to :: SINGLE_BAND_PSEUDO_COLOR" );
|
||||
QgsDebugMsg( "Raster Drawing Style to :: SINGLE_BAND_PSEUDO_COLOR" );
|
||||
|
||||
mRasterLayer->setDrawingStyle( QgsRasterLayer::SINGLE_BAND_PSEUDO_COLOR );
|
||||
}
|
||||
@ -1173,7 +1173,7 @@ void QgsRasterLayerProperties::apply()
|
||||
|
||||
myQSettings.setValue( "/Raster/defaultContrastEnhancementAlgorithm", mDefaultContrastEnhancementAlgorithm );
|
||||
|
||||
QgsDebugMsg( "QgsRasterLayerProperties::apply processing transparency tab" );
|
||||
QgsDebugMsg( "processing transparency tab" );
|
||||
/*
|
||||
* Transparent Pixel Tab
|
||||
*/
|
||||
@ -1367,7 +1367,7 @@ void QgsRasterLayerProperties::apply()
|
||||
mRasterLayer->getRasterTransparency()->setTransparentSingleValuePixelList( myTransparentSingleValuePixelList );
|
||||
}
|
||||
|
||||
QgsDebugMsg( "QgsRasterLayerProperties::apply processing Colormap tab" );
|
||||
QgsDebugMsg( "apply processing Colormap tab" );
|
||||
/*
|
||||
* ColorMap Tab
|
||||
*/
|
||||
@ -1408,11 +1408,11 @@ void QgsRasterLayerProperties::apply()
|
||||
}
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayerProperties::apply color ramp was NOT set because RasterShaderFunction was NULL" );
|
||||
QgsDebugMsg( "color ramp was NOT set because RasterShaderFunction was NULL" );
|
||||
}
|
||||
}
|
||||
|
||||
QgsDebugMsg( "QgsRasterLayerProperties::apply processing general tab" );
|
||||
QgsDebugMsg( "processing general tab" );
|
||||
/*
|
||||
* General Tab
|
||||
*/
|
||||
@ -1832,7 +1832,7 @@ void QgsRasterLayerProperties::on_pbnHistRefresh_clicked()
|
||||
{
|
||||
connect( mRasterLayer, SIGNAL( progressUpdate( int ) ), mHistogramProgress, SLOT( setValue( int ) ) );
|
||||
QApplication::setOverrideCursor( Qt::WaitCursor );
|
||||
QgsDebugMsg( "QgsRasterLayerProperties::on_pbnHistRefresh_clicked" );
|
||||
QgsDebugMsg( "entered." );
|
||||
int myBandCountInt = mRasterLayer->getBandCount();
|
||||
|
||||
// Explanation:
|
||||
@ -2853,7 +2853,7 @@ void QgsRasterLayerProperties::on_pbnLoadStyle_clicked()
|
||||
myFileDialog->setFileMode( QFileDialog::AnyFile );
|
||||
myFileDialog->setAcceptMode( QFileDialog::AcceptOpen );
|
||||
|
||||
//prompt the user for a fileName
|
||||
//prompt the user for a file name
|
||||
QString myFileName;
|
||||
if ( myFileDialog->exec() == QDialog::Accepted )
|
||||
{
|
||||
@ -2868,7 +2868,7 @@ void QgsRasterLayerProperties::on_pbnLoadStyle_clicked()
|
||||
{
|
||||
if ( myFileDialog->selectedFilter() == tr( "QGIS Layer Style File (*.qml)" ) )
|
||||
{
|
||||
//ensure the user never ommitted the extension from the fileName
|
||||
//ensure the user never omitted the extension from the file name
|
||||
if ( !myFileName.toUpper().endsWith( ".QML" ) )
|
||||
{
|
||||
myFileName += ".qml";
|
||||
@ -2919,7 +2919,7 @@ void QgsRasterLayerProperties::on_pbnSaveStyleAs_clicked()
|
||||
myFileDialog->setFileMode( QFileDialog::AnyFile );
|
||||
myFileDialog->setAcceptMode( QFileDialog::AcceptSave );
|
||||
|
||||
//prompt the user for a fileName
|
||||
//prompt the user for a file name
|
||||
QString myOutputFileName;
|
||||
if ( myFileDialog->exec() == QDialog::Accepted )
|
||||
{
|
||||
@ -2934,7 +2934,7 @@ void QgsRasterLayerProperties::on_pbnSaveStyleAs_clicked()
|
||||
{
|
||||
if ( myFileDialog->selectedFilter() == tr( "QGIS Layer Style File (*.qml)" ) )
|
||||
{
|
||||
//ensure the user never ommitted the extension from the fileName
|
||||
//ensure the user never omitted the extension from the file name
|
||||
if ( !myOutputFileName.toUpper().endsWith( ".QML" ) )
|
||||
{
|
||||
myOutputFileName += ".qml";
|
||||
|
@ -59,7 +59,7 @@ QgsSearchQueryBuilder::~QgsSearchQueryBuilder()
|
||||
|
||||
void QgsSearchQueryBuilder::populateFields()
|
||||
{
|
||||
QgsDebugMsg( "QgsSearchQueryBuilder::populateFields" );
|
||||
QgsDebugMsg( "entering." );
|
||||
const QgsFieldMap& fields = mLayer->dataProvider()->fields();
|
||||
for ( QgsFieldMap::const_iterator it = fields.begin(); it != fields.end(); ++it )
|
||||
{
|
||||
@ -73,7 +73,7 @@ void QgsSearchQueryBuilder::populateFields()
|
||||
|
||||
void QgsSearchQueryBuilder::setupListViews()
|
||||
{
|
||||
QgsDebugMsg( "QgsSearchQueryBuilder::setupListViews" );
|
||||
QgsDebugMsg( "entering." );
|
||||
//Models
|
||||
mModelFields = new QStandardItemModel();
|
||||
mModelValues = new QStandardItemModel();
|
||||
|
@ -203,10 +203,7 @@ bool QgsServerSourceSelect::populateLayerList( QgsWmsProvider* wmsProvider )
|
||||
layer != layers.end();
|
||||
layer++ )
|
||||
{
|
||||
|
||||
#ifdef QGISDEBUG
|
||||
// QgsDebugMsg(QString("QgsServerSourceSelect::populateLayerList: got layer name %1 and title '%2'.").arg(layer->name).arg(layer->title));
|
||||
#endif
|
||||
// QgsDebugMsg(QString("got layer name %1 and title '%2'.").arg(layer->name).arg(layer->title));
|
||||
|
||||
layerAndStyleCount++;
|
||||
|
||||
@ -220,7 +217,7 @@ bool QgsServerSourceSelect::populateLayerList( QgsWmsProvider* wmsProvider )
|
||||
// Layer Styles
|
||||
for ( uint j = 0; j < layer->style.size(); j++ )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsServerSourceSelect::populateLayerList: got style name %1 and title '%2'." ).arg( layer->style[j].name ).arg( layer->style[j].title ) );
|
||||
QgsDebugMsg( QString( "got style name %1 and title '%2'." ).arg( layer->style[j].name ).arg( layer->style[j].title ) );
|
||||
|
||||
layerAndStyleCount++;
|
||||
|
||||
@ -271,7 +268,7 @@ void QgsServerSourceSelect::populateImageEncodingGroup( QgsWmsProvider* wmsProvi
|
||||
QList<QByteArray>::const_iterator it = qtImageFormats.begin();
|
||||
while ( it != qtImageFormats.end() )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsServerSourceSelect::populateImageEncodingGroup: can support input of '%1'." ).arg(( *it ).data() ) );
|
||||
QgsDebugMsg( QString( "can support input of '%1'." ).arg(( *it ).data() ) );
|
||||
++it;
|
||||
}
|
||||
|
||||
@ -285,7 +282,7 @@ void QgsServerSourceSelect::populateImageEncodingGroup( QgsWmsProvider* wmsProvi
|
||||
format != formats.end();
|
||||
++format )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsServerSourceSelect::populateImageEncodingGroup: got image format %1." ).arg(( *format ) ) );
|
||||
QgsDebugMsg( QString( "got image format %1." ).arg(( *format ) ) );
|
||||
|
||||
QMap<QString, QPair<QString, int> >::const_iterator iter =
|
||||
m_PotentialFormats.find( *format );
|
||||
@ -324,7 +321,7 @@ void QgsServerSourceSelect::on_btnConnect_clicked()
|
||||
m_connName = cmbConnections->currentText();
|
||||
m_connInfo = connStringParts.join( " " );
|
||||
|
||||
QgsDebugMsg( QString( "QgsServerSourceSelect::serverConnect: Connection info: '%1'." ).arg( m_connInfo ) );
|
||||
QgsDebugMsg( QString( "Connection info: '%1'." ).arg( m_connInfo ) );
|
||||
|
||||
|
||||
// TODO: Create and bind to data provider
|
||||
@ -462,7 +459,7 @@ void QgsServerSourceSelect::on_lstLayers_itemSelectionChanged()
|
||||
lstLayers->findItems( m_selectedStyleIdForLayer[layerName], Qt::MatchRecursive ).first()->setSelected( false );
|
||||
}
|
||||
|
||||
QgsDebugMsg( QString( "QgsServerSourceSelect::addLayers: Added %1" ).arg( item->text( 0 ) ) );
|
||||
QgsDebugMsg( QString( "Added %1" ).arg( item->text( 0 ) ) );
|
||||
|
||||
}
|
||||
|
||||
|
@ -640,7 +640,7 @@ void QgsVectorLayerProperties::on_pbnIndex_clicked()
|
||||
if ( errval )
|
||||
{
|
||||
QMessageBox::information( this, tr( "Spatial Index" ),
|
||||
tr( "Creation of spatial index successfull" ) );
|
||||
tr( "Creation of spatial index successful" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -932,7 +932,7 @@ void QgsVectorLayerProperties::on_pbnLoadStyle_clicked()
|
||||
myFileDialog->setFileMode( QFileDialog::AnyFile );
|
||||
myFileDialog->setAcceptMode( QFileDialog::AcceptOpen );
|
||||
|
||||
//prompt the user for a fileName
|
||||
//prompt the user for a file name
|
||||
QString myFileName;
|
||||
if ( myFileDialog->exec() == QDialog::Accepted )
|
||||
{
|
||||
@ -947,7 +947,7 @@ void QgsVectorLayerProperties::on_pbnLoadStyle_clicked()
|
||||
{
|
||||
if ( myFileDialog->selectedFilter() == tr( "QGIS Layer Style File (*.qml)" ) )
|
||||
{
|
||||
//ensure the user never ommitted the extension from the fileName
|
||||
//ensure the user never omitted the extension from the file name
|
||||
if ( !myFileName.endsWith( ".qml", Qt::CaseInsensitive ) )
|
||||
{
|
||||
myFileName += ".qml";
|
||||
@ -997,7 +997,7 @@ void QgsVectorLayerProperties::on_pbnSaveStyleAs_clicked()
|
||||
myFileDialog->setFileMode( QFileDialog::AnyFile );
|
||||
myFileDialog->setAcceptMode( QFileDialog::AcceptSave );
|
||||
|
||||
//prompt the user for a fileName
|
||||
//prompt the user for a file name
|
||||
QString myOutputFileName;
|
||||
if ( myFileDialog->exec() == QDialog::Accepted )
|
||||
{
|
||||
@ -1014,7 +1014,7 @@ void QgsVectorLayerProperties::on_pbnSaveStyleAs_clicked()
|
||||
{
|
||||
apply(); // make sure the qml to save is uptodate
|
||||
|
||||
//ensure the user never ommitted the extension from the fileName
|
||||
//ensure the user never ommitted the extension from the file name
|
||||
if ( !myOutputFileName.endsWith( ".qml", Qt::CaseInsensitive ) )
|
||||
{
|
||||
myOutputFileName += ".qml";
|
||||
|
@ -61,7 +61,7 @@ QgsComposerItem::~QgsComposerItem()
|
||||
|
||||
void QgsComposerItem::setSelected( bool s )
|
||||
{
|
||||
QgsDebugMsg( "QgsComposerItem::setSelected" );
|
||||
QgsDebugMsg( "entered." );
|
||||
QGraphicsRectItem::setSelected( s );
|
||||
update(); //to draw selection boxes
|
||||
}
|
||||
|
@ -246,7 +246,7 @@ bool QgsCoordinateReferenceSystem::createFromWkt( QString theWkt )
|
||||
|
||||
if ( theWkt.isEmpty() )
|
||||
{
|
||||
QgsDebugMsg( "QgsCoordinateReferenceSystem::createFromWkt -- theWkt is uninitialised, operation failed" )
|
||||
QgsDebugMsg( "theWkt is uninitialised, operation failed" )
|
||||
QgsLogger::critical( "QgsCoordinateReferenceSystem::createFromWkt -- theWkt is uninitialised, operation failed" );
|
||||
return mIsValidFlag;
|
||||
}
|
||||
@ -259,7 +259,6 @@ bool QgsCoordinateReferenceSystem::createFromWkt( QString theWkt )
|
||||
if ( myInputResult != OGRERR_NONE )
|
||||
{
|
||||
QgsDebugMsg( "\n---------------------------------------------------------------" );
|
||||
QgsDebugMsg( "QgsCoordinateReferenceSystem::createFromWkt(QString theWkt) " );
|
||||
QgsDebugMsg( "This CRS could *** NOT *** be set from the supplied WKT " );
|
||||
QgsDebugMsg( "INPUT: " + theWkt );
|
||||
QgsDebugMsg( "---------------------------------------------------------------\n" );
|
||||
@ -355,12 +354,12 @@ bool QgsCoordinateReferenceSystem::createFromProj4( const QString theProj4String
|
||||
/*
|
||||
* - if the above does not match perform a whole text search on proj4 string (if not null)
|
||||
*/
|
||||
QgsDebugMsg( "QgsCoordinateReferenceSystem::createFromProj4 wholetext match on name failed, trying proj4string match" );
|
||||
QgsDebugMsg( "wholetext match on name failed, trying proj4string match" );
|
||||
myRecord = getRecord( "select * from tbl_srs where parameters='" + theProj4String.trimmed() + "'" );
|
||||
if ( !myRecord.empty() )
|
||||
{
|
||||
mySrsId = myRecord["srs_id"].toLong();
|
||||
QgsDebugMsg( "QgsCoordinateReferenceSystem::createFromProj4 proj4string match search for srsid returned srsid: " + QString::number( mySrsId ) );
|
||||
QgsDebugMsg( "proj4string match search for srsid returned srsid: " + QString::number( mySrsId ) );
|
||||
if ( mySrsId > 0 )
|
||||
{
|
||||
createFromSrsId( mySrsId );
|
||||
@ -399,14 +398,14 @@ bool QgsCoordinateReferenceSystem::createFromProj4( const QString theProj4String
|
||||
myStart2 = 0;
|
||||
myStart2 = myLat2RegExp.indexIn( theProj4String, myStart2 );
|
||||
theProj4StringModified.replace( myStart2 + LAT_PREFIX_LEN, myLength2 - LAT_PREFIX_LEN, lat1Str );
|
||||
QgsDebugMsg( "QgsCoordinateReferenceSystem::createFromProj4 - trying proj4string match with swapped lat_1,lat_2" );
|
||||
QgsDebugMsg( "trying proj4string match with swapped lat_1,lat_2" );
|
||||
myRecord = getRecord( "select * from tbl_srs where parameters='" + theProj4StringModified.trimmed() + "'" );
|
||||
if ( !myRecord.empty() )
|
||||
{
|
||||
// Success! We have found the proj string by swapping the lat_1 and lat_2
|
||||
setProj4String( theProj4StringModified );
|
||||
mySrsId = myRecord["srs_id"].toLong();
|
||||
QgsDebugMsg( "QgsCoordinateReferenceSystem::createFromProj4 proj4string match search for srsid returned srsid: " + QString::number( mySrsId ) );
|
||||
QgsDebugMsg( "proj4string match search for srsid returned srsid: " + QString::number( mySrsId ) );
|
||||
if ( mySrsId > 0 )
|
||||
{
|
||||
createFromSrsId( mySrsId );
|
||||
@ -416,9 +415,9 @@ bool QgsCoordinateReferenceSystem::createFromProj4( const QString theProj4String
|
||||
else
|
||||
{
|
||||
// Last ditch attempt to piece together what we know of the projection to find a match...
|
||||
QgsDebugMsg( "QgsCoordinateReferenceSystem::createFromProj4 globbing search for srsid from this proj string" );
|
||||
QgsDebugMsg( "globbing search for srsid from this proj string" );
|
||||
mySrsId = findMatchingProj();
|
||||
QgsDebugMsg( "QgsCoordinateReferenceSystem::createFromProj4 globbing search for srsid returned srsid: " + QString::number( mySrsId ) );
|
||||
QgsDebugMsg( "globbing search for srsid returned srsid: " + QString::number( mySrsId ) );
|
||||
if ( mySrsId > 0 )
|
||||
{
|
||||
createFromSrsId( mySrsId );
|
||||
@ -441,13 +440,13 @@ QgsCoordinateReferenceSystem::RecordMap QgsCoordinateReferenceSystem::getRecord(
|
||||
sqlite3_stmt *myPreparedStatement;
|
||||
int myResult;
|
||||
|
||||
QgsDebugMsg( "QgsCoordinateReferenceSystem::getRecord...running query: " + theSql );
|
||||
QgsDebugMsg( "running query: " + theSql );
|
||||
// Get the full path name to the sqlite3 spatial reference database.
|
||||
myDatabaseFileName = QgsApplication::srsDbFilePath();
|
||||
QFileInfo myInfo( myDatabaseFileName );
|
||||
if ( !myInfo.exists() )
|
||||
{
|
||||
QgsDebugMsg( "QgsCoordinateReferenceSystem::createFromSrid failed : " + myDatabaseFileName +
|
||||
QgsDebugMsg( "failed : " + myDatabaseFileName +
|
||||
" does not exist!" );
|
||||
return myMap;
|
||||
}
|
||||
@ -463,7 +462,7 @@ QgsCoordinateReferenceSystem::RecordMap QgsCoordinateReferenceSystem::getRecord(
|
||||
// XXX Need to free memory from the error msg if one is set
|
||||
if ( myResult == SQLITE_OK && sqlite3_step( myPreparedStatement ) == SQLITE_ROW )
|
||||
{
|
||||
QgsDebugMsg( "QgsCoordinateReferenceSystem::getRecord...trying system srs.db" );
|
||||
QgsDebugMsg( "trying system srs.db" );
|
||||
int myColumnCount = sqlite3_column_count( myPreparedStatement );
|
||||
//loop through each column in the record adding its field name and vvalue to the map
|
||||
for ( int myColNo = 0;myColNo < myColumnCount;myColNo++ )
|
||||
@ -475,7 +474,7 @@ QgsCoordinateReferenceSystem::RecordMap QgsCoordinateReferenceSystem::getRecord(
|
||||
}
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( "QgsCoordinateReferenceSystem::getRecord...trying system qgis.db" );
|
||||
QgsDebugMsg( "trying system qgis.db" );
|
||||
sqlite3_finalize( myPreparedStatement );
|
||||
sqlite3_close( myDatabase );
|
||||
|
||||
@ -518,7 +517,7 @@ QgsCoordinateReferenceSystem::RecordMap QgsCoordinateReferenceSystem::getRecord(
|
||||
sqlite3_close( myDatabase );
|
||||
|
||||
#ifdef QGISDEBUG
|
||||
QgsDebugMsg( "QgsCoordinateReferenceSystem::getRecord retrieved: " + theSql );
|
||||
QgsDebugMsg( "retrieved: " + theSql );
|
||||
RecordMap::Iterator it;
|
||||
for ( it = myMap.begin(); it != myMap.end(); ++it )
|
||||
{
|
||||
@ -750,7 +749,7 @@ void QgsCoordinateReferenceSystem::setMapUnits()
|
||||
*/
|
||||
long QgsCoordinateReferenceSystem::findMatchingProj()
|
||||
{
|
||||
QgsDebugMsg( "QgsCoordinateReferenceSystem::findMatchingProj..." );
|
||||
QgsDebugMsg( "entered." );
|
||||
if ( mEllipsoidAcronym.isNull() || mProjectionAcronym.isNull() || !mIsValidFlag )
|
||||
{
|
||||
QgsLogger::warning( "QgsCoordinateReferenceSystem::findMatchingProj will only work if prj acr ellipsoid acr and proj4string are set!..." );
|
||||
@ -786,7 +785,7 @@ long QgsCoordinateReferenceSystem::findMatchingProj()
|
||||
QString myProj4String = QString::fromUtf8(( char * )sqlite3_column_text( myPreparedStatement, 1 ) );
|
||||
if ( equals( myProj4String ) )
|
||||
{
|
||||
QgsDebugMsg( "QgsCoordinateReferenceSystem::findMatchingProj -------> MATCH FOUND in srs.db srsid: " + mySrsId );
|
||||
QgsDebugMsg( "-------> MATCH FOUND in srs.db srsid: " + mySrsId );
|
||||
// close the sqlite3 statement
|
||||
sqlite3_finalize( myPreparedStatement );
|
||||
sqlite3_close( myDatabase );
|
||||
@ -826,7 +825,7 @@ long QgsCoordinateReferenceSystem::findMatchingProj()
|
||||
QString myProj4String = QString::fromUtf8(( char * )sqlite3_column_text( myPreparedStatement, 1 ) );
|
||||
if ( equals( myProj4String ) )
|
||||
{
|
||||
QgsDebugMsg( "QgsCoordinateReferenceSystem::findMatchingProj -------> MATCH FOUND in user qgis.db srsid: " + mySrsId );
|
||||
QgsDebugMsg( "-------> MATCH FOUND in user qgis.db srsid: " + mySrsId );
|
||||
// close the sqlite3 statement
|
||||
sqlite3_finalize( myPreparedStatement );
|
||||
sqlite3_close( myDatabase );
|
||||
@ -1019,9 +1018,9 @@ QString QgsCoordinateReferenceSystem::getProj4FromSrsId( const int theSrsId )
|
||||
QString mySql = "select parameters from tbl_srs where srs_id = ";
|
||||
mySql += QString::number( theSrsId );
|
||||
|
||||
QgsDebugMsg( "QgsCoordinateReferenceSystem::getProj4FromSrsId : mySrsId = " + QString::number( theSrsId ) );
|
||||
QgsDebugMsg( "QgsCoordinateReferenceSystem::getProj4FromSrsId : USER_PROJECTION_START_ID = " + QString::number( USER_PROJECTION_START_ID ) );
|
||||
QgsDebugMsg( "QgsCoordinateReferenceSystem::getProj4FromSrsId :Selection sql : " + mySql );
|
||||
QgsDebugMsg( "mySrsId = " + QString::number( theSrsId ) );
|
||||
QgsDebugMsg( "USER_PROJECTION_START_ID = " + QString::number( USER_PROJECTION_START_ID ) );
|
||||
QgsDebugMsg( "Selection sql : " + mySql );
|
||||
|
||||
//
|
||||
// Determine if this is a user projection or a system on
|
||||
@ -1042,7 +1041,7 @@ QString QgsCoordinateReferenceSystem::getProj4FromSrsId( const int theSrsId )
|
||||
{
|
||||
myDatabaseFileName = QgsApplication::srsDbFilePath();
|
||||
}
|
||||
QgsDebugMsg( "QgsCoordinateReferenceSystem::getProj4FromSrsId db = " + myDatabaseFileName );
|
||||
QgsDebugMsg( "db = " + myDatabaseFileName );
|
||||
|
||||
sqlite3 *db;
|
||||
int rc;
|
||||
@ -1076,7 +1075,7 @@ QString QgsCoordinateReferenceSystem::getProj4FromSrsId( const int theSrsId )
|
||||
|
||||
int QgsCoordinateReferenceSystem::openDb( QString path, sqlite3 **db )
|
||||
{
|
||||
QgsDebugMsg( "QgsCoordinateReferenceSystem::openDb path = " + path );
|
||||
QgsDebugMsg( "path = " + path );
|
||||
int myResult = sqlite3_open( path.toUtf8().data(), db );
|
||||
|
||||
if ( myResult )
|
||||
|
@ -106,7 +106,7 @@ void QgsCoordinateTransform::setSourceCRS( const QgsCoordinateReferenceSystem& t
|
||||
}
|
||||
void QgsCoordinateTransform::setDestCRS( const QgsCoordinateReferenceSystem& theCRS )
|
||||
{
|
||||
QgsDebugMsg( "QgsCoordinateTransform::setDestCRS called" );
|
||||
QgsDebugMsg( "entered." );
|
||||
mDestCRS = theCRS;
|
||||
initialise();
|
||||
}
|
||||
@ -115,7 +115,7 @@ void QgsCoordinateTransform::setDestCRS( const QgsCoordinateReferenceSystem& the
|
||||
void QgsCoordinateTransform::setDestCRSID( long theCRSID )
|
||||
{
|
||||
//!todo Add some logic here to determine if the srsid is a system or user one
|
||||
QgsDebugMsg( "QgsCoordinateTransform::setDestCRSID slot called" );
|
||||
QgsDebugMsg( "entered." );
|
||||
mDestCRS.createFromSrsId( theCRSID );
|
||||
initialise();
|
||||
}
|
||||
@ -165,7 +165,6 @@ void QgsCoordinateTransform::initialise()
|
||||
if ( mInitialisedFlag )
|
||||
{
|
||||
QgsDebugMsg( "------------------------------------------------------------" );
|
||||
QgsDebugMsg( "QgsCoordinateTransform::initialise()" );
|
||||
QgsDebugMsg( "The OGR Coordinate transformation for this layer was set to" );
|
||||
QgsLogger::debug<QgsCoordinateReferenceSystem>( "Input", mSourceCRS, __FILE__, __FUNCTION__, __LINE__ );
|
||||
QgsLogger::debug<QgsCoordinateReferenceSystem>( "Output", mDestCRS, __FILE__, __FUNCTION__, __LINE__ );
|
||||
|
@ -3419,7 +3419,7 @@ bool QgsGeometry::contains( QgsPoint* p )
|
||||
|
||||
QString QgsGeometry::exportToWkt()
|
||||
{
|
||||
QgsDebugMsg( "QgsGeometry::exportToWkt: entered" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
// TODO: implement with GEOS
|
||||
if ( mDirtyWkb )
|
||||
@ -3462,7 +3462,7 @@ QString QgsGeometry::exportToWkt()
|
||||
hasZValue = true;
|
||||
case QGis::WKBLineString:
|
||||
{
|
||||
QgsDebugMsg( "QgsGeometry::exportToWkt: LINESTRING found" );
|
||||
QgsDebugMsg( "LINESTRING found" );
|
||||
unsigned char *ptr;
|
||||
int *nPoints;
|
||||
int idx;
|
||||
@ -3498,7 +3498,7 @@ QString QgsGeometry::exportToWkt()
|
||||
hasZValue = true;
|
||||
case QGis::WKBPolygon:
|
||||
{
|
||||
QgsDebugMsg( "QgsGeometry::exportToWkt: POLYGON found" );
|
||||
QgsDebugMsg( "POLYGON found" );
|
||||
unsigned char *ptr;
|
||||
int idx, jdx;
|
||||
int *numRings, *nPoints;
|
||||
@ -3591,7 +3591,7 @@ QString QgsGeometry::exportToWkt()
|
||||
hasZValue = true;
|
||||
case QGis::WKBMultiLineString:
|
||||
{
|
||||
QgsDebugMsg( "QgsGeometry::exportToWkt: MULTILINESTRING found" );
|
||||
QgsDebugMsg( "MULTILINESTRING found" );
|
||||
unsigned char *ptr;
|
||||
int idx, jdx, numLineStrings;
|
||||
int *nPoints;
|
||||
@ -3637,7 +3637,7 @@ QString QgsGeometry::exportToWkt()
|
||||
hasZValue = true;
|
||||
case QGis::WKBMultiPolygon:
|
||||
{
|
||||
QgsDebugMsg( "QgsGeometry::exportToWkt: MULTIPOLYGON found" );
|
||||
QgsDebugMsg( "MULTIPOLYGON found" );
|
||||
unsigned char *ptr;
|
||||
int idx, jdx, kdx;
|
||||
int *numPolygons, *numRings, *nPoints;
|
||||
@ -3699,7 +3699,7 @@ QString QgsGeometry::exportToWkt()
|
||||
|
||||
bool QgsGeometry::exportWkbToGeos()
|
||||
{
|
||||
QgsDebugMsgLevel( "QgsGeometry::exportWkbToGeos: entered.", 3 );
|
||||
QgsDebugMsgLevel( "entered.", 3 );
|
||||
|
||||
if ( !mDirtyGeos )
|
||||
{
|
||||
@ -3782,7 +3782,7 @@ bool QgsGeometry::exportWkbToGeos()
|
||||
hasZValue = true;
|
||||
case QGis::WKBLineString:
|
||||
{
|
||||
QgsDebugMsg( "QgsGeometry::geosGeometry: Linestring found" );
|
||||
QgsDebugMsg( "Linestring found" );
|
||||
|
||||
QgsPolyline sequence;
|
||||
|
||||
@ -3950,7 +3950,7 @@ bool QgsGeometry::exportWkbToGeos()
|
||||
|
||||
bool QgsGeometry::exportGeosToWkb()
|
||||
{
|
||||
//QgsDebugMsg("QgsGeometry::exportGeosToWkb: entered.");
|
||||
//QgsDebugMsg("entered.");
|
||||
if ( !mDirtyWkb )
|
||||
{
|
||||
// No need to convert again
|
||||
@ -4390,9 +4390,7 @@ double QgsGeometry::distanceSquaredPointToSegment(
|
||||
double segmentsqrdist = ( *x2 - *x1 ) * ( *x2 - *x1 ) +
|
||||
( *y2 - *y1 ) * ( *y2 - *y1 );
|
||||
|
||||
#ifdef QGISDEBUG
|
||||
// QgsDebugMsg(QString("QgsGeometry::distanceSquaredPointToSegment: Entered with (%1, %2) (%3, %4) %5.").arg(*x1).arg(*y1).arg(*x2).arg(*y2).arg(segmentsqrdist));
|
||||
#endif
|
||||
// QgsDebugMsg(QString("Entered with (%1, %2) (%3, %4) %5.").arg(*x1).arg(*y1).arg(*x2).arg(*y2).arg(segmentsqrdist));
|
||||
|
||||
|
||||
if ( segmentsqrdist == 0.0 )
|
||||
|
@ -46,17 +46,17 @@ QgsHttpTransaction::QgsHttpTransaction( QString uri,
|
||||
mError( 0 )
|
||||
{
|
||||
|
||||
QgsDebugMsg( "QgsHttpTransaction: constructing." );
|
||||
QgsDebugMsg( " QgsHttpTransaction: proxyHost = " + proxyHost + "." );
|
||||
QgsDebugMsg( " QgsHttpTransaction: proxyPort = " + QString::number( proxyPort ) + "." );
|
||||
QgsDebugMsg( " QgsHttpTransaction: proxyUser = " + proxyUser + "." );
|
||||
QgsDebugMsg( " QgsHttpTransaction: proxyPass = " + proxyPass + "." );
|
||||
QgsDebugMsg( "QgsHttpTransaction: exiting constructor." );
|
||||
QgsDebugMsg( "constructing." );
|
||||
QgsDebugMsg( " proxyHost = " + proxyHost + "." );
|
||||
QgsDebugMsg( " proxyPort = " + QString::number( proxyPort ) + "." );
|
||||
QgsDebugMsg( " proxyUser = " + proxyUser + "." );
|
||||
QgsDebugMsg( " proxyPass = " + proxyPass + "." );
|
||||
QgsDebugMsg( "exiting constructor." );
|
||||
}
|
||||
|
||||
QgsHttpTransaction::~QgsHttpTransaction()
|
||||
{
|
||||
QgsDebugMsg( "QgsHttpTransaction: deconstructing." );
|
||||
QgsDebugMsg( "deconstructing." );
|
||||
}
|
||||
|
||||
|
||||
@ -72,8 +72,8 @@ bool QgsHttpTransaction::getSynchronously( QByteArray &respondedContent, int red
|
||||
|
||||
httpredirections = redirections;
|
||||
|
||||
QgsDebugMsg( "QgsHttpTransaction::getSynchronously: Entered." );
|
||||
QgsDebugMsg( "QgsHttpTransaction::getSynchronously: Using '" + httpurl + "'." );
|
||||
QgsDebugMsg( "Entered." );
|
||||
QgsDebugMsg( "Using '" + httpurl + "'." );
|
||||
|
||||
QUrl qurl( httpurl );
|
||||
|
||||
@ -96,7 +96,7 @@ bool QgsHttpTransaction::getSynchronously( QByteArray &respondedContent, int red
|
||||
|
||||
mWatchdogTimer = new QTimer( this );
|
||||
|
||||
QgsDebugMsg( "QgsHttpTransaction::getSynchronously: qurl.host() is '" + qurl.host() + "'." );
|
||||
QgsDebugMsg( "qurl.host() is '" + qurl.host() + "'." );
|
||||
|
||||
httpresponse.truncate( 0 );
|
||||
|
||||
@ -144,8 +144,8 @@ bool QgsHttpTransaction::getSynchronously( QByteArray &respondedContent, int red
|
||||
mWatchdogTimer->setSingleShot( TRUE );
|
||||
mWatchdogTimer->start( NETWORK_TIMEOUT_MSEC );
|
||||
|
||||
QgsDebugMsg( "QgsHttpTransaction::getSynchronously: Starting get with id " + QString::number( httpid ) + "." );
|
||||
QgsDebugMsg( "QgsHttpTransaction::getSynchronously: Setting httpactive = TRUE" );
|
||||
QgsDebugMsg( "Starting get with id " + QString::number( httpid ) + "." );
|
||||
QgsDebugMsg( "Setting httpactive = TRUE" );
|
||||
|
||||
httpactive = TRUE;
|
||||
|
||||
@ -156,11 +156,11 @@ bool QgsHttpTransaction::getSynchronously( QByteArray &respondedContent, int red
|
||||
qApp->processEvents();
|
||||
}
|
||||
|
||||
#ifdef QGISDEBUG
|
||||
QgsDebugMsg( "QgsHttpTransaction::getSynchronously: Response received." );
|
||||
QgsDebugMsg( "Response received." );
|
||||
|
||||
#ifdef QGISDEBUG
|
||||
// QString httpresponsestring(httpresponse);
|
||||
// QgsDebugMsg("QgsHttpTransaction::getSynchronously: Response received; being '" + httpresponsestring + "'.");
|
||||
// QgsDebugMsg("Response received; being '" + httpresponsestring + "'.");
|
||||
#endif
|
||||
|
||||
delete http;
|
||||
@ -168,7 +168,7 @@ bool QgsHttpTransaction::getSynchronously( QByteArray &respondedContent, int red
|
||||
// Did we get an error? If so, bail early
|
||||
if ( !mError.isNull() )
|
||||
{
|
||||
QgsDebugMsg( "QgsHttpTransaction::getSynchronously: Processing an error '" + mError + "'." );
|
||||
QgsDebugMsg( "Processing an error '" + mError + "'." );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -177,7 +177,7 @@ bool QgsHttpTransaction::getSynchronously( QByteArray &respondedContent, int red
|
||||
// TODO detect any redirection loops
|
||||
if ( !httpredirecturl.isEmpty() )
|
||||
{
|
||||
QgsDebugMsg( "QgsHttpTransaction::getSynchronously: Starting get of '" + httpredirecturl + "'." );
|
||||
QgsDebugMsg( "Starting get of '" + httpredirecturl + "'." );
|
||||
|
||||
QgsHttpTransaction httprecurse( httpredirecturl, httphost, httpport );
|
||||
|
||||
@ -206,13 +206,13 @@ QString QgsHttpTransaction::responseContentType()
|
||||
|
||||
void QgsHttpTransaction::dataStarted( int id )
|
||||
{
|
||||
QgsDebugMsg( "QgsHttpTransaction::dataStarted with ID " + QString::number( id ) + "." );
|
||||
QgsDebugMsg( "ID=" + QString::number( id ) + "." );
|
||||
}
|
||||
|
||||
|
||||
void QgsHttpTransaction::dataHeaderReceived( const QHttpResponseHeader& resp )
|
||||
{
|
||||
QgsDebugMsg( "QgsHttpTransaction::dataHeaderReceived: statuscode " +
|
||||
QgsDebugMsg( "statuscode " +
|
||||
QString::number( resp.statusCode() ) + ", reason '" + resp.reasonPhrase() + "', content type: '" +
|
||||
resp.value( "Content-Type" ) + "'." );
|
||||
|
||||
@ -245,23 +245,23 @@ void QgsHttpTransaction::dataReceived( const QHttpResponseHeader& resp )
|
||||
{
|
||||
// TODO: Match 'resp' with 'http' if we move to multiple http connections
|
||||
|
||||
/* Comment this out for now - leave the coding of progressive rendering to another day.
|
||||
#if 0
|
||||
// Comment this out for now - leave the coding of progressive rendering to another day.
|
||||
char* temp;
|
||||
|
||||
if ( 0 < http->readBlock( temp, http->bytesAvailable() ) )
|
||||
if ( 0 < http->readBlock( temp, http->bytesAvailable() ) )
|
||||
{
|
||||
httpresponse.append(temp);
|
||||
httpresponse.append( temp );
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
|
||||
// QgsDebugMsg("QgsHttpTransaction::dataReceived.");
|
||||
// QgsDebugMsg("QgsHttpTransaction::dataReceived: received '" + data + "'.");
|
||||
// QgsDebugMsg("received '" + data + "'.");
|
||||
}
|
||||
|
||||
|
||||
void QgsHttpTransaction::dataProgress( int done, int total )
|
||||
{
|
||||
// QgsDebugMsg("QgsHttpTransaction::dataProgress: got " + QString::number(done) + " of " + QString::number(total));
|
||||
// QgsDebugMsg("got " + QString::number(done) + " of " + QString::number(total));
|
||||
|
||||
// We saw something come back, therefore restart the watchdog timer
|
||||
mWatchdogTimer->start( NETWORK_TIMEOUT_MSEC );
|
||||
@ -288,7 +288,7 @@ void QgsHttpTransaction::dataFinished( int id, bool error )
|
||||
{
|
||||
|
||||
#ifdef QGISDEBUG
|
||||
QgsDebugMsg( "QgsHttpTransaction::dataFinished with ID " + QString::number( id ) + "." );
|
||||
QgsDebugMsg( "ID=" + QString::number( id ) + "." );
|
||||
|
||||
// The signal that this slot is connected to, QHttp::requestFinished,
|
||||
// appears to get called at the destruction of the QHttp if it is
|
||||
@ -301,35 +301,34 @@ void QgsHttpTransaction::dataFinished( int id, bool error )
|
||||
// not overwritten (it should rightfully refer to the timeout event).
|
||||
if ( !httpactive )
|
||||
{
|
||||
QgsDebugMsg( "QgsHttpTransaction::dataFinished - http activity loop already FALSE." );
|
||||
QgsDebugMsg( "http activity loop already FALSE." );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( error )
|
||||
{
|
||||
QgsDebugMsg( "QgsHttpTransaction::dataFinished - however there was an error." );
|
||||
QgsDebugMsg( "QgsHttpTransaction::dataFinished - " + http->errorString() );
|
||||
QgsDebugMsg( "however there was an error." );
|
||||
QgsDebugMsg( "error: " + http->errorString() );
|
||||
|
||||
mError = QString( tr( "HTTP response completed, however there was an error: %1" ) )
|
||||
.arg( http->errorString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( "QgsHttpTransaction::dataFinished - no error." );
|
||||
QgsDebugMsg( "no error." );
|
||||
}
|
||||
#endif
|
||||
|
||||
// Don't do this here as the request could have simply been
|
||||
// to set the hostname - see transactionFinished() instead
|
||||
|
||||
// // TODO
|
||||
// httpresponse = http->readAll();
|
||||
//
|
||||
// #ifdef QGISDEBUG
|
||||
// QgsDebugMsg("QgsHttpTransaction::getSynchronously: Setting httpactive = FALSE");
|
||||
// #endif
|
||||
// httpactive = FALSE;
|
||||
#if 0
|
||||
// TODO
|
||||
httpresponse = http->readAll();
|
||||
|
||||
// QgsDebugMsg("Setting httpactive = FALSE");
|
||||
httpactive = FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -337,48 +336,50 @@ void QgsHttpTransaction::transactionFinished( bool error )
|
||||
{
|
||||
|
||||
#ifdef QGISDEBUG
|
||||
QgsDebugMsg( "QgsHttpTransaction::transactionFinished." );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
// // The signal that this slot is connected to, QHttp::requestFinished,
|
||||
// // appears to get called at the destruction of the QHttp if it is
|
||||
// // still working at the time of the destruction.
|
||||
// //
|
||||
// // This situation may occur when we've detected a timeout and
|
||||
// // we already set httpactive = FALSE.
|
||||
// //
|
||||
// // We have to detect this special case so that the last known error string is
|
||||
// // not overwritten (it should rightfully refer to the timeout event).
|
||||
// if (!httpactive)
|
||||
// {
|
||||
// QgsDebugMsg("QgsHttpTransaction::dataFinished - http activity loop already FALSE.");
|
||||
// return;
|
||||
// }
|
||||
#if 0
|
||||
// The signal that this slot is connected to, QHttp::requestFinished,
|
||||
// appears to get called at the destruction of the QHttp if it is
|
||||
// still working at the time of the destruction.
|
||||
//
|
||||
// This situation may occur when we've detected a timeout and
|
||||
// we already set httpactive = FALSE.
|
||||
//
|
||||
// We have to detect this special case so that the last known error string is
|
||||
// not overwritten (it should rightfully refer to the timeout event).
|
||||
if ( !httpactive )
|
||||
{
|
||||
// QgsDebugMsg("http activity loop already FALSE.");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( error )
|
||||
{
|
||||
QgsDebugMsg( "QgsHttpTransaction::transactionFinished - however there was an error." );
|
||||
QgsDebugMsg( "QgsHttpTransaction::transactionFinished - " + http->errorString() );
|
||||
QgsDebugMsg( "however there was an error." );
|
||||
QgsDebugMsg( "error: " + http->errorString() );
|
||||
|
||||
mError = QString( tr( "HTTP transaction completed, however there was an error: %1" ) )
|
||||
.arg( http->errorString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( "QgsHttpTransaction::transactionFinished - no error." );
|
||||
QgsDebugMsg( "no error." );
|
||||
}
|
||||
#endif
|
||||
|
||||
// TODO
|
||||
httpresponse = http->readAll();
|
||||
|
||||
QgsDebugMsg( "QgsHttpTransaction::getSynchronously: Setting httpactive = FALSE" );
|
||||
QgsDebugMsg( "Setting httpactive = FALSE" );
|
||||
httpactive = FALSE;
|
||||
}
|
||||
|
||||
|
||||
void QgsHttpTransaction::dataStateChanged( int state )
|
||||
{
|
||||
QgsDebugMsg( "QgsHttpTransaction::dataStateChanged to " + QString::number( state ) + "." );
|
||||
QgsDebugMsg( "state " + QString::number( state ) + "." );
|
||||
|
||||
// We saw something come back, therefore restart the watchdog timer
|
||||
mWatchdogTimer->start( NETWORK_TIMEOUT_MSEC );
|
||||
@ -435,15 +436,15 @@ void QgsHttpTransaction::dataStateChanged( int state )
|
||||
|
||||
void QgsHttpTransaction::networkTimedOut()
|
||||
{
|
||||
QgsDebugMsg( "QgsHttpTransaction::networkTimedOut: entering." );
|
||||
QgsDebugMsg( "entering." );
|
||||
|
||||
mError = QString( tr( "Network timed out after %1 seconds of inactivity.\n"
|
||||
"This may be a problem in your network connection or at the WMS server.", "", NETWORK_TIMEOUT_MSEC / 1000 )
|
||||
).arg( NETWORK_TIMEOUT_MSEC / 1000 );
|
||||
|
||||
QgsDebugMsg( "QgsHttpTransaction::getSynchronously: Setting httpactive = FALSE" );
|
||||
QgsDebugMsg( "Setting httpactive = FALSE" );
|
||||
httpactive = FALSE;
|
||||
QgsDebugMsg( "QgsHttpTransaction::networkTimedOut: exiting." );
|
||||
QgsDebugMsg( "exiting." );
|
||||
}
|
||||
|
||||
|
||||
|
@ -374,8 +374,7 @@ void QgsLabel::renderLabel( QPainter* painter, QgsPoint point,
|
||||
catch ( QgsCsException &cse )
|
||||
{
|
||||
Q_UNUSED( cse ); // unused otherwise
|
||||
QgsDebugMsg( "Caught transform error in QgsLabel::renderLabel(). "
|
||||
"Skipping rendering this label" );
|
||||
QgsDebugMsg( "Caught transform error. Skipping rendering this label" );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -424,7 +424,7 @@ int QgsLabelAttributes::unitsCode( const QString &name )
|
||||
/* alignment */
|
||||
QString QgsLabelAttributes::alignmentName( int alignment )
|
||||
{
|
||||
QgsDebugMsg( QString( "QString QgsLabelAttributes::alignmentName (%1)" ).arg( alignment ) );
|
||||
QgsDebugMsg( QString( "alignment=%1" ).arg( alignment ) );
|
||||
if ( !alignment ) return QString( "center" );
|
||||
if ( alignment == ( Qt::AlignRight | Qt::AlignBottom ) ) return QString( "aboveleft" );
|
||||
if ( alignment == ( Qt::AlignRight | Qt::AlignTop ) ) return QString( "belowleft" );
|
||||
|
@ -39,7 +39,7 @@
|
||||
* If the debug level of a message is <= QGIS_DEBUG, the message is written to the
|
||||
* console. It the variable QGIS_DEBUG is not defined, it defaults to 1 for debug
|
||||
* mode and to 0 for release mode
|
||||
* QGIS_DEBUG_FILE may contain a fileName. Only the messages from this file are
|
||||
* QGIS_DEBUG_FILE may contain a file name. Only the messages from this file are
|
||||
* printed (provided they have the right debuglevel). If QGIS_DEBUG_FILE is not
|
||||
* set, messages from all files are printed
|
||||
*/
|
||||
@ -51,7 +51,7 @@ class CORE_EXPORT QgsLogger
|
||||
/**Goes to qDebug.
|
||||
@param msg the message to be printed
|
||||
@param debuglevel
|
||||
@param file fileName where the message comes from
|
||||
@param file file name where the message comes from
|
||||
@param function function where the message comes from
|
||||
@param line place in file where the message comes from*/
|
||||
static void debug( const QString& msg, int debuglevel = 1, const char* file = NULL, const char* function = NULL, int line = -1 );
|
||||
|
@ -50,13 +50,13 @@ QgsMapLayer::QgsMapLayer( int type,
|
||||
mLayerType( type )
|
||||
|
||||
{
|
||||
QgsDebugMsg( "QgsMapLayer::QgsMapLayer - lyrname is '" + lyrname + "'" );
|
||||
QgsDebugMsg( "lyrname is '" + lyrname + "'" );
|
||||
|
||||
mCRS = new QgsCoordinateReferenceSystem();
|
||||
|
||||
// Set the display name = internal name
|
||||
mLayerName = capitaliseLayerName( lyrname );
|
||||
QgsDebugMsg( "QgsMapLayer::QgsMapLayer - layerName is '" + mLayerName + "'" );
|
||||
QgsDebugMsg( "layerName is '" + mLayerName + "'" );
|
||||
|
||||
// Generate the unique ID of this layer
|
||||
QDateTime dt = QDateTime::currentDateTime();
|
||||
@ -96,7 +96,7 @@ QString QgsMapLayer::getLayerID() const
|
||||
/** Write property of QString layerName. */
|
||||
void QgsMapLayer::setLayerName( const QString & _newVal )
|
||||
{
|
||||
QgsDebugMsg( "QgsMapLayer::setLayerName: new name is '" + _newVal + "'" );
|
||||
QgsDebugMsg( "new name is '" + _newVal + "'" );
|
||||
mLayerName = capitaliseLayerName( _newVal );
|
||||
emit layerNameChanged();
|
||||
}
|
||||
@ -104,7 +104,7 @@ void QgsMapLayer::setLayerName( const QString & _newVal )
|
||||
/** Read property of QString layerName. */
|
||||
QString const & QgsMapLayer::name() const
|
||||
{
|
||||
QgsDebugMsg( "QgsMapLayer::name: returning name '" + mLayerName + "'" );
|
||||
QgsDebugMsg( "returning name '" + mLayerName + "'" );
|
||||
return mLayerName;
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ bool QgsMapLayer::draw( QgsRenderContext& rendererContext )
|
||||
|
||||
void QgsMapLayer::drawLabels( QgsRenderContext& rendererContext )
|
||||
{
|
||||
// QgsDebugMsg("In QgsMapLayer::draw");
|
||||
// QgsDebugMsg("entered.");
|
||||
}
|
||||
|
||||
bool QgsMapLayer::readXML( QDomNode & layer_node )
|
||||
@ -577,7 +577,7 @@ QString QgsMapLayer::saveNamedStyle( const QString theURI, bool & theResultFlag
|
||||
QFileInfo myFileInfo( theURI );
|
||||
if ( myFileInfo.exists() || theURI.endsWith( ".qml", Qt::CaseInsensitive ) )
|
||||
{
|
||||
QFileInfo myDirInfo( myFileInfo.path() ); //excludes fileName
|
||||
QFileInfo myDirInfo( myFileInfo.path() ); //excludes file name
|
||||
if ( !myDirInfo.isWritable() )
|
||||
{
|
||||
return QObject::tr( "The directory containing your dataset needs to be writeable!" );
|
||||
|
@ -631,7 +631,7 @@ QgsRect QgsMapRenderer::mapToLayerCoordinates( QgsMapLayer* theLayer, QgsRect re
|
||||
|
||||
void QgsMapRenderer::updateFullExtent()
|
||||
{
|
||||
QgsDebugMsg( "QgsMapRenderer::updateFullExtent() called !" );
|
||||
QgsDebugMsg( "called." );
|
||||
QgsMapLayerRegistry* registry = QgsMapLayerRegistry::instance();
|
||||
|
||||
// reset the map canvas extent since the extent may now be smaller
|
||||
|
@ -1025,7 +1025,7 @@ bool QgsProject::write()
|
||||
|
||||
void QgsProject::clearProperties()
|
||||
{
|
||||
//QgsDebugMsg("Clearing project properties QgsProject::clearProperties()");
|
||||
//QgsDebugMsg("entered.");
|
||||
|
||||
imp_->clear();
|
||||
|
||||
|
@ -150,7 +150,7 @@ void QgsProjectFileTransform::transform081to090()
|
||||
|
||||
// Set the flag 'visible' to match the status of 'checked'
|
||||
QDomNodeList legendLayerFiles = mDom.elementsByTagName( "legendlayerfile" );
|
||||
QgsDebugMsg( QString( "Legend layer file entrie: " ) + QString::number( legendLayerFiles.count() ) );
|
||||
QgsDebugMsg( QString( "Legend layer file entries: " ) + QString::number( legendLayerFiles.count() ) );
|
||||
for ( int i = 0; i < mapLayers.count(); i++ )
|
||||
{
|
||||
// Get one maplayer element from list
|
||||
|
@ -338,9 +338,7 @@ QgsDataProvider* QgsProviderRegistry::getProvider( QString const & providerKey,
|
||||
// load the data provider
|
||||
QLibrary* myLib = new QLibrary( lib );
|
||||
|
||||
#ifdef QGISDEBUG
|
||||
QgsDebugMsg( "QgsProviderRegistry::getRasterProvider: Library name is " + myLib->fileName() );
|
||||
#endif
|
||||
QgsDebugMsg( "Library name is " + myLib->fileName() );
|
||||
|
||||
bool loaded = myLib->load();
|
||||
|
||||
@ -365,10 +363,9 @@ QgsDataProvider* QgsProviderRegistry::getProvider( QString const & providerKey,
|
||||
|
||||
if ( dataProvider )
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
QgsDebugMsg( "Instantiated the data provider plugin" );
|
||||
QgsDebugMsg( "provider name: " + dataProvider->name() );
|
||||
#endif
|
||||
|
||||
if ( dataProvider->isValid() )
|
||||
{
|
||||
delete myLib;
|
||||
|
@ -39,8 +39,7 @@ QString QgsRasterDataProvider::capabilitiesString() const
|
||||
if ( abilities & QgsRasterDataProvider::Identify )
|
||||
{
|
||||
abilitiesList += "Identify";
|
||||
QgsDebugMsg( "QgsRasterDataProvider::capabilitiesString Identify" );
|
||||
|
||||
QgsDebugMsg( "Identify" );
|
||||
}
|
||||
|
||||
return abilitiesList.join( ", " );
|
||||
|
@ -301,7 +301,7 @@ QgsVectorFileWriter::writeAsShapefile( QgsVectorLayer* layer,
|
||||
QgsVectorFileWriter* writer = new QgsVectorFileWriter( shapefileName,
|
||||
fileEncoding, provider->fields(), provider->geometryType(), &layer->srs() );
|
||||
|
||||
// check whether file creation was successfull
|
||||
// check whether file creation was successful
|
||||
WriterError err = writer->hasError();
|
||||
if ( err != NoError )
|
||||
{
|
||||
|
@ -3347,7 +3347,7 @@ void QgsVectorLayer::drawFeature( QPainter* p,
|
||||
|
||||
void QgsVectorLayer::setCoordinateSystem()
|
||||
{
|
||||
QgsDebugMsg( "QgsVectorLayer::setCoordinateSystem ----- Computing Coordinate System" );
|
||||
QgsDebugMsg( "----- Computing Coordinate System" );
|
||||
|
||||
//
|
||||
// Get the layers project info and set up the QgsCoordinateTransform
|
||||
|
@ -24,9 +24,7 @@ originally part of the larger QgsRasterLayer class
|
||||
|
||||
QgsColorRampShader::QgsColorRampShader( double theMinimumValue, double theMaximumValue ) : QgsRasterShaderFunction( theMinimumValue, theMaximumValue )
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
QgsDebugMsg( "QgsColorRampShader::QgsColorRampShader called" );
|
||||
#endif
|
||||
QgsDebugMsg( "called." );
|
||||
}
|
||||
|
||||
bool QgsColorRampShader::generateShadedValue( double theValue, int* theReturnRedValue, int* theReturnGreenValue, int* theReturnBlueValue )
|
||||
|
@ -37,7 +37,7 @@ bool compareRampSearch( const RAMP &a, const RAMP &b )
|
||||
|
||||
QgsColorTable::QgsColorTable( int interp )
|
||||
{
|
||||
QgsDebugMsg( "QgsColorTable::QgsColorTable()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
mInterp = interp;
|
||||
}
|
||||
|
||||
@ -47,9 +47,7 @@ QgsColorTable::~QgsColorTable()
|
||||
|
||||
void QgsColorTable::add( int index, unsigned char c1, unsigned char c2, unsigned char c3, unsigned char c4 )
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
QgsLogger::debug( "QgsColorTable::add() index", ( int )index, 1, __FILE__, __FUNCTION__, __LINE__ );
|
||||
#endif
|
||||
QgsDebugMsg( QString( "index = %1" ).arg( index ) );
|
||||
|
||||
if ( mDiscrete.size() == 0 )
|
||||
{
|
||||
@ -75,7 +73,7 @@ void QgsColorTable::add( int index, unsigned char c1, unsigned char c2, unsigned
|
||||
|
||||
void QgsColorTable::clear()
|
||||
{
|
||||
QgsDebugMsg( "QgsColorTable::clear() called " );
|
||||
QgsDebugMsg( "entered." );
|
||||
mDiscrete.clear();
|
||||
mRamp.clear();
|
||||
mMax = 0;
|
||||
|
@ -28,9 +28,8 @@ class originally created circa 2004 by T.Sutton, Gary E.Sherman, Steve Halasz
|
||||
|
||||
QgsContrastEnhancement::QgsContrastEnhancement( QgsRasterDataType theDataType )
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
QgsDebugMsg( "QgsContrastEnhancement::QgsContrastEnhancement() called" );
|
||||
#endif
|
||||
QgsDebugMsg( "called" );
|
||||
|
||||
mLookupTable = 0;
|
||||
mContrastEnhancementFunction = 0;
|
||||
mEnhancementDirty = false;
|
||||
@ -178,13 +177,12 @@ bool QgsContrastEnhancement::generateLookupTable()
|
||||
if ( QGS_Byte != mRasterDataType && QGS_UInt16 != mRasterDataType && QGS_Int16 != mRasterDataType ) { return false; }
|
||||
if ( !mLookupTable ) { return false; }
|
||||
|
||||
#ifdef QGISDEBUG
|
||||
QgsDebugMsg( "QgsContrastEnhancement::generateLookupTable() - building lookup table" );
|
||||
QgsDebugMsg( "building lookup table" );
|
||||
QgsDebugMsg( "***MinimumValue : " + QString::number( mMinimumValue ) );
|
||||
QgsDebugMsg( "***MaximumValue : " + QString::number( mMaximumValue ) );
|
||||
QgsDebugMsg( "***mLookupTableOffset : " + QString::number( mLookupTableOffset ) );
|
||||
QgsDebugMsg( "***mRasterDataTypeRange : " + QString::number( mRasterDataTypeRange ) );
|
||||
#endif
|
||||
|
||||
for ( int myIterator = 0; myIterator <= mRasterDataTypeRange; myIterator++ )
|
||||
{
|
||||
mLookupTable[myIterator] = mContrastEnhancementFunction->enhanceValue(( double )myIterator - mLookupTableOffset );
|
||||
@ -217,9 +215,8 @@ bool QgsContrastEnhancement::isValueInDisplayableRange( double theValue )
|
||||
*/
|
||||
void QgsContrastEnhancement::setContrastEnhancementAlgorithm( CONTRAST_ENHANCEMENT_ALGORITHM theAlgorithm, bool generateTable )
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
QgsDebugMsg( "QgsContrastEnhancement::setContrastEnhancementAlgorithm() called algorithm: " + QString::number(( int )theAlgorithm ) + " generate lookup table: " + QString::number(( int )generateTable ) );
|
||||
#endif
|
||||
QgsDebugMsg( "called algorithm: " + QString::number(( int )theAlgorithm ) + " generate lookup table: " + QString::number(( int )generateTable ) );
|
||||
|
||||
if ( theAlgorithm != mContrastEnhancementAlgorithm )
|
||||
{
|
||||
switch ( theAlgorithm )
|
||||
@ -258,9 +255,8 @@ void QgsContrastEnhancement::setContrastEnhancementAlgorithm( CONTRAST_ENHANCEME
|
||||
*/
|
||||
void QgsContrastEnhancement::setContrastEnhancementFunction( QgsContrastEnhancementFunction* theFunction )
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
QgsDebugMsg( "QgsContrastEnhancement::setContrastEnhancementFunction() called" );
|
||||
#endif
|
||||
QgsDebugMsg( "called" );
|
||||
|
||||
if ( 0 != theFunction )
|
||||
{
|
||||
mContrastEnhancementFunction = theFunction;
|
||||
@ -277,9 +273,8 @@ void QgsContrastEnhancement::setContrastEnhancementFunction( QgsContrastEnhancem
|
||||
*/
|
||||
void QgsContrastEnhancement::setMaximumValue( double theValue, bool generateTable )
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
QgsDebugMsg( "QgsContrastEnhancement::setMaximumValue() called value: " + QString::number( theValue ) + " generate lookup table: " + QString::number(( int )generateTable ) );
|
||||
#endif
|
||||
QgsDebugMsg( "called value: " + QString::number( theValue ) + " generate lookup table: " + QString::number(( int )generateTable ) );
|
||||
|
||||
if ( theValue > getMaximumPossibleValue( mRasterDataType ) )
|
||||
{
|
||||
mMaximumValue = getMaximumPossibleValue( mRasterDataType );
|
||||
@ -310,9 +305,8 @@ void QgsContrastEnhancement::setMaximumValue( double theValue, bool generateTabl
|
||||
*/
|
||||
void QgsContrastEnhancement::setMinimumValue( double theValue, bool generateTable )
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
QgsDebugMsg( "QgsContrastEnhancement::setMinimumValue() called value: " + QString::number( theValue ) + " generate lookup table: " + QString::number(( int )generateTable ) );
|
||||
#endif
|
||||
QgsDebugMsg( "called value: " + QString::number( theValue ) + " generate lookup table: " + QString::number(( int )generateTable ) );
|
||||
|
||||
if ( theValue < getMinimumPossibleValue( mRasterDataType ) )
|
||||
{
|
||||
mMinimumValue = getMinimumPossibleValue( mRasterDataType );
|
||||
|
@ -254,7 +254,7 @@ void QgsRasterLayer::registerGdalDrivers()
|
||||
}
|
||||
|
||||
|
||||
/** This helper checks to see whether the fileName appears to be a valid raster file name */
|
||||
/** This helper checks to see whether the file name appears to be a valid raster file name */
|
||||
bool QgsRasterLayer::isValidRasterFileName( QString const & theFileNameQString,
|
||||
QString & retErrMsg )
|
||||
{
|
||||
@ -450,7 +450,7 @@ bool QgsRasterLayer::readFile( QString const & fileName )
|
||||
QString mySourceWKT = getProjectionWKT();
|
||||
|
||||
QgsDebugMsg( "--------------------------------------------------------------------------------------" );
|
||||
QgsDebugMsg( "QgsRasterLayer::readFile --- using wkt\n" + mySourceWKT );
|
||||
QgsDebugMsg( "using wkt:\n" + mySourceWKT );
|
||||
QgsDebugMsg( "--------------------------------------------------------------------------------------" );
|
||||
|
||||
mCRS->createFromWkt( mySourceWKT );
|
||||
@ -643,7 +643,7 @@ void QgsRasterLayer::closeDataset()
|
||||
|
||||
bool QgsRasterLayer::update()
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::update" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
if ( mLastModified < QgsRasterLayer::lastModified( source() ) )
|
||||
{
|
||||
@ -656,7 +656,7 @@ bool QgsRasterLayer::update()
|
||||
|
||||
QDateTime QgsRasterLayer::lastModified( QString const & name )
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::lastModified: " + name );
|
||||
QgsDebugMsg( "name=" + name );
|
||||
QDateTime t;
|
||||
|
||||
QFileInfo fi( name );
|
||||
@ -874,7 +874,7 @@ void QgsRasterLayer::drawThumbnail( QPixmap * theQPixmap )
|
||||
|
||||
QPixmap QgsRasterLayer::getPaletteAsPixmap()
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::getPaletteAsPixmap" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
// Only do this for the non-provider (hard-coded GDAL) scenario...
|
||||
// Maybe WMS can do this differently using QImage::numColors and QImage::color()
|
||||
@ -935,12 +935,13 @@ QPixmap QgsRasterLayer::getPaletteAsPixmap()
|
||||
|
||||
bool QgsRasterLayer::draw( QgsRenderContext& rendererContext )
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::draw(4 arguments): entered." );
|
||||
QgsDebugMsg( "entered. (renderContext)" );
|
||||
|
||||
//Dont waste time drawing if transparency is at 0 (completely transparent)
|
||||
if ( mTransparencyLevel == 0 )
|
||||
return TRUE;
|
||||
QgsDebugMsg( "QgsRasterLayer::draw(4 arguments): checking timestamp." );
|
||||
|
||||
QgsDebugMsg( "checking timestamp." );
|
||||
|
||||
// Check timestamp
|
||||
if ( !update() )
|
||||
@ -965,13 +966,8 @@ bool QgsRasterLayer::draw( QgsRenderContext& rendererContext )
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#ifdef QGISDEBUG
|
||||
QgsLogger::debug<QgsRect>( "QgsRasterLayer::draw(4 arguments): theViewExtent is ", theViewExtent, __FILE__, __FUNCTION__, __LINE__, 1 );
|
||||
QgsLogger::debug<QgsRect>( "QgsRasterLayer::draw(4 arguments): myRasterExtent is ", myRasterExtent, __FILE__, __FUNCTION__, __LINE__, 1 );
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
QgsDebugMsg( "theViewExtent is " + theViewExtent.toString() );
|
||||
QgsDebugMsg( "myRasterExtent is " + myRasterExtent.toString() );
|
||||
|
||||
//
|
||||
// The first thing we do is set up the QgsRasterViewPort. This struct stores all the settings
|
||||
@ -1002,20 +998,12 @@ bool QgsRasterLayer::draw( QgsRenderContext& rendererContext )
|
||||
myRasterViewPort->rectXOffset = static_cast < int >( myRasterViewPort->rectXOffsetFloat );
|
||||
myRasterViewPort->rectYOffset = static_cast < int >( myRasterViewPort->rectYOffsetFloat );
|
||||
|
||||
#ifdef QGISDEBUG
|
||||
QgsLogger::debug( "QgsRasterLayer::draw(4 arguments): mGeoTransform[0] = ", mGeoTransform[0], 1, __FILE__, \
|
||||
__FUNCTION__, __LINE__ );
|
||||
QgsLogger::debug( "QgsRasterLayer::draw(4 arguments): mGeoTransform[1] = ", mGeoTransform[1], 1, __FILE__, \
|
||||
__FUNCTION__, __LINE__ );
|
||||
QgsLogger::debug( "QgsRasterLayer::draw(4 arguments): mGeoTransform[2] = ", mGeoTransform[2], 1, __FILE__, \
|
||||
__FUNCTION__, __LINE__ );
|
||||
QgsLogger::debug( "QgsRasterLayer::draw(4 arguments): mGeoTransform[3] = ", mGeoTransform[3], 1, __FILE__, \
|
||||
__FUNCTION__, __LINE__ );
|
||||
QgsLogger::debug( "QgsRasterLayer::draw(4 arguments): mGeoTransform[4] = ", mGeoTransform[4], 1, __FILE__, \
|
||||
__FUNCTION__, __LINE__ );
|
||||
QgsLogger::debug( "QgsRasterLayer::draw(4 arguments): mGeoTransform[5] = ", mGeoTransform[5], 1, __FILE__, \
|
||||
__FUNCTION__, __LINE__ );
|
||||
#endif
|
||||
QgsDebugMsg( QString( "mGeoTransform[0] = %1" ).arg( mGeoTransform[0] ) );
|
||||
QgsDebugMsg( QString( "mGeoTransform[1] = %1" ).arg( mGeoTransform[1] ) );
|
||||
QgsDebugMsg( QString( "mGeoTransform[2] = %1" ).arg( mGeoTransform[2] ) );
|
||||
QgsDebugMsg( QString( "mGeoTransform[3] = %1" ).arg( mGeoTransform[3] ) );
|
||||
QgsDebugMsg( QString( "mGeoTransform[4] = %1" ).arg( mGeoTransform[4] ) );
|
||||
QgsDebugMsg( QString( "mGeoTransform[5] = %1" ).arg( mGeoTransform[5] ) );
|
||||
|
||||
// get dimensions of clipped raster image in raster pixel space/ RasterIO will do the scaling for us.
|
||||
// So for example, if the user is zoomed in a long way, there may only be e.g. 5x5 pixels retrieved from
|
||||
@ -1065,73 +1053,49 @@ bool QgsRasterLayer::draw( QgsRenderContext& rendererContext )
|
||||
myRasterViewPort->drawableAreaXDim = static_cast<int>( fabs(( myRasterViewPort->clippedWidth / theQgsMapToPixel.mapUnitsPerPixel() * mGeoTransform[1] ) ) + 0.5 );
|
||||
myRasterViewPort->drawableAreaYDim = static_cast<int>( fabs(( myRasterViewPort->clippedHeight / theQgsMapToPixel.mapUnitsPerPixel() * mGeoTransform[5] ) ) + 0.5 );
|
||||
|
||||
#ifdef QGISDEBUG
|
||||
QgsLogger::debug( "QgsRasterLayer::draw: mapUnitsPerPixel", theQgsMapToPixel.mapUnitsPerPixel(), 1, __FILE__, \
|
||||
__FUNCTION__, __LINE__ );
|
||||
QgsLogger::debug( "QgsRasterLayer::draw: mRasterXDim", mRasterXDim, 1, __FILE__, __FUNCTION__, __LINE__ );
|
||||
QgsLogger::debug( "QgsRasterLayer::draw: mRasterYDim", mRasterYDim, 1, __FILE__, __FUNCTION__, __LINE__ );
|
||||
QgsDebugMsg( QString( "mapUnitsPerPixel = %1" ).arg( theQgsMapToPixel.mapUnitsPerPixel() ) );
|
||||
QgsDebugMsg( QString( "mRasterXDim = %1" ).arg( mRasterXDim ) );
|
||||
QgsDebugMsg( QString( "mRasterYDim = %1" ).arg( mRasterYDim ) );
|
||||
QgsDebugMsg( QString( "rectXOffset = %1" ).arg( myRasterViewPort->rectXOffset ) );
|
||||
QgsDebugMsg( QString( "rectXOffsetFloat = %1" ).arg( myRasterViewPort->rectXOffsetFloat ) );
|
||||
QgsDebugMsg( QString( "rectYOffset = %1" ).arg( myRasterViewPort->rectYOffset ) );
|
||||
QgsDebugMsg( QString( "rectYOffsetFloat = %1" ).arg( myRasterViewPort->rectYOffsetFloat ) );
|
||||
|
||||
QgsLogger::debug( "QgsRasterLayer::draw: rectXOffset", myRasterViewPort->rectXOffset, 1, __FILE__, \
|
||||
__FUNCTION__, __LINE__ );
|
||||
QgsLogger::debug( "QgsRasterLayer::draw: rectXOffsetFloat", myRasterViewPort->rectXOffsetFloat, 1, __FILE__, \
|
||||
__FUNCTION__, __LINE__ );
|
||||
QgsLogger::debug( "QgsRasterLayer::draw: rectYOffset", myRasterViewPort->rectYOffset, 1, __FILE__, \
|
||||
__FUNCTION__, __LINE__ );
|
||||
QgsLogger::debug( "QgsRasterLayer::draw: rectYOffsetFloat", myRasterViewPort->rectYOffsetFloat, 1, __FILE__, \
|
||||
__FUNCTION__, __LINE__ );
|
||||
QgsDebugMsg( QString( "myRasterExtent.xMin() = %1" ).arg( myRasterExtent.xMin() ) );
|
||||
QgsDebugMsg( QString( "myRasterExtent.xMax() = %1" ).arg( myRasterExtent.xMax() ) );
|
||||
QgsDebugMsg( QString( "myRasterExtent.yMin() = %1" ).arg( myRasterExtent.yMin() ) );
|
||||
QgsDebugMsg( QString( "myRasterExtent.yMax() = %1" ).arg( myRasterExtent.yMax() ) );
|
||||
|
||||
QgsLogger::debug( "QgsRasterLayer::draw: myRasterExtent.xMin()", myRasterExtent.xMin(), 1, __FILE__, __FUNCTION__, \
|
||||
__LINE__ );
|
||||
QgsLogger::debug( "QgsRasterLayer::draw: myRasterExtent.xMax()", myRasterExtent.xMax(), 1, __FILE__, __FUNCTION__, \
|
||||
__LINE__ );
|
||||
QgsLogger::debug( "QgsRasterLayer::draw: myRasterExtent.yMin()", myRasterExtent.yMin(), 1, __FILE__, __FUNCTION__, \
|
||||
__LINE__ );
|
||||
QgsLogger::debug( "QgsRasterLayer::draw: myRasterExtent.yMax()", myRasterExtent.yMax(), 1, __FILE__, __FUNCTION__, \
|
||||
__LINE__ );
|
||||
QgsDebugMsg( QString( "topLeftPoint.x() = %1" ).arg( myRasterViewPort->topLeftPoint.x() ) );
|
||||
QgsDebugMsg( QString( "bottomRightPoint.x() = %1" ).arg( myRasterViewPort->bottomRightPoint.x() ) );
|
||||
QgsDebugMsg( QString( "topLeftPoint.y() = %1" ).arg( myRasterViewPort->topLeftPoint.y() ) );
|
||||
QgsDebugMsg( QString( "bottomRightPoint.y() = %1" ).arg( myRasterViewPort->bottomRightPoint.y() ) );
|
||||
|
||||
QgsLogger::debug( "QgsRasterLayer::draw: topLeftPoint.x()", myRasterViewPort->topLeftPoint.x(), 1, __FILE__, \
|
||||
__FUNCTION__, __LINE__ );
|
||||
QgsLogger::debug( "QgsRasterLayer::draw: bottomRightPoint.x()", myRasterViewPort->bottomRightPoint.x(), 1, __FILE__, \
|
||||
__FUNCTION__, __LINE__ );
|
||||
QgsLogger::debug( "QgsRasterLayer::draw: topLeftPoint.y()", myRasterViewPort->topLeftPoint.y(), 1, __FILE__, \
|
||||
__FUNCTION__, __LINE__ );
|
||||
QgsLogger::debug( "QgsRasterLayer::draw: bottomRightPoint.y()", myRasterViewPort->bottomRightPoint.y(), 1, __FILE__, \
|
||||
__FUNCTION__, __LINE__ );
|
||||
QgsDebugMsg( QString( "clippedXMin = %1" ).arg( myRasterViewPort->clippedXMin ) );
|
||||
QgsDebugMsg( QString( "clippedXMax = %1" ).arg( myRasterViewPort->clippedXMax ) );
|
||||
QgsDebugMsg( QString( "clippedYMin = %1" ).arg( myRasterViewPort->clippedYMin ) );
|
||||
QgsDebugMsg( QString( "clippedYMax = %1" ).arg( myRasterViewPort->clippedYMax ) );
|
||||
|
||||
QgsLogger::debug( "QgsRasterLayer::draw: clippedXMin", myRasterViewPort->clippedXMin, 1, __FILE__, \
|
||||
__FUNCTION__, __LINE__ );
|
||||
QgsLogger::debug( "QgsRasterLayer::draw: clippedXMax", myRasterViewPort->clippedXMax, 1, __FILE__, \
|
||||
__FUNCTION__, __LINE__ );
|
||||
QgsLogger::debug( "QgsRasterLayer::draw: clippedYMin", myRasterViewPort->clippedYMin, 1, __FILE__, \
|
||||
__FUNCTION__, __LINE__ );
|
||||
QgsLogger::debug( "QgsRasterLayer::draw: clippedYMax", myRasterViewPort->clippedYMax, 1, __FILE__, \
|
||||
__FUNCTION__, __LINE__ );
|
||||
|
||||
QgsLogger::debug( "QgsRasterLayer::draw: clippedWidth", myRasterViewPort->clippedWidth, 1, __FILE__, \
|
||||
__FUNCTION__, __LINE__ );
|
||||
QgsLogger::debug( "QgsRasterLayer::draw: clippedHeight", myRasterViewPort->clippedHeight, 1, __FILE__, \
|
||||
__FUNCTION__, __LINE__ );
|
||||
QgsLogger::debug( "QgsRasterLayer::draw: drawableAreaXDim", myRasterViewPort->drawableAreaXDim, 1, __FILE__, \
|
||||
__FUNCTION__, __LINE__ );
|
||||
QgsLogger::debug( "QgsRasterLayer::draw: drawableAreaYDim", myRasterViewPort->drawableAreaYDim, 1, __FILE__, \
|
||||
__FUNCTION__, __LINE__ );
|
||||
QgsDebugMsg( QString( "clippedWidth = %1" ).arg( myRasterViewPort->clippedWidth ) );
|
||||
QgsDebugMsg( QString( "clippedHeight = %1" ).arg( myRasterViewPort->clippedHeight ) );
|
||||
QgsDebugMsg( QString( "drawableAreaXDim = %1" ).arg( myRasterViewPort->drawableAreaXDim ) );
|
||||
QgsDebugMsg( QString( "drawableAreaYDim = %1" ).arg( myRasterViewPort->drawableAreaYDim ) );
|
||||
|
||||
QgsDebugMsg( "ReadXml: gray band name : " + mGrayBandName );
|
||||
QgsDebugMsg( "ReadXml: red band name : " + mRedBandName );
|
||||
QgsDebugMsg( "ReadXml: green band name : " + mGreenBandName );
|
||||
QgsDebugMsg( "ReadXml: blue band name : " + mBlueBandName );
|
||||
#endif
|
||||
|
||||
// /\/\/\ - added to handle zoomed-in rasters
|
||||
|
||||
|
||||
// Provider mode: See if a provider key is specified, and if so use the provider instead
|
||||
|
||||
QgsDebugMsg( "QgsRasterLayer::draw: Checking for provider key." );
|
||||
QgsDebugMsg( "Checking for provider key." );
|
||||
|
||||
if ( !mProviderKey.isEmpty() )
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::draw: Wanting a '" + mProviderKey + "' provider to draw this." );
|
||||
QgsDebugMsg( "Wanting a '" + mProviderKey + "' provider to draw this." );
|
||||
|
||||
emit setStatus( QString( "Retrieving using " ) + mProviderKey );
|
||||
|
||||
@ -1158,24 +1122,20 @@ bool QgsRasterLayer::draw( QgsRenderContext& rendererContext )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
QgsDebugMsg( "QgsRasterLayer::draw: Done mDataProvider->draw." );
|
||||
QgsDebugMsg( "QgsRasterLayer::draw: image stats: " );
|
||||
#ifdef QGISDEBUG
|
||||
QgsLogger::debug( "depth", image->depth(), __FILE__, __FUNCTION__, __LINE__, 1 );
|
||||
QgsLogger::debug( "bytes", image->numBytes(), __FILE__, __FUNCTION__, __LINE__, 1 );
|
||||
QgsLogger::debug( "width", image->width(), __FILE__, __FUNCTION__, __LINE__, 1 );
|
||||
QgsLogger::debug( "height", image->height(), __FILE__, __FUNCTION__, __LINE__, 1 );
|
||||
#endif
|
||||
QgsDebugMsg( "Done mDataProvider->draw." );
|
||||
QgsDebugMsg( "image stats: " );
|
||||
|
||||
QgsDebugMsg( "QgsRasterLayer::draw: Want to theQPainter->drawImage with" );
|
||||
#ifdef QGISDEBUG
|
||||
QgsLogger::debug( "origin x", myRasterViewPort->topLeftPoint.x(), __FILE__, __FUNCTION__, __LINE__, 1 );
|
||||
QgsLogger::debug( "(int)origin x", static_cast<int>( myRasterViewPort->topLeftPoint.x() ), __FILE__, \
|
||||
__FUNCTION__, __LINE__, 1 );
|
||||
QgsLogger::debug( "origin y", myRasterViewPort->topLeftPoint.y(), __FILE__, __FUNCTION__, __LINE__, 1 );
|
||||
QgsLogger::debug( "(int)origin y", static_cast<int>( myRasterViewPort->topLeftPoint.y() ), __FILE__, \
|
||||
__FUNCTION__, __LINE__, 1 );
|
||||
#endif
|
||||
QgsDebugMsg( QString( "depth=%1" ).arg( image->depth() ) );
|
||||
QgsDebugMsg( QString( "bytes=%1" ).arg( image->numBytes() ) );
|
||||
QgsDebugMsg( QString( "width=%1" ).arg( image->width() ) );
|
||||
QgsDebugMsg( QString( "height=%1" ).arg( image->height() ) );
|
||||
|
||||
QgsDebugMsg( "Want to theQPainter->drawImage with" );
|
||||
|
||||
QgsDebugMsg( QString( "origin x: %1" ).arg( myRasterViewPort->topLeftPoint.x() ) );
|
||||
QgsDebugMsg( QString( "(int)origin x: %1" ).arg( static_cast<int>( myRasterViewPort->topLeftPoint.x() ) ) );
|
||||
QgsDebugMsg( QString( "origin y: %1" ).arg( myRasterViewPort->topLeftPoint.y() ) );
|
||||
QgsDebugMsg( QString( "(int)origin y: %1" ).arg( static_cast<int>( myRasterViewPort->topLeftPoint.y() ) ) );
|
||||
|
||||
// Since GDAL's RasterIO can't handle floating point, we have to round to
|
||||
// the nearest pixel. Add 0.5 to get rounding instead of truncation
|
||||
@ -1208,7 +1168,7 @@ bool QgsRasterLayer::draw( QgsRenderContext& rendererContext )
|
||||
}
|
||||
|
||||
delete myRasterViewPort;
|
||||
QgsDebugMsg( "QgsRasterLayer::draw: exiting." );
|
||||
QgsDebugMsg( "exiting." );
|
||||
|
||||
return TRUE;
|
||||
|
||||
@ -1218,7 +1178,7 @@ void QgsRasterLayer::draw( QPainter * theQPainter,
|
||||
QgsRasterViewPort * theRasterViewPort,
|
||||
const QgsMapToPixel* theQgsMapToPixel )
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::draw (3 arguments)" );
|
||||
QgsDebugMsg( " 3 arguments" );
|
||||
//
|
||||
//
|
||||
// The goal here is to make as many decisions as possible early on (outside of the rendering loop)
|
||||
@ -1226,7 +1186,6 @@ void QgsRasterLayer::draw( QPainter * theQPainter,
|
||||
// procedure to use :
|
||||
//
|
||||
|
||||
|
||||
switch ( drawingStyle )
|
||||
{
|
||||
// a "Gray" or "Undefined" layer drawn as a range of gray colors
|
||||
@ -1356,7 +1315,7 @@ void QgsRasterLayer::draw( QPainter * theQPainter,
|
||||
|
||||
void QgsRasterLayer::drawSingleBandGray( QPainter * theQPainter, QgsRasterViewPort * theRasterViewPort, const QgsMapToPixel* theQgsMapToPixel, int theBandNo )
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::drawSingleBandGray called for layer " + QString::number( theBandNo ) );
|
||||
QgsDebugMsg( "layer=" + QString::number( theBandNo ) );
|
||||
//Invalid band number, segfault prevention
|
||||
if ( 0 >= theBandNo )
|
||||
{
|
||||
@ -1459,7 +1418,7 @@ void QgsRasterLayer::drawSingleBandPseudoColor( QPainter * theQPainter,
|
||||
const QgsMapToPixel* theQgsMapToPixel,
|
||||
int theBandNo )
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::drawSingleBandPseudoColor called" );
|
||||
QgsDebugMsg( "entered." );
|
||||
//Invalid band number, segfault prevention
|
||||
if ( 0 >= theBandNo )
|
||||
{
|
||||
@ -1562,7 +1521,7 @@ void QgsRasterLayer::drawSingleBandPseudoColor( QPainter * theQPainter,
|
||||
void QgsRasterLayer::drawPalettedSingleBandColor( QPainter * theQPainter, QgsRasterViewPort * theRasterViewPort,
|
||||
const QgsMapToPixel* theQgsMapToPixel, int theBandNo )
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::drawPalettedSingleBandColor called" );
|
||||
QgsDebugMsg( "entered." );
|
||||
//Invalid band number, segfault prevention
|
||||
if ( 0 >= theBandNo )
|
||||
{
|
||||
@ -1646,7 +1605,7 @@ void QgsRasterLayer::drawPalettedSingleBandGray( QPainter * theQPainter, QgsRast
|
||||
const QgsMapToPixel* theQgsMapToPixel, int theBandNo,
|
||||
QString const & theColorQString )
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::drawPalettedSingleBandGray called" );
|
||||
QgsDebugMsg( "entered." );
|
||||
//Invalid band number, segfault prevention
|
||||
if ( 0 >= theBandNo )
|
||||
{
|
||||
@ -1744,7 +1703,7 @@ void QgsRasterLayer::drawPalettedSingleBandPseudoColor( QPainter * theQPainter,
|
||||
const QgsMapToPixel* theQgsMapToPixel, int theBandNo,
|
||||
QString const & theColorQString )
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::drawPalettedSingleBandPseudoColor called" );
|
||||
QgsDebugMsg( "entered." );
|
||||
//Invalid band number, segfault prevention
|
||||
if ( 0 >= theBandNo )
|
||||
{
|
||||
@ -1872,7 +1831,7 @@ void QgsRasterLayer::drawPalettedSingleBandPseudoColor( QPainter * theQPainter,
|
||||
void QgsRasterLayer::drawPalettedMultiBandColor( QPainter * theQPainter, QgsRasterViewPort * theRasterViewPort,
|
||||
const QgsMapToPixel* theQgsMapToPixel, int theBandNo )
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::drawPalettedMultiBandColor called" );
|
||||
QgsDebugMsg( "entered." );
|
||||
//Invalid band number, segfault prevention
|
||||
if ( 0 >= theBandNo )
|
||||
{
|
||||
@ -1994,7 +1953,7 @@ void QgsRasterLayer::drawMultiBandSingleBandPseudoColor( QPainter * theQPainter,
|
||||
void QgsRasterLayer::drawMultiBandColor( QPainter * theQPainter, QgsRasterViewPort * theRasterViewPort,
|
||||
const QgsMapToPixel* theQgsMapToPixel )
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::drawMultiBandColor called" );
|
||||
QgsDebugMsg( "entered." );
|
||||
int myRedBandNo = getRasterBandNumber( mRedBandName );
|
||||
//Invalid band number, segfault prevention
|
||||
if ( 0 >= myRedBandNo )
|
||||
@ -2146,7 +2105,7 @@ void QgsRasterLayer::drawMultiBandColor( QPainter * theQPainter, QgsRasterViewPo
|
||||
QPixmap* pm = dynamic_cast<QPixmap*>( theQPainter->device() );
|
||||
if ( pm )
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::drawMultiBandColor: theQPainter stats: " );
|
||||
QgsDebugMsg( "theQPainter stats: " );
|
||||
QgsDebugMsg( "width = " + QString::number( pm->width() ) );
|
||||
QgsDebugMsg( "height = " + QString::number( pm->height() ) );
|
||||
pm->save( "/tmp/qgis-rasterlayer-drawmultibandcolor-test-a.png", "PNG" );
|
||||
@ -2156,7 +2115,7 @@ void QgsRasterLayer::drawMultiBandColor( QPainter * theQPainter, QgsRasterViewPo
|
||||
paintImageToCanvas( theQPainter, theRasterViewPort, theQgsMapToPixel, &myQImage );
|
||||
|
||||
#ifdef QGISDEBUG
|
||||
QgsDebugMsg( "QgsRasterLayer::drawMultiBandColor: theQPainter->drawImage." );
|
||||
QgsDebugMsg( "theQPainter->drawImage." );
|
||||
if ( pm )
|
||||
{
|
||||
pm->save( "/tmp/qgis-rasterlayer-drawmultibandcolor-test-b.png", "PNG" );
|
||||
@ -2333,7 +2292,7 @@ const QgsRasterBandStats QgsRasterLayer::getRasterBandStats( int theBandNo )
|
||||
// only print message if we are actually gathering the stats
|
||||
emit setStatus( QString( "Retrieving stats for " ) + name() );
|
||||
qApp->processEvents();
|
||||
QgsDebugMsg( "QgsRasterLayer::retrieve stats for band " + QString::number( theBandNo ) );
|
||||
QgsDebugMsg( "stats for band " + QString::number( theBandNo ) );
|
||||
GDALRasterBandH myGdalBand = GDALGetRasterBand( mGdalDataset, theBandNo );
|
||||
|
||||
|
||||
@ -2719,7 +2678,7 @@ QPixmap QgsRasterLayer::getLegendQPixmap()
|
||||
*/
|
||||
QPixmap QgsRasterLayer::getLegendQPixmap( bool theWithNameFlag )
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::getLegendQPixmap called (" + getDrawingStyleAsQString() + ")" );
|
||||
QgsDebugMsg( "called (" + getDrawingStyleAsQString() + ")" );
|
||||
|
||||
QPixmap myLegendQPixmap; //will be initialised once we know what drawing style is active
|
||||
QPainter myQPainter;
|
||||
@ -2727,7 +2686,7 @@ QPixmap QgsRasterLayer::getLegendQPixmap( bool theWithNameFlag )
|
||||
|
||||
if ( !mProviderKey.isEmpty() )
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::getLegendQPixmap called with provider Key (" + mProviderKey + ")" );
|
||||
QgsDebugMsg( "provider Key (" + mProviderKey + ")" );
|
||||
myLegendQPixmap = QPixmap( 3, 1 );
|
||||
myQPainter.begin( &myLegendQPixmap );
|
||||
//draw legend red part
|
||||
@ -2960,7 +2919,7 @@ QPixmap QgsRasterLayer::getLegendQPixmap( bool theWithNameFlag )
|
||||
myQPainter.drawPixmap( 0, myHeight - myNoPyramidPixmap.height(), myNoPyramidPixmap );
|
||||
}
|
||||
//
|
||||
// Overlay the layerName
|
||||
// Overlay the layer name
|
||||
//
|
||||
if ( drawingStyle == MULTI_BAND_SINGLE_BAND_GRAY || drawingStyle == PALETTED_SINGLE_BAND_GRAY || drawingStyle == SINGLE_BAND_GRAY )
|
||||
{
|
||||
@ -2987,7 +2946,7 @@ QPixmap QgsRasterLayer::getLegendQPixmap( bool theWithNameFlag )
|
||||
|
||||
QPixmap QgsRasterLayer::getDetailedLegendQPixmap( int theLabelCount = 3 )
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::getDetailedLegendQPixmap called" );
|
||||
QgsDebugMsg( "entered." );
|
||||
QFont myQFont( "arial", 10, QFont::Normal );
|
||||
QFontMetrics myQFontMetrics( myQFont );
|
||||
|
||||
@ -3189,7 +3148,7 @@ QPixmap QgsRasterLayer::getDetailedLegendQPixmap( int theLabelCount = 3 )
|
||||
QPixmap myQPixmap2 = myLegendQPixmap.transformed( myQWMatrix );
|
||||
QPainter myQPainter2( &myQPixmap2 );
|
||||
//
|
||||
// Overlay the layerName
|
||||
// Overlay the layer name
|
||||
//
|
||||
if ( drawingStyle == MULTI_BAND_SINGLE_BAND_GRAY || drawingStyle == PALETTED_SINGLE_BAND_GRAY || drawingStyle == SINGLE_BAND_GRAY )
|
||||
{
|
||||
@ -3233,11 +3192,11 @@ QStringList QgsRasterLayer::subLayers() const
|
||||
|
||||
void QgsRasterLayer::setLayerOrder( QStringList const & layers )
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::setLayerOrder: Entered." );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
if ( mDataProvider )
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::setLayerOrder: About to mDataProvider->setLayerOrder(layers)." );
|
||||
QgsDebugMsg( "About to mDataProvider->setLayerOrder(layers)." );
|
||||
mDataProvider->setLayerOrder( layers );
|
||||
}
|
||||
|
||||
@ -3250,7 +3209,7 @@ void QgsRasterLayer::setSubLayerVisibility( QString const & name, bool vis )
|
||||
|
||||
if ( mDataProvider )
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::setSubLayerVisibility: About to mDataProvider->setSubLayerVisibility(name, vis)." );
|
||||
QgsDebugMsg( "About to mDataProvider->setSubLayerVisibility(name, vis)." );
|
||||
mDataProvider->setSubLayerVisibility( name, vis );
|
||||
}
|
||||
|
||||
@ -3862,7 +3821,7 @@ bool QgsRasterLayer::isEditable() const
|
||||
|
||||
void QgsRasterLayer::readColorTable( GDALRasterBandH gdalBand, QgsColorTable *theColorTable )
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::readColorTable()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
// First try to read color table from metadata
|
||||
char **metadata = GDALGetMetadata( gdalBand, NULL );
|
||||
@ -3931,7 +3890,7 @@ void *QgsRasterLayer::readData( GDALRasterBandH gdalBand, QgsRasterViewPort *vie
|
||||
GDALDataType type = GDALGetRasterDataType( gdalBand );
|
||||
int size = GDALGetDataTypeSize( type ) / 8;
|
||||
|
||||
QgsDebugMsg( "QgsRasterLayer::readData: calling RasterIO with " + \
|
||||
QgsDebugMsg( "calling RasterIO with " + \
|
||||
QString( ", source NW corner: " ) + QString::number( viewPort->rectXOffset ) + \
|
||||
", " + QString::number( viewPort->rectYOffset ) + \
|
||||
", source size: " + QString::number( viewPort->clippedWidth ) + \
|
||||
@ -4646,7 +4605,7 @@ void QgsRasterLayer::identify( const QgsPoint& point, QMap<QString, QString>& re
|
||||
double x = point.x();
|
||||
double y = point.y();
|
||||
|
||||
QgsDebugMsg( "QgsRasterLayer::identify: " + QString::number( x ) + ", " + QString::number( y ) );
|
||||
QgsDebugMsg( QString::number( x ) + ", " + QString::number( y ) );
|
||||
|
||||
if ( x < mLayerExtent.xMin() || x > mLayerExtent.xMax() || y < mLayerExtent.yMin() || y > mLayerExtent.yMax() )
|
||||
{
|
||||
@ -4796,7 +4755,7 @@ QgsRasterLayer::QgsRasterLayer( int dummy,
|
||||
mModified( false )
|
||||
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::QgsRasterLayer(4 arguments): starting. with layer list of " + \
|
||||
QgsDebugMsg( "(8 arguments) starting. with layer list of " + \
|
||||
layers.join( ", " ) + " and style list of " + styles.join( ", " ) + " and format of " + \
|
||||
format + " and CRS of " + crs );
|
||||
|
||||
@ -4835,7 +4794,7 @@ QgsRasterLayer::QgsRasterLayer( int dummy,
|
||||
mDataProvider, SIGNAL( setStatus( QString ) ),
|
||||
this, SLOT( showStatusMessage( QString ) )
|
||||
);
|
||||
QgsDebugMsg( "QgsRasterLayer::QgsRasterLayer(4 arguments): exiting." );
|
||||
QgsDebugMsg( "(8 arguments) exiting." );
|
||||
|
||||
emit setStatus( "QgsRasterLayer created" );
|
||||
} // QgsRasterLayer ctor
|
||||
@ -4885,20 +4844,20 @@ void QgsRasterLayer::setDataProvider( QString const & provider,
|
||||
|
||||
// load the data provider
|
||||
mLib = new QLibrary( ogrlib );
|
||||
QgsDebugMsg( "QgsRasterLayer::setDataProvider: Library name is " + mLib->fileName() );
|
||||
QgsDebugMsg( "Library name is " + mLib->fileName() );
|
||||
bool loaded = mLib->load();
|
||||
|
||||
if ( loaded )
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::setDataProvider: Loaded data provider library" );
|
||||
QgsDebugMsg( "QgsRasterLayer::setDataProvider: Attempting to resolve the classFactory function" );
|
||||
QgsDebugMsg( "Loaded data provider library" );
|
||||
QgsDebugMsg( "Attempting to resolve the classFactory function" );
|
||||
classFactoryFunction_t * classFactory = ( classFactoryFunction_t * ) cast_to_fptr( mLib->resolve( "classFactory" ) );
|
||||
|
||||
mValid = false; // assume the layer is invalid until we
|
||||
// determine otherwise
|
||||
if ( classFactory )
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::setDataProvider: Getting pointer to a mDataProvider object from the library" );
|
||||
QgsDebugMsg( "Getting pointer to a mDataProvider object from the library" );
|
||||
//XXX - This was a dynamic cast but that kills the Windows
|
||||
// version big-time with an abnormal termination error
|
||||
// mDataProvider = (QgsRasterDataProvider*)(classFactory((const
|
||||
@ -4909,7 +4868,7 @@ void QgsRasterLayer::setDataProvider( QString const & provider,
|
||||
|
||||
if ( mDataProvider )
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::setDataProvider: Instantiated the data provider plugin" + \
|
||||
QgsDebugMsg( "Instantiated the data provider plugin" + \
|
||||
QString( " with layer list of " ) + layers.join( ", " ) + " and style list of " + styles.join( ", " ) + \
|
||||
" and format of " + format + " and CRS of " + crs );
|
||||
if ( mDataProvider->isValid() )
|
||||
@ -4925,7 +4884,7 @@ void QgsRasterLayer::setDataProvider( QString const & provider,
|
||||
|
||||
// show the extent
|
||||
QString s = mbr.toString();
|
||||
QgsDebugMsg( "QgsRasterLayer::setDataProvider: Extent of layer: " + s );
|
||||
QgsDebugMsg( "Extent of layer: " + s );
|
||||
// store the extent
|
||||
mLayerExtent.setXMaximum( mbr.xMax() );
|
||||
mLayerExtent.setXMinimum( mbr.xMin() );
|
||||
@ -4933,7 +4892,7 @@ void QgsRasterLayer::setDataProvider( QString const & provider,
|
||||
mLayerExtent.setYmin( mbr.yMin() );
|
||||
|
||||
// upper case the first letter of the layer name
|
||||
QgsDebugMsg( "QgsRasterLayer::setDataProvider: mLayerName: " + name() );
|
||||
QgsDebugMsg( "mLayerName: " + name() );
|
||||
|
||||
// set up the raster drawing style
|
||||
drawingStyle = MULTI_BAND_COLOR; //sensible default
|
||||
@ -4956,7 +4915,7 @@ void QgsRasterLayer::setDataProvider( QString const & provider,
|
||||
QgsLogger::warning( "QgsRasterLayer::setDataProvider: Failed to load ../providers/libproviders.so" );
|
||||
|
||||
}
|
||||
QgsDebugMsg( "QgsRasterLayer::setDataProvider: exiting." );
|
||||
QgsDebugMsg( "exiting." );
|
||||
|
||||
} // QgsRasterLayer::setDataProvider
|
||||
|
||||
@ -4989,9 +4948,8 @@ QString QgsRasterLayer::providerKey()
|
||||
|
||||
void QgsRasterLayer::showStatusMessage( QString const & theMessage )
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
// QgsDebugMsg(QString("QgsRasterLayer::showStatusMessage: entered with '%1'.").arg(theMessage));
|
||||
#endif
|
||||
// QgsDebugMsg(QString("entered with '%1'.").arg(theMessage));
|
||||
|
||||
// Pass-through
|
||||
// TODO: See if we can connect signal-to-signal. This is a kludge according to the Qt doc.
|
||||
emit setStatus( theMessage );
|
||||
@ -5038,7 +4996,7 @@ double QgsRasterLayer::rasterUnitsPerPixel()
|
||||
|
||||
void QgsRasterLayer::setColorShadingAlgorithm( COLOR_SHADING_ALGORITHM theShadingAlgorithm )
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::setColorShadingAlgorithm called with [" + QString::number( theShadingAlgorithm ) + "]" );
|
||||
QgsDebugMsg( "called with [" + QString::number( theShadingAlgorithm ) + "]" );
|
||||
if ( mColorShadingAlgorithm != theShadingAlgorithm )
|
||||
{
|
||||
if ( 0 == mRasterShader )
|
||||
@ -5110,12 +5068,12 @@ void QgsRasterLayer::paintImageToCanvas( QPainter* theQPainter, QgsRasterViewPor
|
||||
);
|
||||
}
|
||||
|
||||
QgsDebugMsg( "QgsRasterLayer::drawSingleBandGray: painting image to canvas from "\
|
||||
+ QString::number( paintXoffset ) + ", " + QString::number( paintYoffset )\
|
||||
+ " to "\
|
||||
+ QString::number( static_cast<int>( theRasterViewPort->topLeftPoint.x() + 0.5 ) )\
|
||||
+ ", "\
|
||||
+ QString::number( static_cast<int>( theRasterViewPort->topLeftPoint.y() + 0.5 ) )\
|
||||
QgsDebugMsg( "painting image to canvas from "
|
||||
+ QString::number( paintXoffset ) + ", " + QString::number( paintYoffset )
|
||||
+ " to "
|
||||
+ QString::number( static_cast<int>( theRasterViewPort->topLeftPoint.x() + 0.5 ) )
|
||||
+ ", "
|
||||
+ QString::number( static_cast<int>( theRasterViewPort->topLeftPoint.y() + 0.5 ) )
|
||||
+ "." );
|
||||
|
||||
theQPainter->drawImage( static_cast<int>( theRasterViewPort->topLeftPoint.x() + 0.5 ),
|
||||
@ -5150,7 +5108,7 @@ QString QgsRasterLayer::getColorShadingAlgorithmAsQString()
|
||||
|
||||
void QgsRasterLayer::setColorShadingAlgorithm( QString theShaderAlgorithm )
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::setColorShadingAlgorithm called with [" + theShaderAlgorithm + "]" );
|
||||
QgsDebugMsg( "called with [" + theShaderAlgorithm + "]" );
|
||||
|
||||
if ( theShaderAlgorithm == "PSEUDO_COLOR" )
|
||||
setColorShadingAlgorithm( PSEUDO_COLOR );
|
||||
@ -5190,7 +5148,7 @@ QString QgsRasterLayer::getContrastEnhancementAlgorithmAsQString()
|
||||
|
||||
void QgsRasterLayer::setContrastEnhancementAlgorithm( QString theAlgorithm, bool theGenerateLookupTableFlag )
|
||||
{
|
||||
QgsDebugMsg( "QgsRasterLayer::setContrastEnhancementAlgorithm called with [" + theAlgorithm + "] and flag=" + QString::number(( int )theGenerateLookupTableFlag ) );
|
||||
QgsDebugMsg( "called with [" + theAlgorithm + "] and flag=" + QString::number(( int )theGenerateLookupTableFlag ) );
|
||||
|
||||
if ( theAlgorithm == "NO_STRETCH" )
|
||||
{
|
||||
|
@ -181,8 +181,8 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer
|
||||
static void buildSupportedRasterFileFilter( QString & fileFilters );
|
||||
static void registerGdalDrivers();
|
||||
|
||||
/** This helper checks to see whether the fileName appears to be a valid
|
||||
raster file name. If the fileName looks like it could be valid,
|
||||
/** This helper checks to see whether the file name appears to be a valid
|
||||
raster file name. If the file name looks like it could be valid,
|
||||
but some sort of error occurs in processing the file, the error is
|
||||
returned in retError. */
|
||||
static bool isValidRasterFileName( const QString & theFileNameQString,
|
||||
|
@ -22,9 +22,8 @@ email : ersts@amnh.org
|
||||
|
||||
QgsRasterShader::QgsRasterShader( double theMinimumValue, double theMaximumValue )
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
QgsDebugMsg( "QgsRasterShader::QgsRasterShader called" );
|
||||
#endif
|
||||
QgsDebugMsg( "called." );
|
||||
|
||||
mMinimumValue = theMinimumValue;
|
||||
mMaximumValue = theMaximumValue;
|
||||
mRasterShaderFunction = new QgsRasterShaderFunction( mMinimumValue, mMaximumValue );
|
||||
@ -81,9 +80,8 @@ bool QgsRasterShader::generateShadedValue( double theRedValue, double theGreenVa
|
||||
*/
|
||||
void QgsRasterShader::setRasterShaderFunction( QgsRasterShaderFunction* theFunction )
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
QgsDebugMsg( "QgsRasterShader::setRasterShaderFunction called" );
|
||||
#endif
|
||||
QgsDebugMsg( "called." );
|
||||
|
||||
if ( 0 != theFunction )
|
||||
{
|
||||
mRasterShaderFunction = theFunction;
|
||||
@ -97,9 +95,8 @@ void QgsRasterShader::setRasterShaderFunction( QgsRasterShaderFunction* theFunct
|
||||
*/
|
||||
void QgsRasterShader::setMaximumValue( double theValue )
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
QgsDebugMsg( "QgsRasterShader::setMaximumValue called - Value = " + QString::number( theValue ) );
|
||||
#endif
|
||||
QgsDebugMsg( "Value = " + QString::number( theValue ) );
|
||||
|
||||
mMaximumValue = theValue;
|
||||
if ( 0 != mRasterShaderFunction )
|
||||
{
|
||||
@ -114,9 +111,8 @@ void QgsRasterShader::setMaximumValue( double theValue )
|
||||
*/
|
||||
void QgsRasterShader::setMinimumValue( double theValue )
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
QgsDebugMsg( "QgsRasterShader::setMinimumValue called - Value = " + QString::number( theValue ) );
|
||||
#endif
|
||||
QgsDebugMsg( "Value = " + QString::number( theValue ) );
|
||||
|
||||
mMinimumValue = theValue;
|
||||
if ( 0 != mRasterShaderFunction )
|
||||
{
|
||||
|
@ -21,9 +21,8 @@ email : ersts@amnh.org
|
||||
|
||||
QgsRasterShaderFunction::QgsRasterShaderFunction( double theMinimumValue, double theMaximumValue )
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
QgsDebugMsg( "QgsRasterShaderFunction::QgsRasterShaderFunction called" );
|
||||
#endif
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
mMinimumValue = theMinimumValue;
|
||||
mMaximumValue = theMaximumValue;
|
||||
mMinimumMaximumRange = mMaximumValue - mMinimumValue;
|
||||
@ -75,9 +74,8 @@ bool QgsRasterShaderFunction::generateShadedValue( double theRedValue, double th
|
||||
*/
|
||||
void QgsRasterShaderFunction::setMaximumValue( double theValue )
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
QgsDebugMsg( "QgsRasterShaderFunction::setMaximumValue called - Value = " + QString::number( theValue ) );
|
||||
#endif
|
||||
QgsDebugMsg( "value = " + QString::number( theValue ) );
|
||||
|
||||
mMaximumValue = theValue;
|
||||
mMinimumMaximumRange = mMaximumValue - mMinimumValue;
|
||||
}
|
||||
@ -89,9 +87,8 @@ void QgsRasterShaderFunction::setMaximumValue( double theValue )
|
||||
*/
|
||||
void QgsRasterShaderFunction::setMinimumValue( double theValue )
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
QgsDebugMsg( "QgsRasterShaderFunction::setMinimumValue called - Value = " + QString::number( theValue ) );
|
||||
#endif
|
||||
QgsDebugMsg( "value = " + QString::number( theValue ) );
|
||||
|
||||
mMinimumValue = theValue;
|
||||
mMinimumMaximumRange = mMaximumValue - mMinimumValue;
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ void BulkLoader::bulkLoadUsingSTR(
|
||||
unsigned long cTotalData = 0;
|
||||
|
||||
#ifdef DEBUG
|
||||
QgsDebugMsg( "RTree::BulkLoader: Building level 0" );
|
||||
QgsDebugMsg( "Building level 0" );
|
||||
#endif
|
||||
|
||||
createLevel( pTree, stream, pTree->m_dimension, pTree->m_dimension, bleaf, 0, bufferSize, *tmpFile, cNodes, cTotalData );
|
||||
@ -274,7 +274,7 @@ void BulkLoader::bulkLoadUsingSTR(
|
||||
TmpFile* pTF = new TmpFile();
|
||||
|
||||
#ifndef NDEBUG
|
||||
QgsDebugMsg( QString( "RTree::BulkLoader: Building level %1" ).arg( level ) );
|
||||
QgsDebugMsg( QString( "Building level %1" ).arg( level ) );
|
||||
#endif
|
||||
pTree->m_stats.m_nodesInLevel.push_back( 0 );
|
||||
|
||||
|
@ -144,8 +144,10 @@ void Tools::ExternalSort::initializeRuns(
|
||||
|
||||
m_cNumberOfSortedRecords++;
|
||||
|
||||
//if (m_cNumberOfSortedRecords % 1000000 == 0)
|
||||
// QgsDebugMsg(QString("Tools::ExternalSort::initializeRuns: loaded %1 objects.").arg(m_cNumberOfSortedRecords));
|
||||
#if 0
|
||||
if ( m_cNumberOfSortedRecords % 1000000 == 0 )
|
||||
QgsDebugMsg( QString( "loaded %1 objects." ).arg( m_cNumberOfSortedRecords ) );
|
||||
#endif
|
||||
|
||||
if ( m_pTemplateRecord == 0 )
|
||||
m_pTemplateRecord = o->clone();
|
||||
|
@ -4404,7 +4404,7 @@ extern "C"
|
||||
** Meta information is returned by writing to the memory locations passed as
|
||||
** the 5th and subsequent parameters to this function. Any of these
|
||||
** arguments may be NULL, in which case the corresponding element of meta
|
||||
** information is ommitted.
|
||||
** information is omitted.
|
||||
**
|
||||
** <pre>
|
||||
** Parameter Output Type Description
|
||||
|
@ -708,7 +708,7 @@ extern "C"
|
||||
** xOpen() is a full pathname as generated by xFullPathname() and
|
||||
** that the string will be valid and unchanged until xClose() is
|
||||
** called. {END} So the [sqlite3_file] can store a pointer to the
|
||||
** fileName if it needs to remember the fileName for some reason.
|
||||
** file name if it needs to remember the file name for some reason.
|
||||
**
|
||||
** {F11142} The flags argument to xOpen() includes all bits set in
|
||||
** the flags argument to [sqlite3_open_v2()]. Or if [sqlite3_open()]
|
||||
@ -1499,8 +1499,8 @@ extern "C"
|
||||
**
|
||||
** The windows OS interface layer calls
|
||||
** the system malloc() and free() directly when converting
|
||||
** fileNames between the UTF-8 encoding used by SQLite
|
||||
** and whatever fileName encoding is used by the particular windows
|
||||
** file name between the UTF-8 encoding used by SQLite
|
||||
** and whatever file name encoding is used by the particular windows
|
||||
** installation. Memory allocation errors are detected, but
|
||||
** they are reported back as [SQLITE_CANTOPEN] or
|
||||
** [SQLITE_IOERR] rather than [SQLITE_NOMEM].
|
||||
@ -1912,8 +1912,8 @@ extern "C"
|
||||
** CAPI3REF: Opening A New Database Connection {F12700}
|
||||
**
|
||||
** These routines open an SQLite database file whose name
|
||||
** is given by the fileName argument.
|
||||
** The fileName argument is interpreted as UTF-8
|
||||
** is given by the file name argument.
|
||||
** The file name argument is interpreted as UTF-8
|
||||
** for [sqlite3_open()] and [sqlite3_open_v2()] and as UTF-16
|
||||
** in the native byte order for [sqlite3_open16()].
|
||||
** An [sqlite3*] handle is usually returned in *ppDb, even
|
||||
@ -1956,16 +1956,16 @@ extern "C"
|
||||
** The third options is behavior that is always used for [sqlite3_open()]
|
||||
** and [sqlite3_open16()].
|
||||
**
|
||||
** If the fileName is ":memory:", then an private
|
||||
** If the file name is ":memory:", then an private
|
||||
** in-memory database is created for the connection. This in-memory
|
||||
** database will vanish when the database connection is closed. Future
|
||||
** version of SQLite might make use of additional special fileNames
|
||||
** version of SQLite might make use of additional special file name
|
||||
** that begin with the ":" character. It is recommended that
|
||||
** when a database fileName really does begin with
|
||||
** ":" that you prefix the fileName with a pathname like "./" to
|
||||
** when a database file name really does begin with
|
||||
** ":" that you prefix the file name with a pathname like "./" to
|
||||
** avoid ambiguity.
|
||||
**
|
||||
** If the fileName is an empty string, then a private temporary
|
||||
** If the file name is an empty string, then a private temporary
|
||||
** on-disk database will be created. This private database will be
|
||||
** automatically deleted as soon as the database connection is closed.
|
||||
**
|
||||
@ -1975,7 +1975,7 @@ extern "C"
|
||||
** fourth parameter is a NULL pointer then the default [sqlite3_vfs]
|
||||
** object is used.
|
||||
**
|
||||
** <b>Note to windows users:</b> The encoding used for the fileName argument
|
||||
** <b>Note to windows users:</b> The encoding used for the file name argument
|
||||
** of [sqlite3_open()] and [sqlite3_open_v2()] must be UTF-8, not whatever
|
||||
** codepage is currently defined. FileNames containing international
|
||||
** characters must be converted to UTF-8 prior to passing them into
|
||||
@ -1988,7 +1988,7 @@ extern "C"
|
||||
** [database connection] associated with
|
||||
** the database file given in their first parameter.
|
||||
**
|
||||
** {F12702} The fileName argument is interpreted as UTF-8
|
||||
** {F12702} The file name argument is interpreted as UTF-8
|
||||
** for [sqlite3_open()] and [sqlite3_open_v2()] and as UTF-16
|
||||
** in the native byte order for [sqlite3_open16()].
|
||||
**
|
||||
@ -2028,13 +2028,13 @@ extern "C"
|
||||
** previously exist, then an attempt is made to create and
|
||||
** initialize the database.
|
||||
**
|
||||
** {F12717} If the fileName argument to [sqlite3_open()], [sqlite3_open16()],
|
||||
** {F12717} If the file name argument to [sqlite3_open()], [sqlite3_open16()],
|
||||
** or [sqlite3_open_v2()] is ":memory:", then an private,
|
||||
** ephemeral, in-memory database is created for the connection.
|
||||
** <todo>Is SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE required
|
||||
** in sqlite3_open_v2()?</todo>
|
||||
**
|
||||
** {F12719} If the fileName is an empty string, then a private, ephermeral
|
||||
** {F12719} If the file name is an empty string, then a private, ephermeral
|
||||
** on-disk database will be created.
|
||||
** <todo>Is SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE required
|
||||
** in sqlite3_open_v2()?</todo>
|
||||
@ -2045,15 +2045,15 @@ extern "C"
|
||||
** the default [sqlite3_vfs] object is V is a NULL pointer.
|
||||
*/
|
||||
int sqlite3_open(
|
||||
const char *fileName, /* Database fileName (UTF-8) */
|
||||
const char *fileName, /* Database file name (UTF-8) */
|
||||
sqlite3 **ppDb /* OUT: SQLite db handle */
|
||||
);
|
||||
int sqlite3_open16(
|
||||
const void *fileName, /* Database fileName (UTF-16) */
|
||||
const void *fileName, /* Database file name (UTF-16) */
|
||||
sqlite3 **ppDb /* OUT: SQLite db handle */
|
||||
);
|
||||
int sqlite3_open_v2(
|
||||
const char *fileName, /* Database fileName (UTF-8) */
|
||||
const char *fileName, /* Database file name (UTF-8) */
|
||||
sqlite3 **ppDb, /* OUT: SQLite db handle */
|
||||
int flags, /* Flags */
|
||||
const char *zVfs /* Name of VFS module to use */
|
||||
@ -4038,7 +4038,7 @@ extern "C"
|
||||
** Meta information is returned by writing to the memory locations passed as
|
||||
** the 5th and subsequent parameters to this function. Any of these
|
||||
** arguments may be NULL, in which case the corresponding element of meta
|
||||
** information is ommitted.
|
||||
** information is omitted.
|
||||
**
|
||||
** <pre>
|
||||
** Parameter Output Type Description
|
||||
|
@ -50,7 +50,7 @@ class CORE_EXPORT QgsMarkerCatalogue
|
||||
*/
|
||||
QPicture pictureMarker( QString fullName, double size, QPen pen, QBrush brush, bool qtBug = true );
|
||||
|
||||
/** Returns a pixmap given a fileName of a svg marker
|
||||
/** Returns a pixmap given a file name of a svg marker
|
||||
* NOTE: this method needs to be public static for QgsMarkerDialog::visualizeMarkers */
|
||||
static void svgMarker( QPainter * thepPainter, QString name, double size );
|
||||
private:
|
||||
|
@ -384,7 +384,7 @@ void QgsSymbol::cache( QColor selectionColor )
|
||||
|
||||
void QgsSymbol::cache2( double widthScale, QColor selectionColor )
|
||||
{
|
||||
// QgsDebugMsg(QString("QgsSymbol::cache2 widthScale = %1").arg(widthScale));
|
||||
// QgsDebugMsg(QString("widthScale = %1").arg(widthScale));
|
||||
|
||||
QPen pen = mPen;
|
||||
pen.setWidthF( widthScale * pen.widthF() );
|
||||
|
@ -31,7 +31,7 @@ plugins at startup:
|
||||
|
||||
export QT_PLUGIN_PATH={QGIS Install Prefix}/lib/qgis
|
||||
|
||||
Note that the 'designer' directory is ommitted from the path.
|
||||
Note that the 'designer' directory is omitted from the path.
|
||||
|
||||
Its probably a good idea to add the above export clause to
|
||||
your ~/.bash_profile or ~/.bashrc if you plan to use the
|
||||
|
@ -643,7 +643,7 @@ void QgsMapCanvas::keyPressEvent( QKeyEvent * e )
|
||||
refresh();
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
case Qt::Key_Space:
|
||||
QgsDebugMsg( "Pressing pan selector" );
|
||||
@ -656,16 +656,16 @@ void QgsMapCanvas::keyPressEvent( QKeyEvent * e )
|
||||
}
|
||||
break;
|
||||
|
||||
case Qt::Key_PageUp:
|
||||
QgsDebugMsg("Zoom in");
|
||||
zoom(true);
|
||||
break;
|
||||
|
||||
case Qt::Key_PageDown:
|
||||
QgsDebugMsg("Zoom out");
|
||||
zoom(false);
|
||||
break;
|
||||
|
||||
case Qt::Key_PageUp:
|
||||
QgsDebugMsg( "Zoom in" );
|
||||
zoom( true );
|
||||
break;
|
||||
|
||||
case Qt::Key_PageDown:
|
||||
QgsDebugMsg( "Zoom out" );
|
||||
zoom( false );
|
||||
break;
|
||||
|
||||
default:
|
||||
// Pass it on
|
||||
if ( mMapTool )
|
||||
|
@ -83,9 +83,7 @@ void QgsMapCanvasItem::setRect( const QgsRect& rect )
|
||||
setPos( r.topLeft() );
|
||||
mItemSize = QSizeF( r.width() + 2, r.height() + 2 );
|
||||
|
||||
#ifdef QGISDEBUG
|
||||
// QgsDebugMsg(QString("QgsMapCanvasItem::setRect: [%1,%2]-[%3x%4]").arg((int) r.left()).arg((int) r.top()).arg((int) r.width()).arg((int) r.height()));
|
||||
#endif
|
||||
// QgsDebugMsg(QString("[%1,%2]-[%3x%4]").arg((int) r.left()).arg((int) r.top()).arg((int) r.width()).arg((int) r.height()));
|
||||
|
||||
update();
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ void QgsQuickPrint::printMap()
|
||||
{
|
||||
return;
|
||||
}
|
||||
//ensure the user never ommitted the extension from the fileName
|
||||
//ensure the user never omitted the extension from the file name
|
||||
if ( !mOutputFileName.toUpper().endsWith( ".PDF" ) )
|
||||
{
|
||||
mOutputFileName += ".pdf";
|
||||
@ -681,7 +681,7 @@ void QgsQuickPrint::scaleTextLabels( int theScaleFactor, SymbolScalingType theDi
|
||||
{
|
||||
if ( 0 >= theScaleFactor )
|
||||
{
|
||||
QgsDebugMsg( "QgsQuickPrintGui::scaleTextLabels invalid scale factor" );
|
||||
QgsDebugMsg( "invalid scale factor" );
|
||||
return;
|
||||
}
|
||||
QStringList myLayerSet = mpMapRenderer->layerSet();
|
||||
@ -721,7 +721,7 @@ void QgsQuickPrint::scalePointSymbols( int theScaleFactor, SymbolScalingType the
|
||||
{
|
||||
if ( 0 >= theScaleFactor )
|
||||
{
|
||||
QgsDebugMsg( "QgsQuickPrintGui::scalePointSymbolsForPrint invalid scale factor" );
|
||||
QgsDebugMsg( "invalid scale factor" );
|
||||
return;
|
||||
}
|
||||
QStringList myLayerSet = mpMapRenderer->layerSet();
|
||||
|
@ -119,8 +119,8 @@ void dxf2shpConverterGui::on_buttonBox_helpRequested()
|
||||
{
|
||||
QString s = tr( "Fields description:\n"
|
||||
"* Input DXF file: path to the DXF file to be converted\n"
|
||||
"* Output Shp file: desired fileName of the ShapeFile to be created\n"
|
||||
"* Shp output file type: specifies the type of the output shapefile\n"
|
||||
"* Output Shp file: desired name of the shape file to be created\n"
|
||||
"* Shp output file type: specifies the type of the output shape file\n"
|
||||
"* Export text labels checkbox: if checked, an additional shp points layer will be created, "
|
||||
" and the associated dbf table will contain informations about the \"TEXT\" fields found"
|
||||
" in the dxf file, and the text strings themselves\n\n"
|
||||
@ -159,7 +159,7 @@ void dxf2shpConverterGui::getInputFileName()
|
||||
void dxf2shpConverterGui::getOutputDir()
|
||||
{
|
||||
QString s = QFileDialog::getSaveFileName( this,
|
||||
tr( "Choose a fileName to save to" ),
|
||||
tr( "Choose a file name to save to" ),
|
||||
"output.shp",
|
||||
"Shapefile (*.shp)" );
|
||||
|
||||
|
@ -435,7 +435,7 @@ bool DL_Dxf::processDXFGroup( DL_CreationInterface* creationInterface,
|
||||
{
|
||||
|
||||
|
||||
// QgsDebugMsg(QString("DL_Dxf::processDXFGroup: %1: %2").arg(groupCode).arg(groupValue));
|
||||
// QgsDebugMsg(QString("groupCode=%1 groupValue=%2").arg(groupCode).arg(groupValue));
|
||||
|
||||
// Init on first call
|
||||
if ( firstCall )
|
||||
@ -1064,25 +1064,25 @@ void DL_Dxf::addSpline( DL_CreationInterface* creationInterface )
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
/**
|
||||
* Adds a knot to the previously added spline.
|
||||
*/
|
||||
/*
|
||||
void DL_Dxf::addKnot(DL_CreationInterface* creationInterface) {
|
||||
QgsDebugMsg("DL_Dxf::addKnot");
|
||||
void DL_Dxf::addKnot( DL_CreationInterface* creationInterface )
|
||||
{
|
||||
QgsDebugMsg( "entered." );
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/**
|
||||
* Adds a control point to the previously added spline.
|
||||
*/
|
||||
/*
|
||||
void DL_Dxf::addControlPoint(DL_CreationInterface* creationInterface) {
|
||||
QgsDebugMsg("DL_Dxf::addControlPoint");
|
||||
void DL_Dxf::addControlPoint( DL_CreationInterface* creationInterface )
|
||||
{
|
||||
QgsDebugMsg( "entered." );
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@ -2670,7 +2670,7 @@ void DL_Dxf::writeInsert( DL_WriterA& dw,
|
||||
|
||||
if ( data.name.empty() )
|
||||
{
|
||||
QgsDebugMsg( "DL_Dxf::writeInsert: Block name must not be empty" );
|
||||
QgsDebugMsg( "Block name must not be empty" );
|
||||
return;
|
||||
}
|
||||
|
||||
@ -3416,11 +3416,13 @@ int DL_Dxf::writeImage( DL_WriterA& dw,
|
||||
const DL_ImageData& data,
|
||||
const DL_Attributes& attrib )
|
||||
{
|
||||
|
||||
/*if (data.file.empty()) {
|
||||
QgsDebugMsg("DL_Dxf::writeImage: Image file must not be empty");
|
||||
return;
|
||||
}*/
|
||||
#if 0
|
||||
if ( data.file.empty() )
|
||||
{
|
||||
QgsDebugMsg( "Image file must not be empty" );
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
dw.entity( "IMAGE" );
|
||||
|
||||
|
@ -216,7 +216,7 @@ void QgsPointDialog::on_cmbTransformType_currentIndexChanged( const QString& val
|
||||
QString fileName( mLayer->source() );
|
||||
QFileInfo file( mLayer->source() );
|
||||
int pos = fileName.size() - file.suffix().size() - 1;
|
||||
fileName.insert( pos, tr( "-modified", "Georeferencer:QgsPointDialog.cpp - used to modify a user given fileName" ) );
|
||||
fileName.insert( pos, tr( "-modified", "Georeferencer:QgsPointDialog.cpp - used to modify a user given file name" ) );
|
||||
pos = fileName.size() - file.suffix().size();
|
||||
fileName.replace( pos, fileName.size(), "tif" );
|
||||
|
||||
@ -226,7 +226,7 @@ void QgsPointDialog::on_cmbTransformType_currentIndexChanged( const QString& val
|
||||
}
|
||||
else
|
||||
{
|
||||
// Reset to the default fileNames
|
||||
// Reset to the default file name
|
||||
leSelectModifiedRaster->setText( "" );
|
||||
enableModifiedRasterControls( false );
|
||||
if ( mLayer )
|
||||
|
@ -138,8 +138,8 @@ void QgsGPSPluginGui::on_buttonBox_accepted()
|
||||
break;
|
||||
}
|
||||
}
|
||||
// The slots that are called above will emit closeGui() when successfull.
|
||||
// If not succesfull, the user will get another shot without starting from scratch
|
||||
// The slots that are called above will emit closeGui() when successful.
|
||||
// If not successful, the user will get another shot without starting from scratch
|
||||
// accept();
|
||||
}
|
||||
|
||||
@ -148,7 +148,7 @@ void QgsGPSPluginGui::on_pbnDLOutput_clicked()
|
||||
{
|
||||
QString myFileNameQString =
|
||||
QFileDialog::getSaveFileName( this, //parent dialog
|
||||
tr( "Choose a fileName to save under" ),
|
||||
tr( "Choose a file name to save under" ),
|
||||
"." , //initial dir
|
||||
tr( "GPS eXchange format (*.gpx)" ) );
|
||||
if ( !myFileNameQString.isEmpty() )
|
||||
@ -292,7 +292,7 @@ void QgsGPSPluginGui::on_pbnIMPOutput_clicked()
|
||||
{
|
||||
QString myFileNameQString =
|
||||
QFileDialog::getSaveFileName( this, //parent dialog
|
||||
tr( "Choose a fileName to save under" ),
|
||||
tr( "Choose a file name to save under" ),
|
||||
".", //initial dir
|
||||
tr( "GPS eXchange format (*.gpx)" ) );
|
||||
if ( !myFileNameQString.isEmpty() )
|
||||
@ -516,7 +516,7 @@ void QgsGPSPluginGui::populateIMPDialog()
|
||||
QString sentence1 = tr( "QGIS can only load GPX files by itself, but many other formats can be converted to GPX using GPSBabel (%1)." )
|
||||
.arg( "<a href=\"http://www.gpsbabel.org\">http://www.gpsbabel.org</a>" );
|
||||
QString sentence2 = tr( "This requires that you have GPSBabel installed where QGIS can find it." );
|
||||
QString sentence3 = tr( "Select a GPS file format and the file that you want to import, the feature type that you want to use, a GPX fileName that you want to save the converted file as, and a name for the new layer." );
|
||||
QString sentence3 = tr( "Select a GPS file format and the file that you want to import, the feature type that you want to use, a GPX file name that you want to save the converted file as, and a name for the new layer." );
|
||||
QString sentence4 = tr( "All file formats can not store waypoints, routes, and tracks, so some feature types may be disabled for some file formats." );
|
||||
|
||||
QString text = format.arg( sentence1 ).arg( sentence2 ).arg( sentence3 ).arg( sentence4 );
|
||||
@ -536,7 +536,7 @@ void QgsGPSPluginGui::populateCONVDialog()
|
||||
QString sentence1 = tr( "QGIS can perform conversions of GPX files, by using GPSBabel (%1) to perform the conversions." )
|
||||
.arg( "<a href=\"http://www.gpsbabel.org\">http://www.gpsbabel.org</a>" );
|
||||
QString sentence2 = tr( "This requires that you have GPSBabel installed where QGIS can find it." );
|
||||
QString sentence3 = tr( "Select a GPX input file name, the type of conversion you want to perform, a GPX fileName that you want to save the converted file as, and a name for the new layer created from the result." );
|
||||
QString sentence3 = tr( "Select a GPX input file name, the type of conversion you want to perform, a GPX file name that you want to save the converted file as, and a name for the new layer created from the result." );
|
||||
|
||||
QString text = format.arg( sentence1 ).arg( sentence2 ).arg( sentence3 );
|
||||
|
||||
@ -566,7 +566,7 @@ void QgsGPSPluginGui::on_pbnCONVOutput_clicked()
|
||||
{
|
||||
QString myFileNameQString =
|
||||
QFileDialog::getSaveFileName( this, //parent dialog
|
||||
tr( "Choose a fileName to save under" ),
|
||||
tr( "Choose a file name to save under" ),
|
||||
".", //initial dir
|
||||
tr( "GPS eXchange format (*.gpx)" ) );
|
||||
if ( !myFileNameQString.isEmpty() )
|
||||
|
@ -120,21 +120,21 @@ QgsGrassAttributes::~QgsGrassAttributes()
|
||||
|
||||
void QgsGrassAttributes::restorePosition()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassAttributes::restorePosition()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
QSettings settings;
|
||||
restoreGeometry( settings.value( "/GRASS/windows/attributes/geometry" ).toByteArray() );
|
||||
}
|
||||
|
||||
void QgsGrassAttributes::saveWindowLocation()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassAttributes::saveWindowLocation()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
QSettings settings;
|
||||
settings.setValue( "/GRASS/windows/attributes/geometry", saveGeometry() );
|
||||
}
|
||||
|
||||
int QgsGrassAttributes::addTab( const QString & label )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassAttributes::addTab()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
Q3Table *tb = new Q3Table( 2, 3 );
|
||||
tb->setColumnReadOnly( 0, TRUE );
|
||||
@ -177,7 +177,7 @@ int QgsGrassAttributes::addTab( const QString & label )
|
||||
|
||||
void QgsGrassAttributes::setField( int tab, int field )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassAttributes::setField()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
Q3Table *tb = ( Q3Table * ) tabCats->page( tab );
|
||||
|
||||
@ -189,7 +189,7 @@ void QgsGrassAttributes::setField( int tab, int field )
|
||||
|
||||
void QgsGrassAttributes::setCat( int tab, const QString & name, int cat )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassAttributes::setField()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
Q3Table *tb = ( Q3Table * ) tabCats->page( tab );
|
||||
|
||||
@ -204,7 +204,7 @@ void QgsGrassAttributes::setCat( int tab, const QString & name, int cat )
|
||||
void QgsGrassAttributes::addAttribute( int tab, const QString &name, const QString &value,
|
||||
const QString &type )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassAttributes::addAttribute(): %1: %2" ).arg( name ).arg( value ) );
|
||||
QgsDebugMsg( QString( "name=%1 value=%2" ).arg( name ).arg( value ) );
|
||||
|
||||
Q3Table *tb = ( Q3Table * ) tabCats->page( tab );
|
||||
|
||||
@ -224,7 +224,7 @@ void QgsGrassAttributes::addAttribute( int tab, const QString &name, const QStri
|
||||
|
||||
void QgsGrassAttributes::addTextRow( int tab, const QString &text )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassAttributes::addTextRow()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
Q3Table *tb = ( Q3Table * ) tabCats->page( tab );
|
||||
|
||||
@ -237,7 +237,7 @@ void QgsGrassAttributes::addTextRow( int tab, const QString &text )
|
||||
|
||||
void QgsGrassAttributes::updateAttributes( )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassAttributes::updateAttributes()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
if ( tabCats->count() == 0 ) return;
|
||||
|
||||
@ -298,7 +298,7 @@ void QgsGrassAttributes::updateAttributes( )
|
||||
|
||||
void QgsGrassAttributes::addCat( )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassAttributes::addCat()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
mEdit->addCat( mLine );
|
||||
|
||||
@ -310,7 +310,7 @@ void QgsGrassAttributes::addCat( )
|
||||
|
||||
void QgsGrassAttributes::deleteCat( )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassAttributes::deleteCat()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
if ( tabCats->count() == 0 ) return;
|
||||
|
||||
@ -328,7 +328,7 @@ void QgsGrassAttributes::deleteCat( )
|
||||
|
||||
void QgsGrassAttributes::clear( )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassAttributes::clear()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
while ( tabCats->count() > 0 )
|
||||
{
|
||||
@ -341,7 +341,7 @@ void QgsGrassAttributes::clear( )
|
||||
|
||||
void QgsGrassAttributes::tabChanged( QWidget *widget )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassAttributes::tabChanged()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
//Q3Table *tb = (Q3Table *) tabCats->currentPage();
|
||||
|
||||
|
@ -145,7 +145,7 @@ QgsGrassBrowser::~QgsGrassBrowser() { }
|
||||
|
||||
void QgsGrassBrowser::refresh()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassBrowser::refresh()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
mModel->refresh();
|
||||
mTree->update();
|
||||
@ -153,7 +153,7 @@ void QgsGrassBrowser::refresh()
|
||||
|
||||
void QgsGrassBrowser::addMap()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassBrowser::addMap()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
QModelIndexList indexes = mTree->selectionModel()->selectedIndexes();
|
||||
bool mapSelected = false;
|
||||
@ -207,7 +207,7 @@ void QgsGrassBrowser::addMap()
|
||||
|
||||
void QgsGrassBrowser::doubleClicked( const QModelIndex & index )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassBrowser::doubleClicked()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
addMap();
|
||||
}
|
||||
@ -219,7 +219,7 @@ QString QgsGrassBrowser::formatMessage( QString msg )
|
||||
|
||||
void QgsGrassBrowser::copyMap()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassBrowser::copyMap()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
QModelIndexList indexes = mTree->selectionModel()->selectedIndexes();
|
||||
|
||||
@ -291,7 +291,7 @@ void QgsGrassBrowser::copyMap()
|
||||
|
||||
void QgsGrassBrowser::renameMap()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassBrowser::renameMap()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
QModelIndexList indexes = mTree->selectionModel()->selectedIndexes();
|
||||
|
||||
@ -355,7 +355,7 @@ void QgsGrassBrowser::renameMap()
|
||||
|
||||
void QgsGrassBrowser::deleteMap()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassBrowser::deleteMap()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
QModelIndexList indexes = mTree->selectionModel()->selectedIndexes();
|
||||
|
||||
@ -408,7 +408,7 @@ void QgsGrassBrowser::deleteMap()
|
||||
|
||||
void QgsGrassBrowser::setRegion()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassBrowser::setRegion()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
struct Cell_head window;
|
||||
|
||||
@ -442,7 +442,7 @@ void QgsGrassBrowser::writeRegion( struct Cell_head *window )
|
||||
|
||||
bool QgsGrassBrowser::getItemRegion( QModelIndex index, struct Cell_head *window )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassBrowser::setRegion()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
int type = mModel->itemType( index );
|
||||
QString mapset = mModel->itemMapset( index );
|
||||
@ -470,7 +470,7 @@ bool QgsGrassBrowser::getItemRegion( QModelIndex index, struct Cell_head *window
|
||||
|
||||
void QgsGrassBrowser::selectionChanged( const QItemSelection & selected, const QItemSelection & deselected )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassBrowser::selectionChanged()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
mActionAddMap->setEnabled( false );
|
||||
mActionCopyMap->setEnabled( false );
|
||||
@ -512,7 +512,7 @@ void QgsGrassBrowser::selectionChanged( const QItemSelection & selected, const Q
|
||||
|
||||
void QgsGrassBrowser::currentChanged( const QModelIndex & current, const QModelIndex & previous )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassBrowser::currentChanged()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
}
|
||||
|
||||
void QgsGrassBrowser::setLocation( const QString &gisbase, const QString &location )
|
||||
|
@ -175,7 +175,7 @@ bool QgsGrassEdit::isEditable( QgsMapLayer *layer )
|
||||
|
||||
void QgsGrassEdit::keyPress( QKeyEvent *e )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassEdit::keyPress" );
|
||||
QgsDebugMsg( "entered." );
|
||||
// This does not work:
|
||||
//keyPressEvent(e);
|
||||
|
||||
@ -544,7 +544,7 @@ void QgsGrassEdit::init()
|
||||
|
||||
void QgsGrassEdit::attributeTableFieldChanged( void )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassEdit::attributeTableFieldChanged" );
|
||||
QgsDebugMsg( "entered." );
|
||||
int field = mTableField->currentText().toInt();
|
||||
|
||||
setAttributeTable( field );
|
||||
@ -605,7 +605,7 @@ void QgsGrassEdit::setAttributeTable( int field )
|
||||
|
||||
void QgsGrassEdit::addColumn( void )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassEdit::addColumn()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
int r = mAttributeTable->numRows();
|
||||
mAttributeTable->setNumRows( r + 1 );
|
||||
mAttributeTable->setRowReadOnly( r, false );
|
||||
@ -634,7 +634,7 @@ void QgsGrassEdit::addColumn( void )
|
||||
|
||||
void QgsGrassEdit::columnTypeChanged( int row, int col )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassEdit::columnChanged() row = %1 col = %2" ).arg( row ).arg( col ) );
|
||||
QgsDebugMsg( QString( "row = %1 col = %2" ).arg( row ).arg( col ) );
|
||||
|
||||
if ( col != 1 ) return;
|
||||
|
||||
@ -661,7 +661,7 @@ void QgsGrassEdit::columnTypeChanged( int row, int col )
|
||||
|
||||
void QgsGrassEdit::alterTable( void )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassEdit::alterTable()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
// Create new table if first column name is editable otherwise alter table
|
||||
int field = mTableField->currentText().toInt();
|
||||
@ -733,7 +733,7 @@ void QgsGrassEdit::alterTable( void )
|
||||
|
||||
void QgsGrassEdit::changeSymbology( Q3ListViewItem * item, const QPoint & pnt, int col )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassEdit::changeSymbology() col = %1" ).arg( col ) );
|
||||
QgsDebugMsg( QString( "col = %1" ).arg( col ) );
|
||||
|
||||
QSettings settings;
|
||||
|
||||
@ -777,7 +777,7 @@ void QgsGrassEdit::changeSymbology( Q3ListViewItem * item, const QPoint & pnt, i
|
||||
|
||||
void QgsGrassEdit::lineWidthChanged()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassEdit::lineWidthChanged()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
QSettings settings;
|
||||
mLineWidth = mLineWidthSpinBox->value();
|
||||
|
||||
@ -792,7 +792,7 @@ void QgsGrassEdit::lineWidthChanged()
|
||||
|
||||
void QgsGrassEdit::markerSizeChanged()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassEdit::markerSizeChanged()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
QSettings settings;
|
||||
mSize = mMarkerSizeSpinBox->value();
|
||||
QString spath = "/GRASS/edit/symb/";
|
||||
@ -813,7 +813,7 @@ void QgsGrassEdit::saveWindowLocation()
|
||||
|
||||
void QgsGrassEdit::updateSymb( void )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassEdit::updateSymb" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
// Set lines symbology from map
|
||||
unsigned int nlines = mProvider->numLines();
|
||||
@ -846,7 +846,7 @@ void QgsGrassEdit::updateSymb( void )
|
||||
|
||||
int QgsGrassEdit::nodeSymbFromMap( int node )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassEdit::nodeSymbFromMap() node = %1" ).arg( node ) );
|
||||
QgsDebugMsg( QString( "node = %1" ).arg( node ) );
|
||||
|
||||
int nlines = mProvider->nodeNLines( node );
|
||||
|
||||
@ -871,7 +871,7 @@ int QgsGrassEdit::nodeSymbFromMap( int node )
|
||||
|
||||
int QgsGrassEdit::lineSymbFromMap( int line )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassEdit::lineSymbFromMap() line = %1" ).arg( line ) );
|
||||
QgsDebugMsg( QString( "line = %1" ).arg( line ) );
|
||||
|
||||
int type = mProvider->readLine( NULL, NULL, line );
|
||||
|
||||
@ -914,7 +914,7 @@ int QgsGrassEdit::lineSymbFromMap( int line )
|
||||
|
||||
QgsGrassEdit::~QgsGrassEdit()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassEdit::~QgsGrassEdit()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
// we can only call some methods if init was complete,
|
||||
// note that we cannot use mValid because it is disabled before
|
||||
@ -952,7 +952,7 @@ bool QgsGrassEdit::isValid( void )
|
||||
|
||||
void QgsGrassEdit::closeEdit( void )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassEdit::close()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
// Disconnect signals
|
||||
// Warning: it seems that slots (postRender) can be called even
|
||||
@ -995,7 +995,7 @@ void QgsGrassEdit::closeEdit( void )
|
||||
|
||||
void QgsGrassEdit::closeEvent( QCloseEvent *e )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassEdit::closeEvent()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
e->accept();
|
||||
|
||||
@ -1004,7 +1004,7 @@ void QgsGrassEdit::closeEvent( QCloseEvent *e )
|
||||
|
||||
void QgsGrassEdit::catModeChanged( void )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassEdit::catModeChanged()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
int mode = mCatModeBox->currentItem();
|
||||
|
||||
int field = mFieldBox->currentText().toInt();
|
||||
@ -1039,7 +1039,7 @@ void QgsGrassEdit::catModeChanged( void )
|
||||
|
||||
void QgsGrassEdit::fieldChanged( void )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassEdit::fieldChanged()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
int mode = mCatModeBox->currentItem();
|
||||
int field = mFieldBox->currentText().toInt();
|
||||
|
||||
@ -1235,13 +1235,13 @@ void QgsGrassEdit::newPoint( void )
|
||||
|
||||
void QgsGrassEdit::newLine( void )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassEdit::newLine" );
|
||||
QgsDebugMsg( "entered." );
|
||||
startTool( QgsGrassEdit::NEW_LINE );
|
||||
}
|
||||
|
||||
void QgsGrassEdit::newBoundary( void )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassEdit::newBoundary" );
|
||||
QgsDebugMsg( "entered." );
|
||||
startTool( QgsGrassEdit::NEW_BOUNDARY );
|
||||
}
|
||||
|
||||
@ -1292,7 +1292,7 @@ void QgsGrassEdit::editAttributes( void )
|
||||
|
||||
void QgsGrassEdit::startTool( int tool )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassEdit::startTool() tool = %1" ).arg( tool ) );
|
||||
QgsDebugMsg( QString( "tool = %1" ).arg( tool ) );
|
||||
|
||||
// Delete last dynamic drawing from canvas
|
||||
eraseDynamic();
|
||||
@ -1393,7 +1393,7 @@ void QgsGrassEdit::startTool( int tool )
|
||||
|
||||
void QgsGrassEdit::checkOrphan( int field, int cat )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassEdit::checkOrphan field = %1 cat = %2" ).arg( field ).arg( cat ) );
|
||||
QgsDebugMsg( QString( "field = %1 cat = %2" ).arg( field ).arg( cat ) );
|
||||
|
||||
int orphan;
|
||||
QString *error = mProvider->isOrphan( field, cat, &orphan );
|
||||
@ -1532,7 +1532,7 @@ void QgsGrassEdit::addCat( int line )
|
||||
|
||||
void QgsGrassEdit::deleteCat( int line, int field, int cat )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassEdit::deleteCat" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
int type = mProvider->readLine( mPoints, mCats, line );
|
||||
Vect_field_cat_del( mCats, field, cat );
|
||||
@ -1550,7 +1550,7 @@ void QgsGrassEdit::deleteCat( int line, int field, int cat )
|
||||
|
||||
void QgsGrassEdit::postRender( QPainter * )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassEdit::postRender" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
// Warning: it seems that this slot can be called even
|
||||
// after disconnect (is it a queue?)
|
||||
@ -1569,7 +1569,7 @@ void QgsGrassEdit::postRender( QPainter * )
|
||||
|
||||
void QgsGrassEdit::displayMap()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassEdit::displayMap" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
mTransform = mCanvas->getCoordinateTransform();
|
||||
|
||||
@ -1616,7 +1616,7 @@ void QgsGrassEdit::displayMap()
|
||||
|
||||
void QgsGrassEdit::displayUpdated( void )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassEdit::displayUpdated" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
mTransform = mCanvas->getCoordinateTransform();
|
||||
mProjectionEnabled = ( QgsProject::instance()->readNumEntry( "SpatialRefSys", "/ProjectionsEnabled", 0 ) != 0 );
|
||||
@ -1656,7 +1656,7 @@ void QgsGrassEdit::displayUpdated( void )
|
||||
|
||||
void QgsGrassEdit::displayElement( int line, const QPen & pen, int size, QPainter *painter )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassEdit::displayElement() line = %1" ).arg( line ) );
|
||||
QgsDebugMsg( QString( "line = %1" ).arg( line ) );
|
||||
|
||||
// is it a valid line?
|
||||
if ( line == 0 )
|
||||
@ -1711,7 +1711,7 @@ void QgsGrassEdit::displayElement( int line, const QPen & pen, int size, QPainte
|
||||
|
||||
void QgsGrassEdit::eraseElement( int line )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassEdit::eraseElement() line = %1" ).arg( line ) );
|
||||
QgsDebugMsg( QString( "line = %1" ).arg( line ) );
|
||||
|
||||
int type = mProvider->readLine( NULL, NULL, line );
|
||||
if ( type < 0 ) return;
|
||||
@ -1746,14 +1746,14 @@ void QgsGrassEdit::displayDynamic( struct line_pnts *Points )
|
||||
|
||||
void QgsGrassEdit::displayDynamic( double x, double y, int type, int size )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassEdit::displayDynamic icon" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
displayDynamic( 0, x, y, type, size );
|
||||
}
|
||||
|
||||
void QgsGrassEdit::displayDynamic( struct line_pnts *Points, double x, double y, int type, int size )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassEdit::displayDynamic Points = %1 type = %2" ).arg( QString::number(( qulonglong )Points, 16 ).toLocal8Bit().constData() ).arg( type ) );
|
||||
QgsDebugMsg( QString( "Points = %1 type = %2" ).arg( QString::number(( qulonglong )Points, 16 ).toLocal8Bit().constData() ).arg( type ) );
|
||||
QgsPoint point;
|
||||
|
||||
//mTransform = mCanvas->getCoordinateTransform();
|
||||
@ -1786,7 +1786,7 @@ void QgsGrassEdit::displayDynamic( struct line_pnts *Points, double x, double y,
|
||||
|
||||
void QgsGrassEdit::displayNode( int node, const QPen & pen, int size, QPainter *painter )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassEdit::displayNode() node = %1" ).arg( node ) );
|
||||
QgsDebugMsg( QString( "node = %1" ).arg( node ) );
|
||||
|
||||
if ( !mSymbDisplay[mNodeSymb[node]] ) return;
|
||||
|
||||
@ -1811,7 +1811,7 @@ QgsPoint QgsGrassEdit::transformLayerToMap( QgsPoint point )
|
||||
void QgsGrassEdit::displayIcon( double x, double y, const QPen & pen,
|
||||
int type, int size, QPainter *painter )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassEdit::displayIcon()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
QgsPoint point;
|
||||
Q3PointArray pointArray( 2 );
|
||||
@ -1880,7 +1880,7 @@ void QgsGrassEdit::displayIcon( double x, double y, const QPen & pen,
|
||||
|
||||
void QgsGrassEdit::setCanvasPropmt( QString left, QString mid, QString right )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassEdit::setCanvasPropmt" );
|
||||
QgsDebugMsg( "entered." );
|
||||
mCanvasPrompt = "";
|
||||
if ( left.length() > 0 ) mCanvasPrompt.append( tr( "Left: " ) + left + " " );
|
||||
if ( mid.length() > 0 ) mCanvasPrompt.append( tr( "Middle: " ) + mid + " " );
|
||||
|
@ -140,7 +140,7 @@ void QgsGrassEditNewLine::deactivate()
|
||||
|
||||
void QgsGrassEditNewLine::activate()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassEditNewLine::activate()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
// Display dynamic segment
|
||||
if ( e->mEditPoints->n_points > 0 )
|
||||
|
@ -259,7 +259,7 @@ QgsGrassMapcalc::QgsGrassMapcalc(
|
||||
|
||||
void QgsGrassMapcalc::contentsMousePressEvent( QMouseEvent* e )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassMapcalc::contentsMousePressEvent mTool = %1 mToolStep = %2" ).arg( mTool ).arg( mToolStep ) );
|
||||
QgsDebugMsg( QString( "mTool = %1 mToolStep = %2" ).arg( mTool ).arg( mToolStep ) );
|
||||
|
||||
QPoint p = mView->inverseWorldMatrix().map( e->pos() );
|
||||
limit( &p );
|
||||
@ -366,9 +366,7 @@ void QgsGrassMapcalc::contentsMousePressEvent( QMouseEvent* e )
|
||||
|
||||
void QgsGrassMapcalc::contentsMouseMoveEvent( QMouseEvent* e )
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
// QgsDebugMsg(QString("QgsGrassMapcalc::contentsMouseMoveEvent mTool = %1 mToolStep = %2").arg(mTool).arg(mToolStep));
|
||||
#endif
|
||||
// QgsDebugMsg(QString("mTool = %1 mToolStep = %2").arg(mTool).arg(mToolStep));
|
||||
|
||||
QPoint p = mView->inverseWorldMatrix().map( e->pos() );
|
||||
limit( &p );
|
||||
@ -432,7 +430,7 @@ void QgsGrassMapcalc::contentsMouseMoveEvent( QMouseEvent* e )
|
||||
|
||||
void QgsGrassMapcalc::contentsMouseReleaseEvent( QMouseEvent* e )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassMapcalc::contentsMouseReleaseEvent mTool = %1 mToolStep = %2" ).arg( mTool ).arg( mToolStep ) );
|
||||
QgsDebugMsg( QString( "mTool = %1 mToolStep = %2" ).arg( mTool ).arg( mToolStep ) );
|
||||
|
||||
QPoint p = mView->inverseWorldMatrix().map( e->pos() );
|
||||
limit( &p );
|
||||
@ -483,7 +481,7 @@ QStringList QgsGrassMapcalc::arguments()
|
||||
|
||||
QStringList QgsGrassMapcalc::checkOutput()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassMapcalc::checkOutput()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
QStringList list;
|
||||
|
||||
QString value = mOutputLineEdit->text().trimmed();
|
||||
@ -507,7 +505,7 @@ QStringList QgsGrassMapcalc::checkOutput()
|
||||
|
||||
QStringList QgsGrassMapcalc::checkRegion()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassMapcalc::checkRegion()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
QStringList list;
|
||||
|
||||
Q3CanvasItemList l = mCanvas->allItems();
|
||||
@ -562,7 +560,7 @@ QStringList QgsGrassMapcalc::checkRegion()
|
||||
|
||||
bool QgsGrassMapcalc::inputRegion( struct Cell_head *window, bool all )
|
||||
{
|
||||
QgsDebugMsg( "gsGrassMapcalc::inputRegion" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
if ( !QgsGrass::region( QgsGrass::getDefaultGisdbase(),
|
||||
QgsGrass::getDefaultLocation(),
|
||||
@ -623,7 +621,7 @@ bool QgsGrassMapcalc::inputRegion( struct Cell_head *window, bool all )
|
||||
|
||||
QStringList QgsGrassMapcalc::output( int type )
|
||||
{
|
||||
QgsDebugMsg( "gsGrassMapcalc::output" );
|
||||
QgsDebugMsg( "entered." );
|
||||
QStringList list;
|
||||
if ( type == QgsGrassModuleOption::Raster )
|
||||
{
|
||||
@ -638,7 +636,7 @@ QgsGrassMapcalc::~QgsGrassMapcalc()
|
||||
|
||||
void QgsGrassMapcalc::showOptions( int tool )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassMapcalc::showOptions() tool = %1" ).arg( tool ) );
|
||||
QgsDebugMsg( QString( "tool = %1" ).arg( tool ) );
|
||||
|
||||
// Hide widgets
|
||||
mMapComboBox->hide();
|
||||
@ -663,7 +661,7 @@ void QgsGrassMapcalc::showOptions( int tool )
|
||||
|
||||
void QgsGrassMapcalc::setOption()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassMapcalc::setOption()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
if ( mTool != Select ) return;
|
||||
if ( !mObject ) return;
|
||||
@ -863,7 +861,7 @@ void QgsGrassMapcalc::setToolActionsOff()
|
||||
void QgsGrassMapcalc::updateMaps()
|
||||
{
|
||||
// TODO: this copy and paste from QgsGrassModuleInput, do it better
|
||||
QgsDebugMsg( "QgsGrassMapcalc::updateMaps" );
|
||||
QgsDebugMsg( "entered." );
|
||||
QString current = mMapComboBox->currentText();
|
||||
mMapComboBox->clear();
|
||||
mMaps.resize( 0 );
|
||||
@ -921,7 +919,7 @@ void QgsGrassMapcalc::updateMaps()
|
||||
|
||||
void QgsGrassMapcalc::mapChanged()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassMapcalc::mapChanged" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
if (( mTool != AddMap && mTool != Select ) || !mObject ) return;
|
||||
if ( mObject->type() != QgsGrassMapcalcObject::Map ) return;
|
||||
@ -934,7 +932,7 @@ void QgsGrassMapcalc::mapChanged()
|
||||
|
||||
void QgsGrassMapcalc::constantChanged()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassMapcalc::constantChanged" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
if (( mTool != AddConstant && mTool != Select ) || !mObject ) return;
|
||||
if ( mObject->type() != QgsGrassMapcalcObject::Constant ) return;
|
||||
@ -946,7 +944,7 @@ void QgsGrassMapcalc::constantChanged()
|
||||
|
||||
void QgsGrassMapcalc::functionChanged()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassMapcalc::functionChanged" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
if (( mTool != AddFunction && mTool != Select ) || !mObject ) return;
|
||||
if ( mObject->type() != QgsGrassMapcalcObject::Function ) return;
|
||||
@ -973,7 +971,7 @@ void QgsGrassMapcalc::resizeCanvas( int width, int height )
|
||||
|
||||
void QgsGrassMapcalc::growCanvas( int left, int right, int top, int bottom )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassMapcalc::growCanvas()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
QgsDebugMsg( QString( "left = %1 right = %2 top = %3 bottom = %4" ).arg( left ).arg( right ).arg( top ).arg( bottom ) );
|
||||
|
||||
int width = mCanvas->width() + left + right;
|
||||
@ -1014,7 +1012,7 @@ void QgsGrassMapcalc::growCanvas( int left, int right, int top, int bottom )
|
||||
|
||||
void QgsGrassMapcalc::autoGrow()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassMapcalc::autoGrow()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
int thresh = 15;
|
||||
|
||||
@ -1055,7 +1053,7 @@ void QgsGrassMapcalc::autoGrow()
|
||||
|
||||
void QgsGrassMapcalc::saveAs()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassMapcalc::saveAs()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
// Check/create 'mapcalc' directory in current mapset
|
||||
QString ms = QgsGrass::getDefaultGisdbase() + "/"
|
||||
@ -1111,7 +1109,7 @@ void QgsGrassMapcalc::saveAs()
|
||||
|
||||
void QgsGrassMapcalc::save()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassMapcalc::save()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
if ( mFileName.isEmpty() ) // Should not happen
|
||||
{
|
||||
QMessageBox::warning( this, tr( "Save mapcalc" ), tr( "File name empty" ) );
|
||||
@ -1247,7 +1245,7 @@ void QgsGrassMapcalc::save()
|
||||
|
||||
void QgsGrassMapcalc::load()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassMapcalc::load()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
QgsGrassSelect *sel = new QgsGrassSelect( QgsGrassSelect::MAPCALC );
|
||||
if ( sel->exec() == QDialog::Rejected ) return;
|
||||
@ -1444,7 +1442,7 @@ void QgsGrassMapcalc::load()
|
||||
|
||||
void QgsGrassMapcalc::clear()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassMapcalc::clear()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
setTool( Select );
|
||||
|
||||
@ -1462,7 +1460,7 @@ void QgsGrassMapcalc::clear()
|
||||
/******************** CANVAS ITEMS ******************************/
|
||||
QgsGrassMapcalcItem::QgsGrassMapcalcItem(): mSelected( false )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassMapcalcItem::QgsGrassMapcalcItem()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
}
|
||||
|
||||
QgsGrassMapcalcItem::~QgsGrassMapcalcItem()
|
||||
@ -1485,7 +1483,7 @@ QgsGrassMapcalcObject::QgsGrassMapcalcObject( int type )
|
||||
mType( type ), mCenter( -1000, -1000 ), mSelectionBoxSize( 5 ),
|
||||
mOutputConnector( 0 )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassMapcalcObject::QgsGrassMapcalcObject()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
Q3CanvasRectangle::setZ( 20 );
|
||||
setActive( true );
|
||||
@ -1507,7 +1505,7 @@ QgsGrassMapcalcObject::QgsGrassMapcalcObject( int type )
|
||||
|
||||
QgsGrassMapcalcObject::~QgsGrassMapcalcObject()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassMapcalcObject::~QgsGrassMapcalcObject()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
// Delete connections
|
||||
for ( int i = 0; i < mInputCount; i++ )
|
||||
{
|
||||
@ -1524,7 +1522,7 @@ QgsGrassMapcalcObject::~QgsGrassMapcalcObject()
|
||||
mOutputConnector->setSocket( mOutputConnectorEnd );
|
||||
con->repaint();
|
||||
}
|
||||
QgsDebugMsg( "QgsGrassMapcalcObject::~QgsGrassMapcalcObject() end" );
|
||||
QgsDebugMsg( "exited." );
|
||||
}
|
||||
|
||||
int QgsGrassMapcalcObject::type()
|
||||
@ -1615,7 +1613,7 @@ void QgsGrassMapcalcObject::draw( QPainter & painter )
|
||||
|
||||
void QgsGrassMapcalcObject::setCenter( int x, int y )
|
||||
{
|
||||
// QgsDebugMsg(QString("QgsGrassMapcalcObject::setCenter() x = %1 y = %2").arg(x).arg(y));
|
||||
// QgsDebugMsg(QString("x = %1 y = %2").arg(x).arg(y));
|
||||
mCenter.setX( x );
|
||||
mCenter.setY( y );
|
||||
resetSize();
|
||||
@ -1766,7 +1764,7 @@ void QgsGrassMapcalcObject::setSelected( bool s )
|
||||
bool QgsGrassMapcalcObject::tryConnect( QgsGrassMapcalcConnector *connector,
|
||||
int end )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassMapcalcObject::connect" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
QPoint p = connector->point( end );
|
||||
|
||||
@ -1811,7 +1809,7 @@ bool QgsGrassMapcalcObject::tryConnect( QgsGrassMapcalcConnector *connector,
|
||||
void QgsGrassMapcalcObject::setConnector( int direction, int socket,
|
||||
QgsGrassMapcalcConnector *connector, int end )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassMapcalcObject::setConnector" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
if ( direction == In )
|
||||
{
|
||||
@ -1829,7 +1827,7 @@ void QgsGrassMapcalcObject::setConnector( int direction, int socket,
|
||||
|
||||
QPoint QgsGrassMapcalcObject::socketPoint( int direction , int socket )
|
||||
{
|
||||
// QgsDebugMsg("QgsGrassMapcalcObject::socketPoint");
|
||||
// QgsDebugMsg("entered.");
|
||||
|
||||
if ( direction == In )
|
||||
{
|
||||
@ -1841,7 +1839,7 @@ QPoint QgsGrassMapcalcObject::socketPoint( int direction , int socket )
|
||||
|
||||
QString QgsGrassMapcalcObject::expression()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassMapcalcObject::expression()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
QgsDebugMsg( QString( "mType = %1" ).arg( mType ) );
|
||||
|
||||
if ( mType == Map || mType == Constant )
|
||||
@ -1893,7 +1891,7 @@ QString QgsGrassMapcalcObject::expression()
|
||||
QgsGrassMapcalcConnector::QgsGrassMapcalcConnector( Q3Canvas *canvas )
|
||||
: Q3CanvasLine( canvas ), QgsGrassMapcalcItem()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassMapcalcConnector::QgsGrassMapcalcConnector()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
Q3CanvasLine::setZ( 10 );
|
||||
setActive( true );
|
||||
@ -1954,7 +1952,7 @@ void QgsGrassMapcalcConnector::repaint()
|
||||
|
||||
void QgsGrassMapcalcConnector::setPoint( int index, QPoint point )
|
||||
{
|
||||
// QgsDebugMsg(QString("QgsGrassMapcalcConnector::setPoint index = %1").arg(index));
|
||||
// QgsDebugMsg(QString("index = %1").arg(index));
|
||||
|
||||
mPoints[index] = point;
|
||||
Q3CanvasLine::setPoints( mPoints[0].x(), mPoints[0].y(),
|
||||
@ -1975,7 +1973,7 @@ void QgsGrassMapcalcConnector::setSelected( bool s )
|
||||
|
||||
void QgsGrassMapcalcConnector::selectEnd( QPoint point )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassMapcalcConnector::selectEnd" );
|
||||
QgsDebugMsg( "entered." );
|
||||
mSelectedEnd = -1;
|
||||
|
||||
double d0 = sqrt( pow(( double )( point.x() - mPoints[0].x() ), 2.0 )
|
||||
@ -2006,7 +2004,7 @@ int QgsGrassMapcalcConnector::selectedEnd()
|
||||
|
||||
bool QgsGrassMapcalcConnector::tryConnectEnd( int end )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassMapcalcConnector::tryConnect" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
Q3CanvasItemList l = canvas()->collisions( mPoints[end] );
|
||||
QgsGrassMapcalcObject *object = 0;
|
||||
@ -2032,7 +2030,7 @@ bool QgsGrassMapcalcConnector::tryConnectEnd( int end )
|
||||
void QgsGrassMapcalcConnector::setSocket( int end,
|
||||
QgsGrassMapcalcObject *object, int direction, int socket )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassMapcalcConnector::setSocket" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
// Remove old connection from object
|
||||
if ( mSocketObjects[end] )
|
||||
@ -2071,7 +2069,7 @@ bool QgsGrassMapcalcConnector::connected( int direction )
|
||||
|
||||
QString QgsGrassMapcalcConnector::expression()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassMapcalcConnector::expression()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
for ( int i = 0; i < 2; i++ )
|
||||
{
|
||||
if ( !mSocketObjects[i] ) continue;
|
||||
|
@ -567,7 +567,7 @@ void QgsGrassModel::removeItems( QgsGrassModelItem *item, QStringList list )
|
||||
|
||||
void QgsGrassModel::addItems( QgsGrassModelItem *item, QStringList list, int type )
|
||||
{
|
||||
// QgsDebugMsg("QgsGrassModel::addItems");
|
||||
// QgsDebugMsg("entered.");
|
||||
QModelIndex index = QgsGrassModel::index( item );
|
||||
|
||||
// Add new items
|
||||
@ -739,7 +739,7 @@ void QgsGrassModel::refreshItem( QgsGrassModelItem *item )
|
||||
QModelIndex QgsGrassModel::index( int row, int column,
|
||||
const QModelIndex & parent ) const
|
||||
{
|
||||
// QgsDebugMsg(QString("QgsGrassModel::index row = %1 column = %2").arg(row).arg(column));
|
||||
// QgsDebugMsg(QString("row = %1 column = %2").arg(row).arg(column));
|
||||
|
||||
// It is strange(?) but Qt can call this method with row < 0
|
||||
// for example if beginInsertRows(,0,0) is called and the first
|
||||
@ -763,7 +763,7 @@ QModelIndex QgsGrassModel::index( int row, int column,
|
||||
|
||||
QModelIndex QgsGrassModel::parent( const QModelIndex & index ) const
|
||||
{
|
||||
// QgsDebugMsg("QgsGrassModel::parent");
|
||||
// QgsDebugMsg("entered.");
|
||||
|
||||
if ( !index.isValid() ) return QModelIndex();
|
||||
|
||||
@ -792,7 +792,7 @@ QModelIndex QgsGrassModel::parent( const QModelIndex & index ) const
|
||||
|
||||
int QgsGrassModel::rowCount( const QModelIndex & parent ) const
|
||||
{
|
||||
// QgsDebugMsg("QgsGrassModel::rowCount");
|
||||
// QgsDebugMsg("entered.");
|
||||
QgsGrassModelItem *item;
|
||||
if ( !parent.isValid() )
|
||||
{
|
||||
@ -811,13 +811,13 @@ int QgsGrassModel::rowCount( const QModelIndex & parent ) const
|
||||
|
||||
int QgsGrassModel::columnCount( const QModelIndex & parent ) const
|
||||
{
|
||||
// QgsDebugMsg("QgsGrassModel::columnCount");
|
||||
// QgsDebugMsg("entered.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
QVariant QgsGrassModel::data( const QModelIndex &index, int role ) const
|
||||
{
|
||||
// QgsDebugMsg("QgsGrassModel::data");
|
||||
// QgsDebugMsg("entered.");
|
||||
|
||||
if ( !index.isValid() ) { return QVariant(); }
|
||||
if ( role != Qt::DisplayRole && role != Qt::DecorationRole ) return QVariant();
|
||||
@ -937,7 +937,7 @@ void QgsGrassModel::setLocation( const QString &gisbase, const QString &location
|
||||
QVariant QgsGrassModel::headerData( int section,
|
||||
Qt::Orientation orientation, int role ) const
|
||||
{
|
||||
// QgsDebugMsg("QgsGrassModel::headerData");
|
||||
// QgsDebugMsg("entered.");
|
||||
|
||||
//TODO
|
||||
//if (orientation == Qt::Horizontal && role == Qt::DisplayRole)
|
||||
@ -947,7 +947,7 @@ QVariant QgsGrassModel::headerData( int section,
|
||||
|
||||
Qt::ItemFlags QgsGrassModel::flags( const QModelIndex &index ) const
|
||||
{
|
||||
// QgsDebugMsg("QgsGrassModel::flags");
|
||||
// QgsDebugMsg("entered.");
|
||||
|
||||
//TODO
|
||||
if ( !index.isValid() )
|
||||
|
@ -799,7 +799,7 @@ QStringList QgsGrassModuleStandardOptions::output( int type )
|
||||
|
||||
QStringList QgsGrassModuleStandardOptions::ready()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassModuleStandardOptions::ready()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
QStringList list;
|
||||
|
||||
for ( unsigned int i = 0; i < mItems.size(); i++ )
|
||||
|
@ -189,7 +189,7 @@ QgsGrassNewMapset::QgsGrassNewMapset( QgisInterface *iface,
|
||||
|
||||
QgsGrassNewMapset::~QgsGrassNewMapset()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::~QgsGrassNewMapset()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
mRunning = false;
|
||||
}
|
||||
@ -209,7 +209,7 @@ void QgsGrassNewMapset::browseDatabase()
|
||||
|
||||
void QgsGrassNewMapset::databaseChanged()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::databaseChanged()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
// TODO: reset next tabs
|
||||
//
|
||||
QSettings settings;
|
||||
@ -267,14 +267,14 @@ void QgsGrassNewMapset::databaseChanged()
|
||||
/*************************** LOCATION *******************************/
|
||||
void QgsGrassNewMapset::setLocationPage( )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::setLocationPage" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
setLocations();
|
||||
}
|
||||
|
||||
void QgsGrassNewMapset::setLocations( )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::setLocations" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
mLocationComboBox->clear();
|
||||
|
||||
@ -379,37 +379,37 @@ void QgsGrassNewMapset::checkLocation()
|
||||
|
||||
void QgsGrassNewMapset::existingLocationChanged( const QString &text )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::existingLocationChanged()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
}
|
||||
|
||||
void QgsGrassNewMapset::newLocationChanged()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::newLocationChanged()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
checkLocation();
|
||||
}
|
||||
|
||||
/************************** PROJECTION ******************************/
|
||||
void QgsGrassNewMapset::setProjectionPage()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::setProjectionPage()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
setGrassProjection();
|
||||
}
|
||||
|
||||
void QgsGrassNewMapset::sridSelected( QString theSRID )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::sridSelected()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
projectionSelected();
|
||||
}
|
||||
|
||||
void QgsGrassNewMapset::projectionSelected()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::projectionSelected()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
setGrassProjection();
|
||||
}
|
||||
|
||||
void QgsGrassNewMapset::projRadioSwitched()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::projRadioSwitched" );
|
||||
QgsDebugMsg( "entered." );
|
||||
if ( mNoProjRadioButton->isChecked() )
|
||||
{
|
||||
mProjectionSelector->setEnabled( false );
|
||||
@ -424,7 +424,7 @@ void QgsGrassNewMapset::projRadioSwitched()
|
||||
|
||||
void QgsGrassNewMapset::setGrassProjection()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::setGrassProjection()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
setError( mProjErrorLabel, "" );
|
||||
|
||||
QString proj4 = mProjectionSelector->getSelectedProj4String();
|
||||
@ -525,7 +525,7 @@ void QgsGrassNewMapset::setGrassProjection()
|
||||
/**************************** REGION ********************************/
|
||||
void QgsGrassNewMapset::setRegionPage()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::setRegionPage()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
// Set defaults
|
||||
if ( !mRegionModified )
|
||||
@ -638,7 +638,7 @@ void QgsGrassNewMapset::setRegionPage()
|
||||
|
||||
void QgsGrassNewMapset::setGrassRegionDefaults()
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassNewMapset::setGrassRegionDefaults() mCellHead.proj = %1" ).arg( mCellHead.proj ) );
|
||||
QgsDebugMsg( QString( "mCellHead.proj = %1" ).arg( mCellHead.proj ) );
|
||||
|
||||
int srsid = QgsProject::instance()->readNumEntry(
|
||||
"SpatialRefSys", "/ProjectCRSID", 0 );
|
||||
@ -690,7 +690,7 @@ void QgsGrassNewMapset::setGrassRegionDefaults()
|
||||
|
||||
void QgsGrassNewMapset::regionChanged()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::regionChanged()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
mRegionModified = true;
|
||||
checkRegion();
|
||||
@ -699,7 +699,7 @@ void QgsGrassNewMapset::regionChanged()
|
||||
|
||||
void QgsGrassNewMapset::checkRegion()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::checkRegion()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
bool err = false;
|
||||
|
||||
@ -760,7 +760,7 @@ void QgsGrassNewMapset::checkRegion()
|
||||
|
||||
void QgsGrassNewMapset::loadRegions()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::loadRegions()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
QString path = QgsApplication::pkgDataPath() + "/grass/locations.gml";
|
||||
QgsDebugMsg( QString( "load:%1" ).arg( path.local8Bit().data() ) );
|
||||
@ -855,7 +855,7 @@ void QgsGrassNewMapset::loadRegions()
|
||||
|
||||
void QgsGrassNewMapset::setSelectedRegion()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::setSelectedRegion()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
// mRegionsPoints are in EPSG 4326 = LL WGS84
|
||||
int index = 2 * mRegionsComboBox->currentItem();
|
||||
@ -963,7 +963,7 @@ void QgsGrassNewMapset::setSelectedRegion()
|
||||
|
||||
void QgsGrassNewMapset::setCurrentRegion()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::setCurrentRegion()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
QgsRect ext = mIface->getMapCanvas()->extent();
|
||||
|
||||
@ -1021,7 +1021,7 @@ void QgsGrassNewMapset::setCurrentRegion()
|
||||
|
||||
void QgsGrassNewMapset::clearRegion()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::clearRegion()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
QPixmap pm = mPixmap;
|
||||
mRegionMap->setPixmap( pm );
|
||||
@ -1029,7 +1029,7 @@ void QgsGrassNewMapset::clearRegion()
|
||||
|
||||
void QgsGrassNewMapset::drawRegion()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::drawRegion()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
QPixmap pm = mPixmap;
|
||||
mRegionMap->setPixmap( pm );
|
||||
@ -1176,7 +1176,7 @@ void QgsGrassNewMapset::drawRegion()
|
||||
/**************************** MAPSET ********************************/
|
||||
void QgsGrassNewMapset::setMapsets()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::setMapsets" );
|
||||
QgsDebugMsg( "entered." );
|
||||
mMapsetsListView->clear();
|
||||
|
||||
if ( mCreateLocationRadioButton->isChecked() )
|
||||
@ -1212,7 +1212,7 @@ void QgsGrassNewMapset::setMapsets()
|
||||
|
||||
void QgsGrassNewMapset::mapsetChanged()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::mapsetChanged()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
setNextEnabled( page( MAPSET ), false );
|
||||
setError( mMapsetErrorLabel, "" );
|
||||
@ -1259,7 +1259,7 @@ void QgsGrassNewMapset::mapsetChanged()
|
||||
/**************************** FINISH ********************************/
|
||||
void QgsGrassNewMapset::setFinishPage()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::setFinish()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
mDatabaseLabel->setText( tr( "Database: " ) + mDatabaseLineEdit->text() );
|
||||
|
||||
@ -1281,7 +1281,7 @@ void QgsGrassNewMapset::setFinishPage()
|
||||
|
||||
void QgsGrassNewMapset::createMapset()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::createMapset()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
// TODO: handle all possible errors better, especially
|
||||
// half created location/mapset
|
||||
@ -1396,7 +1396,7 @@ void QgsGrassNewMapset::createMapset()
|
||||
|
||||
void QgsGrassNewMapset::accept()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::accept()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
createMapset();
|
||||
}
|
||||
@ -1404,7 +1404,7 @@ void QgsGrassNewMapset::accept()
|
||||
/********************************************************************/
|
||||
void QgsGrassNewMapset::setError( QLabel *line, const QString &err )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::setError(): " );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
if ( err.length() > 0 )
|
||||
{
|
||||
@ -1422,14 +1422,12 @@ void QgsGrassNewMapset::setError( QLabel *line, const QString &err )
|
||||
// to next page if Key_Enter is pressed
|
||||
void QgsGrassNewMapset::keyPressEvent( QKeyEvent * e )
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
// QgsDebugMsg(QString("QgsGrassNewMapset::keyPressEvent() key = %1").arg(e->key()));
|
||||
#endif
|
||||
// QgsDebugMsg(QString("key = %1").arg(e->key()));
|
||||
}
|
||||
|
||||
void QgsGrassNewMapset::pageSelected( const QString & title )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassNewMapset::pageSelected(): %1" ).arg( title.local8Bit().data() ) );
|
||||
QgsDebugMsg( QString( "title = %1" ).arg( title ) );
|
||||
|
||||
int index = indexOf( currentPage() );
|
||||
|
||||
@ -1515,7 +1513,7 @@ bool QgsGrassNewMapset::isRunning( void )
|
||||
|
||||
void QgsGrassNewMapset::close( void )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::close()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
hide();
|
||||
mRunning = false;
|
||||
@ -1524,7 +1522,7 @@ void QgsGrassNewMapset::close( void )
|
||||
|
||||
void QgsGrassNewMapset::closeEvent( QCloseEvent *e )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassNewMapset::closeEvent()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
e->accept();
|
||||
close();
|
||||
|
@ -271,9 +271,7 @@ void QgsGrassPlugin::mapsetChanged()
|
||||
|
||||
void QgsGrassPlugin::saveMapset()
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
// QgsDebugMsg("QgsGrassPlugin::addVector()");
|
||||
#endif
|
||||
// QgsDebugMsg("entered.");
|
||||
|
||||
// Save working mapset in project file
|
||||
QgsProject::instance()->writeEntry( "GRASS", "/WorkingGisdbase",
|
||||
@ -289,9 +287,7 @@ void QgsGrassPlugin::saveMapset()
|
||||
// Slot called when the "Add GRASS vector layer" menu item is triggered
|
||||
void QgsGrassPlugin::addVector()
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
// QgsDebugMsg("QgsGrassPlugin::addVector()");
|
||||
#endif
|
||||
// QgsDebugMsg("entered.");
|
||||
QString uri;
|
||||
|
||||
QgsGrassSelect *sel = new QgsGrassSelect( QgsGrassSelect::VECTOR );
|
||||
@ -377,13 +373,9 @@ void QgsGrassPlugin::addVector()
|
||||
// Slot called when the "Add GRASS raster layer" menu item is triggered
|
||||
void QgsGrassPlugin::addRaster()
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
// QgsDebugMsg("QgsGrassPlugin::addRaster()");
|
||||
#endif
|
||||
// QgsDebugMsg("entered.");
|
||||
QString uri;
|
||||
|
||||
// QgsDebugMsg("QgsGrassPlugin::addRaster");
|
||||
|
||||
QgsGrassSelect *sel = new QgsGrassSelect( QgsGrassSelect::RASTER );
|
||||
if ( sel->exec() )
|
||||
{
|
||||
@ -399,9 +391,9 @@ void QgsGrassPlugin::addRaster()
|
||||
|
||||
uri = sel->gisdbase + "/" + sel->location + "/" + sel->mapset + "/" + element + "/" + sel->map;
|
||||
}
|
||||
#ifdef QGISDEBUG
|
||||
|
||||
// QgsDebugMsg(QString("plugin URI: %1").arg(uri));
|
||||
#endif
|
||||
|
||||
if ( uri.length() == 0 )
|
||||
{
|
||||
// QgsDebugMsg("Nothing was selected");
|
||||
@ -409,9 +401,9 @@ void QgsGrassPlugin::addRaster()
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
|
||||
// QgsDebugMsg("Add new raster layer");
|
||||
#endif
|
||||
|
||||
// create raster name
|
||||
int pos = uri.findRev( '/' );
|
||||
pos = uri.findRev( '/', pos - 1 );
|
||||
@ -464,9 +456,7 @@ void QgsGrassPlugin::edit()
|
||||
|
||||
void QgsGrassPlugin::setEditAction()
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
// QgsDebugMsg("QgsGrassPlugin::setEditAction()");
|
||||
#endif
|
||||
// QgsDebugMsg("entered.");
|
||||
|
||||
QgsMapLayer *layer = ( QgsMapLayer * ) qGisInterface->activeLayer();
|
||||
|
||||
@ -482,9 +472,8 @@ void QgsGrassPlugin::setEditAction()
|
||||
|
||||
void QgsGrassPlugin::newVector()
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
// QgsDebugMsg("QgsGrassPlugin::newVector()");
|
||||
#endif
|
||||
// QgsDebugMsg("entered.");
|
||||
|
||||
|
||||
if ( QgsGrassEdit::isRunning() )
|
||||
{
|
||||
@ -560,16 +549,12 @@ void QgsGrassPlugin::newVector()
|
||||
|
||||
void QgsGrassPlugin::postRender( QPainter *painter )
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
// QgsDebugMsg("QgsGrassPlugin::postRender()");
|
||||
#endif
|
||||
// QgsDebugMsg("entered.");
|
||||
}
|
||||
|
||||
void QgsGrassPlugin::displayRegion()
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
// QgsDebugMsg("QgsGrassPlugin::displayRegion()");
|
||||
#endif
|
||||
// QgsDebugMsg("entered.");
|
||||
|
||||
mRegionBand->reset();
|
||||
|
||||
@ -615,9 +600,7 @@ void QgsGrassPlugin::displayRegion()
|
||||
|
||||
void QgsGrassPlugin::switchRegion( bool on )
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
// QgsDebugMsg("QgsGrassPlugin::switchRegion()");
|
||||
#endif
|
||||
// QgsDebugMsg("entered.");
|
||||
|
||||
QSettings settings;
|
||||
settings.writeEntry( "/GRASS/region/on", on );
|
||||
@ -634,9 +617,8 @@ void QgsGrassPlugin::switchRegion( bool on )
|
||||
|
||||
void QgsGrassPlugin::redrawRegion()
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
// QgsDebugMsg("QgsGrassPlugin::redrawRegion()");
|
||||
#endif
|
||||
// QgsDebugMsg("entered.");
|
||||
|
||||
if ( mRegionAction->isOn() )
|
||||
{
|
||||
displayRegion();
|
||||
@ -645,9 +627,7 @@ void QgsGrassPlugin::redrawRegion()
|
||||
|
||||
void QgsGrassPlugin::changeRegion( void )
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
// QgsDebugMsg("QgsGrassPlugin::changeRegion()");
|
||||
#endif
|
||||
// QgsDebugMsg("entered.");
|
||||
|
||||
if ( mRegion ) // running
|
||||
{
|
||||
@ -687,9 +667,7 @@ void QgsGrassPlugin::setRegionPen( QPen & pen )
|
||||
|
||||
void QgsGrassPlugin::openMapset()
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
// QgsDebugMsg("QgsGrassPlugin::openMapset()");
|
||||
#endif
|
||||
// QgsDebugMsg("entered.");
|
||||
|
||||
QString element;
|
||||
|
||||
@ -712,9 +690,7 @@ void QgsGrassPlugin::openMapset()
|
||||
|
||||
void QgsGrassPlugin::closeMapset()
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
// QgsDebugMsg("QgsGrassPlugin::closeMapset()");
|
||||
#endif
|
||||
// QgsDebugMsg("entered.");
|
||||
|
||||
QString err = QgsGrass::closeMapset();
|
||||
|
||||
@ -741,9 +717,8 @@ void QgsGrassPlugin::newMapset()
|
||||
|
||||
void QgsGrassPlugin::projectRead()
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
// QgsDebugMsg("QgsGrassPlugin::projectRead");
|
||||
#endif
|
||||
// QgsDebugMsg("entered.");
|
||||
|
||||
bool ok;
|
||||
QString gisdbase = QgsProject::instance()->readEntry(
|
||||
"GRASS", "/WorkingGisdbase", "", &ok ).trimmed();
|
||||
@ -794,9 +769,7 @@ void QgsGrassPlugin::projectRead()
|
||||
|
||||
void QgsGrassPlugin::newProject()
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
// QgsDebugMsg("QgsGrassPlugin::newProject");
|
||||
#endif
|
||||
// QgsDebugMsg("entered.");
|
||||
}
|
||||
|
||||
// Unload the plugin by cleaning up the GUI
|
||||
|
@ -85,7 +85,7 @@ class QgsGrassRegionEdit : public QgsMapTool
|
||||
double x = point.x();
|
||||
double y = point.y();
|
||||
|
||||
QgsDebugMsg( "QgsGrassRegionEdit::canvasPressEvent()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
if ( !mDraw ) // first corner
|
||||
{
|
||||
@ -108,7 +108,7 @@ class QgsGrassRegionEdit : public QgsMapTool
|
||||
{
|
||||
QgsPoint point = toMapCoords( event->pos() );
|
||||
|
||||
QgsDebugMsg( "QgsGrassRegionEdit::canvasMoveEvent()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
if ( !mDraw ) return;
|
||||
mRegion->draw( mRegion->mX, mRegion->mY, point.x(), point.y() );
|
||||
@ -266,7 +266,7 @@ QString QgsGrassRegion::formatEdge( double v )
|
||||
void QgsGrassRegion::setGuiValues( bool north, bool south, bool east, bool west,
|
||||
bool nsres, bool ewres, bool rows, bool cols )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassRegion::setGuiValues()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
mUpdatingGui = true;
|
||||
|
||||
@ -369,7 +369,7 @@ void QgsGrassRegion::adjust()
|
||||
|
||||
void QgsGrassRegion::radioChanged()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassRegion::radioChanged()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
if ( mRowsRadio->isChecked() )
|
||||
{
|
||||
@ -395,7 +395,7 @@ void QgsGrassRegion::radioChanged()
|
||||
|
||||
void QgsGrassRegion::draw( double x1, double y1, double x2, double y2 )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassRegion::draw()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
if ( x1 < x2 )
|
||||
{
|
||||
@ -425,7 +425,7 @@ void QgsGrassRegion::draw( double x1, double y1, double x2, double y2 )
|
||||
|
||||
void QgsGrassRegion::displayRegion()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassRegion::displayRegion()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
QgsPoint ul( mWindow.west, mWindow.north );
|
||||
QgsPoint lr( mWindow.east, mWindow.south );
|
||||
@ -437,7 +437,7 @@ void QgsGrassRegion::displayRegion()
|
||||
|
||||
void QgsGrassRegion::postRender( QPainter *painter )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassRegion::postRender" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
mDisplayed = false;
|
||||
displayRegion();
|
||||
|
@ -281,7 +281,7 @@ QgsGrassShell::QgsGrassShell( QgsGrassTools *tools,
|
||||
|
||||
QgsGrassShell::~QgsGrassShell()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassShell::~QgsGrassShell()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
#ifndef WIN32
|
||||
// This was old trick to write history
|
||||
@ -317,7 +317,7 @@ QgsGrassShell::~QgsGrassShell()
|
||||
|
||||
void QgsGrassShell::keyPressEvent( QKeyEvent * e )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassShell::keyPressEvent()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
char s[10];
|
||||
int length = 0;
|
||||
@ -371,7 +371,7 @@ void QgsGrassShell::keyPressEvent( QKeyEvent * e )
|
||||
void QgsGrassShell::keyReleaseEvent( QKeyEvent * e )
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
// QgsDebugMsg("QgsGrassShell::keyReleaseEvent()");
|
||||
// QgsDebugMsg("entered.");
|
||||
#endif
|
||||
|
||||
// Reset key down
|
||||
@ -384,7 +384,7 @@ void QgsGrassShell::keyReleaseEvent( QKeyEvent * e )
|
||||
void QgsGrassShell::readStdout( int socket )
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
// QgsDebugMsg("QgsGrassShell::readStdout()");
|
||||
// QgsDebugMsg("entered.");
|
||||
#endif
|
||||
|
||||
char buf[4097];
|
||||
@ -915,7 +915,7 @@ void QgsGrassShell::readStderr()
|
||||
|
||||
void QgsGrassShell::closeShell()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassShell::closeShell()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
mTabWidget->removePage( this );
|
||||
delete this;
|
||||
@ -933,20 +933,20 @@ QgsGrassShellText::~QgsGrassShellText() {}
|
||||
|
||||
void QgsGrassShellText::contentsMousePressEvent( QMouseEvent* e )
|
||||
{
|
||||
QgsDebugMsg( "contentsMousePressEvent()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
mShell->mousePressEvent( e );
|
||||
Q3TextEdit::contentsMousePressEvent( e );
|
||||
}
|
||||
|
||||
void QgsGrassShellText::keyPressEvent( QKeyEvent * e )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassShellText::keyPressEvent()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
mShell->keyPressEvent( e );
|
||||
}
|
||||
|
||||
void QgsGrassShellText::keyReleaseEvent( QKeyEvent * e )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassShellText::keyReleaseEvent()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
mShell->keyReleaseEvent( e );
|
||||
}
|
||||
|
||||
|
@ -175,7 +175,7 @@ QgsGrassTools::QgsGrassTools( QgisInterface *iface,
|
||||
|
||||
void QgsGrassTools::moduleClicked( QTreeWidgetItem * item, int column )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassTools::moduleClicked()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
if ( !item ) return;
|
||||
|
||||
QString name = item->text( 1 );
|
||||
@ -289,7 +289,7 @@ void QgsGrassTools::runModule( QString name )
|
||||
|
||||
bool QgsGrassTools::loadConfig( QString filePath )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassTools::loadConfig(): %1" ).arg( filePath ) );
|
||||
QgsDebugMsg( filePath );
|
||||
mModulesTree->clear();
|
||||
mModulesTree->setIconSize( QSize( 80, 22 ) );
|
||||
|
||||
@ -423,7 +423,7 @@ void QgsGrassTools::addModules( QTreeWidgetItem *parent, QDomElement &element )
|
||||
|
||||
void QgsGrassTools::mapsetChanged()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassTools::mapsetChanged()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
QString title = tr( "GRASS Tools: " ) + QgsGrass::getDefaultLocation()
|
||||
+ "/" + QgsGrass::getDefaultMapset();
|
||||
@ -435,7 +435,7 @@ void QgsGrassTools::mapsetChanged()
|
||||
|
||||
QgsGrassTools::~QgsGrassTools()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassTools::~QgsGrassTools()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
saveWindowLocation();
|
||||
}
|
||||
|
||||
@ -475,13 +475,13 @@ void QgsGrassTools::saveWindowLocation()
|
||||
|
||||
void QgsGrassTools::emitRegionChanged()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassTools::emitRegionChanged()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
emit regionChanged();
|
||||
}
|
||||
|
||||
void QgsGrassTools::closeTools()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassTools::closeTools()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
for ( int i = mTabWidget->count() - 1; i > 1; i-- )
|
||||
{
|
||||
|
@ -92,7 +92,7 @@ QString QgsGrassElementDialog::getItem( QString element,
|
||||
QString title, QString label,
|
||||
QString text, QString source, bool * ok )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassElementDialog::getItem" );
|
||||
QgsDebugMsg( "entered." );
|
||||
if ( ok ) *ok = false;
|
||||
mElement = element;
|
||||
mSource = source;
|
||||
@ -150,7 +150,7 @@ QString QgsGrassElementDialog::getItem( QString element,
|
||||
|
||||
void QgsGrassElementDialog::textChanged()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassElementDialog::textChanged" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
QString text = mLineEdit->text().trimmed();
|
||||
|
||||
|
@ -89,9 +89,9 @@ void QgsGridMakerPluginGui::on_buttonBox_accepted()
|
||||
//
|
||||
// If you have a produced a raster layer using your plugin, you can ask qgis to
|
||||
// add it to the view using:
|
||||
// emit drawRasterLayer(QString("layerName"));
|
||||
// emit drawRasterLayer(QString("layer name"));
|
||||
// or for a vector layer
|
||||
//emit drawVectorLayer(QString("pathname"),QString("layerName"),QString("provider name (either ogr or postgres"));
|
||||
//emit drawVectorLayer(QString("path name"),QString("layer name"),QString("provider name (either ogr or postgres"));
|
||||
//
|
||||
|
||||
emit drawVectorLayer( leOutputShapeFile->text(), QString( "Graticule" ), QString( "ogr" ) );
|
||||
@ -105,7 +105,7 @@ void QgsGridMakerPluginGui::on_pbnSelectOutputFile_clicked()
|
||||
QgsLogger::debug( " Gps File Importer Gui::pbnSelectOutputFile_clicked()" );
|
||||
QString myOutputFileNameQString = QFileDialog::getSaveFileName(
|
||||
this,
|
||||
tr( "Choose a fileName to save under" ),
|
||||
tr( "Choose a file name to save under" ),
|
||||
".",
|
||||
tr( "ESRI Shapefile (*.shp)" ) );
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -39,7 +39,7 @@ bool LinTriangleInterpolator::calcFirstDerX( double x, double y, Vector3D* vec )
|
||||
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "warning, null pointer" );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -65,7 +65,7 @@ bool LinTriangleInterpolator::calcFirstDerY( double x, double y, Vector3D* vec )
|
||||
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "warning, null pointer" );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -91,7 +91,7 @@ bool LinTriangleInterpolator::calcNormVec( double x, double y, Vector3D* vec )
|
||||
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "warning, null pointer" );
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ bool LinTriangleInterpolator::calcPoint( double x, double y, Point3D* point )
|
||||
}
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "warning, null pointer" );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ bool MathUtils::calcBarycentricCoordinates( double x, double y, Point3D* p1, Poi
|
||||
double area = triArea( p1, p2, p3 );
|
||||
if ( area == 0 )//p1, p2, p3 are in a line
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "warning, triangle area should not be 0" );
|
||||
return false;
|
||||
}
|
||||
double area1 = triArea( &p, p2, p3 );
|
||||
@ -41,7 +41,7 @@ bool MathUtils::calcBarycentricCoordinates( double x, double y, Point3D* p1, Poi
|
||||
}
|
||||
else//null pointer
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "warning, null pointer" );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -55,7 +55,7 @@ bool MathUtils::BarycentricToXY( double u, double v, double w, Point3D* p1, Poin
|
||||
|
||||
if ( area == 0 )
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "warning, p1, p2 and p3 are in a line" );
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ bool MathUtils::BarycentricToXY( double u, double v, double w, Point3D* p1, Poin
|
||||
}
|
||||
else//null pointer
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "warning, null pointer" );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -127,7 +127,7 @@ bool MathUtils::circumcenter( Point3D* p1, Point3D* p2, Point3D* p3, Point3D* re
|
||||
//if one of the denominator is zero we will have problems
|
||||
if ( denominator == 0 )
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "error: the three points are in a line" );
|
||||
return false;
|
||||
}
|
||||
else
|
||||
@ -152,7 +152,7 @@ bool MathUtils::circumcenter( Point3D* p1, Point3D* p2, Point3D* p3, Point3D* re
|
||||
}
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "warning, null pointer" );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -208,7 +208,7 @@ double MathUtils::distPointFromLine( Point3D* thepoint, Point3D* p1, Point3D* p2
|
||||
}
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "warning, null pointer" );
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -217,7 +217,7 @@ int MathUtils::faculty( int n )
|
||||
{
|
||||
if ( n < 0 )//Is faculty also defined for negative integers?
|
||||
{
|
||||
QgsDebugMsg( "Error, faculty of a negativ integer requested!" );
|
||||
QgsDebugMsg( "Error, faculty of a negative integer requested!" );
|
||||
return 0;
|
||||
}
|
||||
int i;
|
||||
@ -281,7 +281,7 @@ bool MathUtils::inCircle( Point3D* testp, Point3D* p1, Point3D* p2, Point3D* p3
|
||||
}
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "warning, null pointer" );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -324,7 +324,7 @@ double MathUtils::leftOf( Point3D* thepoint, Point3D* p1, Point3D* p2 )
|
||||
}
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "warning, null pointer" );
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -367,7 +367,7 @@ bool MathUtils::lineIntersection( Point3D* p1, Point3D* p2, Point3D* p3, Point3D
|
||||
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "warning, null pointer" );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -420,7 +420,7 @@ bool MathUtils::lineIntersection( Point3D* p1, Point3D* p2, Point3D* p3, Point3D
|
||||
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "warning, null pointer" );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -499,7 +499,7 @@ double MathUtils::triArea( Point3D* pa, Point3D* pb, Point3D* pc )
|
||||
}
|
||||
else//null pointer
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "warning, null pointer" );
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -530,9 +530,9 @@ double MathUtils::calcCubicHermitePoly( int n, int i, double t )
|
||||
{
|
||||
return ( calcBernsteinPoly( 3, 2, t ) + calcBernsteinPoly( 3, 3, t ) );
|
||||
}
|
||||
else//somthing went wrong
|
||||
else//something went wrong
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "unexpected error" );
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -571,7 +571,7 @@ double MathUtils::cFDerCubicHermitePoly( int n, int i, double t )
|
||||
}
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "unexpected error" );
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -619,7 +619,7 @@ bool MathUtils::normalLeft( Vector3D* v1, Vector3D* result, double length )
|
||||
|
||||
if ( d < 0 )//no solution in R
|
||||
{
|
||||
QgsDebugMsg( "Determinant Error in MathUtils::normalLeft" );
|
||||
QgsDebugMsg( "Determinant Error" );
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -676,7 +676,7 @@ bool MathUtils::normalRight( Vector3D* v1, Vector3D* result, double length )
|
||||
|
||||
if ( d < 0 )//no solution in R
|
||||
{
|
||||
QgsDebugMsg( "Determinant Error in MathUtils::normalLeft" );
|
||||
QgsDebugMsg( "Determinant Error" );
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -736,9 +736,9 @@ double MathUtils::crossVec( Point3D* first, Vector3D* vec1, Point3D* second, Vec
|
||||
return (( first->getX()*vec1->getY() - first->getY()*vec1->getX() - second->getX()*vec1->getY() + second->getY()*vec1->getX() ) / ( vec2->getX()*vec1->getY() - vec2->getY()*vec1->getX() ) );
|
||||
|
||||
}
|
||||
else//if a division through zero would occur
|
||||
else//if a division by zero would occur
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "warning: vectors are parallel" );
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -746,7 +746,7 @@ double MathUtils::crossVec( Point3D* first, Vector3D* vec1, Point3D* second, Vec
|
||||
|
||||
else//null pointer
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "warning, null pointer" );
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -788,7 +788,7 @@ bool MathUtils::normalMinDistance( Vector3D* tangent, Vector3D* target, Vector3D
|
||||
double xgalpha1 = 1 / ( 2 * xt * xt * yw * yw * zt * zt - 2 * zt * zt * zt * xt * zw * xw + yt * yt * yt * yt * zw * zw + yt * yt * zw * zw * zt * zt + xt * xt * yt * yt * xw * xw + xt * xt * yw * yw * yt * yt - 2 * xt * xt * xt * zt * zw * xw + yt * yt * yt * yt * xw * xw + yt * yt * yw * yw * zt * zt + 2 * xt * xt * yt * yt * zw * zw - 2 * yt * yt * yt * yw * zt * zw + zt * zt * xt * xt * zw * zw + zt * zt * zt * zt * xw * xw + xt * xt * zt * zt * xw * xw + 2 * zt * zt * xw * xw * yt * yt - 2 * xt * xt * yw * zt * yt * zw - 2 * xt * yt * yt * yt * xw * yw - 2 * xt * xt * xt * yw * yt * xw - 2 * xt * zt * zt * xw * yt * yw - 2 * xt * zt * xw * yt * yt * zw - 2 * yw * zt * zt * zt * yt * zw + xt * xt * xt * xt * yw * yw + yw * yw * zt * zt * zt * zt + xt * xt * xt * xt * zw * zw );
|
||||
if ( xgalpha1 < 0 )
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "warning, only complex solution of xg" );
|
||||
return false;
|
||||
}
|
||||
xg1 = sqrt( xgalpha1 ) * ( -yt * yw * xt + yt * yt * xw + xw * zt * zt - zt * xt * zw );
|
||||
@ -798,7 +798,7 @@ bool MathUtils::normalMinDistance( Vector3D* tangent, Vector3D* target, Vector3D
|
||||
double ygalpha1 = 1 / ( 2 * xt * xt * yw * yw * zt * zt - 2 * zt * zt * zt * xt * zw * xw + yt * yt * yt * yt * zw * zw + yt * yt * zw * zw * zt * zt + xt * xt * yt * yt * xw * xw + xt * xt * yw * yw * yt * yt - 2 * xt * xt * xt * zt * zw * xw + yt * yt * yt * yt * xw * xw + yt * yt * yw * yw * zt * zt + 2 * xt * xt * yt * yt * zw * zw - 2 * yt * yt * yt * yw * zt * zw + zt * zt * xt * xt * zw * zw + zt * zt * zt * zt * xw * xw + xt * xt * zt * zt * xw * xw + 2 * zt * zt * xw * xw * yt * yt - 2 * xt * xt * yw * zt * yt * zw - 2 * xt * yt * yt * yt * xw * yw - 2 * xt * xt * xt * yw * yt * xw - 2 * xt * zt * zt * xw * yt * yw - 2 * xt * zt * xw * yt * yt * zw - 2 * yw * zt * zt * zt * yt * zw + xt * xt * xt * xt * yw * yw + yw * yw * zt * zt * zt * zt + xt * xt * xt * xt * zw * zw );
|
||||
if ( ygalpha1 < 0 )
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "warning, only complex solution of yg" );
|
||||
return false;
|
||||
}
|
||||
yg1 = -sqrt( ygalpha1 ) * ( -yw * xt * xt - zt * zt * yw + zt * yt * zw + yt * xw * xt );
|
||||
@ -808,7 +808,7 @@ bool MathUtils::normalMinDistance( Vector3D* tangent, Vector3D* target, Vector3D
|
||||
double zgalpha1 = 1 / ( 2 * xt * xt * yw * yw * zt * zt - 2 * zt * zt * zt * xt * zw * xw + yt * yt * yt * yt * zw * zw + yt * yt * zw * zw * zt * zt + xt * xt * yt * yt * xw * xw + xt * xt * yw * yw * yt * yt - 2 * xt * xt * xt * zt * zw * xw + yt * yt * yt * yt * xw * xw + yt * yt * yw * yw * zt * zt + 2 * xt * xt * yt * yt * zw * zw - 2 * yt * yt * yt * yw * zt * zw + zt * zt * xt * xt * zw * zw + zt * zt * zt * zt * xw * xw + xt * xt * zt * zt * xw * xw + 2 * zt * zt * xw * xw * yt * yt - 2 * xt * xt * yw * zt * yt * zw - 2 * xt * yt * yt * yt * xw * yw - 2 * xt * xt * xt * yw * yt * xw - 2 * xt * zt * zt * xw * yt * yw - 2 * xt * zt * xw * yt * yt * zw - 2 * yw * zt * zt * zt * yt * zw + xt * xt * xt * xt * yw * yw + yw * yw * zt * zt * zt * zt + xt * xt * xt * xt * zw * zw );
|
||||
if ( zgalpha1 < 0 )
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "warning, only complex solution of zg" );
|
||||
return false;
|
||||
}
|
||||
zg1 = -sqrt( zgalpha1 ) * ( yt * yw * zt - yt * yt * zw + xw * zt * xt - xt * xt * zw );
|
||||
@ -834,7 +834,7 @@ bool MathUtils::normalMinDistance( Vector3D* tangent, Vector3D* target, Vector3D
|
||||
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "warning, null pointer" );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -852,7 +852,7 @@ double MathUtils::planeTest( Point3D* test, Point3D* pt1, Point3D* pt2, Point3D*
|
||||
}
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "warning, null pointer" );
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -868,7 +868,7 @@ double MathUtils::angle( Point3D* p1, Point3D* p2, Point3D* p3, Point3D* p4 )
|
||||
}
|
||||
else
|
||||
{
|
||||
QgsDebugMsg( "" );
|
||||
QgsDebugMsg( "warning, null pointer" );
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ void QgsInterpolationDialog::on_buttonBox_accepted()
|
||||
return;
|
||||
}
|
||||
|
||||
//read fileName
|
||||
//read file name
|
||||
QString fileName = mOutputFileLineEdit->text();
|
||||
QFileInfo theFileInfo( fileName );
|
||||
if ( !theFileInfo.dir().exists() )
|
||||
|
@ -113,7 +113,7 @@ void QuickPrintGui::on_buttonBox_accepted()
|
||||
myFileDialog->setFileMode( QFileDialog::AnyFile );
|
||||
myFileDialog->setAcceptMode( QFileDialog::AcceptSave );
|
||||
|
||||
//prompt the user for a fileName
|
||||
//prompt the user for a file name
|
||||
QString myOutputFileName;
|
||||
if ( myFileDialog->exec() == QDialog::Accepted )
|
||||
{
|
||||
@ -128,7 +128,7 @@ void QuickPrintGui::on_buttonBox_accepted()
|
||||
{
|
||||
if ( myFileDialog->selectedFilter() == tr( "Portable Document Format (*.pdf)" ) )
|
||||
{
|
||||
//ensure the user never ommitted the extension from the fileName
|
||||
//ensure the user never omitted the extension from the file name
|
||||
if ( !myOutputFileName.toUpper().endsWith( ".PDF" ) )
|
||||
{
|
||||
myOutputFileName += ".pdf";
|
||||
|
@ -415,7 +415,7 @@ GPSData* GPSData::getData( const QString& fileName )
|
||||
else
|
||||
QgsLogger::debug( fileName + " is already loaded" );
|
||||
|
||||
// return a pointer and increase the reference count for that fileName
|
||||
// return a pointer and increase the reference count for that file name
|
||||
DataMap::iterator iter = dataObjects.find( fileName );
|
||||
++( iter->second.second );
|
||||
return ( GPSData* )( iter->second.first );
|
||||
@ -425,7 +425,7 @@ GPSData* GPSData::getData( const QString& fileName )
|
||||
void GPSData::releaseData( const QString& fileName )
|
||||
{
|
||||
|
||||
/* decrease the reference count for the fileName (if it is used), and erase
|
||||
/* decrease the reference count for the file name (if it is used), and erase
|
||||
it if the reference count becomes 0 */
|
||||
DataMap::iterator iter = dataObjects.find( fileName );
|
||||
if ( iter != dataObjects.end() )
|
||||
|
@ -218,19 +218,19 @@ class GPSData
|
||||
void writeXML( QTextStream& stream );
|
||||
|
||||
/** This function returns a pointer to the GPSData object associated with
|
||||
the file @c fileName. If the file does not exist or can't be parsed,
|
||||
the file @c file name. If the file does not exist or can't be parsed,
|
||||
NULL will be returned. If the file is already used by another layer,
|
||||
a pointer to the same GPSData object will be returned. And if the file
|
||||
is not used by any other layer, and can be parsed, a new GPSData object
|
||||
will be created and a pointer to it will be returned. If you use this
|
||||
function you should also call releaseData() with the same @c fileName
|
||||
function you should also call releaseData() with the same @c file name
|
||||
when you're done with the GPSData pointer, otherwise the data will stay
|
||||
in memory forever and you will get an ugly memory leak. */
|
||||
static GPSData* getData( const QString& fileName );
|
||||
|
||||
/** Call this function when you're done with a GPSData pointer that you
|
||||
got earlier using getData(). Do NOT call this function if you haven't
|
||||
called getData() earlier with the same @c fileName, that can cause data
|
||||
called getData() earlier with the same @c file name, that can cause data
|
||||
that is still in use to be deleted. */
|
||||
static void releaseData( const QString& fileName );
|
||||
|
||||
@ -250,7 +250,7 @@ class GPSData
|
||||
/** This is used internally to store GPS data objects (one per file). */
|
||||
typedef std::map<QString, std::pair<GPSData*, unsigned> > DataMap;
|
||||
|
||||
/** This is the static container that maps fileNames to GPSData objects and
|
||||
/** This is the static container that maps file names to GPSData objects and
|
||||
does reference counting, so several providers can use the same GPSData
|
||||
object. */
|
||||
static DataMap dataObjects;
|
||||
|
@ -65,7 +65,7 @@ QgsGPXProvider::QgsGPXProvider( QString uri ) :
|
||||
// we always use UTF-8
|
||||
mEncoding = QTextCodec::codecForName( "utf8" );
|
||||
|
||||
// get the fileName and the type parameter from the URI
|
||||
// get the file name and the type parameter from the URI
|
||||
int fileNameEnd = uri.indexOf( '?' );
|
||||
if ( fileNameEnd == -1 || uri.mid( fileNameEnd + 1, 5 ) != "type=" )
|
||||
{
|
||||
|
@ -318,7 +318,7 @@ QString QgsGrass::getDefaultMapset( void )
|
||||
|
||||
void QgsGrass::setLocation( QString gisdbase, QString location )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrass::setLocation(): gisdbase = %1 location = %2" ).arg( gisdbase ).arg( location ) );
|
||||
QgsDebugMsg( QString( "gisdbase = %1 location = %2" ).arg( gisdbase ).arg( location ) );
|
||||
init();
|
||||
|
||||
// Set principal GRASS variables (in memory)
|
||||
@ -337,7 +337,7 @@ void QgsGrass::setLocation( QString gisdbase, QString location )
|
||||
|
||||
void QgsGrass::setMapset( QString gisdbase, QString location, QString mapset )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrass::setLocation(): gisdbase = %1 location = %2 mapset = %3" ).arg( gisdbase ).arg( location ).arg( mapset ) );
|
||||
QgsDebugMsg( QString( "gisdbase = %1 location = %2 mapset = %3" ).arg( gisdbase ).arg( location ).arg( mapset ) );
|
||||
init();
|
||||
|
||||
// Set principal GRASS variables (in memory)
|
||||
@ -434,7 +434,6 @@ void GRASS_EXPORT QgsGrass::clearErrorEnv()
|
||||
|
||||
QString GRASS_EXPORT QgsGrass::openMapset( QString gisdbase, QString location, QString mapset )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrass::openMapset" );
|
||||
QgsDebugMsg( QString( "gisdbase = %1" ).arg( gisdbase.local8Bit().data() ) );
|
||||
QgsDebugMsg( QString( "location = %1" ).arg( location.local8Bit().data() ) );
|
||||
QgsDebugMsg( QString( "mapset = %1" ).arg( mapset.local8Bit().data() ) );
|
||||
@ -586,7 +585,7 @@ QString GRASS_EXPORT QgsGrass::openMapset( QString gisdbase, QString location, Q
|
||||
|
||||
QString QgsGrass::closeMapset( )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrass::closeMapset" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
if ( mMapsetLock.length() > 0 )
|
||||
{
|
||||
@ -638,7 +637,7 @@ QString QgsGrass::closeMapset( )
|
||||
|
||||
QStringList GRASS_EXPORT QgsGrass::locations( QString gisbase )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrass::locations gisbase = %1" ).arg( gisbase ) );
|
||||
QgsDebugMsg( QString( "gisbase = %1" ).arg( gisbase ) );
|
||||
|
||||
QStringList list;
|
||||
|
||||
@ -660,7 +659,7 @@ QStringList GRASS_EXPORT QgsGrass::locations( QString gisbase )
|
||||
|
||||
QStringList GRASS_EXPORT QgsGrass::mapsets( QString gisbase, QString locationName )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrass::mapsets gisbase = %1 locationName = %2" ).arg( gisbase ).arg( locationName ) );
|
||||
QgsDebugMsg( QString( "gisbase = %1 locationName = %2" ).arg( gisbase ).arg( locationName ) );
|
||||
|
||||
if ( gisbase.isEmpty() || locationName.isEmpty() )
|
||||
return QStringList();
|
||||
@ -670,7 +669,7 @@ QStringList GRASS_EXPORT QgsGrass::mapsets( QString gisbase, QString locationNam
|
||||
|
||||
QStringList GRASS_EXPORT QgsGrass::mapsets( QString locationPath )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrass::mapsets locationPath = %1" ).arg( locationPath ) );
|
||||
QgsDebugMsg( QString( "locationPath = %1" ).arg( locationPath ) );
|
||||
|
||||
QStringList list;
|
||||
|
||||
@ -692,7 +691,7 @@ QStringList GRASS_EXPORT QgsGrass::mapsets( QString locationPath )
|
||||
QStringList GRASS_EXPORT QgsGrass::vectors( QString gisbase, QString locationName,
|
||||
QString mapsetName )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrass::vectors()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
if ( gisbase.isEmpty() || locationName.isEmpty() || mapsetName.isEmpty() )
|
||||
return QStringList();
|
||||
@ -728,7 +727,7 @@ QStringList GRASS_EXPORT QgsGrass::vectors( QString gisbase, QString locationNam
|
||||
|
||||
QStringList GRASS_EXPORT QgsGrass::vectors( QString mapsetPath )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrass::vectors mapsetPath = %1" ).arg( mapsetPath ) );
|
||||
QgsDebugMsg( QString( "mapsetPath = %1" ).arg( mapsetPath ) );
|
||||
|
||||
QStringList list;
|
||||
|
||||
@ -753,7 +752,7 @@ QStringList GRASS_EXPORT QgsGrass::vectors( QString mapsetPath )
|
||||
QStringList GRASS_EXPORT QgsGrass::rasters( QString gisbase, QString locationName,
|
||||
QString mapsetName )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrass::rasters()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
if ( gisbase.isEmpty() || locationName.isEmpty() || mapsetName.isEmpty() )
|
||||
return QStringList();
|
||||
@ -790,7 +789,7 @@ QStringList GRASS_EXPORT QgsGrass::rasters( QString gisbase, QString locationNam
|
||||
|
||||
QStringList GRASS_EXPORT QgsGrass::rasters( QString mapsetPath )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrass::rasters mapsetPath = %1" ).arg( mapsetPath ) );
|
||||
QgsDebugMsg( QString( "mapsetPath = %1" ).arg( mapsetPath ) );
|
||||
|
||||
QStringList list;
|
||||
|
||||
@ -818,7 +817,7 @@ QStringList GRASS_EXPORT QgsGrass::elements( QString gisbase, QString locationNa
|
||||
|
||||
QStringList GRASS_EXPORT QgsGrass::elements( QString mapsetPath, QString element )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrass::elements mapsetPath = %1" ).arg( mapsetPath ) );
|
||||
QgsDebugMsg( QString( "mapsetPath = %1" ).arg( mapsetPath ) );
|
||||
|
||||
QStringList list;
|
||||
|
||||
@ -888,7 +887,7 @@ bool GRASS_EXPORT QgsGrass::writeRegion( QString gisbase,
|
||||
QString location, QString mapset,
|
||||
struct Cell_head *window )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrass::writeRegion()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
QgsDebugMsg( QString( "n = %1 s = %2" ).arg( window->north ).arg( window->south ) );
|
||||
QgsDebugMsg( QString( "e = %1 w = %2" ).arg( window->east ).arg( window->west ) );
|
||||
|
||||
@ -949,7 +948,7 @@ bool GRASS_EXPORT QgsGrass::mapRegion( int type, QString gisbase,
|
||||
QString location, QString mapset, QString map,
|
||||
struct Cell_head *window )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrass::mapRegion()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
QgsDebugMsg( QString( "map = %1" ).arg( map ) );
|
||||
QgsDebugMsg( QString( "mapset = %1" ).arg( mapset ) );
|
||||
|
||||
|
@ -218,7 +218,7 @@ QgsGrassProvider::QgsGrassProvider( QString uri )
|
||||
|
||||
void QgsGrassProvider::update( void )
|
||||
{
|
||||
QgsDebugMsg( "*** QgsGrassProvider::update ***" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
mValid = false;
|
||||
|
||||
@ -260,7 +260,7 @@ void QgsGrassProvider::update( void )
|
||||
int QgsGrassProvider::allocateSelection( struct Map_info *map, char **selection )
|
||||
{
|
||||
int size;
|
||||
QgsDebugMsg( "QgsGrassProvider::allocateSellection" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
int nlines = Vect_get_num_lines( map );
|
||||
int nareas = Vect_get_num_areas( map );
|
||||
@ -282,7 +282,7 @@ int QgsGrassProvider::allocateSelection( struct Map_info *map, char **selection
|
||||
|
||||
QgsGrassProvider::~QgsGrassProvider()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassProvider::~QgsGrassProvider()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
closeLayer( mLayerId );
|
||||
}
|
||||
|
||||
@ -298,9 +298,7 @@ bool QgsGrassProvider::getNextFeature( QgsFeature& feature )
|
||||
unsigned char *wkb;
|
||||
int wkbsize;
|
||||
|
||||
#if QGISDEBUG > 3
|
||||
QgsDebugMsg( "QgsGrassProvider::getNextFeature()" );
|
||||
#endif
|
||||
QgsDebugMsgLevel( "entered.", 3 );
|
||||
|
||||
if ( isEdited() || isFrozen() || !mValid )
|
||||
return false;
|
||||
@ -423,7 +421,7 @@ bool QgsGrassProvider::getNextFeature( QgsFeature& feature )
|
||||
|
||||
void QgsGrassProvider::resetSelection( bool sel )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassProvider::resetSelection()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
if ( !mValid ) return;
|
||||
memset( mSelection, ( int ) sel, mSelectionSize );
|
||||
mNextCidx = 0;
|
||||
@ -547,7 +545,7 @@ long QgsGrassProvider::featureCount() const
|
||||
*/
|
||||
uint QgsGrassProvider::fieldCount() const
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassProvider::fieldCount() return:%1" ).arg( mLayers[mLayerId].fields.size() ) );
|
||||
QgsDebugMsg( QString( "return: %1" ).arg( mLayers[mLayerId].fields.size() ) );
|
||||
return mLayers[mLayerId].fields.size();
|
||||
}
|
||||
|
||||
@ -609,10 +607,8 @@ QVariant QgsGrassProvider::maxValue( int index )
|
||||
|
||||
bool QgsGrassProvider::isValid()
|
||||
{
|
||||
#ifdef QGISDEBUG
|
||||
QString validString = mValid ? "true" : "false";
|
||||
QgsDebugMsg( QString( "QgsGrassProvider::isValid() returned: %1" ).arg( validString ) );
|
||||
#endif
|
||||
QgsDebugMsg( QString( "returned: %1" ).arg( mValid ? "true" : "false" ) );
|
||||
|
||||
return mValid;
|
||||
}
|
||||
|
||||
@ -628,7 +624,6 @@ static int cmpAtt( const void *a, const void *b )
|
||||
/* returns layerId or -1 on error */
|
||||
int QgsGrassProvider::openLayer( QString gisdbase, QString location, QString mapset, QString mapName, int field )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassProvider::openLayer()" );
|
||||
QgsDebugMsg( QString( "gisdbase: %1" ).arg( gisdbase ) );
|
||||
QgsDebugMsg( QString( "location: %1" ).arg( location ) );
|
||||
QgsDebugMsg( QString( "mapset: %1" ).arg( mapset ) );
|
||||
@ -684,7 +679,7 @@ int QgsGrassProvider::openLayer( QString gisdbase, QString location, QString map
|
||||
|
||||
void QgsGrassProvider::loadLayerSourcesFromMap( GLAYER &layer )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassProvider::loadLayerSourcesFromMap" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
// Reset and free
|
||||
layer.fields.clear();
|
||||
@ -706,7 +701,7 @@ void QgsGrassProvider::loadLayerSourcesFromMap( GLAYER &layer )
|
||||
|
||||
void QgsGrassProvider::loadAttributes( GLAYER &layer )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassProvider::loadLayerSourcesFromMap" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
// TODO: free old attributes
|
||||
|
||||
@ -961,7 +956,7 @@ void QgsGrassProvider::closeLayer( int layerId )
|
||||
/* returns mapId or -1 on error */
|
||||
int QgsGrassProvider::openMap( QString gisdbase, QString location, QString mapset, QString mapName )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassProvider::openMap()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
QString tmpPath = gisdbase + "/" + location + "/" + mapset + "/" + mapName;
|
||||
|
||||
@ -1071,7 +1066,7 @@ int QgsGrassProvider::openMap( QString gisdbase, QString location, QString mapse
|
||||
|
||||
void QgsGrassProvider::updateMap( int mapId )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassProvider::updateMap() mapId = %1" ).arg( mapId ) );
|
||||
QgsDebugMsg( QString( "mapId = %1" ).arg( mapId ) );
|
||||
|
||||
/* Close map */
|
||||
GMAP *map = &( mMaps[mapId] );
|
||||
@ -1150,7 +1145,7 @@ void QgsGrassProvider::closeMap( int mapId )
|
||||
|
||||
bool QgsGrassProvider::mapOutdated( int mapId )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassProvider::mapOutdated()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
GMAP *map = &( mMaps[mapId] );
|
||||
|
||||
@ -1169,7 +1164,7 @@ bool QgsGrassProvider::mapOutdated( int mapId )
|
||||
|
||||
bool QgsGrassProvider::attributesOutdated( int mapId )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassProvider::attributesOutdated()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
GMAP *map = &( mMaps[mapId] );
|
||||
|
||||
@ -1349,7 +1344,7 @@ int QgsGrassProvider::grassLayerType( QString name )
|
||||
|
||||
bool QgsGrassProvider::isGrassEditable( void )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassProvider::isGrassEditable" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
if ( !isValid() )
|
||||
return false;
|
||||
@ -1365,9 +1360,7 @@ bool QgsGrassProvider::isGrassEditable( void )
|
||||
|
||||
bool QgsGrassProvider::isEdited( void )
|
||||
{
|
||||
#if QGISDEBUG > 3
|
||||
QgsDebugMsg( "QgsGrassProvider::isEdited" );
|
||||
#endif
|
||||
QgsDebugMsgLevel( "entered.", 3 );
|
||||
|
||||
GMAP *map = &( mMaps[mLayers[mLayerId].mapId] );
|
||||
return ( map->update );
|
||||
@ -1375,9 +1368,7 @@ bool QgsGrassProvider::isEdited( void )
|
||||
|
||||
bool QgsGrassProvider::isFrozen( void )
|
||||
{
|
||||
#if QGISDEBUG > 3
|
||||
QgsDebugMsg( "QgsGrassProvider::isFrozen" );
|
||||
#endif
|
||||
QgsDebugMsgLevel( "entered.", 3 );
|
||||
|
||||
GMAP *map = &( mMaps[mLayers[mLayerId].mapId] );
|
||||
return ( map->frozen );
|
||||
@ -1385,7 +1376,7 @@ bool QgsGrassProvider::isFrozen( void )
|
||||
|
||||
void QgsGrassProvider::freeze()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassProvider::freeze" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
if ( !isValid() ) return;
|
||||
|
||||
@ -1399,7 +1390,7 @@ void QgsGrassProvider::freeze()
|
||||
|
||||
void QgsGrassProvider::thaw()
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassProvider::thaw" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
if ( !isValid() ) return;
|
||||
GMAP *map = &( mMaps[mLayers[mLayerId].mapId] );
|
||||
@ -1414,7 +1405,7 @@ void QgsGrassProvider::thaw()
|
||||
|
||||
bool QgsGrassProvider::startEdit( void )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassProvider::startEdit" );
|
||||
QgsDebugMsg( "entered." );
|
||||
QgsDebugMsg( QString( " uri = %1" ).arg( dataSourceUri() ) );
|
||||
QgsDebugMsg( QString( " mMaps.size() = %1" ).arg( mMaps.size() ) );
|
||||
|
||||
@ -1494,7 +1485,7 @@ bool QgsGrassProvider::startEdit( void )
|
||||
|
||||
bool QgsGrassProvider::closeEdit( bool newMap )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassProvider::closeEdit" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
if ( !isValid() )
|
||||
return false;
|
||||
@ -1580,23 +1571,21 @@ bool QgsGrassProvider::reopenMap()
|
||||
|
||||
int QgsGrassProvider::numLines( void )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassProvider::numLines" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
return ( Vect_get_num_lines( mMap ) );
|
||||
}
|
||||
|
||||
int QgsGrassProvider::numNodes( void )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassProvider::numNodes" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
return ( Vect_get_num_nodes( mMap ) );
|
||||
}
|
||||
|
||||
int QgsGrassProvider::readLine( struct line_pnts *Points, struct line_cats *Cats, int line )
|
||||
{
|
||||
#if QGISDEBUG > 3
|
||||
QgsDebugMsg( "QgsGrassProvider::readLine" );
|
||||
#endif
|
||||
QgsDebugMsgLevel( "entered.", 3 );
|
||||
|
||||
if ( Points )
|
||||
Vect_reset_line( Points );
|
||||
@ -1611,9 +1600,7 @@ int QgsGrassProvider::readLine( struct line_pnts *Points, struct line_cats *Cats
|
||||
|
||||
bool QgsGrassProvider::nodeCoor( int node, double *x, double *y )
|
||||
{
|
||||
#if QGISDEBUG > 3
|
||||
QgsDebugMsg( "QgsGrassProvider::nodeCoor" );
|
||||
#endif
|
||||
QgsDebugMsgLevel( "entered.", 3 );
|
||||
|
||||
if ( !Vect_node_alive( mMap, node ) )
|
||||
{
|
||||
@ -1628,9 +1615,7 @@ bool QgsGrassProvider::nodeCoor( int node, double *x, double *y )
|
||||
|
||||
bool QgsGrassProvider::lineNodes( int line, int *node1, int *node2 )
|
||||
{
|
||||
#if QGISDEBUG > 3
|
||||
QgsDebugMsg( "QgsGrassProvider::lineNodes" );
|
||||
#endif
|
||||
QgsDebugMsgLevel( "entered.", 3 );
|
||||
|
||||
if ( !Vect_line_alive( mMap, line ) )
|
||||
{
|
||||
@ -1645,7 +1630,7 @@ bool QgsGrassProvider::lineNodes( int line, int *node1, int *node2 )
|
||||
|
||||
int QgsGrassProvider::writeLine( int type, struct line_pnts *Points, struct line_cats *Cats )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassProvider::writeLine n_points = %1 n_cats = %2" ).arg( Points->n_points ).arg( Cats->n_cats ) );
|
||||
QgsDebugMsg( QString( "n_points = %1 n_cats = %2" ).arg( Points->n_points ).arg( Cats->n_cats ) );
|
||||
|
||||
if ( !isEdited() )
|
||||
return -1;
|
||||
@ -1655,7 +1640,7 @@ int QgsGrassProvider::writeLine( int type, struct line_pnts *Points, struct line
|
||||
|
||||
int QgsGrassProvider::rewriteLine( int line, int type, struct line_pnts *Points, struct line_cats *Cats )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassProvider::rewriteLine n_points = %1 n_cats = %2" ).arg( Points->n_points ).arg( Cats->n_cats ) );
|
||||
QgsDebugMsg( QString( "n_points = %1 n_cats = %2" ).arg( Points->n_points ).arg( Cats->n_cats ) );
|
||||
|
||||
if ( !isEdited() )
|
||||
return -1;
|
||||
@ -1666,7 +1651,7 @@ int QgsGrassProvider::rewriteLine( int line, int type, struct line_pnts *Points,
|
||||
|
||||
int QgsGrassProvider::deleteLine( int line )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassProvider::deleteLine" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
if ( !isEdited() )
|
||||
return -1;
|
||||
@ -1676,9 +1661,7 @@ int QgsGrassProvider::deleteLine( int line )
|
||||
|
||||
int QgsGrassProvider::findLine( double x, double y, int type, double threshold )
|
||||
{
|
||||
#if QGISDEBUG > 3
|
||||
QgsDebugMsg( "QgsGrassProvider::findLine" );
|
||||
#endif
|
||||
QgsDebugMsgLevel( "entered", 3 );
|
||||
|
||||
return ( Vect_find_line( mMap, x, y, 0, type, threshold, 0, 0 ) );
|
||||
}
|
||||
@ -1690,9 +1673,7 @@ int QgsGrassProvider::findNode( double x, double y, double threshold )
|
||||
|
||||
bool QgsGrassProvider::lineAreas( int line, int *left, int *right )
|
||||
{
|
||||
#if QGISDEBUG > 3
|
||||
QgsDebugMsg( "QgsGrassProvider::lineAreas" );
|
||||
#endif
|
||||
QgsDebugMsgLevel( "entered.", 3 );
|
||||
|
||||
if ( !Vect_line_alive( mMap, line ) )
|
||||
{
|
||||
@ -1707,9 +1688,7 @@ bool QgsGrassProvider::lineAreas( int line, int *left, int *right )
|
||||
|
||||
int QgsGrassProvider::centroidArea( int centroid )
|
||||
{
|
||||
#if QGISDEBUG > 3
|
||||
QgsDebugMsg( "QgsGrassProvider::centroidArea" );
|
||||
#endif
|
||||
QgsDebugMsgLevel( "entered.", 3 );
|
||||
|
||||
if ( !Vect_line_alive( mMap, centroid ) )
|
||||
{
|
||||
@ -1721,9 +1700,7 @@ int QgsGrassProvider::centroidArea( int centroid )
|
||||
|
||||
int QgsGrassProvider::nodeNLines( int node )
|
||||
{
|
||||
#if QGISDEBUG > 3
|
||||
QgsDebugMsg( "QgsGrassProvider::nodeNLines" );
|
||||
#endif
|
||||
QgsDebugMsgLevel( "entered.", 3 );
|
||||
|
||||
if ( !Vect_node_alive( mMap, node ) )
|
||||
{
|
||||
@ -1735,9 +1712,7 @@ int QgsGrassProvider::nodeNLines( int node )
|
||||
|
||||
int QgsGrassProvider::nodeLine( int node, int idx )
|
||||
{
|
||||
#if QGISDEBUG > 3
|
||||
QgsDebugMsg( "QgsGrassProvider::nodeLine" );
|
||||
#endif
|
||||
QgsDebugMsgLevel( "entered.", 3 );
|
||||
|
||||
if ( !Vect_node_alive( mMap, node ) )
|
||||
{
|
||||
@ -1749,41 +1724,35 @@ int QgsGrassProvider::nodeLine( int node, int idx )
|
||||
|
||||
int QgsGrassProvider::lineAlive( int line )
|
||||
{
|
||||
#if QGISDEBUG > 3
|
||||
QgsDebugMsg( "QgsGrassProvider::lineAlive" );
|
||||
#endif
|
||||
QgsDebugMsgLevel( "entered.", 3 );
|
||||
|
||||
return ( Vect_line_alive( mMap, line ) ) ;
|
||||
}
|
||||
|
||||
int QgsGrassProvider::nodeAlive( int node )
|
||||
{
|
||||
#if QGISDEBUG > 3
|
||||
QgsDebugMsg( "QgsGrassProvider::nodeAlive" );
|
||||
#endif
|
||||
QgsDebugMsgLevel( "QgsGrassProvider::nodeAlive", 3 );
|
||||
|
||||
return ( Vect_node_alive( mMap, node ) ) ;
|
||||
}
|
||||
|
||||
int QgsGrassProvider::numUpdatedLines( void )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassProvider::numUpdatedLines" );
|
||||
QgsDebugMsg( QString( " numUpdatedLines = %1" ).arg( Vect_get_num_updated_lines( mMap ) ) );
|
||||
QgsDebugMsg( QString( "numUpdatedLines = %1" ).arg( Vect_get_num_updated_lines( mMap ) ) );
|
||||
|
||||
return ( Vect_get_num_updated_lines( mMap ) ) ;
|
||||
}
|
||||
|
||||
int QgsGrassProvider::numUpdatedNodes( void )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassProvider::numUpdatedNodes" );
|
||||
QgsDebugMsg( QString( " numUpdatedNodes = %1" ).arg( Vect_get_num_updated_nodes( mMap ) ) );
|
||||
QgsDebugMsg( QString( "numUpdatedNodes = %1" ).arg( Vect_get_num_updated_nodes( mMap ) ) );
|
||||
|
||||
return ( Vect_get_num_updated_nodes( mMap ) ) ;
|
||||
}
|
||||
|
||||
int QgsGrassProvider::updatedLine( int idx )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassProvider::updatedLine idx = %1" ).arg( idx ) );
|
||||
QgsDebugMsg( QString( "idx = %1" ).arg( idx ) );
|
||||
QgsDebugMsg( QString( " updatedLine = %1" ).arg( Vect_get_updated_line( mMap, idx ) ) );
|
||||
|
||||
return ( Vect_get_updated_line( mMap, idx ) ) ;
|
||||
@ -1791,7 +1760,7 @@ int QgsGrassProvider::updatedLine( int idx )
|
||||
|
||||
int QgsGrassProvider::updatedNode( int idx )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassProvider::updatedNode idx = %1" ).arg( idx ) );
|
||||
QgsDebugMsg( QString( "idx = %1" ).arg( idx ) );
|
||||
QgsDebugMsg( QString( " updatedNode = %1" ).arg( Vect_get_updated_node( mMap, idx ) ) );
|
||||
|
||||
return ( Vect_get_updated_node( mMap, idx ) ) ;
|
||||
@ -1801,7 +1770,7 @@ int QgsGrassProvider::updatedNode( int idx )
|
||||
|
||||
QString *QgsGrassProvider::key( int field )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassProvider::key() field = %1" ).arg( field ) );
|
||||
QgsDebugMsg( QString( "field = %1" ).arg( field ) );
|
||||
|
||||
QString *key = new QString();
|
||||
|
||||
@ -1819,7 +1788,7 @@ QString *QgsGrassProvider::key( int field )
|
||||
|
||||
std::vector<QgsField> *QgsGrassProvider::columns( int field )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassProvider::columns() field = %1" ).arg( field ) );
|
||||
QgsDebugMsg( QString( "field = %1" ).arg( field ) );
|
||||
|
||||
std::vector<QgsField> *col = new std::vector<QgsField>;
|
||||
|
||||
@ -1893,7 +1862,7 @@ std::vector<QgsField> *QgsGrassProvider::columns( int field )
|
||||
|
||||
QgsAttributeMap *QgsGrassProvider::attributes( int field, int cat )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassProvider::attributes() field = %1 cat = %2" ).arg( field ).arg( cat ) );
|
||||
QgsDebugMsg( QString( "field = %1 cat = %2" ).arg( field ).arg( cat ) );
|
||||
|
||||
QgsAttributeMap *att = new QgsAttributeMap;
|
||||
|
||||
@ -1975,7 +1944,7 @@ QgsAttributeMap *QgsGrassProvider::attributes( int field, int cat )
|
||||
|
||||
QString *QgsGrassProvider::updateAttributes( int field, int cat, const QString &values )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassProvider::updateAttributes() field = %1 cat = %2" ).arg( field ).arg( cat ) );
|
||||
QgsDebugMsg( QString( "field = %1 cat = %2" ).arg( field ).arg( cat ) );
|
||||
|
||||
QString *error = new QString();
|
||||
struct field_info *fi = Vect_get_field( mMap, field ); // should work also with field = 0
|
||||
@ -2041,14 +2010,14 @@ QString *QgsGrassProvider::updateAttributes( int field, int cat, const QString &
|
||||
|
||||
int QgsGrassProvider::numDbLinks( void )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassProvider::numDbLinks()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
return ( Vect_get_num_dblinks( mMap ) );
|
||||
}
|
||||
|
||||
int QgsGrassProvider::dbLinkField( int link )
|
||||
{
|
||||
QgsDebugMsg( "QgsGrassProvider::dbLinkField()" );
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
struct field_info *fi = Vect_get_dblink( mMap, link );
|
||||
|
||||
@ -2059,7 +2028,7 @@ int QgsGrassProvider::dbLinkField( int link )
|
||||
|
||||
QString *QgsGrassProvider::executeSql( int field, const QString &sql )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassProvider::executeSql field = %1" ).arg( field ) );
|
||||
QgsDebugMsg( QString( "field = %1" ).arg( field ) );
|
||||
|
||||
QString *error = new QString();
|
||||
struct field_info *fi = Vect_get_field( mMap, field ); // should work also with field = 0
|
||||
@ -2109,7 +2078,7 @@ QString *QgsGrassProvider::executeSql( int field, const QString &sql )
|
||||
|
||||
QString *QgsGrassProvider::createTable( int field, const QString &key, const QString &columns )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassProvider::createTable() field = %1" ).arg( field ) );
|
||||
QgsDebugMsg( QString( "field = %1" ).arg( field ) );
|
||||
|
||||
QString *error = new QString();
|
||||
struct field_info *fi = Vect_get_field( mMap, field ); // should work also with field = 0
|
||||
@ -2184,7 +2153,7 @@ QString *QgsGrassProvider::createTable( int field, const QString &key, const QSt
|
||||
|
||||
QString *QgsGrassProvider::addColumn( int field, const QString &column )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassProvider::addColumn() field = %1" ).arg( field ) );
|
||||
QgsDebugMsg( QString( "field = %1" ).arg( field ) );
|
||||
|
||||
QString *error = new QString();
|
||||
struct field_info *fi = Vect_get_field( mMap, field ); // should work also with field = 0
|
||||
@ -2207,7 +2176,7 @@ QString *QgsGrassProvider::addColumn( int field, const QString &column )
|
||||
|
||||
QString *QgsGrassProvider::insertAttributes( int field, int cat )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassProvider::insertAttributes() field = %1 cat = %2" ).arg( field ).arg( cat ) );
|
||||
QgsDebugMsg( QString( "field = %1 cat = %2" ).arg( field ).arg( cat ) );
|
||||
|
||||
QString *error = new QString();
|
||||
struct field_info *fi = Vect_get_field( mMap, field ); // should work also with field = 0
|
||||
@ -2230,7 +2199,7 @@ QString *QgsGrassProvider::insertAttributes( int field, int cat )
|
||||
|
||||
QString *QgsGrassProvider::deleteAttributes( int field, int cat )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassProvider::deleteAttributes() field = %1 cat = %2" ).arg( field ).arg( cat ) );
|
||||
QgsDebugMsg( QString( "field = %1 cat = %2" ).arg( field ).arg( cat ) );
|
||||
|
||||
QString *error = new QString();
|
||||
struct field_info *fi = Vect_get_field( mMap, field ); // should work also with field = 0
|
||||
@ -2253,7 +2222,7 @@ QString *QgsGrassProvider::deleteAttributes( int field, int cat )
|
||||
|
||||
QString *QgsGrassProvider::isOrphan( int field, int cat, int *orphan )
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassProvider::isOrphan() field = %1 cat = %2" ).arg( field ).arg( cat ) );
|
||||
QgsDebugMsg( QString( "field = %1 cat = %2" ).arg( field ).arg( cat ) );
|
||||
|
||||
QString *error = new QString();
|
||||
|
||||
|
@ -720,7 +720,7 @@ bool QgsOgrProvider::changeGeometryValues( QgsGeometryMap & geometry_map )
|
||||
|
||||
bool QgsOgrProvider::createSpatialIndex()
|
||||
{
|
||||
QString fileName = dataSourceUri().section( '/', -1, -1 );//find out the fileName from the uri
|
||||
QString fileName = dataSourceUri().section( '/', -1, -1 );//find out the file name from the uri
|
||||
QString layerName = fileName.section( '.', 0, 0 );
|
||||
QString sql = "CREATE SPATIAL INDEX ON " + layerName;
|
||||
OGR_DS_ExecuteSQL( ogrDataSource, sql.toAscii(), OGR_L_GetSpatialFilter( ogrLayer ), "" );
|
||||
@ -751,7 +751,7 @@ bool QgsOgrProvider::deleteFeatures( const QgsFeatureIds & id )
|
||||
}
|
||||
|
||||
OGR_L_SyncToDisk( ogrLayer );
|
||||
QString fileName = dataSourceUri().section( '/', -1, -1 );//find out the fileName from the uri
|
||||
QString fileName = dataSourceUri().section( '/', -1, -1 );//find out the file name from the uri
|
||||
QString layerName = fileName.section( '.', 0, 0 );
|
||||
QString sql = "REPACK " + layerName;
|
||||
OGR_DS_ExecuteSQL( ogrDataSource, sql.toLocal8Bit().data(), NULL, NULL );
|
||||
@ -1229,7 +1229,7 @@ QGISEXTERN bool createEmptyDataSource( const QString& uri,
|
||||
|
||||
QgsCoordinateReferenceSystem QgsOgrProvider::getCRS()
|
||||
{
|
||||
QgsDebugMsg( "QgsOgrProvider::getCRS()" );
|
||||
QgsDebugMsg( "entering." );
|
||||
|
||||
QgsCoordinateReferenceSystem srs;
|
||||
|
||||
|
@ -109,22 +109,22 @@ void QgsPostgresCountThread::run()
|
||||
// Second we tell the application that the extents have changed, so that it
|
||||
// can go on and do any visual housekeeping (e.g. update the overview window)
|
||||
|
||||
QgsDebugMsg( QString( "QgsPostgresCountThread: About to create and dispatch event %1 to callback" ).arg( QGis::ProviderCountCalcEvent ) );
|
||||
QgsDebugMsg( QString( "About to create and dispatch event %1 to callback" ).arg( QGis::ProviderCountCalcEvent ) );
|
||||
|
||||
QgsProviderCountCalcEvent* e1 = new QgsProviderCountCalcEvent( numberFeatures );
|
||||
QApplication::postEvent(( QObject * )callbackObject, e1 );
|
||||
|
||||
// QApplication::postEvent(qApp->mainWidget(), e1);
|
||||
|
||||
QgsDebugMsg( QString( "QgsPostgresCountThread: Posted event %1 to callback" ).arg( QGis::ProviderCountCalcEvent ) );
|
||||
QgsDebugMsg( QString( "Posted event %1 to callback" ).arg( QGis::ProviderCountCalcEvent ) );
|
||||
|
||||
|
||||
QgsDebugMsg( "QgsPostgresCountThread: About to finish connection." );
|
||||
QgsDebugMsg( "About to finish connection." );
|
||||
|
||||
// ending the thread, clean up
|
||||
PQfinish( connection );
|
||||
|
||||
QgsDebugMsg( "QgsPostgresCountThread: About to complete running." );
|
||||
QgsDebugMsg( "About to complete running." );
|
||||
|
||||
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ void QgsPostgresExtentThread::run()
|
||||
// // placeholders for now.
|
||||
// QString connInfo;
|
||||
|
||||
QgsDebugMsg( "QgsPostgresExtentThread: Started running." );
|
||||
QgsDebugMsg( "Started running." );
|
||||
|
||||
// Open another connection to the database
|
||||
PGconn *connection = PQconnectdb( connInfo.toUtf8() );
|
||||
@ -103,11 +103,11 @@ void QgsPostgresExtentThread::run()
|
||||
#endif
|
||||
|
||||
|
||||
QgsDebugMsg( "QgsPostgresExtentThread: About to issue query." );
|
||||
QgsDebugMsg( "About to issue query." );
|
||||
|
||||
PGresult *result = PQexec( connection, sql.toUtf8() );
|
||||
|
||||
QgsDebugMsg( "QgsPostgresExtentThread: Query completed." );
|
||||
QgsDebugMsg( "Query completed." );
|
||||
|
||||
|
||||
|
||||
@ -142,7 +142,7 @@ void QgsPostgresExtentThread::run()
|
||||
*/
|
||||
|
||||
|
||||
QgsDebugMsg( QString( "QgsPostgresExtentThread: Set extents to: %1, %2 %3, %4" ).arg( layerExtent->xMin() ).arg( layerExtent->yMin() ).arg( layerExtent->xMax() ).arg( layerExtent->yMax() ) );
|
||||
QgsDebugMsg( QString( "Set extents to: %1, %2 %3, %4" ).arg( layerExtent->xMin() ).arg( layerExtent->yMin() ).arg( layerExtent->xMax() ).arg( layerExtent->yMax() ) );
|
||||
|
||||
// clear query result
|
||||
PQclear( result );
|
||||
@ -154,22 +154,22 @@ void QgsPostgresExtentThread::run()
|
||||
// Second we tell the application that the extents have changed, so that it
|
||||
// can go on and do any visual housekeeping (e.g. update the overview window)
|
||||
|
||||
QgsDebugMsg( QString( "QgsPostgresExtentThread: About to create and dispatch event %1 to callback" ).arg( QGis::ProviderExtentCalcEvent ) );
|
||||
QgsDebugMsg( QString( "About to create and dispatch event %1 to callback" ).arg( QGis::ProviderExtentCalcEvent ) );
|
||||
|
||||
QgsProviderExtentCalcEvent * e1 = new QgsProviderExtentCalcEvent( layerExtent );
|
||||
QApplication::postEvent(( QObject * )callbackObject, e1 );
|
||||
|
||||
// QApplication::postEvent(qApp->mainWidget(), e1);
|
||||
|
||||
QgsDebugMsg( QString( "QgsPostgresExtentThread: Posted event %1 to callback" ).arg( QGis::ProviderExtentCalcEvent ) );
|
||||
QgsDebugMsg( QString( "Posted event %1 to callback" ).arg( QGis::ProviderExtentCalcEvent ) );
|
||||
|
||||
|
||||
QgsDebugMsg( "QgsPostgresExtentThread: About to finish connection." );
|
||||
QgsDebugMsg( "About to finish connection." );
|
||||
|
||||
// ending the thread, clean up
|
||||
PQfinish( connection );
|
||||
|
||||
QgsDebugMsg( "QgsPostgresExtentThread: About to complete running." );
|
||||
QgsDebugMsg( "About to complete running." );
|
||||
|
||||
|
||||
}
|
||||
|
@ -672,7 +672,7 @@ int QgsWFSProvider::getExtentFromGML2( QgsRect* extent, const QDomElement& wfsCo
|
||||
|
||||
int QgsWFSProvider::setCRSFromGML2( const QDomElement& wfsCollectionElement )
|
||||
{
|
||||
QgsDebugMsg( "entering QgsWFSProvider::setCRSFromGML" );
|
||||
QgsDebugMsg( "entering." );
|
||||
//search <gml:boundedBy>
|
||||
QDomNodeList boundedByList = wfsCollectionElement.elementsByTagNameNS( GML_NAMESPACE, "boundedBy" );
|
||||
if ( boundedByList.size() < 1 )
|
||||
|
Loading…
x
Reference in New Issue
Block a user