Skip to content
Permalink
Browse files
Follow Qt naming style: fileName instead of filename, layerName inste…
…ad of layerName

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9136 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Aug 23, 2008
1 parent 9576836 commit 619dd2e4930e79900758e37ae5fcc7a3e9cbee28
Showing with 221 additions and 221 deletions.
  1. +2 −2 python/core/qgslogger.sip
  2. +1 −1 python/core/qgsmarkercatalogue.sip
  3. +1 −1 python/core/qgsproject.sip
  4. +1 −1 python/core/qgsrasterlayer.sip
  5. +3 −3 src/app/composer/qgscomposer.cpp
  6. +2 −2 src/app/main.cpp
  7. +23 −23 src/app/qgisapp.cpp
  8. +4 −4 src/app/qgisapp.h
  9. +2 −2 src/app/qgsabout.cpp
  10. +1 −1 src/app/qgsmapserverexport.cpp
  11. +1 −1 src/app/qgsmapserverexport.h
  12. +13 −13 src/app/qgsrasterlayerproperties.cpp
  13. +4 −4 src/app/qgsvectorlayerproperties.cpp
  14. +2 −2 src/core/qgslogger.h
  15. +4 −4 src/core/qgsmaplayer.cpp
  16. +3 −3 src/core/qgsproject.cpp
  17. +1 −1 src/core/qgsproject.h
  18. +4 −4 src/core/raster/qgsrasterlayer.cpp
  19. +2 −2 src/core/raster/qgsrasterlayer.h
  20. +21 −21 src/core/sqlite3/sqlite3.h
  21. +2 −2 src/core/symbology/qgsmarkercatalogue.cpp
  22. +1 −1 src/core/symbology/qgsmarkercatalogue.h
  23. +1 −1 src/gui/qgsquickprint.cpp
  24. +2 −2 src/plugins/dxf2shp_converter/dxf2shpconvertergui.cpp
  25. +3 −3 src/plugins/dxf2shp_converter/shapelib-1.2.10/shapefil.h
  26. +4 −4 src/plugins/georeferencer/plugingui.cpp
  27. +15 −15 src/plugins/georeferencer/qgspointdialog.cpp
  28. +24 −24 src/plugins/gps_importer/qgsgpsplugin.cpp
  29. +6 −6 src/plugins/gps_importer/qgsgpsplugin.h
  30. +5 −5 src/plugins/gps_importer/qgsgpsplugingui.cpp
  31. +6 −6 src/plugins/gps_importer/qgsgpsplugingui.h
  32. +3 −3 src/plugins/grid_maker/plugingui.cpp
  33. +2 −2 src/plugins/interpolation/DualEdgeTriangulation.h
  34. +2 −2 src/plugins/interpolation/Triangulation.h
  35. +5 −5 src/plugins/interpolation/qgsinterpolationdialog.cpp
  36. +2 −2 src/plugins/quick_print/quickprintgui.cpp
  37. +6 −6 src/plugins/spit/qgsshapefile.cpp
  38. +2 −2 src/plugins/spit/qgsshapefile.h
  39. +3 −3 src/plugins/spit/qgsspit.cpp
  40. +14 −14 src/providers/gpx/gpsdata.cpp
  41. +6 −6 src/providers/gpx/gpsdata.h
  42. +1 −1 src/providers/gpx/qgsgpxprovider.cpp
  43. +8 −8 src/providers/ogr/qgsogrprovider.cpp
  44. +1 −1 tests/algorithms/qgsproject/projecttest.h
  45. +1 −1 tools/mapserver_export/qgsmapserverexport.cpp
  46. +1 −1 tools/mapserver_export/qgsmapserverexport.h
@@ -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 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
*/

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 fileName 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 fileName of a svg marker
* NOTE: this method needs to be public static for QgsMarkerDialog::visualizeMarkers */
static void svgMarker (QPainter * thepPainter, QString name, int size );
};
@@ -59,7 +59,7 @@ public:
Every project has an associated file that contains its XML
*/
//@{
void setFilename( const QString & name );
void setFileName( const QString & name );

/** returns file name */
QString fileName() const;
@@ -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 fileName appears to be a valid
raster file name */
static bool isValidRasterFileName(const QString & theFileNameQString);

@@ -781,7 +781,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 fileName to save the map image as"),
file.path(),
myFilters
)
@@ -797,7 +797,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 fileName
QString myOutputFileNameQString; // = myQFileDialog->getSaveFileName(); //delete this

int result = myQFileDialog->exec();
@@ -876,7 +876,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 fileName to save the map as"),
file.path(), tr("SVG Format") + " (*.svg *SVG)" );
myQFileDialog->selectFile( file.fileName() );
myQFileDialog->setFileMode(QFileDialog::AnyFile);
@@ -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"
@@ -584,7 +584,7 @@ int main(int argc, char *argv[])


/////////////////////////////////////////////////////////////////////
// autoload any filenames that were passed in on the command line
// autoload any fileNames that were passed in on the command line
/////////////////////////////////////////////////////////////////////
#ifdef QGISDEBUG
std::cout << "Number of files in myFileList: " << myFileList.count() << std::endl;
@@ -1975,7 +1975,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 fileNames with a dialog.
*/
void QgisApp::addVectorLayer()
{
@@ -2074,7 +2074,7 @@ bool QgisApp::addVectorLayers(QStringList const & theLayerQStringList, const QSt



/** This helper checks to see whether the filename appears to be a valid vector file name */
/** This helper checks to see whether the fileName appears to be a valid vector file name */
bool QgisApp::isValidVectorFileName(QString theFileNameQString)
{
return (theFileNameQString.toLower().endsWith(".shp"));
@@ -2527,7 +2527,7 @@ void QgisApp::fileNew(bool thePromptToSaveFlag)

QgsProject* prj = QgsProject::instance();
prj->title( QString::null );
prj->setFilename( QString::null );
prj->setFileName( QString::null );
prj->clearProperties(); // why carry over properties from previous projects?

QSettings settings;
@@ -2599,7 +2599,7 @@ void QgisApp::newVectorLayer()
bool haveLastUsedFilter = false; // by default, there is no last
// used filter
QString enc;
QString filename;
QString fileName;

QSettings settings; // where we keep last used filter in
// persistant state
@@ -2634,14 +2634,14 @@ void QgisApp::newVectorLayer()
return;
}

filename = openFileDialog->selectedFiles().first();
fileName = openFileDialog->selectedFiles().first();
enc = openFileDialog->encoding();

// If the file exists, delete it otherwise we'll end up loading that
// file, which can cause problems (e.g., if the file contains
// linestrings, but we're wanting to create points, we'll end up
// with a linestring file).
QFile::remove(filename);
QFile::remove(fileName);

settings.setValue("/UI/lastVectorFileFilter", openFileDialog->selectedFilter());

@@ -2668,20 +2668,20 @@ void QgisApp::newVectorLayer()
#if 0
if(geometrytype == QGis::WKBPoint)
{
createEmptyDataSource(filename,fileformat, enc, QGis::WKBPoint, attributes);
createEmptyDataSource(fileName,fileformat, enc, QGis::WKBPoint, attributes);
}
else if (geometrytype == QGis::WKBLineString)
{
createEmptyDataSource(filename,fileformat, enc, QGis::WKBLineString, attributes);
createEmptyDataSource(fileName,fileformat, enc, QGis::WKBLineString, attributes);
}
else if(geometrytype == QGis::WKBPolygon)
{
createEmptyDataSource(filename,fileformat, enc, QGis::WKBPolygon, attributes);
createEmptyDataSource(fileName,fileformat, enc, QGis::WKBPolygon, attributes);
}
#endif
if(geometrytype != QGis::WKBUnknown)
{
createEmptyDataSource(filename,fileformat, enc, geometrytype, attributes);
createEmptyDataSource(fileName,fileformat, enc, geometrytype, attributes);
}
else
{
@@ -2696,9 +2696,9 @@ void QgisApp::newVectorLayer()
}

//then add the layer to the view
QStringList filenames;
filenames.append(filename);
addVectorLayers(filenames, enc);
QStringList fileNames;
fileNames.append(fileName);
addVectorLayers(fileNames, enc);
}

void QgisApp::fileOpen()
@@ -2749,7 +2749,7 @@ void QgisApp::fileOpen()
delete mComposer;
mComposer = new QgsComposer(this);

QgsProject::instance()->setFilename( fullPath );
QgsProject::instance()->setFileName( fullPath );

try
{
@@ -2873,7 +2873,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 fileName, then obviously we need to get one; note
// that the project file name is reset to null in fileNew()
QFileInfo fullPath;

@@ -2917,7 +2917,7 @@ bool QgisApp::fileSave()
}


QgsProject::instance()->setFilename( fullPath.filePath() );
QgsProject::instance()->setFileName( fullPath.filePath() );
}

try
@@ -2964,7 +2964,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 fileName to save the QGIS project file as"),
lastUsedDir, QObject::tr("QGis files (*.qgs)")) );

saveFileDialog->setFileMode(QFileDialog::AnyFile);
@@ -2973,7 +2973,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 fileName, then obviously we need to get one; note
// that the project file name is reset to null in fileNew()
QFileInfo fullPath;

@@ -3003,7 +3003,7 @@ void QgisApp::fileSaveAs()

try
{
QgsProject::instance()->setFilename( fullPath.filePath() );
QgsProject::instance()->setFileName( fullPath.filePath() );

if ( QgsProject::instance()->write() )
{
@@ -3205,7 +3205,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 fileName to save the map image as"),
myLastUsedDir, myFilters) );

// allow for selection of more than one file
@@ -3222,7 +3222,7 @@ void QgisApp::saveMapAsImage()
}


//prompt the user for a filename
//prompt the user for a fileName
QString myOutputFileNameQString; // = myQFileDialog->getSaveFileName(); //delete this
if (myQFileDialog->exec() == QDialog::Accepted)
{
@@ -3233,7 +3233,7 @@ void QgisApp::saveMapAsImage()
QgsDebugMsg("Selected filter: " + myFilterString);
QgsDebugMsg("Image type to be passed to mapcanvas: " + myFilterMap[myFilterString]);

// Add the file type suffix to the filename if required
// Add the file type suffix to the fileName if required
if (!myOutputFileNameQString.endsWith(myFilterMap[myFilterString]))
{
myOutputFileNameQString += "." + myFilterMap[myFilterString];
@@ -3259,7 +3259,7 @@ void QgisApp::saveMapAsImage(QString theImageFileNameQString, QPixmap * theQPixm
{
if ( theImageFileNameQString=="")
{
//no filename chosen
//no fileName chosen
return;
}
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.
* fileNames 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 fileNames 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 fileName using dlg )
void addRasterLayer();
//#ifdef HAVE_POSTGRESQL
//! Add a databaselayer to the map
@@ -452,7 +452,7 @@ public slots:
*/
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 fileName 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);
@@ -245,10 +245,10 @@ void QgsAbout::openUrl(QString url)
* Step 2: Replace all bytes of the UTF-8 above 0x7f with the hexcode in lower case.
* Step 2: Replace all non [a-z][a-Z][0-9] with underscore (backward compatibility)
*/
QString QgsAbout::fileSystemSafe(QString filename)
QString QgsAbout::fileSystemSafe(QString fileName)
{
QString result;
QByteArray utf8 = filename.toUtf8();
QByteArray utf8 = fileName.toUtf8();

for (int i = 0; i < utf8.size(); i++)
{
@@ -367,7 +367,7 @@ void QgsMapserverExport::on_btnChooseFile_clicked()
{
QString s = QFileDialog::getSaveFileName(
this,
"Choose a filename for the exported map file",
"Choose a fileName for the exported map file",
"./",
"Mapserver files (*.map)" );
txtMapFilePath->setText(s);
@@ -45,7 +45,7 @@ Q_OBJECT
//! get the full path name of the map file
QString fullPathName();
//! Set the full path to the file
void setFileName(QString filename);
void setFileName(QString fileName);
enum ACTION {
SAVE,
SAVEAS,

0 comments on commit 619dd2e

Please sign in to comment.