Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove redundant doxygen comments from .cpp files, move to .h
where appropriate
  • Loading branch information
nyalldawson committed Apr 3, 2017
1 parent fa6ec3a commit 676dc1a
Show file tree
Hide file tree
Showing 35 changed files with 49 additions and 205 deletions.
16 changes: 0 additions & 16 deletions src/app/pluginmanager/qgsapppluginmanagerinterface.cpp
Expand Up @@ -29,8 +29,6 @@ QgsAppPluginManagerInterface::~QgsAppPluginManagerInterface()
{
}


//! show the Plugin Manager window and optionally open tab tabIndex
void QgsAppPluginManagerInterface::showPluginManager( int tabIndex )
{
mPluginManager->getCppPluginsMetadata();
Expand All @@ -45,15 +43,11 @@ void QgsAppPluginManagerInterface::showPluginManager( int tabIndex )
mPluginManager->exec();
}


//! remove python plugins from the metadata registry (c++ plugins stay)
void QgsAppPluginManagerInterface::clearPythonPluginMetadata()
{
mPluginManager->clearPythonPluginMetadata();
}


//! add a single plugin to the metadata registry
void QgsAppPluginManagerInterface::addPluginMetadata( const QMap<QString, QString> &metadata )
{
if ( metadata.isEmpty() || !metadata.contains( QStringLiteral( "id" ) ) )
Expand All @@ -64,36 +58,26 @@ void QgsAppPluginManagerInterface::addPluginMetadata( const QMap<QString, QStrin
mPluginManager->addPluginMetadata( metadata.value( QStringLiteral( "id" ) ), metadata );
}


//! refresh plugin list model (and metadata browser content if necessary)
void QgsAppPluginManagerInterface::reloadModel()
{
mPluginManager->reloadModelData();
}


//! return given plugin metadata
const QMap<QString, QString> *QgsAppPluginManagerInterface::pluginMetadata( const QString &key ) const
{
return mPluginManager->pluginMetadata( key );
}


//! clear the repository listWidget
void QgsAppPluginManagerInterface::clearRepositoryList()
{
mPluginManager->clearRepositoryList();
}


//! add repository to the repository listWidget
void QgsAppPluginManagerInterface::addToRepositoryList( const QMap<QString, QString> &repository )
{
mPluginManager->addToRepositoryList( repository );
}


//! show the given message in the Plugin Manager internal message bar
void QgsAppPluginManagerInterface::pushMessage( const QString &text, QgsMessageBar::MessageLevel level, int duration )
{
mPluginManager->pushMessage( text, level, duration );
Expand Down
6 changes: 0 additions & 6 deletions src/app/pluginmanager/qgspluginmanager.cpp
Expand Up @@ -984,9 +984,6 @@ const QMap<QString, QString> *QgsPluginManager::pluginMetadata( const QString &k
return nullptr;
}



//! Clear the repository listWidget
void QgsPluginManager::clearRepositoryList()
{
treeRepositories->clear();
Expand All @@ -999,9 +996,6 @@ void QgsPluginManager::clearRepositoryList()
}
}



//! Add repository to the repository listWidget
void QgsPluginManager::addToRepositoryList( const QMap<QString, QString> &repository )
{
// If it's the second item on the tree, change the button text to plural form and add the filter context menu
Expand Down
25 changes: 4 additions & 21 deletions src/app/qgisapp.cpp
Expand Up @@ -4805,7 +4805,7 @@ void QgisApp::fileNew( bool promptToSaveFlag, bool forceBlank )
prj->setCrs( srs );
prj->setDirty( false );

/** New Empty Project Created
/* New Empty Project Created
(before attempting to load custom project templates/filepaths) */

// load default template
Expand Down Expand Up @@ -4915,10 +4915,10 @@ void QgisApp::fileOpenAfterLaunch()

// notify user if last attempt at auto-opening a project failed

/** NOTE: Notification will not show if last auto-opened project failed but
/* NOTE: Notification will not show if last auto-opened project failed but
next project opened is from command line (minor issue) */

/** TODO: Keep projOpenedOKAtLaunch from being reset to true after
/* TODO: Keep projOpenedOKAtLaunch from being reset to true after
reading command line project (which happens before initialization signal) */
if ( !projOpenedOK )
{
Expand Down Expand Up @@ -9604,13 +9604,11 @@ void QgisApp::unregisterOptionsWidgetFactory( QgsOptionsWidgetFactory *factory )
mOptionsWidgetFactories.removeAll( factory );
}

//! Get a pointer to the currently selected map layer
QgsMapLayer *QgisApp::activeLayer()
{
return mLayerTreeView ? mLayerTreeView->currentLayer() : nullptr;
}

//! Set the current layer
bool QgisApp::setActiveLayer( QgsMapLayer *layer )
{
if ( !layer )
Expand All @@ -9623,13 +9621,7 @@ bool QgisApp::setActiveLayer( QgsMapLayer *layer )
return true;
}

/** Add a vector layer directly without prompting user for location
The caller must provide information compatible with the provider plugin
using the vectorLayerPath and baseName. The provider can use these
parameters in any way necessary to initialize the layer. The baseName
parameter is used in the Map Legend so it should be formed in a meaningful
way.
*/

QgsVectorLayer *QgisApp::addVectorLayer( const QString &vectorLayerPath, const QString &baseName, const QString &providerKey )
{
bool wasfrozen = mMapCanvas->isFrozen();
Expand Down Expand Up @@ -11493,15 +11485,6 @@ QgsRasterLayer *QgisApp::addRasterLayer(
}


/** Add a raster layer directly without prompting user for location
The caller must provide information compatible with the provider plugin
using the uri and baseName. The provider can use these
parameters in any way necessary to initialize the layer. The baseName
parameter is used in the Map Legend so it should be formed in a meaningful
way.

\note Copied from the equivalent addVectorLayer function in this file
*/
QgsRasterLayer *QgisApp::addRasterLayer(
QString const &uri, QString const &baseName, QString const &providerKey )
{
Expand Down
18 changes: 14 additions & 4 deletions src/app/qgisapp.h
Expand Up @@ -164,9 +164,13 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
QgisApp( QgisApp const & ) = delete;
QgisApp &operator=( QgisApp const & ) = delete;

/**
* Add a vector layer to the canvas, returns pointer to it
*/
/** Add a vector layer directly without prompting user for location
The caller must provide information compatible with the provider plugin
using the vectorLayerPath and baseName. The provider can use these
parameters in any way necessary to initialize the layer. The baseName
parameter is used in the Map Legend so it should be formed in a meaningful
way.
*/
QgsVectorLayer *addVectorLayer( const QString &vectorLayerPath, const QString &baseName, const QString &providerKey );

/** \brief overloaded version of the private addLayer method that takes a list of
Expand Down Expand Up @@ -771,7 +775,13 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
//! Watch for QFileOpenEvent.
virtual bool event( QEvent *event ) override;

//! Open a raster layer using the Raster Data Provider.
/** Add a raster layer directly without prompting user for location
The caller must provide information compatible with the provider plugin
using the uri and baseName. The provider can use these
parameters in any way necessary to initialize the layer. The baseName
parameter is used in the Map Legend so it should be formed in a meaningful
way.
*/
QgsRasterLayer *addRasterLayer( QString const &uri, QString const &baseName, QString const &providerKey );

//! Open a plugin layer using its provider
Expand Down
9 changes: 0 additions & 9 deletions src/app/qgisappinterface.cpp
Expand Up @@ -529,7 +529,6 @@ void QgisAppInterface::unregisterCustomDropHandler( QgsCustomDropHandler *handle
qgis->unregisterCustomDropHandler( handler );
}

//! Menus
QMenu *QgisAppInterface::projectMenu() { return qgis->projectMenu(); }
QMenu *QgisAppInterface::editMenu() { return qgis->editMenu(); }
QMenu *QgisAppInterface::viewMenu() { return qgis->viewMenu(); }
Expand All @@ -546,7 +545,6 @@ QMenu *QgisAppInterface::firstRightStandardMenu() { return qgis->firstRightStand
QMenu *QgisAppInterface::windowMenu() { return qgis->windowMenu(); }
QMenu *QgisAppInterface::helpMenu() { return qgis->helpMenu(); }

//! ToolBars
QToolBar *QgisAppInterface::fileToolBar() { return qgis->fileToolBar(); }
QToolBar *QgisAppInterface::layerToolBar() { return qgis->layerToolBar(); }
QToolBar *QgisAppInterface::mapNavToolToolBar() { return qgis->mapNavToolToolBar(); }
Expand All @@ -560,7 +558,6 @@ QToolBar *QgisAppInterface::vectorToolBar() { return qgis->vectorToolBar(); }
QToolBar *QgisAppInterface::databaseToolBar() { return qgis->databaseToolBar(); }
QToolBar *QgisAppInterface::webToolBar() { return qgis->webToolBar(); }

//! Project menu actions
QAction *QgisAppInterface::actionNewProject() { return qgis->actionNewProject(); }
QAction *QgisAppInterface::actionOpenProject() { return qgis->actionOpenProject(); }
QAction *QgisAppInterface::actionSaveProject() { return qgis->actionSaveProject(); }
Expand All @@ -571,7 +568,6 @@ QAction *QgisAppInterface::actionPrintComposer() { return qgis->actionNewPrintCo
QAction *QgisAppInterface::actionShowComposerManager() { return qgis->actionShowComposerManager(); }
QAction *QgisAppInterface::actionExit() { return qgis->actionExit(); }

//! Edit menu actions
QAction *QgisAppInterface::actionCutFeatures() { return qgis->actionCutFeatures(); }
QAction *QgisAppInterface::actionCopyFeatures() { return qgis->actionCopyFeatures(); }
QAction *QgisAppInterface::actionPasteFeatures() { return qgis->actionPasteFeatures(); }
Expand All @@ -587,7 +583,6 @@ QAction *QgisAppInterface::actionDeleteRing() { return qgis->actionDeleteRing();
QAction *QgisAppInterface::actionDeletePart() { return qgis->actionDeletePart(); }
QAction *QgisAppInterface::actionNodeTool() { return qgis->actionNodeTool(); }

//! View menu actions
QAction *QgisAppInterface::actionPan() { return qgis->actionPan(); }
QAction *QgisAppInterface::actionPanToSelected() { return qgis->actionPanToSelected(); }
QAction *QgisAppInterface::actionZoomIn() { return qgis->actionZoomIn(); }
Expand All @@ -612,7 +607,6 @@ QAction *QgisAppInterface::actionNewBookmark() { return qgis->actionNewBookmark(
QAction *QgisAppInterface::actionShowBookmarks() { return qgis->actionShowBookmarks(); }
QAction *QgisAppInterface::actionDraw() { return qgis->actionDraw(); }

//! Layer menu actions
QAction *QgisAppInterface::actionNewVectorLayer() { return qgis->actionNewVectorLayer(); }
QAction *QgisAppInterface::actionAddOgrLayer() { return qgis->actionAddOgrLayer(); }
QAction *QgisAppInterface::actionAddRasterLayer() { return qgis->actionAddRasterLayer(); }
Expand Down Expand Up @@ -645,17 +639,14 @@ QAction *QgisAppInterface::actionHideSelectedLayers() { return qgis->actionHideS
QAction *QgisAppInterface::actionHideDeselectedLayers() { return qgis->actionHideDeselectedLayers(); }
QAction *QgisAppInterface::actionShowSelectedLayers() { return qgis->actionShowSelectedLayers(); }

//! Plugin menu actions
QAction *QgisAppInterface::actionManagePlugins() { return qgis->actionManagePlugins(); }
QAction *QgisAppInterface::actionPluginListSeparator() { return qgis->actionPluginListSeparator(); }
QAction *QgisAppInterface::actionShowPythonDialog() { return qgis->actionShowPythonDialog(); }

//! Settings menu actions
QAction *QgisAppInterface::actionToggleFullScreen() { return qgis->actionToggleFullScreen(); }
QAction *QgisAppInterface::actionOptions() { return qgis->actionOptions(); }
QAction *QgisAppInterface::actionCustomProjection() { return qgis->actionCustomProjection(); }

//! Help menu actions
QAction *QgisAppInterface::actionHelpContents() { return qgis->actionHelpContents(); }
QAction *QgisAppInterface::actionQgisHomePage() { return qgis->actionQgisHomePage(); }
QAction *QgisAppInterface::actionCheckQgisVersion() { return qgis->actionCheckQgisVersion(); }
Expand Down
4 changes: 0 additions & 4 deletions src/app/qgisappstylesheet.cpp
Expand Up @@ -25,10 +25,6 @@
#include <QFont>
#include <QStyle>

/** @class QgisAppStyleSheet
* @brief Adjustable stylesheet for the Qgis application
*/

QgisAppStyleSheet::QgisAppStyleSheet( QObject *parent )
: QObject( parent )
{
Expand Down
1 change: 0 additions & 1 deletion src/app/qgsmaptoolmovefeature.cpp
Expand Up @@ -198,7 +198,6 @@ void QgsMapToolMoveFeature::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
}
}

//! called when map tool is being deactivated
void QgsMapToolMoveFeature::deactivate()
{
//delete rubber band
Expand Down
1 change: 0 additions & 1 deletion src/app/qgsmaptoolmovefeature.h
Expand Up @@ -38,7 +38,6 @@ class APP_EXPORT QgsMapToolMoveFeature: public QgsMapToolAdvancedDigitizing

virtual void cadCanvasReleaseEvent( QgsMapMouseEvent *e ) override;

//! called when map tool is being deactivated
void deactivate() override;

private:
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsvectorlayerproperties.cpp
Expand Up @@ -377,7 +377,7 @@ void QgsVectorLayerProperties::insertFieldOrExpression()
mMapTipWidget->insertText( expression );
}

//! @note in raster props, this method is called sync()
// in raster props, this method is called sync()
void QgsVectorLayerProperties::syncToLayer()
{
// populate the general information
Expand Down
1 change: 0 additions & 1 deletion src/core/geometry/qgsgeometry.cpp
Expand Up @@ -816,7 +816,6 @@ int QgsGeometry::splitGeometry( const QList<QgsPoint> &splitLine, QList<QgsGeome
return result;
}

//! Replaces a part of this geometry with another line
int QgsGeometry::reshapeGeometry( const QList<QgsPoint> &reshapeWithLine )
{
if ( !d->geometry )
Expand Down
1 change: 0 additions & 1 deletion src/core/qgis.cpp
Expand Up @@ -72,7 +72,6 @@ const QString GEO_NONE = QStringLiteral( "NONE" );

const double Qgis::DEFAULT_SEARCH_RADIUS_MM = 2.;

//! Default threshold between map coordinates and device coordinates for map2pixel simplification
const float Qgis::DEFAULT_MAPTOPIXEL_THRESHOLD = 1.0f;

const QColor Qgis::DEFAULT_HIGHLIGHT_COLOR = QColor( 255, 0, 0, 128 );
Expand Down
31 changes: 2 additions & 29 deletions src/core/qgsapplication.cpp
Expand Up @@ -618,21 +618,16 @@ QString QgsApplication::donorsFilePath()
return ABISYM( mPkgDataPath ) + QStringLiteral( "/doc/DONORS" );
}

//! Returns the path to the sponsors file.
QString QgsApplication::translatorsFilePath()
{
return ABISYM( mPkgDataPath ) + QStringLiteral( "/doc/TRANSLATORS" );
}

//! Returns the path to the licence file.
QString QgsApplication::licenceFilePath()
{
return ABISYM( mPkgDataPath ) + QStringLiteral( "/doc/LICENSE" );
}

/*!
Returns the path to the help application.
*/
QString QgsApplication::helpAppPath()
{
QString helpAppPath;
Expand All @@ -647,9 +642,7 @@ QString QgsApplication::helpAppPath()
#endif
return helpAppPath;
}
/*!
Returns the path to the translation directory.
*/

QString QgsApplication::i18nPath()
{
if ( ABISYM( mRunningFromBuildDir ) )
Expand All @@ -658,56 +651,36 @@ QString QgsApplication::i18nPath()
return ABISYM( mPkgDataPath ) + QStringLiteral( "/i18n/" );
}

/*!
Returns the path to the master qgis.db file.
*/
QString QgsApplication::qgisMasterDatabaseFilePath()
{
return ABISYM( mPkgDataPath ) + QStringLiteral( "/resources/qgis.db" );
}

/*!
Returns the path to the settings directory in user's home dir
*/
QString QgsApplication::qgisSettingsDirPath()
{
return ABISYM( mConfigPath );
}

/*!
Returns the path to the user qgis.db file.
*/
QString QgsApplication::qgisUserDatabaseFilePath()
{
return qgisSettingsDirPath() + QStringLiteral( "qgis.db" );
}

/*!
Returns the path to the user authentication database file: qgis-auth.db.
*/
QString QgsApplication::qgisAuthDatabaseFilePath()
{
return ABISYM( mAuthDbDirPath ) + QStringLiteral( "qgis-auth.db" );
}

/*!
Returns the path to the splash screen image directory.
*/
QString QgsApplication::splashPath()
{
return QStringLiteral( ":/images/splash/" );
}

/*!
Returns the path to the icons image directory.
*/
QString QgsApplication::iconsPath()
{
return ABISYM( mPkgDataPath ) + QStringLiteral( "/images/icons/" );
}
/*!
Returns the path to the srs.db file.
*/

QString QgsApplication::srsDatabaseFilePath()
{
if ( ABISYM( mRunningFromBuildDir ) )
Expand Down

0 comments on commit 676dc1a

Please sign in to comment.