Skip to content
Permalink
Browse files

Add Help button and connect it to user manual

  • Loading branch information
DelazJ authored and m-kuhn committed Sep 2, 2017
1 parent 8e12757 commit f51244c98b774cf0d78e0021cfbe32180464f97f
Showing with 250 additions and 62 deletions.
  1. +0 −1 python/gui/symbology/qgssymbollevelsdialog.sip
  2. +6 −0 src/app/openstreetmap/qgsosmexportdialog.cpp
  3. +2 −0 src/app/openstreetmap/qgsosmexportdialog.h
  4. +6 −0 src/app/openstreetmap/qgsosmimportdialog.cpp
  5. +2 −0 src/app/openstreetmap/qgsosmimportdialog.h
  6. +6 −0 src/app/qgsaddtaborgroup.cpp
  7. +2 −0 src/app/qgsaddtaborgroup.h
  8. +7 −1 src/app/qgsdiagramproperties.cpp
  9. +1 −0 src/app/qgsdiagramproperties.h
  10. +7 −0 src/app/qgssavestyletodbdialog.cpp
  11. +5 −0 src/app/qgssavestyletodbdialog.h
  12. +6 −0 src/gui/qgscolordialog.cpp
  13. +2 −0 src/gui/qgscolordialog.h
  14. +7 −0 src/gui/qgsexpressionbuilderdialog.cpp
  15. +5 −0 src/gui/qgsexpressionbuilderdialog.h
  16. +7 −0 src/gui/qgsexpressionselectiondialog.cpp
  17. +2 −0 src/gui/qgsexpressionselectiondialog.h
  18. +7 −0 src/gui/qgsgradientcolorrampdialog.cpp
  19. +2 −0 src/gui/qgsgradientcolorrampdialog.h
  20. +7 −0 src/gui/qgsnewmemorylayerdialog.cpp
  21. +5 −0 src/gui/qgsnewmemorylayerdialog.h
  22. +6 −0 src/gui/qgsorderbydialog.cpp
  23. +2 −0 src/gui/qgsorderbydialog.h
  24. +6 −0 src/gui/qgsrasterlayersaveasdialog.cpp
  25. +3 −2 src/gui/qgsrasterlayersaveasdialog.h
  26. +7 −0 src/gui/symbology/qgsstyleexportimportdialog.cpp
  27. +2 −0 src/gui/symbology/qgsstyleexportimportdialog.h
  28. +6 −0 src/gui/symbology/qgssymbollevelsdialog.cpp
  29. +4 −1 src/gui/symbology/qgssymbollevelsdialog.h
  30. +11 −1 src/gui/symbology/qgssymbolselectordialog.cpp
  31. +4 −0 src/gui/symbology/qgssymbolselectordialog.h
  32. +7 −1 src/plugins/geometry_checker/ui/qgsgeometrycheckerdialog.cpp
  33. +3 −0 src/plugins/geometry_checker/ui/qgsgeometrycheckerdialog.h
  34. +8 −0 src/plugins/spatialquery/qgsspatialquerydialog.cpp
  35. +2 −0 src/plugins/spatialquery/qgsspatialquerydialog.h
  36. +1 −1 src/plugins/spatialquery/qgsspatialquerydialogbase.ui
  37. +8 −0 src/providers/wcs/qgswcssourceselect.cpp
  38. +7 −0 src/providers/wcs/qgswcssourceselect.h
  39. +10 −10 src/ui/qgsaddtaborgroupbase.ui
  40. +8 −9 src/ui/qgscolordialog.ui
  41. +1 −1 src/ui/qgsexpressionbuilderdialogbase.ui
  42. +30 −14 src/ui/qgsexpressionselectiondialogbase.ui
  43. +1 −1 src/ui/qgsgradientcolorrampdialogbase.ui
  44. +1 −1 src/ui/qgsnewmemorylayerdialogbase.ui
  45. +1 −1 src/ui/qgsorderbydialogbase.ui
  46. +1 −1 src/ui/qgsosmexportdialog.ui
  47. +2 −2 src/ui/qgsosmimportdialog.ui
  48. +1 −1 src/ui/qgsrasterlayersaveasdialogbase.ui
  49. +10 −10 src/ui/qgssavetodbdialog.ui
  50. +2 −2 src/ui/qgsstyleexportimportdialogbase.ui
  51. +1 −1 src/ui/qgssymbollevelsdialogbase.ui
@@ -8,7 +8,6 @@




class QgsSymbolLevelsDialog : QDialog
{

@@ -36,6 +36,7 @@ QgsOSMExportDialog::QgsOSMExportDialog( QWidget *parent )
connect( btnBrowseDb, &QAbstractButton::clicked, this, &QgsOSMExportDialog::onBrowse );
connect( buttonBox, &QDialogButtonBox::accepted, this, &QgsOSMExportDialog::onOK );
connect( buttonBox, &QDialogButtonBox::rejected, this, &QgsOSMExportDialog::onClose );
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsOSMExportDialog::showHelp );
connect( editDbFileName, &QLineEdit::textChanged, this, &QgsOSMExportDialog::updateLayerName );
connect( radPoints, &QAbstractButton::clicked, this, &QgsOSMExportDialog::updateLayerName );
connect( radPolylines, &QAbstractButton::clicked, this, &QgsOSMExportDialog::updateLayerName );
@@ -212,3 +213,8 @@ void QgsOSMExportDialog::onDeselectAll()
mTagsModel->item( i, 0 )->setCheckState( Qt::Unchecked );
}
}

void QgsOSMExportDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "managing_data_source/opening_data.html#importing-openstreetmap-vectors" ) );
}
@@ -19,6 +19,7 @@
#include <QDialog>

#include "ui_qgsosmexportdialog.h"
#include "qgshelp.h"

class QgsOSMDatabase;

@@ -43,6 +44,7 @@ class QgsOSMExportDialog : public QDialog, private Ui::QgsOSMExportDialog

void onOK();
void onClose();
void showHelp();

private:
QgsOSMDatabase *mDatabase = nullptr;
@@ -34,6 +34,7 @@ QgsOSMImportDialog::QgsOSMImportDialog( QWidget *parent )
connect( editDbFileName, &QLineEdit::textChanged, this, &QgsOSMImportDialog::dbFileNameChanged );
connect( buttonBox, &QDialogButtonBox::accepted, this, &QgsOSMImportDialog::onOK );
connect( buttonBox, &QDialogButtonBox::rejected, this, &QgsOSMImportDialog::onClose );
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsOSMImportDialog::showHelp );

connect( mImport, &QgsOSMXmlImport::progress, this, &QgsOSMImportDialog::onProgress );
}
@@ -130,3 +131,8 @@ void QgsOSMImportDialog::onProgress( int percent )
progressBar->setValue( percent );
qApp->processEvents( QEventLoop::ExcludeSocketNotifiers );
}

void QgsOSMImportDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "managing_data_source/opening_data.html#importing-openstreetmap-vectors" ) );
}
@@ -19,6 +19,7 @@
#include <QDialog>

#include "ui_qgsosmimportdialog.h"
#include "qgshelp.h"

class QgsOSMXmlImport;

@@ -38,6 +39,7 @@ class QgsOSMImportDialog : public QDialog, private Ui::QgsOSMImportDialog

void onOK();
void onClose();
void showHelp();

void onProgress( int percent );

@@ -51,6 +51,7 @@ QgsAddTabOrGroup::QgsAddTabOrGroup( QgsVectorLayer *lyr, const QList < TabPair >

connect( mTabButton, &QAbstractButton::toggled, this, &QgsAddTabOrGroup::on_mTabButton_toggled );
connect( mGroupButton, &QAbstractButton::toggled, this, &QgsAddTabOrGroup::on_mGroupButton_toggled );
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsAddTabOrGroup::showHelp );

mColumnCountSpinBox->setValue( QgsSettings().value( QStringLiteral( "/qgis/attributeForm/defaultTabColumnCount" ), 1 ).toInt() );

@@ -115,3 +116,8 @@ void QgsAddTabOrGroup::on_mTabButton_toggled( bool checked )
if ( checked )
mColumnCountSpinBox->setValue( QgsSettings().value( QStringLiteral( "/qgis/attributeForm/defaultTabColumnCount" ), 1 ).toInt() );
}

void QgsAddTabOrGroup::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "working_with_vector/vector_properties.html#customize-a-form-for-your-data" ) );
}
@@ -22,6 +22,7 @@
#include "ui_qgsaddtaborgroupbase.h"
#include "qgsguiutils.h"
#include "qgis_app.h"
#include "qgshelp.h"

class QTreeWidgetItem;
class QgsVectorLayer;
@@ -50,6 +51,7 @@ class APP_EXPORT QgsAddTabOrGroup : public QDialog, private Ui::QgsAddTabOrGroup
private slots:
void on_mGroupButton_toggled( bool checked );
void on_mTabButton_toggled( bool checked );
void showHelp();

protected:
QgsVectorLayer *mLayer = nullptr;
@@ -950,9 +950,15 @@ void QgsDiagramProperties::showSizeLegendDialog()
dlg.setLayout( new QVBoxLayout() );
dlg.setWindowTitle( panel->panelTitle() );
dlg.layout()->addWidget( panel );
QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Ok );
QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Help | QDialogButtonBox::Ok );
connect( buttonBox, &QDialogButtonBox::accepted, &dlg, &QDialog::accept );
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsDiagramProperties::showHelp );
dlg.layout()->addWidget( buttonBox );
if ( dlg.exec() )
mSizeLegend.reset( panel->dataDefinedSizeLegend() );
}

void QgsDiagramProperties::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "working_with_vector/vector_properties.html#legend" ) );
}
@@ -90,6 +90,7 @@ class APP_EXPORT QgsDiagramProperties : public QWidget, private Ui::QgsDiagramPr
private slots:

void updateProperty();
void showHelp();
};

class EditBlockerDelegate: public QStyledItemDelegate
@@ -34,6 +34,8 @@ QgsSaveStyleToDbDialog::QgsSaveStyleToDbDialog( QWidget *parent )

QgsSettings settings;
restoreGeometry( settings.value( QStringLiteral( "Windows/saveStyleToDb/geometry" ) ).toByteArray() );

connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsSaveStyleToDbDialog::showHelp );
}

QgsSaveStyleToDbDialog::~QgsSaveStyleToDbDialog()
@@ -103,3 +105,8 @@ void QgsSaveStyleToDbDialog::on_mFilePickButton_clicked()
mFileNameLabel->setText( myFI.fileName() );
}
}

void QgsSaveStyleToDbDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "introduction/general_tools.html#save-and-share-layer-properties" ) );
}
@@ -19,6 +19,7 @@
#include "ui_qgssavetodbdialog.h"
#include "qgsguiutils.h"
#include "qgis_app.h"
#include "qgshelp.h"

class APP_EXPORT QgsSaveStyleToDbDialog : public QDialog, private Ui::QgsSaveToDBDialog
{
@@ -38,6 +39,10 @@ class APP_EXPORT QgsSaveStyleToDbDialog : public QDialog, private Ui::QgsSaveToD
bool isDefault();
void on_mFilePickButton_clicked();
void accept() override;

private slots:
void showHelp();

};

#endif // QGSSAVESTYLETODBDIALOG_H
@@ -57,6 +57,7 @@ QgsColorDialog::QgsColorDialog( QWidget *parent, Qt::WindowFlags fl, const QColo

connect( mColorWidget, &QgsCompoundColorWidget::currentColorChanged, this, &QgsColorDialog::currentColorChanged );
connect( this, &QDialog::rejected, this, &QgsColorDialog::discardColor );
connect( mButtonBox, &QDialogButtonBox::helpRequested, this, &QgsColorDialog::showHelp );
}

QColor QgsColorDialog::color() const
@@ -205,3 +206,8 @@ void QgsColorDialog::closeEvent( QCloseEvent *e )
saveSettings();
QDialog::closeEvent( e );
}

void QgsColorDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "introduction/general_tools.html#color-selector" ) );
}
@@ -21,6 +21,7 @@
#include "ui_qgscolordialog.h"
#include "qgis_gui.h"
#include "qgis.h"
#include "qgshelp.h"

class QColor;

@@ -113,6 +114,7 @@ class GUI_EXPORT QgsColorDialog : public QDialog, private Ui::QgsColorDialogBase
void on_mButtonBox_rejected();
void on_mButtonBox_clicked( QAbstractButton *button );
void discardColor();
void showHelp();

private:

@@ -33,6 +33,8 @@ QgsExpressionBuilderDialog::QgsExpressionBuilderDialog( QgsVectorLayer *layer, c

QgsSettings settings;
restoreGeometry( settings.value( QStringLiteral( "Windows/ExpressionBuilderDialog/geometry" ) ).toByteArray() );

connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsExpressionBuilderDialog::showHelp );
}

QgsExpressionBuilderWidget *QgsExpressionBuilderDialog::expressionBuilder()
@@ -79,3 +81,8 @@ void QgsExpressionBuilderDialog::setGeomCalculator( const QgsDistanceArea &da )
// Store in child widget only.
builder->setGeomCalculator( da );
}

void QgsExpressionBuilderDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "working_with_vector/expression.html" ) );
}
@@ -18,6 +18,7 @@

#include <QDialog>
#include "ui_qgsexpressionbuilderdialogbase.h"
#include "qgshelp.h"
#include "qgis_gui.h"


@@ -75,6 +76,10 @@ class GUI_EXPORT QgsExpressionBuilderDialog : public QDialog, private Ui::QgsExp

private:
QString mRecentKey;

private slots:
void showHelp();

};

#endif
@@ -57,6 +57,8 @@ QgsExpressionSelectionDialog::QgsExpressionSelectionDialog( QgsVectorLayer *laye

QgsSettings settings;
restoreGeometry( settings.value( QStringLiteral( "Windows/ExpressionSelectionDialog/geometry" ) ).toByteArray() );

connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsExpressionSelectionDialog::showHelp );
}

QgsExpressionBuilderWidget *QgsExpressionSelectionDialog::expressionBuilder()
@@ -194,3 +196,8 @@ void QgsExpressionSelectionDialog::saveRecent()
{
mExpressionBuilder->saveToRecent( QStringLiteral( "Selection" ) );
}

void QgsExpressionSelectionDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "introduction/general_tools.html#automatic-selection" ) );
}
@@ -21,6 +21,7 @@

#include "qgsmapcanvas.h"
#include "qgsmessagebar.h"
#include "qgshelp.h"

#include <QDialog>
#include "qgis_gui.h"
@@ -88,6 +89,7 @@ class GUI_EXPORT QgsExpressionSelectionDialog : public QDialog, private Ui::QgsE
void on_mActionSelectIntersect_triggered();
void on_mButtonZoomToFeatures_clicked();
void on_mPbnClose_clicked();
void showHelp();

protected:

@@ -146,6 +146,8 @@ QgsGradientColorRampDialog::QgsGradientColorRampDialog( const QgsGradientColorRa

connect( mStopEditor, &QgsGradientStopEditor::selectedStopChanged, this, &QgsGradientColorRampDialog::selectedStopChanged );
mStopEditor->selectStop( 0 );

connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsGradientColorRampDialog::showHelp );
}

QgsGradientColorRampDialog::~QgsGradientColorRampDialog()
@@ -563,6 +565,11 @@ void QgsGradientColorRampDialog::setColor2( const QColor &color )
updateColorButtons();
}

void QgsGradientColorRampDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "working_with_vector/style_library.html#color-ramp" ) );
}


/// @cond PRIVATE

@@ -20,6 +20,7 @@
#include "qgis.h"

#include "ui_qgsgradientcolorrampdialogbase.h"
#include "qgshelp.h"
#include "qgis_gui.h"

class QgsGradientColorRamp;
@@ -91,6 +92,7 @@ class GUI_EXPORT QgsGradientColorRampDialog : public QDialog, private Ui::QgsGra
void plotMousePress( QPointF point );
void plotMouseRelease( QPointF point );
void plotMouseMove( QPointF point );
void showHelp();

private:

@@ -56,6 +56,8 @@ QgsNewMemoryLayerDialog::QgsNewMemoryLayerDialog( QWidget *parent, Qt::WindowFla

mPointRadioButton->setChecked( true );
mNameLineEdit->setText( tr( "New scratch layer" ) );

connect( mButtonBox, &QDialogButtonBox::helpRequested, this, &QgsNewMemoryLayerDialog::showHelp );
}

QgsNewMemoryLayerDialog::~QgsNewMemoryLayerDialog()
@@ -116,3 +118,8 @@ QString QgsNewMemoryLayerDialog::layerName() const
{
return mNameLineEdit->text();
}

void QgsNewMemoryLayerDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "managing_data_source/create_layers.html#creating-a-new-temporary-scratch-layer" ) );
}
@@ -20,6 +20,7 @@
#include "ui_qgsnewmemorylayerdialogbase.h"
#include "qgsguiutils.h"
#include "qgis.h"
#include "qgshelp.h"
#include "qgis_gui.h"

class QgsVectorLayer;
@@ -65,6 +66,10 @@ class GUI_EXPORT QgsNewMemoryLayerDialog: public QDialog, private Ui::QgsNewMemo
private:

QString mCrsId;

private slots:

void showHelp();
};

#endif //QGSNEWMEMORYLAYERDIALOG_H
@@ -34,6 +34,8 @@ QgsOrderByDialog::QgsOrderByDialog( QgsVectorLayer *layer, QWidget *parent )
mOrderByTableWidget->horizontalHeader()->setResizeMode( 2, QHeaderView::ResizeToContents );

mOrderByTableWidget->installEventFilter( this );

connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsOrderByDialog::showHelp );
}

void QgsOrderByDialog::setOrderBy( const QgsFeatureRequest::OrderBy &orderBy )
@@ -150,3 +152,7 @@ bool QgsOrderByDialog::eventFilter( QObject *obj, QEvent *e )
return false;
}

void QgsOrderByDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "working_with_vector/vector_properties.html#layer-rendering" ) );
}
@@ -22,6 +22,7 @@

#include "ui_qgsorderbydialogbase.h"
#include "qgsfeaturerequest.h"
#include "qgshelp.h"
#include "qgis_gui.h"

class QgsVectorLayer;
@@ -62,6 +63,7 @@ class GUI_EXPORT QgsOrderByDialog : public QDialog, private Ui::OrderByDialogBas

private slots:
void onExpressionChanged( const QString &expression );
void showHelp();

private:

@@ -137,6 +137,8 @@ QgsRasterLayerSaveAsDialog::QgsRasterLayerSaveAsDialog( QgsRasterLayer *rasterLa
okButton->setEnabled( false );
}

connect( mButtonBox, &QDialogButtonBox::helpRequested, this, &QgsRasterLayerSaveAsDialog::showHelp );

mExtentGroupBox->setOutputCrs( outputCrs() );
mExtentGroupBox->setOriginalExtent( mDataProvider->extent(), mLayerCrs );
mExtentGroupBox->setCurrentExtent( mCurrentExtent, mCurrentCrs );
@@ -737,3 +739,7 @@ bool QgsRasterLayerSaveAsDialog::validate() const
return true;
}

void QgsRasterLayerSaveAsDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "managing_data_source/create_layers.html#save-layer-from-an-existing-file" ) );
}

0 comments on commit f51244c

Please sign in to comment.
You can’t perform that action at this time.