[QGIS Commit] r8680 - in branches/advanced_printing_branch/src: app app/composer ui

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Jun 27 11:29:29 EDT 2008


Author: mhugent
Date: 2008-06-27 11:29:28 -0400 (Fri, 27 Jun 2008)
New Revision: 8680

Modified:
   branches/advanced_printing_branch/src/app/CMakeLists.txt
   branches/advanced_printing_branch/src/app/composer/qgscomposeritem.cpp
   branches/advanced_printing_branch/src/app/composer/qgscomposeritem.h
   branches/advanced_printing_branch/src/app/composer/qgscomposerlabel.cpp
   branches/advanced_printing_branch/src/app/composer/qgscomposerlabel.h
   branches/advanced_printing_branch/src/app/composer/qgscomposerscalebar.cpp
   branches/advanced_printing_branch/src/app/composer/qgscomposerscalebar.h
   branches/advanced_printing_branch/src/app/composer/qgscomposerscalebarwidget.cpp
   branches/advanced_printing_branch/src/app/composer/qgscomposerscalebarwidget.h
   branches/advanced_printing_branch/src/ui/qgscomposerscalebarwidgetbase.ui
Log:
More improvements for composer scale bar

Modified: branches/advanced_printing_branch/src/app/CMakeLists.txt
===================================================================
--- branches/advanced_printing_branch/src/app/CMakeLists.txt	2008-06-27 08:55:27 UTC (rev 8679)
+++ branches/advanced_printing_branch/src/app/CMakeLists.txt	2008-06-27 15:29:28 UTC (rev 8680)
@@ -124,9 +124,8 @@
   composer/qgscomposerlabelwidget.h
   composer/qgscomposermap.h
   composer/qgscomposermapwidget.h
-  #composer/qgscomposerpicture.h
+  composer/qgscomposerscalebar.h
   composer/qgscomposerscalebarwidget.h
-  #composer/qgscomposervectorlegend.h
   composer/qgscomposerview.h
   composer/qgscomposeritemgroup.h
   composer/qgscompositionwidget.h

Modified: branches/advanced_printing_branch/src/app/composer/qgscomposeritem.cpp
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposeritem.cpp	2008-06-27 08:55:27 UTC (rev 8679)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposeritem.cpp	2008-06-27 15:29:28 UTC (rev 8680)
@@ -336,12 +336,6 @@
   p->drawRect (QRectF( 0, 0, rect().width(), rect().height()));
 }
 
-double QgsComposerItem::fontPointScaleFactor(const QPainter* p) const
-{
-  double dpiPaintDevice = (p->device()->logicalDpiX() + p->device()->logicalDpiY()) / 2;
-  return (25.4 / dpiPaintDevice / 0.376); //consider 1 point equals 0.376 mm 
-}
-
 void QgsComposerItem::hoverMoveEvent ( QGraphicsSceneHoverEvent * event )
 {
   if(isSelected())

Modified: branches/advanced_printing_branch/src/app/composer/qgscomposeritem.h
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposeritem.h	2008-06-27 08:55:27 UTC (rev 8679)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposeritem.h	2008-06-27 15:29:28 UTC (rev 8680)
@@ -137,9 +137,6 @@
 
     /**Draw background*/
     virtual void drawBackground(QPainter* p);
-
-    /**Scale factor for fonts that are directly drawn to the composer view and specified in points*/
-    double fontPointScaleFactor(const QPainter* p) const;
 };
 
 #endif

Modified: branches/advanced_printing_branch/src/app/composer/qgscomposerlabel.cpp
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposerlabel.cpp	2008-06-27 08:55:27 UTC (rev 8679)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposerlabel.cpp	2008-06-27 15:29:28 UTC (rev 8680)
@@ -32,14 +32,12 @@
     {
       return;
     }
-  
-  //scale font considering resolution of output device and 1 point equals 0.376 mm
-  QFont outputFont(mFont);
-  outputFont.setPointSizeF(mFont.pointSizeF() * fontPointScaleFactor(painter));
 
-  painter->setFont(outputFont);
-  painter->drawText(QRectF(mMargin, mMargin, rect().width(), rect().height()), Qt::AlignLeft, mText, 0);
+  painter->setFont(mFont);
 
+  QFontMetricsF fontSize(mFont);
+  painter->drawText(mMargin, mMargin + fontSize.ascent(), mText);
+
   drawFrame(painter);
   if(isSelected())
     {
@@ -47,19 +45,21 @@
     }
 }
 
-void QgsComposerLabel::setFontSize(double size)
+void QgsComposerLabel::setText(const QString& text)
 {
-  mFont.setPointSizeF(size);
+  mText = text;
+  adjustSizeToText();
 }
 
+void QgsComposerLabel::setFont(const QFont& f)
+{
+  mFont = f;
+  adjustSizeToText();
+}
+
 void QgsComposerLabel::adjustSizeToText()
 {
-  //find out width and hight mText and set bounding box to it
-  QFont scaledFont(mFont);
-  scaledFont.setPointSizeF(mFont.pointSizeF() * (25.4 / 120 / 0.376)); //how to find out the 120 dpi of QGraphicsView?
-
-
-  QFontMetricsF fontInfo(scaledFont);
+  QFontMetricsF fontInfo(mFont);
   setSceneRect(QRectF(transform().dx(), transform().dy(), fontInfo.width(mText) + 2 * mMargin, fontInfo.ascent() + 2 * mMargin));
 }
 

Modified: branches/advanced_printing_branch/src/app/composer/qgscomposerlabel.h
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposerlabel.h	2008-06-27 08:55:27 UTC (rev 8679)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposerlabel.h	2008-06-27 15:29:28 UTC (rev 8680)
@@ -32,10 +32,9 @@
   void adjustSizeToText();
 
   QString text() {return mText;}
-  void setText(const QString& text){mText = text;}
+  void setText(const QString& text);
   QFont font() {return mFont;}
-  void setFont(const QFont& f){mFont = f;}
-  void setFontSize(double size);
+  void setFont(const QFont& f);
   double margin(){return mMargin;}
   void setMargin(double m){mMargin = m;}
  

Modified: branches/advanced_printing_branch/src/app/composer/qgscomposerscalebar.cpp
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposerscalebar.cpp	2008-06-27 08:55:27 UTC (rev 8679)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposerscalebar.cpp	2008-06-27 15:29:28 UTC (rev 8680)
@@ -19,6 +19,7 @@
 #include "qgsrect.h"
 #include <QFontMetricsF>
 #include <QPainter>
+#include <cmath>
 
 QgsComposerScaleBar::QgsComposerScaleBar(QgsComposition* composition): QgsComposerItem(composition), mComposerMap(0), mStyle(QgsComposerScaleBar::Single_Box), mSegmentMM(0.0)
 {
@@ -34,13 +35,16 @@
 {
   //calculate top level of the bar
   QFontMetricsF labelFontMetrics(mFont);
-  double barTopPosition = fontHeight(painter) + mLabelBarSpace;
+  double barTopPosition = fontHeight() + mLabelBarSpace + mBoxContentSpace;
 
   switch(mStyle)
     {
     case QgsComposerScaleBar::Single_Box:
       drawScaleBarSingleBox(painter, barTopPosition);
       break;
+    case QgsComposerScaleBar::Bar_Ticks_Middle:
+      drawScaleBarTicksMiddle(painter, barTopPosition);
+      break;
     default:
       break;
     }
@@ -63,10 +67,28 @@
 
 void QgsComposerScaleBar::setComposerMap(const QgsComposerMap* map)
 {
+  disconnect(mComposerMap, SIGNAL(extentChanged()), this, SLOT(updateSegmentSize()));
+  disconnect(mComposerMap, SIGNAL(destroyed(QObject*)), this, SLOT(invalidateCurrentMap()));
   mComposerMap = map;
+
+  if(!map)
+    {
+      return;
+    }
+
+  connect(mComposerMap, SIGNAL(extentChanged()), this, SLOT(updateSegmentSize()));
+  connect(mComposerMap, SIGNAL(destroyed(QObject*)), this, SLOT(invalidateCurrentMap()));
+  
   refreshSegmentMM();
 }
 
+void QgsComposerScaleBar::invalidateCurrentMap()
+{
+  disconnect(mComposerMap, SIGNAL(extentChanged()), this, SLOT(updateSegmentSize()));
+  disconnect(mComposerMap, SIGNAL(destroyed(QObject*)), this, SLOT(invalidateCurrentMap()));
+  mComposerMap = 0;
+}
+
 void QgsComposerScaleBar::refreshSegmentMM()
 {
   if(mComposerMap)
@@ -84,8 +106,8 @@
 
 void QgsComposerScaleBar::applyDefaultSettings()
 {
-  mNumSegments = 3;
-  mNumSegmentsLeft = 1;
+  mNumSegments = 2;
+  mNumSegmentsLeft = 0;
 
   mNumMapUnitsPerScaleBarUnit = 1.0;
 
@@ -97,8 +119,9 @@
   mPen.setWidthF(1.0);
 
   mBrush.setColor(QColor(0, 0, 0));
+  mBrush.setStyle(Qt::SolidPattern);
 
-  mFont.setPointSizeF(8);
+  mFont.setPointSizeF(4);
 
   mLabelBarSpace = 3.0;
 
@@ -108,8 +131,11 @@
       QRectF composerItemRect = mComposerMap->rect();
       QgsRect composerMapRect = mComposerMap->extent();
 
-      double widthScaleBar = composerItemRect.width() / 5;
-      mNumUnitsPerSegment = composerMapRect.width() / 5 / 4;
+      double proposedScaleBarLength = composerMapRect.width() /4;
+      int powerOf10 = int (pow(10.0, int (log(proposedScaleBarLength) / log(10.0)))); // from scalebar plugin
+      int nPow10 = proposedScaleBarLength / powerOf10;
+      mNumSegments = 2;
+      mNumUnitsPerSegment = (nPow10 / 2) * powerOf10;
     }
 
   refreshSegmentMM();
@@ -126,11 +152,11 @@
   p->save();
   
   QFont labelFont(mFont);
-  labelFont.setPointSizeF(mFont.pointSizeF() * fontPointScaleFactor(p));
+  labelFont.setPointSizeF(mFont.pointSizeF());
 
   p->setFont(labelFont);
 
-  double mCurrentXCoord = mPen.widthF();
+  double mCurrentXCoord = mPen.widthF() + mBoxContentSpace;
 
   //draw labels of the left segments
   for(int i = 0; i < mNumSegmentsLeft; ++i)
@@ -143,11 +169,12 @@
   //draw labels of the right segments
   for(int i = 0; i < mNumSegments; ++i)
     {
-      p->drawText(QPointF(mCurrentXCoord, fontHeight(p)), QString::number(currentLabelNumber / mNumMapUnitsPerScaleBarUnit) + " " + mUnitLabeling);
+      p->drawText(QPointF(mCurrentXCoord, fontHeight() + mBoxContentSpace), QString::number(currentLabelNumber / mNumMapUnitsPerScaleBarUnit));
       mCurrentXCoord += mSegmentMM;
       currentLabelNumber += mNumUnitsPerSegment;
     }
   
+  p->drawText(QPointF(mCurrentXCoord, fontHeight() + mBoxContentSpace), QString::number(currentLabelNumber / mNumMapUnitsPerScaleBarUnit) + " " + mUnitLabeling);
   p->restore();
 }
 
@@ -163,7 +190,7 @@
   //mHeight, mBrush, mPen
   p->setPen(mPen);
 
-  double mCurrentXCoord = mPen.widthF();
+  double mCurrentXCoord = mPen.widthF() + mBoxContentSpace;
 
   bool useColor = true; //alternate brush color/white
 
@@ -205,6 +232,42 @@
   p->restore();
 }
 
+void QgsComposerScaleBar::drawScaleBarTicksMiddle(QPainter* p, double barTopPosition) const
+{
+  if(!p)
+    {
+      return;
+    }
+  
+  p->save();
+
+  //mHeight, mBrush, mPen
+  p->setPen(mPen);
+
+  double mCurrentXCoord = mPen.widthF() + mBoxContentSpace;
+
+  //draw the left segments
+  for(int i = 0; i < mNumSegmentsLeft; ++i)
+    {
+      p->drawLine(mCurrentXCoord, barTopPosition, mCurrentXCoord, barTopPosition + mHeight);
+      p->drawLine(mCurrentXCoord, barTopPosition + mHeight/2, mCurrentXCoord + mSegmentMM / mNumSegmentsLeft, barTopPosition + mHeight/2);
+      mCurrentXCoord += mSegmentMM / mNumSegmentsLeft;
+    }
+
+  p->drawLine(mCurrentXCoord, barTopPosition, mCurrentXCoord, barTopPosition + mHeight);
+  
+  //draw the right segments
+  for(int i = 0; i < mNumSegments; ++i)
+    {
+      p->drawLine(mCurrentXCoord, barTopPosition, mCurrentXCoord, barTopPosition + mHeight);
+      p->drawLine(mCurrentXCoord, barTopPosition + mHeight/2.0, mCurrentXCoord + mSegmentMM, barTopPosition + mHeight/2.0);
+      mCurrentXCoord += mSegmentMM;
+    }
+
+  p->drawLine(mCurrentXCoord, barTopPosition, mCurrentXCoord, barTopPosition + mHeight);
+  p->restore();
+}
+
 void QgsComposerScaleBar::adjustBoxSize()
 {
   int numFullSegments = mNumSegments;
@@ -213,8 +276,16 @@
       ++numFullSegments;
     }
 
-  double width = numFullSegments * mSegmentMM + 2 * mPen.widthF();
-  double height = mHeight + mLabelBarSpace + QFontMetrics(mFont).height();
+  //consider width of largest label
+  double largestLabelNumber = mNumSegments * mNumUnitsPerSegment / mNumMapUnitsPerScaleBarUnit;
+  QString largestLabel = QString::number(largestLabelNumber) + " " + mUnitLabeling;
+  double largestLabelWidth = QFontMetricsF(mFont).width(largestLabel);
+
+  double width = numFullSegments * mSegmentMM + 2 * mPen.widthF() + largestLabelWidth + 2 * mBoxContentSpace;
+  double height = mHeight + mLabelBarSpace + 2 * mBoxContentSpace + QFontMetrics(mFont).height();
+
+  
+
   QRectF sceneBox(transform().dx(), transform().dy(), width, height);
   setSceneRect(sceneBox);
 }
@@ -225,15 +296,19 @@
   QgsComposerItem::update();
 }
 
-double QgsComposerScaleBar::fontHeight(QPainter* p) const
+double QgsComposerScaleBar::fontHeight() const
 {
-  QFont labelFont(mFont);
-  labelFont.setPointSizeF(mFont.pointSizeF() * fontPointScaleFactor(p));
-  QFontMetricsF labelFontMetrics(labelFont);
-  return labelFontMetrics.height();
+  QFontMetricsF labelFontMetrics(mFont);
+  return labelFontMetrics.ascent();
 }
 
+void QgsComposerScaleBar::updateSegmentSize()
+{
+  refreshSegmentMM();
+  update();
+}
 
+
 #if 0
 #include "qgscomposerscalebar.h"
 #include "qgscomposermap.h"

Modified: branches/advanced_printing_branch/src/app/composer/qgscomposerscalebar.h
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposerscalebar.h	2008-06-27 08:55:27 UTC (rev 8679)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposerscalebar.h	2008-06-27 15:29:28 UTC (rev 8680)
@@ -17,14 +17,18 @@
 #define QGSCOMPOSERSCALEBAR_H
 
 #include "qgscomposeritem.h"
+#include <QObject>
 #include <QPen>
 
 class QgsComposerMap;
 
-class QgsComposerScaleBar: public QgsComposerItem
+class QgsComposerScaleBar: public QObject, public QgsComposerItem
 {
- public:
 
+ Q_OBJECT
+ 
+public:
+
   enum Style
     {
       Bar_Ticks_Down,
@@ -71,6 +75,12 @@
   void setComposerMap(const QgsComposerMap* map);
   const QgsComposerMap* composerMap() const {return mComposerMap;}
 
+  double labelBarSpace() const {return mLabelBarSpace;}
+  void setLabelBarSpace(double space){mLabelBarSpace = space;}
+
+  double boxContentSpace() const {return mBoxContentSpace;}
+  void setBoxContentSpace(double space){mBoxContentSpace = space;}
+
   /**Apply default settings (scale bar 1/5 of map item width)*/
   void applyDefaultSettings();
 
@@ -82,6 +92,11 @@
   /**Adjusts box size and calls QgsComposerItem::update()*/
   void update();
 
+ public slots:
+  void updateSegmentSize();
+  /**Sets mCompositionMap to 0 if the map is deleted*/
+  void invalidateCurrentMap();
+
  protected:
 
   /**Reference to composer map object*/
@@ -107,9 +122,13 @@
   double mHeight;
   /**Scalebar style*/
   QgsComposerScaleBar::Style mStyle;
+  
   /**Space between bar and Text labels*/
   double mLabelBarSpace;
 
+  /**Space between content and item box*/
+  double mBoxContentSpace;
+
   /**Width of a segment (in mm)*/
   double mSegmentMM;
 
@@ -123,8 +142,10 @@
    @param barTopPosition Item coordinates of the bar top. Necessary because of Labels*/
   void drawScaleBarSingleBox(QPainter* p, double barTopPosition) const;
 
+  void drawScaleBarTicksMiddle(QPainter* p, double barTopPosition) const;
+
   /**Returns height of font considering font scale factor for the given painter*/
-  double fontHeight(QPainter* p) const;
+  double fontHeight() const;
 };
 
 #endif //QGSCOMPOSERSCALEBAR_H

Modified: branches/advanced_printing_branch/src/app/composer/qgscomposerscalebarwidget.cpp
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposerscalebarwidget.cpp	2008-06-27 08:55:27 UTC (rev 8679)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposerscalebarwidget.cpp	2008-06-27 15:29:28 UTC (rev 8680)
@@ -24,6 +24,10 @@
 QgsComposerScaleBarWidget::QgsComposerScaleBarWidget(QgsComposerScaleBar* scaleBar): QWidget(), mComposerScaleBar(scaleBar)
 {
   setupUi(this);
+
+  mStyleComboBox->insertItem(0, tr("Single_Box"));
+  mStyleComboBox->insertItem(1, tr("Bar_Ticks_Middle"));
+
   setGuiElements(); //set the GUI elements to the state of scaleBar
 }
 
@@ -34,6 +38,9 @@
 
 void QgsComposerScaleBarWidget::refreshMapComboBox()
 {
+  //save the current entry in case it is still present after refresh
+  QString saveCurrentComboText = mMapComboBox->currentText();
+
   mMapComboBox->clear();
 
   if(mComposerScaleBar)
@@ -50,6 +57,17 @@
 	    } 
 	}
     }
+
+  if(mMapComboBox->findText(saveCurrentComboText) == -1)
+    {
+      //the former entry is no longer present. Inform the scalebar about the changed composer map
+      on_mMapComboBox_activated(mMapComboBox->currentText());
+    }
+  else
+    {
+      //the former entry is still present. Make it the current entry again
+      mMapComboBox->setCurrentText(saveCurrentComboText);
+    }
 }
 
 void QgsComposerScaleBarWidget::showEvent ( QShowEvent * event )
@@ -110,6 +128,8 @@
   mLineWidthSpinBox->setValue(mComposerScaleBar->pen().widthF());
   mHeightSpinBox->setValue(mComposerScaleBar->height());
   mMapUnitsPerBarUnitSpinBox->setValue(mComposerScaleBar->numMapUnitsPerScaleBarUnit());
+  mLabelBarSpaceSpinBox->setValue(mComposerScaleBar->labelBarSpace());
+  mBoxSizeSpinBox->setValue(mComposerScaleBar->boxContentSpace());
 
   //map combo box
   if(mComposerScaleBar->composerMap())
@@ -122,6 +142,16 @@
 	}
     }
 
+  //frame
+  if(mComposerScaleBar->frame())
+    {
+      mBoxCheckBox->setCheckState(Qt::Checked);
+    }
+  else
+    {
+      mBoxCheckBox->setCheckState(Qt::Unchecked);
+    }
+
   //Style //todo...
   
   
@@ -244,3 +274,62 @@
   mComposerScaleBar->setNumMapUnitsPerScaleBarUnit(d);
   mComposerScaleBar->update();
 }
+
+void QgsComposerScaleBarWidget::on_mBoxCheckBox_stateChanged(int state)
+{
+  if(!mComposerScaleBar)
+    {
+      return;
+    }
+
+  if(state == Qt::Checked)
+    {
+      mComposerScaleBar->setFrame(true);
+    }
+  else
+    {
+      mComposerScaleBar->setFrame(false);
+    }
+  mComposerScaleBar->update();
+}
+
+void QgsComposerScaleBarWidget::on_mStyleComboBox_currentIndexChanged(const QString& text)
+{
+  if(!mComposerScaleBar)
+    {
+      return;
+    }
+
+  if(text == tr("Single_Box"))
+    {
+      mComposerScaleBar->setStyle(QgsComposerScaleBar::Single_Box);
+    }
+
+  else if(text == tr("Bar_Ticks_Middle"))
+    {
+      mComposerScaleBar->setStyle(QgsComposerScaleBar::Bar_Ticks_Middle);
+    }
+  mComposerScaleBar->update();
+}
+
+void QgsComposerScaleBarWidget::on_mLabelBarSpaceSpinBox_valueChanged(double d)
+{
+  if(!mComposerScaleBar)
+    {
+      return;
+    }
+
+  mComposerScaleBar->setLabelBarSpace(d);
+  mComposerScaleBar->update();
+}
+
+void QgsComposerScaleBarWidget::on_mBoxSizeSpinBox_valueChanged(double d)
+{
+  if(!mComposerScaleBar)
+    {
+      return;
+    }
+
+  mComposerScaleBar->setBoxContentSpace(d);
+  mComposerScaleBar->update();
+}

Modified: branches/advanced_printing_branch/src/app/composer/qgscomposerscalebarwidget.h
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposerscalebarwidget.h	2008-06-27 08:55:27 UTC (rev 8679)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposerscalebarwidget.h	2008-06-27 15:29:28 UTC (rev 8680)
@@ -40,6 +40,10 @@
   void on_mMapUnitsPerBarUnitSpinBox_valueChanged(double d);
   void on_mColorPushButton_clicked();
   void on_mFontButton_clicked();
+  void on_mBoxCheckBox_stateChanged(int state);
+  void on_mStyleComboBox_currentIndexChanged(const QString& text);
+  void on_mLabelBarSpaceSpinBox_valueChanged(double d);
+  void on_mBoxSizeSpinBox_valueChanged(double d);
   
 
  protected:

Modified: branches/advanced_printing_branch/src/ui/qgscomposerscalebarwidgetbase.ui
===================================================================
--- branches/advanced_printing_branch/src/ui/qgscomposerscalebarwidgetbase.ui	2008-06-27 08:55:27 UTC (rev 8679)
+++ branches/advanced_printing_branch/src/ui/qgscomposerscalebarwidgetbase.ui	2008-06-27 15:29:28 UTC (rev 8680)
@@ -6,7 +6,7 @@
     <x>0</x>
     <y>0</y>
     <width>367</width>
-    <height>487</height>
+    <height>575</height>
    </rect>
   </property>
   <property name="sizePolicy" >
@@ -177,6 +177,26 @@
     </widget>
    </item>
    <item row="9" column="0" >
+    <widget class="QLabel" name="mLabelBarSpaceLabel" >
+     <property name="text" >
+      <string>Label space:</string>
+     </property>
+    </widget>
+   </item>
+   <item row="9" column="2" >
+    <widget class="QDoubleSpinBox" name="mLabelBarSpaceSpinBox" />
+   </item>
+   <item row="10" column="0" >
+    <widget class="QLabel" name="mBoxSpaceLabel" >
+     <property name="text" >
+      <string>Box space:</string>
+     </property>
+    </widget>
+   </item>
+   <item row="10" column="2" >
+    <widget class="QDoubleSpinBox" name="mBoxSizeSpinBox" />
+   </item>
+   <item row="11" column="0" >
     <widget class="QPushButton" name="mFontButton" >
      <property name="sizePolicy" >
       <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
@@ -189,14 +209,21 @@
      </property>
     </widget>
    </item>
-   <item row="9" column="2" >
+   <item row="11" column="2" >
     <widget class="QPushButton" name="mColorPushButton" >
      <property name="text" >
       <string>Color...</string>
      </property>
     </widget>
    </item>
-   <item row="10" column="1" >
+   <item row="12" column="0" >
+    <widget class="QCheckBox" name="mBoxCheckBox" >
+     <property name="text" >
+      <string>Box</string>
+     </property>
+    </widget>
+   </item>
+   <item row="13" column="1" >
     <spacer>
      <property name="orientation" >
       <enum>Qt::Vertical</enum>
@@ -204,7 +231,7 @@
      <property name="sizeHint" >
       <size>
        <width>20</width>
-       <height>61</height>
+       <height>21</height>
       </size>
      </property>
     </spacer>



More information about the QGIS-commit mailing list