Skip to content
Permalink
Browse files
use new QgsHelp where possible instead of builtin context help
  • Loading branch information
alexbruy committed Jan 23, 2017
1 parent 6c55e68 commit 57535763d76c9f4b8aa39ef93a0430b72d927b51
Showing with 64 additions and 72 deletions.
  1. +2 −2 src/app/ogr/qgsopenvectorlayerdialog.h
  2. +2 −2 src/app/pluginmanager/qgspluginmanager.h
  3. +2 −9 src/app/qgisapp.cpp
  4. +2 −2 src/app/qgscustomprojectiondialog.h
  5. +2 −2 src/app/qgsdecorationcopyrightdialog.cpp
  6. +2 −2 src/app/qgsdecorationgriddialog.cpp
  7. +2 −2 src/app/qgsdecorationnortharrowdialog.cpp
  8. +2 −2 src/app/qgsdecorationscalebardialog.cpp
  9. +2 −2 src/app/qgsidentifyresultsdialog.h
  10. +0 −1 src/app/qgsmeasuredialog.cpp
  11. +2 −2 src/app/qgsmeasuredialog.h
  12. +2 −2 src/app/qgsnewspatialitelayerdialog.h
  13. +2 −2 src/app/qgsoptions.h
  14. +2 −2 src/app/qgsprojectproperties.h
  15. +2 −2 src/app/qgsrasterlayerproperties.h
  16. +2 −2 src/app/qgsvectorlayerproperties.h
  17. +2 −2 src/gui/qgsquerybuilder.h
  18. +2 −2 src/gui/symbology-ng/qgsstylemanagerdialog.h
  19. +2 −2 src/plugins/coordinate_capture/coordinatecapturegui.h
  20. +2 −2 src/plugins/evis/databaseconnection/evisdatabaseconnectiongui.h
  21. +2 −2 src/plugins/gps_importer/qgsgpsplugingui.h
  22. +2 −2 src/plugins/offline_editing/offline_editing_plugin_gui.cpp
  23. +2 −2 src/providers/db2/qgsdb2newconnection.h
  24. +2 −2 src/providers/db2/qgsdb2sourceselect.h
  25. +2 −2 src/providers/delimitedtext/qgsdelimitedtextsourceselect.h
  26. +2 −2 src/providers/mssql/qgsmssqlnewconnection.h
  27. +2 −2 src/providers/mssql/qgsmssqlsourceselect.h
  28. +2 −2 src/providers/oracle/qgsoraclenewconnection.h
  29. +2 −2 src/providers/oracle/qgsoraclesourceselect.h
  30. +2 −2 src/providers/postgres/qgspgnewconnection.h
  31. +2 −2 src/providers/postgres/qgspgsourceselect.h
  32. +2 −2 src/providers/spatialite/qgsspatialitesourceselect.h
  33. +2 −2 src/providers/wms/qgswmssourceselect.h
@@ -21,7 +21,7 @@

#include <ui_qgsopenvectorlayerdialogbase.h>
#include <QDialog>
#include "qgscontexthelp.h"
#include "qgshelp.h"

/**
* Class for a dialog to select the type and source for ogr vectors, supports
@@ -84,7 +84,7 @@ class QgsOpenVectorLayerDialog : public QDialog, private Ui::QgsOpenVectorLayerD
void on_btnDelete_clicked();
void on_cmbDatabaseTypes_currentIndexChanged( const QString & text );
void on_cmbConnections_currentIndexChanged( const QString & text );
void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
void on_buttonBox_helpRequested() { QgsHelp::openHelp( QStringLiteral( "working_with_vector/supported_data.html#loading-a-layer-from-a-file" ) ); }
};

#endif // QGSOPENVECTORDIALOG_H
@@ -26,7 +26,7 @@
#include "ui_qgspluginmanagerbase.h"
#include "qgsoptionsdialogbase.h"
#include "qgisgui.h"
#include "qgscontexthelp.h"
#include "qgshelp.h"
#include "qgsmessagebar.h"
#include "qgspythonutils.h"

@@ -156,7 +156,7 @@ class QgsPluginManager : public QgsOptionsDialogBase, private Ui::QgsPluginManag
void on_ckbDeprecated_toggled( bool state );

//! Open help browser
void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
void on_buttonBox_helpRequested() { QgsHelp::openHelp( QStringLiteral( "plugins/plugins.html#the-plugins-dialog" ) ); }

//! Reimplement QgsOptionsDialogBase method to prevent modifying the tab list by signals from the stacked widget
void optionsStackedWidget_CurrentChanged( int indx ) { Q_UNUSED( indx ) }
@@ -246,6 +246,7 @@
#include "qgstransaction.h"
#include "qgstransactiongroup.h"
#include "qgsvectorlayerutils.h"
#include "qgshelp.h"

#include "qgssublayersdialog.h"
#include "ogr/qgsopenvectorlayerdialog.h"
@@ -9311,15 +9312,7 @@ void QgisApp::adjustBrightnessContrast( int delta, bool updateBrightness )

void QgisApp::helpContents()
{
QSettings settings;
QString helpUrl = settings.value( QStringLiteral( "Qgis/docsUserManualUrl" ),
QStringLiteral( "https://docs.qgis.org/%1.%2/%3/docs/user_manual/" ) ).toString();
// We should really ship the HTML version of the docs local too.
openURL( helpUrl
.arg( Qgis::QGIS_VERSION_INT / 10000 )
.arg( Qgis::QGIS_VERSION_INT / 100 % 100 )
.arg( tr( "en", "documentation language" ) ),
false );
QgsHelp::openHelp( QStringLiteral( "index.html" ) );
}

void QgisApp::apiDocumentation()
@@ -19,7 +19,7 @@
#define QGSCUSTOMCRSDIALOG_H

#include "ui_qgscustomprojectiondialogbase.h"
#include "qgscontexthelp.h"
#include "qgshelp.h"
#include "qgscoordinatereferencesystem.h"
#include "qgis_app.h"

@@ -44,7 +44,7 @@ class APP_EXPORT QgsCustomProjectionDialog : public QDialog, private Ui::QgsCust
void on_pbnCopyCRS_clicked();
void on_leNameList_currentItemChanged( QTreeWidgetItem *current, QTreeWidgetItem *prev );

void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
void on_buttonBox_helpRequested() { QgsHelp::openHelp( QStringLiteral( "working_with_projections/working_with_projections.html#custom-coordinate-reference-system" ) ); }
void on_buttonBox_accepted();

private:
@@ -13,7 +13,7 @@
#include "qgsdecorationcopyrightdialog.h"
#include "qgsdecorationcopyright.h"

#include "qgscontexthelp.h"
#include "qgshelp.h"

//qt includes
#include <QColorDialog>
@@ -100,5 +100,5 @@ void QgsDecorationCopyrightDialog::apply()

void QgsDecorationCopyrightDialog::on_buttonBox_helpRequested()
{
QgsContextHelp::run( metaObject()->className() );
QgsHelp::openHelp( QStringLiteral( "introduction/general_tools.html#id57" ) );
}
@@ -20,7 +20,7 @@
#include "qgsdecorationgrid.h"

#include "qgslogger.h"
#include "qgscontexthelp.h"
#include "qgshelp.h"
#include "qgsstyle.h"
#include "qgssymbol.h"
#include "qgssymbolselectordialog.h"
@@ -178,7 +178,7 @@ QgsDecorationGridDialog::~QgsDecorationGridDialog()

void QgsDecorationGridDialog::on_buttonBox_helpRequested()
{
QgsContextHelp::run( metaObject()->className() );
QgsHelp::openHelp( QStringLiteral( "introduction/general_tools.html#id56" ) );
}

void QgsDecorationGridDialog::on_buttonBox_accepted()
@@ -13,7 +13,7 @@
#include "qgsdecorationnortharrowdialog.h"
#include "qgsdecorationnortharrow.h"
#include "qgslogger.h"
#include "qgscontexthelp.h"
#include "qgshelp.h"

#include <QPainter>
#include <QSettings>
@@ -65,7 +65,7 @@ QgsDecorationNorthArrowDialog::~QgsDecorationNorthArrowDialog()

void QgsDecorationNorthArrowDialog::on_buttonBox_helpRequested()
{
QgsContextHelp::run( metaObject()->className() );
QgsHelp::openHelp( QStringLiteral( "introduction/general_tools.html#north-arrow" ) );
}

void QgsDecorationNorthArrowDialog::on_buttonBox_accepted()
@@ -13,7 +13,7 @@
#include "qgsdecorationscalebardialog.h"
#include "qgsdecorationscalebar.h"
#include "qgslogger.h"
#include "qgscontexthelp.h"
#include "qgshelp.h"

#include <QColorDialog>
#include <QSettings>
@@ -84,7 +84,7 @@ QgsDecorationScaleBarDialog::~QgsDecorationScaleBarDialog()

void QgsDecorationScaleBarDialog::on_buttonBox_helpRequested()
{
QgsContextHelp::run( metaObject()->className() );
QgsHelp::openHelp( QStringLiteral( "introduction/general_tools.html#scale-bar" ) );
}

void QgsDecorationScaleBarDialog::apply()
@@ -19,7 +19,7 @@
#define QGSIDENTIFYRESULTSDIALOG_H

#include "ui_qgsidentifyresultsbase.h"
#include "qgscontexthelp.h"
#include "qgshelp.h"
#include "qgsfeature.h"
#include "qgsfields.h"
#include "qgscoordinatereferencesystem.h"
@@ -205,7 +205,7 @@ class APP_EXPORT QgsIdentifyResultsDialog: public QDialog, private Ui::QgsIdenti

QTreeWidgetItem *retrieveAttributes( QTreeWidgetItem *item, QgsAttributeMap &attributes, int &currentIdx );

void helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
void helpRequested() { QgsHelp::openHelp( QStringLiteral( "introduction/general_tools.html#identify" ) ); }

void on_cmbIdentifyMode_currentIndexChanged( int index );

@@ -19,7 +19,6 @@
#include "qgsmeasuretool.h"

#include "qgslogger.h"
#include "qgscontexthelp.h"
#include "qgsdistancearea.h"
#include "qgsmapcanvas.h"
#include "qgsproject.h"
@@ -21,7 +21,7 @@

#include "qgspoint.h"
#include "qgsdistancearea.h"
#include "qgscontexthelp.h"
#include "qgshelp.h"
#include "qgis_app.h"

class QCloseEvent;
@@ -61,7 +61,7 @@ class APP_EXPORT QgsMeasureDialog : public QDialog, private Ui::QgsMeasureBase
void closeEvent( QCloseEvent *e ) override;

//! Show the help for the dialog
void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
void on_buttonBox_helpRequested() { QgsHelp::openHelp( QStringLiteral( "introduction/general_tools.html#id38" ) ); }

//! When any external settings change
void updateSettings();
@@ -19,7 +19,7 @@

#include "ui_qgsnewspatialitelayerdialogbase.h"
#include "qgisgui.h"
#include "qgscontexthelp.h"
#include "qgshelp.h"

#include "qgis.h"

@@ -48,7 +48,7 @@ class APP_EXPORT QgsNewSpatialiteLayerDialog: public QDialog, private Ui::QgsNew
void selectionChanged();
void checkOk();

void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
void on_buttonBox_helpRequested() { QgsHelp::openHelp( QStringLiteral( "working_with_vector/editing_geometry_attributes.html#vector-create-spatialite" ) ); }
void on_buttonBox_accepted();
void on_buttonBox_rejected();

@@ -22,7 +22,7 @@
#include "ui_qgsoptionsbase.h"
#include "qgisgui.h"
#include "qgisapp.h"
#include "qgscontexthelp.h"
#include "qgshelp.h"

#include <qgscoordinatereferencesystem.h>

@@ -176,7 +176,7 @@ class APP_EXPORT QgsOptions : public QgsOptionsDialogBase, private Ui::QgsOption
void on_mBtnRemoveHiddenPath_clicked();


void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
void on_buttonBox_helpRequested() { QgsHelp::openHelp( QStringLiteral( "introduction/qgis_configuration.html#options" ) ); }

void on_mBrowseCacheDirectory_clicked();
void on_mClearCache_clicked();
@@ -22,7 +22,7 @@
#include "qgis.h"
#include "qgsunittypes.h"
#include "qgisgui.h"
#include "qgscontexthelp.h"
#include "qgshelp.h"
#include "qgis_app.h"

class QgsMapCanvas;
@@ -141,7 +141,7 @@ class APP_EXPORT QgsProjectProperties : public QgsOptionsDialogBase, private Ui:
/*!
* Slot to show the context help for this dialog
*/
void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
void on_buttonBox_helpRequested() { QgsHelp::openHelp( QStringLiteral( "introduction/qgis_configuration.html#project-properties" ) ); }

void on_cbxProjectionEnabled_toggled( bool onFlyEnabled );

@@ -22,7 +22,7 @@
#include "qgsoptionsdialogbase.h"
#include "ui_qgsrasterlayerpropertiesbase.h"
#include "qgisgui.h"
#include "qgscontexthelp.h"
#include "qgshelp.h"
#include "qgsmaplayerstylemanager.h"
#include "qgis_app.h"

@@ -100,7 +100,7 @@ class APP_EXPORT QgsRasterLayerProperties : public QgsOptionsDialogBase, private
//! Save a style when appriate button is pressed.
void saveStyleAs_clicked();
//! Help button
void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
void on_buttonBox_helpRequested() { QgsHelp::openHelp( QStringLiteral( "working_with_raster/raster_properties.html" ) ); }

//! Slot to reset all color rendering options to default
void on_mResetColorRenderingBtn_clicked();
@@ -22,7 +22,7 @@
#include "qgsoptionsdialogbase.h"
#include "ui_qgsvectorlayerpropertiesbase.h"
#include "qgisgui.h"
#include "qgscontexthelp.h"
#include "qgshelp.h"
#include "qgsmaplayerstylemanager.h"
#include "qgsvectorlayer.h"
#include "layertree/qgslayertreemodel.h"
@@ -104,7 +104,7 @@ class APP_EXPORT QgsVectorLayerProperties : public QgsOptionsDialogBase, private
void loadStyle_clicked();
void saveStyleAs_clicked();
void mOptionsStackedWidget_CurrentChanged( int indx );
void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
void on_buttonBox_helpRequested() { QgsHelp::openHelp( QStringLiteral( "working_with_vector/vector_properties.html" ) ); }
void on_pbnUpdateExtents_clicked();

void on_mButtonAddJoin_clicked();
@@ -21,7 +21,7 @@
#include <QModelIndex>
#include "ui_qgsquerybuilderbase.h"
#include "qgisgui.h"
#include "qgscontexthelp.h"
#include "qgshelp.h"
#include "qgis_gui.h"

class QgsVectorLayer;
@@ -79,7 +79,7 @@ class GUI_EXPORT QgsQueryBuilder : public QDialog, private Ui::QgsQueryBuilderBa
void on_btnNot_clicked();
void on_btnOr_clicked();

void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
void on_buttonBox_helpRequested() { QgsHelp::openHelp( QStringLiteral( "working_with_vector/vector_properties.html#query-builder" ) ); }

/** Test the constructed sql statement to see if the vector layer data provider likes it.
* The number of rows that would be returned is displayed in a message box.
@@ -22,7 +22,7 @@
#include <QMenu>

#include "ui_qgsstylemanagerdialogbase.h"
#include "qgscontexthelp.h"
#include "qgshelp.h"
#include "qgis_gui.h"

class QgsStyle;
@@ -58,7 +58,7 @@ class GUI_EXPORT QgsStyleManagerDialog : public QDialog, private Ui::QgsStyleMan
//! called when the dialog is going to be closed
void onFinished();

void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
void on_buttonBox_helpRequested() { QgsHelp::openHelp( QStringLiteral( "working_with_vector/style_library.html#id2" ) ); }

void itemChanged( QStandardItem* item );

@@ -13,7 +13,7 @@
#define CoordinateCaptureGUI_H

#include <QDialog>
#include "qgscontexthelp.h"
#include "qgshelp.h"

/**
@author Tim Sutton
@@ -29,7 +29,7 @@ class CoordinateCaptureGui : public QDialog
private slots:
void on_buttonBox_accepted();
void on_buttonBox_rejected();
void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
void on_buttonBox_helpRequested() { QgsHelp::openHelp( QStringLiteral( "plugins/plugins_coordinate_capture.html" ) ); }
};

#endif
@@ -31,7 +31,7 @@
#include "evisdatabaseconnection.h"
#include "evisdatabaselayerfieldselectiongui.h"
#include "evisquerydefinition.h"
#include "qgscontexthelp.h"
#include "qgshelp.h"

#include <QTemporaryFile>
#include <QDialog>
@@ -72,7 +72,7 @@ class eVisDatabaseConnectionGui : public QDialog, private Ui::eVisDatabaseConnec
void drawNewVectorLayer( const QString&, const QString&, const QString& );

void on_buttonBox_accepted();
void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
void on_buttonBox_helpRequested() { QgsHelp::openHelp( QStringLiteral( "plugins/plugins_evis.html#id11" ) ); }

void on_cboxDatabaseType_currentIndexChanged( int );
void on_cboxPredefinedQueryList_currentIndexChanged( int );
@@ -21,7 +21,7 @@
#include "ui_qgsgpspluginguibase.h"
#include "qgsbabelformat.h"
#include "qgsgpsdevice.h"
#include "qgscontexthelp.h"
#include "qgshelp.h"

#include <vector>

@@ -80,7 +80,7 @@ class QgsGPSPluginGui : public QDialog, private Ui::QgsGPSPluginGuiBase
void on_pbnRefresh_clicked();
void on_buttonBox_accepted();
void on_buttonBox_rejected();
void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
void on_buttonBox_helpRequested() { QgsHelp::openHelp( QStringLiteral( "working_with_gps/plugins_gps.html" ) ); }

signals:
void drawRasterLayer( const QString& );
@@ -18,7 +18,7 @@

#include "offline_editing_plugin_gui.h"

#include "qgscontexthelp.h"
#include "qgshelp.h"
#include "qgslayertree.h"
#include "qgslayertreemodel.h"
#include "qgsmaplayer.h"
@@ -167,7 +167,7 @@ void QgsOfflineEditingPluginGui::on_buttonBox_rejected()
// TODO: help
void QgsOfflineEditingPluginGui::on_buttonBox_helpRequested()
{
QgsContextHelp::run( metaObject()->className() );
QgsHelp::openHelp( QStringLiteral( "plugins/plugins_offline_editing.html" ) );
}

void QgsOfflineEditingPluginGui::restoreState()

0 comments on commit 5753576

Please sign in to comment.