Skip to content

Commit

Permalink
Move Help button to top toolbar.
Browse files Browse the repository at this point in the history
  • Loading branch information
imanhn authored and nyalldawson committed Dec 15, 2020
1 parent ae34eba commit bb643c6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 44 deletions.
2 changes: 1 addition & 1 deletion src/app/qgsidentifyresultsdialog.cpp
Expand Up @@ -419,7 +419,7 @@ QgsIdentifyResultsDialog::QgsIdentifyResultsDialog( QgsMapCanvas *canvas, QWidge
connect( mActionPrint, &QAction::triggered, this, &QgsIdentifyResultsDialog::printCurrentItem );
connect( mOpenFormAction, &QAction::triggered, this, &QgsIdentifyResultsDialog::featureForm );
connect( mClearResultsAction, &QAction::triggered, this, &QgsIdentifyResultsDialog::clear );
connect( mHelpToolButton, &QAbstractButton::clicked, this, &QgsIdentifyResultsDialog::showHelp );
connect( mHelpToolAction, &QAction::triggered, this, &QgsIdentifyResultsDialog::showHelp );

initSelectionModes();

Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsidentifyresultsdialog.h
Expand Up @@ -269,6 +269,8 @@ class APP_EXPORT QgsIdentifyResultsDialog: public QDialog, private Ui::QgsIdenti

void mapLayerActionDestroyed();

void showHelp();

private:
QString representValue( QgsVectorLayer *vlayer, const QgsEditorWidgetSetup &setup, const QString &fieldName, const QVariant &value );

Expand Down Expand Up @@ -315,8 +317,6 @@ class APP_EXPORT QgsIdentifyResultsDialog: public QDialog, private Ui::QgsIdenti

QVector<QgsIdentifyPlotCurve *> mPlotCurves;

void showHelp();

QgsMapToolSelectionHandler::SelectionMode mSelectionMode = QgsMapToolSelectionHandler::SelectSimple;

void setSelectionMode();
Expand Down
55 changes: 14 additions & 41 deletions src/ui/qgsidentifyresultsbase.ui
Expand Up @@ -73,6 +73,8 @@
<addaction name="mActionCopy"/>
<addaction name="mActionPrint"/>
<addaction name="separator"/>
<addaction name="mHelpToolAction"/>
<addaction name="separator"/>
</widget>
</item>
<item>
Expand Down Expand Up @@ -226,19 +228,6 @@
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="mHelpToolButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Help</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
Expand Down Expand Up @@ -384,6 +373,18 @@
<string>Hide derived attributes from results</string>
</property>
</action>
<action name="mHelpToolAction">
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionHelpContents.svg</normaloff>:/images/themes/default/mActionHelpContents.svg</iconset>
</property>
<property name="text">
<string>Help</string>
</property>
<property name="toolTip">
<string>Help</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
Expand All @@ -396,34 +397,6 @@
</customwidgets>
<resources>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
</resources>
<connections/>
</ui>

0 comments on commit bb643c6

Please sign in to comment.