Skip to content
Permalink
Browse files

[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 bc4efc9908c6497b69a97f15fafc2e87b2a69f91
@@ -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 );
@@ -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" ) );
}
@@ -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;
@@ -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>

0 comments on commit bc4efc9

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