Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[ui] Add Help button to the "Load Layer Style" dialog (#8986)
  • Loading branch information
DelazJ authored and nirvn committed Jan 28, 2019
1 parent b3a48b6 commit bc4efc9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/app/qgsvectorlayerloadstyledialog.cpp
Expand Up @@ -102,6 +102,7 @@ QgsVectorLayerLoadStyleDialog::QgsVectorLayerLoadStyleDialog( QgsVectorLayer *la
connect( mRelatedTable, &QTableWidget::doubleClicked, this, &QDialog::accept );
connect( mOthersTable, &QTableWidget::doubleClicked, this, &QDialog::accept );
connect( mCancelButton, &QPushButton::clicked, this, &QDialog::reject );
connect( mButtonBox, &QDialogButtonBox::helpRequested, this, &QgsVectorLayerLoadStyleDialog::showHelp );
connect( mLoadButton, &QPushButton::clicked, this, &QDialog::accept );
connect( mDeleteButton, &QPushButton::clicked, this, &QgsVectorLayerLoadStyleDialog::deleteStyleFromDB );
setTabOrder( mRelatedTable, mOthersTable );
Expand Down Expand Up @@ -290,7 +291,9 @@ void QgsVectorLayerLoadStyleDialog::updateLoadButtonState()
&& ( mRelatedTable->selectionModel()->hasSelection() || mOthersTable->selectionModel()->hasSelection()
) ) ||
( type != QgsVectorLayerProperties::DB && !mFileWidget->filePath().isEmpty() ) );
}



void QgsVectorLayerLoadStyleDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "introduction/general_tools.html#save-and-share-layer-properties" ) );
}
1 change: 1 addition & 0 deletions src/app/qgsvectorlayerloadstyledialog.h
Expand Up @@ -50,6 +50,7 @@ class APP_EXPORT QgsVectorLayerLoadStyleDialog : public QDialog, private Ui::Qgs
void onRelatedTableSelectionChanged();
void onOthersTableSelectionChanged();
void deleteStyleFromDB();
void showHelp();

private:
QgsVectorLayer *mLayer = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion src/ui/qgsvectorlayerloadstyledialog.ui
Expand Up @@ -159,7 +159,7 @@
<item row="5" column="1">
<widget class="QDialogButtonBox" name="mButtonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Close|QDialogButtonBox::Open</set>
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Close|QDialogButtonBox::Help|QDialogButtonBox::Open</set>
</property>
</widget>
</item>
Expand Down

0 comments on commit bc4efc9

Please sign in to comment.