Skip to content
Permalink
Browse files
Filling the help infrastructure (#5064)
* Filling the help infrastructure

Add missing help button and links to user manual

* Remove unneeded comment

* remove unneeded comment

* Remove unneeded comment
  • Loading branch information
DelazJ authored and m-kuhn committed Aug 24, 2017
1 parent 0dbf432 commit 9f18050
Show file tree
Hide file tree
Showing 33 changed files with 185 additions and 96 deletions.
@@ -64,6 +64,7 @@ QgsDwgImportDialog::QgsDwgImportDialog( QWidget *parent, Qt::WindowFlags f )
: QDialog( parent, f )
{
setupUi( this );
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsDwgImportDialog::showHelp );

QgsSettings s;
leDatabase->setText( s.value( "/DwgImport/lastDatabase", "" ).toString() );
@@ -478,3 +479,8 @@ void QgsDwgImportDialog::on_buttonBox_accepted()
dwgGroup->setExpanded( false );
}
}

void QgsDwgImportDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "managing_data_source/opening_data.html#importing-a-dxf-or-dwg-file" ) );
}
@@ -19,6 +19,7 @@
#define QGSDWGIMPORTDIALOG_H

#include "ui_qgsdwgimportbase.h"
#include "qgshelp.h"

class QgsVectorLayer;
class QgsLayerTreeGroup;
@@ -40,6 +41,7 @@ class QgsDwgImportDialog : public QDialog, private Ui::QgsDwgImportBase
void on_pbDeselectAll_clicked();
void on_leDatabase_textChanged( const QString &text );
void on_leLayerGroup_textChanged( const QString &text );
void showHelp();

private:
QgsVectorLayer *layer( QgsLayerTreeGroup *layerGroup, QString layer, QString table );
@@ -108,6 +108,7 @@ QgsAlignRasterDialog::QgsAlignRasterDialog( QWidget *parent )
// TODO: auto-detect reference layer

connect( buttonBox, &QDialogButtonBox::accepted, this, &QgsAlignRasterDialog::runAlign );
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsAlignRasterDialog::showHelp );

populateLayersView();

@@ -122,6 +123,12 @@ QgsAlignRasterDialog::~QgsAlignRasterDialog()
}


void QgsAlignRasterDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "working_with_raster/raster_analysis.html#raster-alignment" ) );
}


void QgsAlignRasterDialog::populateLayersView()
{
mCboReferenceLayer->clear();
@@ -17,6 +17,7 @@

#include <QDialog>
#include "qgsalignraster.h"
#include "qgshelp.h"
#include "ui_qgsalignrasterdialog.h"

class QgsAlignRaster;
@@ -49,6 +50,7 @@ class QgsAlignRasterDialog : public QDialog, private Ui::QgsAlignRasterDialog
void updateCustomGridOffset();

void updateParametersFromReferenceLayer();
void showHelp();

protected:
void populateLayersView();
@@ -212,5 +212,12 @@ void QgsAttributeActionPropertiesDialog::init( const QSet<QString> &actionScopes
connect( mActionText, &QsciScintilla::textChanged, this, &QgsAttributeActionPropertiesDialog::updateButtons );
connect( mChooseIconButton, &QAbstractButton::clicked, this, &QgsAttributeActionPropertiesDialog::chooseIcon );

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

updateButtons();
}

void QgsAttributeActionPropertiesDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "working_with_vector/vector_properties.html#actions-properties" ) );
}
@@ -19,6 +19,7 @@
#include "ui_qgsattributeactionpropertiesdialogbase.h"

#include "qgsaction.h"
#include "qgshelp.h"

#include <QDialog>

@@ -52,6 +53,7 @@ class QgsAttributeActionPropertiesDialog: public QDialog, private Ui::QgsAttribu
void insertExpressionOrField();
void chooseIcon();
void updateButtons();
void showHelp();

private:
void init( const QSet<QString> &actionScopes );
@@ -93,6 +93,7 @@ QgsAttributeTypeDialog::QgsAttributeTypeDialog( QgsVectorLayer *vl, int fieldIdx
restoreGeometry( settings.value( QStringLiteral( "Windows/QgsAttributeTypeDialog/geometry" ) ).toByteArray() );

constraintExpressionWidget->setLayer( vl );
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsAttributeTypeDialog::showHelp );
}

QgsAttributeTypeDialog::~QgsAttributeTypeDialog()
@@ -371,3 +372,8 @@ void QgsAttributeTypeDialog::defaultExpressionChanged()

mDefaultPreviewLabel->setText( "<i>" + previewText + "</i>" );
}

void QgsAttributeTypeDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "working_with_vector/vector_properties.html#configure-the-field-behavior" ) );
}
@@ -22,6 +22,7 @@
#include "qgseditorconfigwidget.h"
#include "qgsfeature.h"
#include "qgsvectordataprovider.h"
#include "qgshelp.h"
#include "qgis_app.h"

class QDialog;
@@ -175,6 +176,8 @@ class APP_EXPORT QgsAttributeTypeDialog: public QDialog, private Ui::QgsAttribut

void defaultExpressionChanged();

void showHelp();

private:
QgsVectorLayer *mLayer = nullptr;
int mFieldIdx;
@@ -62,6 +62,7 @@ QgsCustomizationDialog::QgsCustomizationDialog( QWidget * parent, QSettings * se
connect( buttonBox->button( QDialogButtonBox::Apply ), &QAbstractButton::clicked, this, &QgsCustomizationDialog::apply );
connect( buttonBox->button( QDialogButtonBox::Cancel ), &QAbstractButton::clicked, this, &QgsCustomizationDialog::cancel );
connect( buttonBox->button( QDialogButtonBox::Reset ), &QAbstractButton::clicked, this, &QgsCustomizationDialog::reset );
connect( buttonBox->button( QDialogButtonBox::Help ), &QAbstractButton::clicked, this, &QgsCustomizationDialog::showHelp );

}

@@ -483,6 +484,12 @@ bool QgsCustomizationDialog::catchOn()
return actionCatch->isChecked();
}

void QgsCustomizationDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "introduction/qgis_configuration.html#customization" ) );
}


void QgsCustomization::addTreeItemActions( QTreeWidgetItem *parentItem, const QList<QAction *> &actions )
{
Q_FOREACH ( QAction *action, actions )
@@ -18,6 +18,7 @@
#define QGSCUSTOMIZATION_H

#include "ui_qgscustomizationdialogbase.h"
#include "qgshelp.h"

#include <QDialog>
#include <QDomNode>
@@ -77,6 +78,8 @@ class APP_EXPORT QgsCustomizationDialog : public QMainWindow, private Ui::QgsCus

void cancel();

void showHelp();

// Reset values from settings
void reset();

@@ -42,6 +42,7 @@ QgsDecorationLayoutExtentDialog::QgsDecorationLayoutExtentDialog( QgsDecorationL

updateGuiElements();
connect( buttonBox->button( QDialogButtonBox::Apply ), &QAbstractButton::clicked, this, &QgsDecorationLayoutExtentDialog::apply );
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsDecorationLayoutExtentDialog::showHelp );

mSymbolButton->setMapCanvas( QgisApp::instance()->mapCanvas() );
}
@@ -84,3 +85,8 @@ void QgsDecorationLayoutExtentDialog::on_buttonBox_rejected()
{
reject();
}

void QgsDecorationLayoutExtentDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "introduction/general_tools.html#decorations" ) );
}
@@ -21,6 +21,7 @@
#include <QDialog>
#include "qgis_app.h"
#include "qgstextrenderer.h"
#include "qgshelp.h"
#include <memory>

class QgsDecorationLayoutExtent;
@@ -38,6 +39,7 @@ class APP_EXPORT QgsDecorationLayoutExtentDialog : public QDialog, private Ui::Q
void apply();
void on_buttonBox_accepted();
void on_buttonBox_rejected();
void showHelp();


private:
@@ -444,6 +444,7 @@ QgsDxfExportDialog::QgsDxfExportDialog( QWidget *parent, Qt::WindowFlags f )
connect( this, &QDialog::accepted, this, &QgsDxfExportDialog::saveSettings );
connect( mSelectAllButton, &QAbstractButton::clicked, this, &QgsDxfExportDialog::selectAll );
connect( mDeselectAllButton, &QAbstractButton::clicked, this, &QgsDxfExportDialog::deSelectAll );
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsDxfExportDialog::showHelp );

mFileLineEdit->setFocus();

@@ -647,3 +648,7 @@ QString QgsDxfExportDialog::mapTheme() const
{
return mVisibilityPresets->currentText();
}
void QgsDxfExportDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "managing_data_source/create_layers.html#create-dxf-files" ) );
}
@@ -21,6 +21,7 @@
#include "ui_qgsdxfexportdialogbase.h"
#include "qgslayertreemodel.h"
#include "qgsdxfexport.h"
#include "qgshelp.h"

#include <QList>
#include <QPair>
@@ -102,6 +103,7 @@ class QgsDxfExportDialog : public QDialog, private Ui::QgsDxfExportDialogBase
void saveSettings();
void on_mVisibilityPresets_currentIndexChanged( int index );
void on_mCrsSelector_crsChanged( const QgsCoordinateReferenceSystem &crs );
void showHelp();

private:
void cleanGroup( QgsLayerTreeNode *node );
@@ -119,6 +119,7 @@ QgsMapSaveDialog::QgsMapSaveDialog( QWidget *parent, QgsMapCanvas *mapCanvas, QL
}

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

void QgsMapSaveDialog::updateDpi( int dpi )
@@ -459,3 +460,8 @@ void QgsMapSaveDialog::accepted()
}
}
}

void QgsMapSaveDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "introduction/getting_started.html#output" ) );
}
@@ -24,6 +24,7 @@
#include "qgsmapcanvas.h"
#include "qgsmapdecoration.h"
#include "qgsrectangle.h"
#include "qgshelp.h"

#include <QDialog>
#include <QSize>
@@ -97,6 +98,9 @@ class APP_EXPORT QgsMapSaveDialog: public QDialog, private Ui::QgsMapSaveDialog
int mDpi;
QSize mSize;

private slots:

void showHelp();
};

#endif // QGSMAPSAVEDIALOG_H
@@ -47,6 +47,7 @@ QgsProjectLayerGroupDialog::QgsProjectLayerGroupDialog( QWidget *parent, const Q
}

connect( mButtonBox, &QDialogButtonBox::rejected, this, &QDialog::reject );
connect( mButtonBox, &QDialogButtonBox::helpRequested, this, &QgsProjectLayerGroupDialog::showHelp );
}

QgsProjectLayerGroupDialog::~QgsProjectLayerGroupDialog()
@@ -233,3 +234,9 @@ void QgsProjectLayerGroupDialog::on_mButtonBox_accepted()
}
accept();
}

void QgsProjectLayerGroupDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "introduction/general_tools.html#nesting-projects" ) );

}
@@ -17,6 +17,7 @@

#include "QDialog"
#include "ui_qgsprojectlayergroupdialogbase.h"
#include "qgshelp.h"
#include "qgis_app.h"

class QDomElement;
@@ -44,6 +45,7 @@ class APP_EXPORT QgsProjectLayerGroupDialog: public QDialog, private Ui::QgsProj
void on_mProjectFileLineEdit_editingFinished();
void onTreeViewSelectionChanged();
void on_mButtonBox_accepted();
void showHelp();

private:
void changeProjectFile();
@@ -30,6 +30,7 @@
QgsRasterCalcDialog::QgsRasterCalcDialog( QWidget *parent, Qt::WindowFlags f ): QDialog( parent, f )
{
setupUi( this );
connect( mButtonBox, &QDialogButtonBox::helpRequested, this, &QgsRasterCalcDialog::showHelp );

QgsSettings settings;
restoreGeometry( settings.value( QStringLiteral( "Windows/RasterCalc/geometry" ) ).toByteArray() );
@@ -224,6 +225,11 @@ void QgsRasterCalcDialog::on_mButtonBox_accepted()
s.setValue( QStringLiteral( "/RasterCalculator/lastOutputDir" ), QVariant( QFileInfo( mOutputLayerLineEdit->text() ).absolutePath() ) );
}

void QgsRasterCalcDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "working_with_raster/raster_analysis.html#raster-calculator" ) );
}

void QgsRasterCalcDialog::on_mOutputLayerPushButton_clicked()
{
QgsSettings s;
@@ -20,6 +20,7 @@

#include "ui_qgsrastercalcdialogbase.h"
#include "qgsrastercalculator.h"
#include "qgshelp.h"
#include "qgis_app.h"

//! A dialog to enter a raster calculation expression
@@ -54,6 +55,7 @@ class APP_EXPORT QgsRasterCalcDialog: public QDialog, private Ui::QgsRasterCalcD
void on_mOutputLayerLineEdit_textChanged( const QString &text );
//! Enables OK button if calculator expression is valid and output file path exists
void setAcceptButtonState();
void showHelp();

//calculator buttons
void on_mPlusPushButton_clicked();
@@ -41,6 +41,7 @@ QgsConfigureShortcutsDialog::QgsConfigureShortcutsDialog( QWidget *parent, QgsSh
if ( !mManager )
mManager = QgsGui::shortcutsManager();

connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsConfigureShortcutsDialog::showHelp ); // Vérifier nommage des boutons
connect( btnChangeShortcut, &QAbstractButton::clicked, this, &QgsConfigureShortcutsDialog::changeShortcut );
connect( btnResetShortcut, &QAbstractButton::clicked, this, &QgsConfigureShortcutsDialog::resetShortcut );
connect( btnSetNoShortcut, &QAbstractButton::clicked, this, &QgsConfigureShortcutsDialog::setNoShortcut );
@@ -491,3 +492,8 @@ void QgsConfigureShortcutsDialog::on_mLeFilter_textChanged( const QString &text
}
}
}

void QgsConfigureShortcutsDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "introduction/qgis_configuration.html#keyboard-shortcuts" ) );
}
@@ -20,6 +20,7 @@
#include "qgis.h"

#include "ui_qgsconfigureshortcutsdialog.h"
#include "qgshelp.h"
#include "qgis_gui.h"

class QShortcut;
@@ -60,6 +61,9 @@ class GUI_EXPORT QgsConfigureShortcutsDialog : public QDialog, private Ui::QgsCo

void actionChanged( QTreeWidgetItem *current, QTreeWidgetItem *previous );

//! Open the associated help
void showHelp();

private:

//! Saves the dialog window state

0 comments on commit 9f18050

Please sign in to comment.