Skip to content
Permalink
Browse files

Add link to user manual for annotation dialogs

  • Loading branch information
DelazJ authored and nyalldawson committed Nov 1, 2018
1 parent 8c5f795 commit 6e9c2a3d0ce2b121c2ecb9427b02d2af590995e8
@@ -20,6 +20,7 @@
#include "qgsproject.h"
#include "qgsannotationmanager.h"
#include "qgsgui.h"
#include "qgshelp.h"
#include <QFileDialog>
#include <QFileInfo>
#include <QGraphicsScene>
@@ -44,6 +45,7 @@ QgsFormAnnotationDialog::QgsFormAnnotationDialog( QgsMapCanvasAnnotationItem *it
}

QObject::connect( mButtonBox, &QDialogButtonBox::accepted, this, &QgsFormAnnotationDialog::applySettingsToItem );
QObject::connect( mButtonBox, &QDialogButtonBox::helpRequested, this, &QgsFormAnnotationDialog::showHelp );
QPushButton *deleteButton = new QPushButton( tr( "Delete" ) );
QObject::connect( deleteButton, &QPushButton::clicked, this, &QgsFormAnnotationDialog::deleteItem );
mButtonBox->addButton( deleteButton, QDialogButtonBox::RejectRole );
@@ -94,3 +96,7 @@ void QgsFormAnnotationDialog::mButtonBox_clicked( QAbstractButton *button )
}
}

void QgsFormAnnotationDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "introduction/general_tools.html#annotation-tools" ) );
}
@@ -36,6 +36,7 @@ class APP_EXPORT QgsFormAnnotationDialog: public QDialog, private Ui::QgsFormAnn
void mBrowseToolButton_clicked();
void deleteItem();
void mButtonBox_clicked( QAbstractButton *button );
void showHelp();
};

#endif // QGSFORMANNOTATIONDIALOG_H
@@ -20,6 +20,7 @@
#include "qgsproject.h"
#include "qgsannotationmanager.h"
#include "qgsgui.h"
#include "qgshelp.h"
#include <QFileDialog>
#include <QFileInfo>
#include <QGraphicsScene>
@@ -45,6 +46,7 @@ QgsHtmlAnnotationDialog::QgsHtmlAnnotationDialog( QgsMapCanvasAnnotationItem *it
}

QObject::connect( mButtonBox, &QDialogButtonBox::accepted, this, &QgsHtmlAnnotationDialog::applySettingsToItem );
QObject::connect( mButtonBox, &QDialogButtonBox::helpRequested, this, &QgsHtmlAnnotationDialog::showHelp );
QPushButton *deleteButton = new QPushButton( tr( "Delete" ) );
QObject::connect( deleteButton, &QPushButton::clicked, this, &QgsHtmlAnnotationDialog::deleteItem );
mButtonBox->addButton( deleteButton, QDialogButtonBox::RejectRole );
@@ -99,3 +101,7 @@ void QgsHtmlAnnotationDialog::mButtonBox_clicked( QAbstractButton *button )
}
}

void QgsHtmlAnnotationDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "introduction/general_tools.html#annotation-tools" ) );
}
@@ -36,6 +36,7 @@ class APP_EXPORT QgsHtmlAnnotationDialog: public QDialog, private Ui::QgsFormAnn
void mBrowseToolButton_clicked();
void deleteItem();
void mButtonBox_clicked( QAbstractButton *button );
void showHelp();
};

#endif // QgsHTMLAnnotationDialog_H
@@ -22,6 +22,7 @@
#include "qgsproject.h"
#include "qgsannotationmanager.h"
#include "qgsgui.h"
#include "qgshelp.h"
#include <QFileDialog>
#include <QFileInfo>
#include <QGraphicsScene>
@@ -47,6 +48,7 @@ QgsSvgAnnotationDialog::QgsSvgAnnotationDialog( QgsMapCanvasAnnotationItem *item
}

QObject::connect( mButtonBox, &QDialogButtonBox::accepted, this, &QgsSvgAnnotationDialog::applySettingsToItem );
QObject::connect( mButtonBox, &QDialogButtonBox::helpRequested, this, &QgsSvgAnnotationDialog::showHelp );
QPushButton *deleteButton = new QPushButton( tr( "Delete" ) );
QObject::connect( deleteButton, &QPushButton::clicked, this, &QgsSvgAnnotationDialog::deleteItem );
mButtonBox->addButton( deleteButton, QDialogButtonBox::RejectRole );
@@ -96,3 +98,8 @@ void QgsSvgAnnotationDialog::mButtonBox_clicked( QAbstractButton *button )
applySettingsToItem();
}
}

void QgsSvgAnnotationDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "introduction/general_tools.html#annotation-tools" ) );
}
@@ -35,6 +35,7 @@ class APP_EXPORT QgsSvgAnnotationDialog: public QDialog, private Ui::QgsFormAnno
void applySettingsToItem();
void deleteItem();
void mButtonBox_clicked( QAbstractButton *button );
void showHelp();

private:
QgsSvgAnnotationDialog() = delete; //forbidden
@@ -22,6 +22,7 @@
#include "qgsannotationmanager.h"
#include "qgsproject.h"
#include "qgsgui.h"
#include "qgshelp.h"
#include <QColorDialog>
#include <QGraphicsScene>

@@ -54,6 +55,7 @@ QgsTextAnnotationDialog::QgsTextAnnotationDialog( QgsMapCanvasAnnotationItem *it
setCurrentFontPropertiesToGui();

QObject::connect( mButtonBox, &QDialogButtonBox::accepted, this, &QgsTextAnnotationDialog::applyTextToItem );
QObject::connect( mButtonBox, &QDialogButtonBox::helpRequested, this, &QgsTextAnnotationDialog::showHelp );
QObject::connect( mFontComboBox, &QFontComboBox::currentFontChanged, this, &QgsTextAnnotationDialog::changeCurrentFormat );
QObject::connect( mFontSizeSpinBox, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this, &QgsTextAnnotationDialog::changeCurrentFormat );
QObject::connect( mBoldPushButton, &QPushButton::toggled, this, &QgsTextAnnotationDialog::changeCurrentFormat );
@@ -168,3 +170,7 @@ void QgsTextAnnotationDialog::deleteItem()
mItem = nullptr;
}

void QgsTextAnnotationDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "introduction/general_tools.html#annotation-tools" ) );
}
@@ -51,6 +51,7 @@ class APP_EXPORT QgsTextAnnotationDialog: public QDialog, private Ui::QgsTextAnn
void deleteItem();
void mButtonBox_clicked( QAbstractButton *button );
void backgroundColorChanged( const QColor &color );
void showHelp();
};

#endif // QGSTEXTANNOTATIONDIALOG_H
@@ -40,7 +40,7 @@
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
@@ -97,7 +97,7 @@
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>

0 comments on commit 6e9c2a3

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