Skip to content
Permalink
Browse files

Add configuration GUI for label geometry generators

  • Loading branch information
m-kuhn committed Mar 9, 2019
1 parent ae51dce commit cbca6127ef7abb9a24462ef2cd0f66751a8e4890
Showing with 231 additions and 215 deletions.
  1. +10 −0 src/gui/qgstextformatwidget.cpp
  2. +4 −0 src/gui/qgstextformatwidget.h
  3. +217 −215 src/ui/qgstextformatwidgetbase.ui
@@ -522,6 +522,10 @@ void QgsTextFormatWidget::initWidget()

connect( mQuadrantBtnGrp, static_cast<void ( QButtonGroup::* )( int )>( &QButtonGroup::buttonClicked ), this, &QgsTextFormatWidget::updatePreview );

mGeometryGeneratorType->addItem( QgsApplication::getThemeIcon( QStringLiteral( "/mIconPolygonLayer.svg" ) ), tr( "Polygon / MultiPolygon" ), QgsWkbTypes::GeometryType::PolygonGeometry );
mGeometryGeneratorType->addItem( QgsApplication::getThemeIcon( QStringLiteral( "/mIconLineLayer.svg" ) ), tr( "LineString / MultiLineString" ), QgsWkbTypes::GeometryType::LineGeometry );
mGeometryGeneratorType->addItem( QgsApplication::getThemeIcon( QStringLiteral( "/mIconPointLayer.svg" ) ), tr( "Point / MultiPoint" ), QgsWkbTypes::GeometryType::PointGeometry );

// set correct initial tab to match displayed setting page
whileBlocking( mOptionsTab )->setCurrentIndex( mLabelStackedWidget->currentIndex() );

@@ -530,6 +534,12 @@ void QgsTextFormatWidget::initWidget()
lblFontPreview->setMapUnits( mMapCanvas->mapSettings().mapUnits() );
mPreviewScaleComboBox->setScale( mMapCanvas->mapSettings().scale() );
}

setupWidget();
}

void QgsTextFormatWidget::setupWidget()
{
}

void QgsTextFormatWidget::setWidgetMode( QgsTextFormatWidget::Mode mode )
@@ -163,6 +163,10 @@ class GUI_EXPORT QgsTextFormatWidget : public QWidget, protected Ui::QgsTextForm
bool mLoadSvgParams = false;

void initWidget();
/**
* Used to setup child classes. Called at the end of initWidget.
*/
virtual void setupWidget();
void setWidgetMode( Mode mode );
void toggleDDButtons( bool visible );
void blockFontChangeSignals( bool blk );

0 comments on commit cbca612

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