Skip to content

Commit bc4efc9

Browse files
DelazJnirvn
authored andcommittedJan 28, 2019
[ui] Add Help button to the "Load Layer Style" dialog (#8986)
1 parent b3a48b6 commit bc4efc9

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed
 

‎src/app/qgsvectorlayerloadstyledialog.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ QgsVectorLayerLoadStyleDialog::QgsVectorLayerLoadStyleDialog( QgsVectorLayer *la
102102
connect( mRelatedTable, &QTableWidget::doubleClicked, this, &QDialog::accept );
103103
connect( mOthersTable, &QTableWidget::doubleClicked, this, &QDialog::accept );
104104
connect( mCancelButton, &QPushButton::clicked, this, &QDialog::reject );
105+
connect( mButtonBox, &QDialogButtonBox::helpRequested, this, &QgsVectorLayerLoadStyleDialog::showHelp );
105106
connect( mLoadButton, &QPushButton::clicked, this, &QDialog::accept );
106107
connect( mDeleteButton, &QPushButton::clicked, this, &QgsVectorLayerLoadStyleDialog::deleteStyleFromDB );
107108
setTabOrder( mRelatedTable, mOthersTable );
@@ -290,7 +291,9 @@ void QgsVectorLayerLoadStyleDialog::updateLoadButtonState()
290291
&& ( mRelatedTable->selectionModel()->hasSelection() || mOthersTable->selectionModel()->hasSelection()
291292
) ) ||
292293
( type != QgsVectorLayerProperties::DB && !mFileWidget->filePath().isEmpty() ) );
294+
}
293295

294-
295-
296+
void QgsVectorLayerLoadStyleDialog::showHelp()
297+
{
298+
QgsHelp::openHelp( QStringLiteral( "introduction/general_tools.html#save-and-share-layer-properties" ) );
296299
}

‎src/app/qgsvectorlayerloadstyledialog.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ class APP_EXPORT QgsVectorLayerLoadStyleDialog : public QDialog, private Ui::Qgs
5050
void onRelatedTableSelectionChanged();
5151
void onOthersTableSelectionChanged();
5252
void deleteStyleFromDB();
53+
void showHelp();
5354

5455
private:
5556
QgsVectorLayer *mLayer = nullptr;

‎src/ui/qgsvectorlayerloadstyledialog.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
<item row="5" column="1">
160160
<widget class="QDialogButtonBox" name="mButtonBox">
161161
<property name="standardButtons">
162-
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Close|QDialogButtonBox::Open</set>
162+
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Close|QDialogButtonBox::Help|QDialogButtonBox::Open</set>
163163
</property>
164164
</widget>
165165
</item>

0 commit comments

Comments
 (0)
Please sign in to comment.