100911_data_defined_label_position.diff

Marco Hugentobler, 2010-09-11 06:45 AM

Download (25.5 KB)

View differences:

src/app/qgslabelinggui.h (Arbeitskopie)
45 45
    void updatePreview();
46 46
    void updateOptions();
47 47

  
48
    void on_mXCoordinateComboBox_currentIndexChanged( const QString & text );
49
    void on_mYCoordinateComboBox_currentIndexChanged( const QString & text );
50

  
48 51
  protected:
49 52
    void populatePlacementMethods();
50 53
    void populateFieldNames();
......
57 60
  private:
58 61
    QgsPalLabeling* mLBL;
59 62
    QgsVectorLayer* mLayer;
63

  
64
    void disableDataDefinedAlignment();
65
    void enableDataDefinedAlignment();
60 66
};
61 67

  
62 68
#endif
src/app/qgslabelinggui.cpp (Arbeitskopie)
250 250
  setDataDefinedProperty( mFontFamilyAttributeComboBox, QgsPalLayerSettings::Family, lyr );
251 251
  setDataDefinedProperty( mBufferSizeAttributeComboBox, QgsPalLayerSettings:: BufferSize, lyr );
252 252
  setDataDefinedProperty( mBufferColorAttributeComboBox, QgsPalLayerSettings::BufferColor, lyr );
253
  setDataDefinedProperty( mXCoordinateComboBox, QgsPalLayerSettings::PositionX, lyr );
254
  setDataDefinedProperty( mYCoordinateComboBox, QgsPalLayerSettings::PositionY, lyr );
255
  setDataDefinedProperty( mHorizontalAlignmentComboBox, QgsPalLayerSettings::Hali, lyr );
256
  setDataDefinedProperty( mVerticalAlignmentComboBox, QgsPalLayerSettings::Vali, lyr );
253 257

  
254 258
  return lyr;
255 259
}
......
308 312
  comboList << mFontFamilyAttributeComboBox;
309 313
  comboList << mBufferSizeAttributeComboBox;
310 314
  comboList << mBufferColorAttributeComboBox;
315
  comboList << mXCoordinateComboBox;
316
  comboList << mYCoordinateComboBox;
317
  comboList << mHorizontalAlignmentComboBox;
318
  comboList << mVerticalAlignmentComboBox;
311 319

  
312 320
  QList<QComboBox*>::iterator comboIt = comboList.begin();
313 321
  for ( ; comboIt != comboList.end(); ++comboIt )
......
335 343
  setCurrentComboValue( mFontFamilyAttributeComboBox, s, QgsPalLayerSettings::Family );
336 344
  setCurrentComboValue( mBufferSizeAttributeComboBox, s , QgsPalLayerSettings::BufferSize );
337 345
  setCurrentComboValue( mBufferColorAttributeComboBox, s, QgsPalLayerSettings::BufferColor );
346
  setCurrentComboValue( mXCoordinateComboBox, s, QgsPalLayerSettings::PositionX );
347
  setCurrentComboValue( mYCoordinateComboBox, s, QgsPalLayerSettings::PositionY );
348
  setCurrentComboValue( mHorizontalAlignmentComboBox, s, QgsPalLayerSettings::Hali );
349
  setCurrentComboValue( mVerticalAlignmentComboBox, s, QgsPalLayerSettings::Vali );
338 350
}
339 351

  
340 352
void QgsLabelingGui::changeTextColor()
......
418 430
    stackedOptions->setCurrentWidget( pageOptionsEmpty );
419 431
  }
420 432
}
433

  
434
void QgsLabelingGui::on_mXCoordinateComboBox_currentIndexChanged( const QString & text )
435
{
436
  if ( text.isEmpty() ) //no data defined alignment without data defined position
437
  {
438
    disableDataDefinedAlignment();
439
  }
440
  else if ( !mYCoordinateComboBox->currentText().isEmpty() )
441
  {
442
    enableDataDefinedAlignment();
443
  }
444
}
445

  
446
void QgsLabelingGui::on_mYCoordinateComboBox_currentIndexChanged( const QString & text )
447
{
448
  if ( text.isEmpty() ) //no data defined alignment without data defined position
449
  {
450
    disableDataDefinedAlignment();
451
  }
452
  else if ( !mXCoordinateComboBox->currentText().isEmpty() )
453
  {
454
    enableDataDefinedAlignment();
455
  }
456
}
457

  
458
void QgsLabelingGui::disableDataDefinedAlignment()
459
{
460
  mHorizontalAlignmentComboBox->setCurrentIndex( mHorizontalAlignmentComboBox->findText( "" ) );
461
  mHorizontalAlignmentComboBox->setEnabled( false );
462
  mVerticalAlignmentComboBox->setCurrentIndex( mVerticalAlignmentComboBox->findText( "" ) );
463
  mVerticalAlignmentComboBox->setEnabled( false );
464
}
465

  
466
void QgsLabelingGui::enableDataDefinedAlignment()
467
{
468
  mHorizontalAlignmentComboBox->setEnabled( true );
469
  mVerticalAlignmentComboBox->setEnabled( true );
470
}
src/core/qgspallabeling.cpp (Arbeitskopie)
193 193
    return;
194 194
  }
195 195

  
196
  for ( int i = 0; i < 9; ++i )
196
  for ( int i = 0; i < 13; ++i )
197 197
  {
198 198
    QMap< QgsPalLayerSettings::DataDefinedProperties, int >::const_iterator it = propertyMap.find(( QgsPalLayerSettings::DataDefinedProperties )i );
199 199
    QVariant propertyValue;
......
242 242
  _readDataDefinedProperty( layer, QgsPalLayerSettings::Family, propertyMap );
243 243
  _readDataDefinedProperty( layer, QgsPalLayerSettings::BufferSize, propertyMap );
244 244
  _readDataDefinedProperty( layer, QgsPalLayerSettings::BufferColor, propertyMap );
245
  _readDataDefinedProperty( layer,  QgsPalLayerSettings::PositionX, propertyMap );
246
  _readDataDefinedProperty( layer,  QgsPalLayerSettings::PositionY, propertyMap );
247
  _readDataDefinedProperty( layer,  QgsPalLayerSettings::Hali, propertyMap );
248
  _readDataDefinedProperty( layer,  QgsPalLayerSettings::Vali, propertyMap );
245 249
}
246 250

  
247 251
void QgsPalLayerSettings::readFromLayer( QgsVectorLayer* layer )
......
391 395
{
392 396
  QString labelText = f.attributeMap()[fieldIndex].toString();
393 397
  double labelX, labelY; // will receive label size
398
  QFont labelFont = textFont;
394 399

  
395 400
  //data defined label size?
396 401
  QMap< DataDefinedProperties, int >::const_iterator it = dataDefinedProperties.find( QgsPalLayerSettings::Size );
397 402
  if ( it != dataDefinedProperties.constEnd() )
398 403
  {
399
    QFont labelFont = textFont;
400 404
    //find out size
401 405
    QVariant size = f.attributeMap().value( *it );
402 406
    if ( size.isValid() )
......
430 434
    return;
431 435
  }
432 436

  
437
  //data defined position / alignment?
438
  bool dataDefinedPosition = false;
439
  double xPos, yPos;
440

  
441
  QMap< DataDefinedProperties, int >::const_iterator dPosXIt = dataDefinedProperties.find( QgsPalLayerSettings::PositionX );
442
  if ( dPosXIt != dataDefinedProperties.constEnd() )
443
  {
444
    QMap< DataDefinedProperties, int >::const_iterator dPosYIt = dataDefinedProperties.find( QgsPalLayerSettings::PositionY );
445
    if ( dPosYIt != dataDefinedProperties.constEnd() )
446
    {
447
      //data defined position
448
      dataDefinedPosition = true;
449
      xPos = f.attributeMap().value( *dPosXIt ).toDouble();
450
      yPos = f.attributeMap().value( *dPosYIt ).toDouble();
451

  
452
      //consider alignment settings (by adjusting xPos and yPos, which are lower/left in pal)
453

  
454
      //horizontal alignment
455
      QMap< DataDefinedProperties, int >::const_iterator haliIt = dataDefinedProperties.find( QgsPalLayerSettings::Hali );
456
      if ( haliIt != dataDefinedProperties.end() )
457
      {
458
        QString haliString = f.attributeMap().value( *haliIt ).toString();
459
        if ( haliString.compare( "Center", Qt::CaseInsensitive ) == 0 )
460
        {
461
          xPos -= labelX / 2.0;
462
        }
463
        else if ( haliString.compare( "Right", Qt::CaseInsensitive ) == 0 )
464
        {
465
          xPos -= labelX;
466
        }
467
      }
468

  
469
      //vertical alignment
470
      QMap< DataDefinedProperties, int >::const_iterator valiIt = dataDefinedProperties.find( QgsPalLayerSettings::Vali );
471
      if ( valiIt != dataDefinedProperties.constEnd() )
472
      {
473
        QString valiString = f.attributeMap().value( *valiIt ).toString();
474
        if ( valiString.compare( "Bottom", Qt::CaseInsensitive ) != 0 )
475
        {
476
          if ( valiString.compare( "Top", Qt::CaseInsensitive ) == 0 || valiString.compare( "Cap", Qt::CaseInsensitive ) == 0 )
477
          {
478
            yPos -= labelY;
479
          }
480
          else
481
          {
482
            QFontMetrics labelFontMetrics( labelFont );
483
            double descentRatio = labelFontMetrics.descent() / labelFontMetrics.height();
484

  
485
            if ( valiString.compare( "Base", Qt::CaseInsensitive ) == 0 )
486
            {
487
              yPos -= labelY * descentRatio;
488
            }
489
            else if ( valiString.compare( "Half", Qt::CaseInsensitive ) == 0 )
490
            {
491
              yPos -= labelY * descentRatio;
492
              yPos -= labelY * 0.5 * ( 1 - descentRatio );
493
            }
494
          }
495
        }
496
      }
497
    }
498
  }
499

  
433 500
  QgsPalGeometry* lbl = new QgsPalGeometry( f.id(), labelText, GEOSGeom_clone( geos_geom ) );
434 501

  
435 502
  // record the created geometry - it will be deleted at the end.
......
438 505
  // register feature to the layer
439 506
  try
440 507
  {
441
    if ( !palLayer->registerFeature( lbl->strId(), lbl, labelX, labelY, labelText.toUtf8().constData() ) )
508
    if ( !palLayer->registerFeature( lbl->strId(), lbl, labelX, labelY, labelText.toUtf8().constData(), xPos, yPos, dataDefinedPosition ) )
442 509
      return;
443 510
  }
444 511
  catch ( std::exception* e )
src/core/pal/feature.h (Arbeitskopie)
86 86

  
87 87
      void setLabelInfo( LabelInfo* info ) { labelInfo = info; }
88 88
      void setDistLabel( double dist ) { distlabel = dist; }
89
      //Set label position of the feature to fixed x/y values
90
      void setFixedPosition( double x, double y ) { fixedPos = true; fixedPosX = x; fixedPosY = y;}
91
      bool fixedPosition() const { return fixedPos; }
89 92

  
90 93
    protected:
91 94
      Layer *layer;
......
97 100

  
98 101
      char *uid;
99 102

  
103
      bool fixedPos; //true in case of fixed position (only 1 candidate position with cost 0)
104
      double fixedPosX;
105
      double fixedPosY;
106

  
100 107
      // array of parts - possibly not necessary
101 108
      //int nPart;
102 109
      //FeaturePart** parts;
src/core/pal/layer.cpp (Arbeitskopie)
226 226

  
227 227

  
228 228

  
229
  bool Layer::registerFeature( const char *geom_id, PalGeometry *userGeom, double label_x, double label_y, const char* labelText )
229
  bool Layer::registerFeature( const char *geom_id, PalGeometry *userGeom, double label_x, double label_y, const char* labelText,
230
                               double labelPosX, double labelPosY, bool fixedPos )
230 231
  {
231 232
    if ( !geom_id || label_x < 0 || label_y < 0 )
232 233
      return false;
......
243 244
    GEOSGeometry *the_geom = userGeom->getGeosGeometry();
244 245

  
245 246
    Feature* f = new Feature( this, geom_id, userGeom, label_x, label_y );
247
    if ( fixedPos )
248
    {
249
      f->setFixedPosition( labelPosX, labelPosY );
250
    }
246 251

  
247 252
    bool first_feat = true;
248 253

  
......
314 319
    modMutex->unlock();
315 320

  
316 321
    // if using only biggest parts...
317
    if ( mode == LabelPerFeature && biggest_part != NULL )
322
    if (( mode == LabelPerFeature || f->fixedPosition() ) && biggest_part != NULL )
318 323
    {
319 324
      addFeaturePart( biggest_part, labelText );
320 325
      first_feat = false;
src/core/pal/layer.h (Arbeitskopie)
283 283
       * @param label_x label width
284 284
       * @param label_y label height
285 285
       * @param userGeom user's geometry that implements the PalGeometry interface
286
       * @param labelPosX x position of the label (in case of fixed label position)
287
       * @param labelPosY y position of the label (in case of fixed label position)
288
       * @param fixedPos true if a single fixed position for this label is needed
286 289
       *
287 290
       * @throws PalException::FeatureExists
288 291
       *
289 292
       * @return true on success (i.e. valid geometry)
290 293
       */
291
      bool registerFeature( const char *geom_id, PalGeometry *userGeom, double label_x = -1, double label_y = -1, const char* labelText = NULL );
294
      bool registerFeature( const char *geom_id, PalGeometry *userGeom, double label_x = -1, double label_y = -1,
295
                            const char* labelText = NULL, double labelPosX = 0.0, double labelPosY = 0.0, bool fixedPos = false );
292 296

  
293 297
      /** return pointer to feature or NULL if doesn't exist */
294 298
      Feature* getFeature( const char* geom_id );
src/core/pal/feature.cpp (Arbeitskopie)
61 61
namespace pal
62 62
{
63 63
  Feature::Feature( Layer* l, const char* geom_id, PalGeometry* userG, double lx, double ly )
64
      : layer( l ), userGeom( userG ), label_x( lx ), label_y( ly ), distlabel( 0 ), labelInfo( NULL )
64
      : layer( l ), userGeom( userG ), label_x( lx ), label_y( ly ), distlabel( 0 ), labelInfo( NULL ), fixedPos( false )
65 65
  {
66 66
    uid = new char[strlen( geom_id ) +1];
67 67
    strcpy( uid, geom_id );
......
1245 1245

  
1246 1246
    double delta = bbox_max[0] - bbox_min[0];
1247 1247

  
1248
    switch ( type )
1248
    if ( f->fixedPosition() )
1249 1249
    {
1250
      case GEOS_POINT:
1251
        if ( f->layer->getArrangement() == P_POINT_OVER )
1252
          nbp = setPositionOverPoint( x[0], y[0], scale, lPos, delta );
1253
        else
1254
          nbp = setPositionForPoint( x[0], y[0], scale, lPos, delta );
1255
        break;
1256
      case GEOS_LINESTRING:
1257
        if ( f->layer->getArrangement() == P_CURVED )
1258
          nbp = setPositionForLineCurved( lPos, mapShape );
1259
        else
1260
          nbp = setPositionForLine( scale, lPos, mapShape, delta );
1261
        break;
1250
      nbp = 1;
1251
      *lPos = new LabelPosition *[nbp];
1252
      ( *lPos )[0] = new LabelPosition( 0, f->fixedPosX, f->fixedPosY, f->label_x, f->label_y, 0, 0.0,  this );
1253
    }
1254
    else
1255
    {
1256
      switch ( type )
1257
      {
1258
        case GEOS_POINT:
1259
          if ( f->layer->getArrangement() == P_POINT_OVER )
1260
            nbp = setPositionOverPoint( x[0], y[0], scale, lPos, delta );
1261
          else
1262
            nbp = setPositionForPoint( x[0], y[0], scale, lPos, delta );
1263
          break;
1264
        case GEOS_LINESTRING:
1265
          if ( f->layer->getArrangement() == P_CURVED )
1266
            nbp = setPositionForLineCurved( lPos, mapShape );
1267
          else
1268
            nbp = setPositionForLine( scale, lPos, mapShape, delta );
1269
          break;
1262 1270

  
1263
      case GEOS_POLYGON:
1264
        switch ( f->layer->getArrangement() )
1265
        {
1266
          case P_POINT:
1267
          case P_POINT_OVER:
1268
            double cx, cy;
1269
            mapShape->getCentroid( cx, cy );
1270
            if ( f->layer->getArrangement() == P_POINT_OVER )
1271
              nbp = setPositionOverPoint( cx, cy, scale, lPos, delta );
1272
            else
1273
              nbp = setPositionForPoint( cx, cy, scale, lPos, delta );
1274
            break;
1275
          case P_LINE:
1276
            nbp = setPositionForLine( scale, lPos, mapShape, delta );
1277
            break;
1278
          default:
1279
            nbp = setPositionForPolygon( scale, lPos, mapShape, delta );
1280
            break;
1281
        }
1271
        case GEOS_POLYGON:
1272
          switch ( f->layer->getArrangement() )
1273
          {
1274
            case P_POINT:
1275
            case P_POINT_OVER:
1276
              double cx, cy;
1277
              mapShape->getCentroid( cx, cy );
1278
              if ( f->layer->getArrangement() == P_POINT_OVER )
1279
                nbp = setPositionOverPoint( cx, cy, scale, lPos, delta );
1280
              else
1281
                nbp = setPositionForPoint( cx, cy, scale, lPos, delta );
1282
              break;
1283
            case P_LINE:
1284
              nbp = setPositionForLine( scale, lPos, mapShape, delta );
1285
              break;
1286
            default:
1287
              nbp = setPositionForPolygon( scale, lPos, mapShape, delta );
1288
              break;
1289
          }
1290
      }
1282 1291
    }
1283 1292

  
1284 1293
    int rnbp = nbp;
src/core/qgspallabeling.h (Arbeitskopie)
83 83
      Family,
84 84
      BufferSize,
85 85
      BufferColor,
86
      PositionX, //x-coordinate data defined label position
87
      PositionY, //y-coordinate data defined label position
88
      Hali, //horizontal alignment for data defined label position (Left, Center, Right)
89
      Vali //vertical alignment for data defined label position (Bottom, Base, Half, Cap, Top)
86 90
    };
87 91

  
88 92
    QString fieldName;
src/ui/qgslabelingguibase.ui (Arbeitskopie)
739 739
      <attribute name="title">
740 740
       <string>Data defined settings</string>
741 741
      </attribute>
742
      <layout class="QGridLayout" name="gridLayout_4">
742
      <layout class="QGridLayout" name="gridLayout_3">
743 743
       <item row="0" column="0">
744 744
        <widget class="QGroupBox" name="mFontAttributePropertiesGroupBox">
745 745
         <property name="sizePolicy">
......
753 753
         </property>
754 754
         <layout class="QGridLayout" name="gridLayout">
755 755
          <item row="0" column="0">
756
           <layout class="QGridLayout" name="gridLayout_11">
757
            <item row="0" column="0">
758
             <widget class="QLabel" name="mSizeLabel">
759
              <property name="text">
760
               <string>Size</string>
761
              </property>
762
             </widget>
763
            </item>
764
            <item row="0" column="1">
765
             <widget class="QComboBox" name="mSizeAttributeComboBox"/>
766
            </item>
767
            <item row="2" column="0">
768
             <widget class="QLabel" name="mBoldLabel">
769
              <property name="text">
770
               <string>Bold</string>
771
              </property>
772
             </widget>
773
            </item>
774
            <item row="2" column="1">
775
             <widget class="QComboBox" name="mBoldAttributeComboBox"/>
776
            </item>
777
            <item row="1" column="1">
778
             <widget class="QComboBox" name="mColorAttributeComboBox"/>
779
            </item>
780
            <item row="1" column="0">
781
             <widget class="QLabel" name="mColorLabel">
782
              <property name="text">
783
               <string>Color</string>
784
              </property>
785
             </widget>
786
            </item>
787
            <item row="3" column="1">
788
             <widget class="QComboBox" name="mItalicAttributeComboBox"/>
789
            </item>
790
            <item row="3" column="0">
791
             <widget class="QLabel" name="mItalicLabel">
792
              <property name="text">
793
               <string>Italic</string>
794
              </property>
795
             </widget>
796
            </item>
797
            <item row="4" column="1">
798
             <widget class="QComboBox" name="mUnderlineAttributeComboBox"/>
799
            </item>
800
            <item row="4" column="0">
801
             <widget class="QLabel" name="mUnderlineLabel">
802
              <property name="text">
803
               <string>Underline</string>
804
              </property>
805
             </widget>
806
            </item>
807
            <item row="6" column="1">
808
             <widget class="QComboBox" name="mFontFamilyAttributeComboBox"/>
809
            </item>
810
            <item row="6" column="0">
811
             <widget class="QLabel" name="mFontFamilyLabel">
812
              <property name="text">
813
               <string>Font family</string>
814
              </property>
815
             </widget>
816
            </item>
817
            <item row="5" column="1">
818
             <widget class="QComboBox" name="mStrikeoutAttributeComboBox"/>
819
            </item>
820
            <item row="5" column="0">
821
             <widget class="QLabel" name="mStrikeoutLabel">
822
              <property name="text">
823
               <string>Strikeout</string>
824
              </property>
825
             </widget>
826
            </item>
827
           </layout>
756
           <widget class="QLabel" name="mSizeLabel">
757
            <property name="text">
758
             <string>Size</string>
759
            </property>
760
           </widget>
828 761
          </item>
762
          <item row="0" column="1">
763
           <widget class="QComboBox" name="mSizeAttributeComboBox"/>
764
          </item>
765
          <item row="1" column="0">
766
           <widget class="QLabel" name="mColorLabel">
767
            <property name="text">
768
             <string>Color</string>
769
            </property>
770
           </widget>
771
          </item>
772
          <item row="1" column="1">
773
           <widget class="QComboBox" name="mColorAttributeComboBox"/>
774
          </item>
775
          <item row="2" column="0">
776
           <widget class="QLabel" name="mBoldLabel">
777
            <property name="text">
778
             <string>Bold</string>
779
            </property>
780
           </widget>
781
          </item>
782
          <item row="2" column="1">
783
           <widget class="QComboBox" name="mBoldAttributeComboBox"/>
784
          </item>
785
          <item row="3" column="0">
786
           <widget class="QLabel" name="mItalicLabel">
787
            <property name="text">
788
             <string>Italic</string>
789
            </property>
790
           </widget>
791
          </item>
792
          <item row="3" column="1">
793
           <widget class="QComboBox" name="mItalicAttributeComboBox"/>
794
          </item>
795
          <item row="4" column="0">
796
           <widget class="QLabel" name="mUnderlineLabel">
797
            <property name="text">
798
             <string>Underline</string>
799
            </property>
800
           </widget>
801
          </item>
802
          <item row="4" column="1">
803
           <widget class="QComboBox" name="mUnderlineAttributeComboBox"/>
804
          </item>
805
          <item row="5" column="0">
806
           <widget class="QLabel" name="mStrikeoutLabel">
807
            <property name="text">
808
             <string>Strikeout</string>
809
            </property>
810
           </widget>
811
          </item>
812
          <item row="5" column="1">
813
           <widget class="QComboBox" name="mStrikeoutAttributeComboBox"/>
814
          </item>
815
          <item row="6" column="0">
816
           <widget class="QLabel" name="mFontFamilyLabel">
817
            <property name="text">
818
             <string>Font family</string>
819
            </property>
820
           </widget>
821
          </item>
822
          <item row="6" column="1">
823
           <widget class="QComboBox" name="mFontFamilyAttributeComboBox"/>
824
          </item>
829 825
         </layout>
830 826
        </widget>
831 827
       </item>
......
834 830
         <property name="title">
835 831
          <string>Buffer properties</string>
836 832
         </property>
837
         <layout class="QGridLayout" name="gridLayout_3">
833
         <layout class="QGridLayout" name="gridLayout_2">
838 834
          <item row="0" column="0">
839
           <layout class="QGridLayout" name="gridLayout_2">
840
            <item row="0" column="0">
841
             <widget class="QLabel" name="mBufferSizeLabel">
842
              <property name="text">
843
               <string>Buffer size</string>
844
              </property>
845
             </widget>
846
            </item>
847
            <item row="0" column="1">
848
             <widget class="QComboBox" name="mBufferSizeAttributeComboBox"/>
849
            </item>
850
            <item row="1" column="0">
851
             <widget class="QLabel" name="mBufferColorLabel">
852
              <property name="text">
853
               <string>Buffer color</string>
854
              </property>
855
             </widget>
856
            </item>
857
            <item row="1" column="1">
858
             <widget class="QComboBox" name="mBufferColorAttributeComboBox"/>
859
            </item>
860
           </layout>
835
           <widget class="QLabel" name="mBufferSizeLabel">
836
            <property name="text">
837
             <string>Buffer size</string>
838
            </property>
839
           </widget>
861 840
          </item>
841
          <item row="0" column="1">
842
           <widget class="QComboBox" name="mBufferSizeAttributeComboBox"/>
843
          </item>
844
          <item row="1" column="0">
845
           <widget class="QLabel" name="mBufferColorLabel">
846
            <property name="text">
847
             <string>Buffer color</string>
848
            </property>
849
           </widget>
850
          </item>
851
          <item row="1" column="1">
852
           <widget class="QComboBox" name="mBufferColorAttributeComboBox"/>
853
          </item>
862 854
         </layout>
863 855
        </widget>
864 856
       </item>
865 857
       <item row="2" column="0">
858
        <widget class="QGroupBox" name="mPositionAttributeGroupBox">
859
         <property name="title">
860
          <string>Position</string>
861
         </property>
862
         <layout class="QGridLayout" name="gridLayout_4">
863
          <item row="0" column="0">
864
           <widget class="QLabel" name="mXCoordinateLabel">
865
            <property name="text">
866
             <string>X Coordinate</string>
867
            </property>
868
           </widget>
869
          </item>
870
          <item row="0" column="1">
871
           <widget class="QComboBox" name="mXCoordinateComboBox"/>
872
          </item>
873
          <item row="1" column="0">
874
           <widget class="QLabel" name="mYCoordinateLabel">
875
            <property name="text">
876
             <string>Y Coordinate</string>
877
            </property>
878
           </widget>
879
          </item>
880
          <item row="1" column="1">
881
           <widget class="QComboBox" name="mYCoordinateComboBox"/>
882
          </item>
883
          <item row="2" column="0">
884
           <widget class="QLabel" name="mHorizontalAlignmentLabel">
885
            <property name="text">
886
             <string>Horizontal alignment</string>
887
            </property>
888
           </widget>
889
          </item>
890
          <item row="2" column="1">
891
           <widget class="QComboBox" name="mHorizontalAlignmentComboBox"/>
892
          </item>
893
          <item row="3" column="0">
894
           <widget class="QLabel" name="mVerticalAlignmentLabel">
895
            <property name="text">
896
             <string>Vertical alignment</string>
897
            </property>
898
           </widget>
899
          </item>
900
          <item row="3" column="1">
901
           <widget class="QComboBox" name="mVerticalAlignmentComboBox"/>
902
          </item>
903
         </layout>
904
        </widget>
905
       </item>
906
       <item row="3" column="0">
866 907
        <spacer name="verticalSpacer">
867 908
         <property name="orientation">
868 909
          <enum>Qt::Vertical</enum>