Skip to content
Permalink
Browse files

Add Help button and some fixes to automated placement widget

  • Loading branch information
DelazJ authored and nyalldawson committed Jan 13, 2018
1 parent 0e80b72 commit ee43d54ace1c697189ca043f1f7b128e2c966d8b
@@ -17,6 +17,7 @@
#include "qgslabelingenginesettings.h"
#include "qgsproject.h"
#include "pal/pal.h"
#include "qgshelp.h"

#include <QPushButton>

@@ -26,6 +27,7 @@ QgsLabelEngineConfigDialog::QgsLabelEngineConfigDialog( QWidget *parent )
setupUi( this );

connect( buttonBox, &QDialogButtonBox::accepted, this, &QgsLabelEngineConfigDialog::onOK );
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsLabelEngineConfigDialog::showHelp );
connect( buttonBox->button( QDialogButtonBox::RestoreDefaults ), &QAbstractButton::clicked,
this, &QgsLabelEngineConfigDialog::setDefaults );

@@ -80,3 +82,8 @@ void QgsLabelEngineConfigDialog::setDefaults()
chkShowPartialsLabels->setChecked( p.getShowPartial() );
mDrawOutlinesChkBox->setChecked( true );
}

void QgsLabelEngineConfigDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "working_with_vector/vector_properties.html#labels-properties" ) );
}
@@ -31,6 +31,10 @@ class APP_EXPORT QgsLabelEngineConfigDialog : public QDialog, private Ui::QgsLab
void onOK();
void setDefaults();


private slots:
void showHelp();

protected:
};

@@ -6,16 +6,10 @@
<rect>
<x>0</x>
<y>0</y>
<width>336</width>
<height>430</height>
<width>420</width>
<height>358</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>336</width>
<height>0</height>
</size>
</property>
<property name="windowTitle">
<string>Automated Placement Engine</string>
</property>
@@ -215,76 +209,37 @@
<property name="verticalSpacing">
<number>6</number>
</property>
<item row="3" column="2">
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="4" column="0" colspan="3">
<item row="3" column="0">
<widget class="QCheckBox" name="chkShowCandidates">
<property name="text">
<string>Show candidates (for debugging)</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_6">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>(i.e. including colliding objects)</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="3">
<item row="2" column="0">
<widget class="QCheckBox" name="chkShowAllLabels">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="inputMethodHints">
<set>Qt::ImhNone</set>
</property>
<property name="text">
<string>Show all labels for all layers</string>
<string>Show all labels for all layers (i.e. including colliding objects)</string>
</property>
</widget>
</item>
<item row="3" column="0">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>8</width>
<height>8</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0" colspan="3">
<item row="0" column="0">
<widget class="QCheckBox" name="mDrawOutlinesChkBox">
<property name="text">
<string>Draw text as outlines (recommended)</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="3">
<item row="1" column="0">
<widget class="QCheckBox" name="chkShowPartialsLabels">
<property name="text">
<string>Show partial labels</string>
@@ -312,7 +267,7 @@
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::RestoreDefaults</set>
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok|QDialogButtonBox::RestoreDefaults</set>
</property>
</widget>
</item>

0 comments on commit ee43d54

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