Skip to content
Permalink
Browse files

Add some tooltips to relation subform buttons

  • Loading branch information
nyalldawson committed May 25, 2016
1 parent e5d8529 commit fff938c5d9d3b4e213ce37334dfbc180591f8266
Showing with 12 additions and 4 deletions.
  1. +12 −4 src/gui/qgsrelationeditorwidget.cpp
@@ -47,49 +47,57 @@ QgsRelationEditorWidget::QgsRelationEditorWidget( QWidget* parent )
mToggleEditingButton->setText( tr( "Toggle editing" ) );
mToggleEditingButton->setEnabled( false );
mToggleEditingButton->setCheckable( true );
mToggleEditingButton->setToolTip( tr( "Toggle editing mode for child layer" ) );
buttonLayout->addWidget( mToggleEditingButton );
// save Edits
mSaveEditsButton = new QToolButton( this );
mSaveEditsButton->setIcon( QgsApplication::getThemeIcon( "/mActionSaveEdits.svg" ) );
mSaveEditsButton->setText( tr( "Save layer edits" ) );
mSaveEditsButton->setText( tr( "Save child layer edits" ) );
mSaveEditsButton->setToolTip( tr( "Save child layer edits" ) );
mSaveEditsButton->setEnabled( true );
buttonLayout->addWidget( mSaveEditsButton );
// add feature
mAddFeatureButton = new QToolButton( this );
mAddFeatureButton->setIcon( QgsApplication::getThemeIcon( "/mActionNewTableRow.png" ) );
mAddFeatureButton->setText( tr( "Add feature" ) );
mAddFeatureButton->setText( tr( "Add child feature" ) );
mAddFeatureButton->setToolTip( tr( "Add child feature" ) );
mAddFeatureButton->setObjectName( "mAddFeatureButton" );
buttonLayout->addWidget( mAddFeatureButton );
// delete feature
mDeleteFeatureButton = new QToolButton( this );
mDeleteFeatureButton->setIcon( QgsApplication::getThemeIcon( "/mActionDeleteSelected.svg" ) );
mDeleteFeatureButton->setText( tr( "Delete feature" ) );
mDeleteFeatureButton->setText( tr( "Delete child feature" ) );
mDeleteFeatureButton->setToolTip( tr( "Delete child feature" ) );
mDeleteFeatureButton->setObjectName( "mDeleteFeatureButton" );
buttonLayout->addWidget( mDeleteFeatureButton );
// link feature
mLinkFeatureButton = new QToolButton( this );
mLinkFeatureButton->setIcon( QgsApplication::getThemeIcon( "/mActionLink.svg" ) );
mLinkFeatureButton->setText( tr( "Link feature" ) );
mLinkFeatureButton->setText( tr( "Link existing features" ) );
mLinkFeatureButton->setToolTip( tr( "Link existing child features" ) );
mLinkFeatureButton->setObjectName( "mLinkFeatureButton" );
buttonLayout->addWidget( mLinkFeatureButton );
// unlink feature
mUnlinkFeatureButton = new QToolButton( this );
mUnlinkFeatureButton->setIcon( QgsApplication::getThemeIcon( "/mActionUnlink.svg" ) );
mUnlinkFeatureButton->setText( tr( "Unlink feature" ) );
mUnlinkFeatureButton->setToolTip( tr( "Unlink child feature" ) );
mUnlinkFeatureButton->setObjectName( "mUnlinkFeatureButton" );
buttonLayout->addWidget( mUnlinkFeatureButton );
// spacer
buttonLayout->addItem( new QSpacerItem( 0, 0, QSizePolicy::Expanding ) );
// form view
mFormViewButton = new QToolButton( this );
mFormViewButton->setText( tr( "Form view" ) );
mFormViewButton->setToolTip( tr( "Switch to form view" ) );
mFormViewButton->setIcon( QgsApplication::getThemeIcon( "/mActionPropertyItem.png" ) );
mFormViewButton->setCheckable( true );
mFormViewButton->setChecked( mViewMode == QgsDualView::AttributeEditor );
buttonLayout->addWidget( mFormViewButton );
// table view
mTableViewButton = new QToolButton( this );
mTableViewButton->setText( tr( "Table view" ) );
mTableViewButton->setToolTip( tr( "Switch to table view" ) );
mTableViewButton->setIcon( QgsApplication::getThemeIcon( "/mActionOpenTable.svg" ) );
mTableViewButton->setCheckable( true );
mTableViewButton->setChecked( mViewMode == QgsDualView::AttributeTable );

0 comments on commit fff938c

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