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

svn_qgis at osgeo.org svn_qgis at osgeo.org
Wed May 28 03:46:59 EDT 2008


Author: mhugent
Date: 2008-05-28 03:46:59 -0400 (Wed, 28 May 2008)
New Revision: 8529

Modified:
   branches/advanced_printing_branch/src/app/composer/qgscomposer.cpp
   branches/advanced_printing_branch/src/app/composer/qgscomposer.h
   branches/advanced_printing_branch/src/app/composer/qgscomposermap.cpp
   branches/advanced_printing_branch/src/app/composer/qgscomposermap.h
   branches/advanced_printing_branch/src/app/composer/qgscomposermapwidget.cpp
   branches/advanced_printing_branch/src/app/composer/qgscomposermapwidget.h
   branches/advanced_printing_branch/src/app/composer/qgscomposition.cpp
   branches/advanced_printing_branch/src/app/composer/qgscomposition.h
   branches/advanced_printing_branch/src/ui/qgscomposerbase.ui
Log:
Improvements with new composer map widget, but not fully functional yet

Modified: branches/advanced_printing_branch/src/app/composer/qgscomposer.cpp
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposer.cpp	2008-05-27 11:42:22 UTC (rev 8528)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposer.cpp	2008-05-28 07:46:59 UTC (rev 8529)
@@ -75,8 +75,6 @@
 
   mCompositionOptionsLayout = new QGridLayout( mCompositionOptionsFrame );
   mCompositionOptionsLayout->setMargin(0);
-  mItemOptionsLayout = new QGridLayout( mItemOptionsFrame );
-  mItemOptionsLayout->setMargin(0);
 
   mCompositionNameComboBox->insertItem( tr("Map 1") );
 
@@ -147,72 +145,52 @@
   }
 }
 
-void QgsComposer::removeWidgetChildren ( QWidget *w )
+void QgsComposer::showCompositionOptions ( QWidget *w ) 
 {
-#ifdef QGISDEBUG
-  std::cout << "QgsComposer::removeWidgetChildren" << std::endl;
-#endif
+  QWidget* currentWidget = mItemStackedWidget->currentWidget();
+  mItemStackedWidget->removeWidget(currentWidget);
+  mItemStackedWidget->addWidget(w);
+}
 
-  const QObjectList ol = mItemOptionsFrame->children();
-  if ( !ol.isEmpty() ) 
-  {
-    QListIterator<QObject*> olit( ol );
-    QObject *ob;
-    while( olit.hasNext() )
+void QgsComposer::showItemOptions(const QgsComposerItem* item)
+{
+  QWidget* currentWidget = mItemStackedWidget->currentWidget();
+
+  if(!item)
     {
-      ob = olit.next();
-      if( ob->isWidgetType() ) 
-      {
-        QWidget *ow = (QWidget *) ob;
+      mItemStackedWidget->removeWidget(currentWidget);
+    }
 
-        // The following line is legacy Qt3, is not supported in Qt4
-        // and can cause a SIGABRT
-        //w->removeChild ( ob );
-        // instead:
-        ow->setParent(0);
-        // TODO: Eventually mItemOptionsFrame should be made
-        // a Qt4 QStackedWidget and all this removeWidgetChildren
-        // shenanigans can alledgedly go away
+  QMap<QgsComposerItem*, QWidget*>::iterator it = mItemWidgetMap.find(const_cast<QgsComposerItem*>(item));
+  if(it == mItemWidgetMap.constEnd())
+    {
+      return;
+    }
 
-        ow->hide();
-      }
+  QWidget* newWidget = it.value();
+  if(!newWidget || newWidget == currentWidget) //bail out if new widget does not exist or is already there
+    {
+      return;
     }
-  }
-}
 
-void QgsComposer::showCompositionOptions ( QWidget *w ) {
-#ifdef QGISDEBUG
-  std::cout << "QgsComposer::showCompositionOptions" << std::endl;
-#endif
-  removeWidgetChildren ( mCompositionOptionsFrame );
-
-  if ( w ) { 
-    w->reparent ( mCompositionOptionsFrame, QPoint(0,0), TRUE );
-    mCompositionOptionsLayout->addWidget( w, 0, 0 );
-  }
+  mItemStackedWidget->addWidget(newWidget);
 }
 
-/*
-void QgsComposer::showItemOptions ( QWidget *w )
+void QgsComposer::addItem(QgsComposerItem* item, QWidget* widget)
 {
-#ifdef QGISDEBUG
-  std::cout << "QgsComposer::showItemOptions" << std::endl;
-#endif
-  removeWidgetChildren ( mItemOptionsFrame );
+  mItemWidgetMap.insert(item, widget);
+}
 
-  // NOTE: It is better to leave there the tab with item options if w is NULL
-
-  if ( w ) {
-    w->reparent ( mItemOptionsFrame, QPoint(0,0), TRUE );
-
-    mItemOptionsLayout->addWidget( w, 0, 0 );
-    mOptionsTabWidget->setCurrentPage (1);
-  }
-  }*/
-
-void QgsComposer::showItemOptions(const QgsComposerItem* i)
+void QgsComposer::removeItem(QgsComposerItem* item)
 {
-  //todo...
+  QMap<QgsComposerItem*, QWidget*>::iterator it = mItemWidgetMap.find(item);
+  if(it != mItemWidgetMap.end())
+    {
+      delete it.value();
+      mView->scene()->removeItem(item);
+      mItemWidgetMap.remove(item);
+      delete item;
+    }
 }
 
 QgsMapCanvas *QgsComposer::mapCanvas(void)

Modified: branches/advanced_printing_branch/src/app/composer/qgscomposer.h
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposer.h	2008-05-27 11:42:22 UTC (rev 8528)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposer.h	2008-05-28 07:46:59 UTC (rev 8529)
@@ -77,7 +77,6 @@
     void showCompositionOptions ( QWidget *w );
     
     //! Show item options in widget
-    //void showItemOptions ( QWidget *w );
     void showItemOptions(const QgsComposerItem* i);
 
     /** \brief stores statei in project */
@@ -95,6 +94,15 @@
     //! Restore the window and toolbar state
     void restoreWindowState();
 
+    /** Adds an item and its configuration widget to the composer.	\
+	QgsComposer takes ownership of these objects and deletes them	\
+	if not needed any more.
+    */
+    void addItem(QgsComposerItem* item, QWidget* widget);
+
+    /**Removes (and deletes) the item and its configuration widget from the composer*/
+    void removeItem(QgsComposerItem* item);
+
     //! Move event
     void moveEvent ( QMoveEvent * );
     
@@ -159,8 +167,6 @@
 private:
     //! Set teh pixmap / icons on the toolbar buttons
     void setupTheme();
-    //! remove widget childrens
-    void removeWidgetChildren ( QWidget *w );
 
     /** \brief move up the content of the file
         \param file file

Modified: branches/advanced_printing_branch/src/app/composer/qgscomposermap.cpp
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposermap.cpp	2008-05-27 11:42:22 UTC (rev 8528)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposermap.cpp	2008-05-28 07:46:59 UTC (rev 8529)
@@ -667,14 +667,16 @@
 
 void QgsComposerMap::resize(double dx, double dy)
 {
-  qWarning("QgsComposerMap::resize");
-  qWarning(QString::number(dx).toLatin1());
-  qWarning(QString::number(dy).toLatin1());
-
   //setRect
   QRectF currentRect = QGraphicsRectItem::rect();
-  setRect(currentRect.x(), currentRect.y(), currentRect.width() + dx, currentRect.height() + dy);
+  QRectF newRect = QRectF(currentRect.x(), currentRect.y(), currentRect.width() + dx, currentRect.height() + dy);
+  setRect(newRect);
+}
 
+void QgsComposerMap::setRect(const QRectF rectangle)
+{
+  QGraphicsRectItem::setRect(rectangle);
   recalculate();
+  emit extentChanged();
 }
 

Modified: branches/advanced_printing_branch/src/app/composer/qgscomposermap.h
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposermap.h	2008-05-27 11:42:22 UTC (rev 8528)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposermap.h	2008-05-28 07:46:59 UTC (rev 8529)
@@ -108,9 +108,17 @@
     /** resizes an item in x- and y direction (canvas coordinates)*/
     void resize(double dx, double dy);
 
+    /**Sets new rect and does recalculate*/
+    void setRect(const QRectF rectangle);
+
     /** \brief Scale */
     double scale ( void );
 
+    Calculate calculationMode() {return mCalculate;}
+    PreviewMode previewMode() {return mPreviewMode;}
+    void setPreviewMode(PreviewMode m) {mPreviewMode = m;}
+    void setCalculationMode(Calculate c) {mCalculate = c;}
+
     // Set cache outdated
     void setCacheUpdated ( bool u = false );
 
@@ -142,6 +150,10 @@
     // Called if map canvas has changed
     void mapCanvasChanged ( );
 
+ signals:
+    /**Is emitted when width/height is changed as a result of user interaction*/
+    void extentChanged();
+
 private:
     // Called by GUI if with or height was changed 
     //void sizeChanged ( void );
@@ -189,7 +201,7 @@
     bool mCacheUpdated;
     
     // Resize schema
-    int mCalculate;
+    Calculate mCalculate;
 
     // Line width scale
     double mWidthScale;

Modified: branches/advanced_printing_branch/src/app/composer/qgscomposermapwidget.cpp
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposermapwidget.cpp	2008-05-27 11:42:22 UTC (rev 8528)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposermapwidget.cpp	2008-05-28 07:46:59 UTC (rev 8529)
@@ -16,13 +16,181 @@
  ***************************************************************************/
 
 #include "qgscomposermapwidget.h"
+#include "qgscomposermap.h"
 
 QgsComposerMapWidget::QgsComposerMapWidget(QgsComposerMap* composerMap): QWidget(), mComposerMap(composerMap)
 {
   setupUi(this);
+  mWidthLineEdit->setValidator(new QDoubleValidator(0));
+  mHeightLineEdit->setValidator(new QDoubleValidator(0));
+  mScaleLineEdit->setValidator(new QDoubleValidator(0));
+
+  mCalculateComboBox->insertItem( 0, tr("Extent (calculate scale)"));
+  mCalculateComboBox->insertItem( 1, tr("Scale (calculate extent)"));
+
+  mPreviewModeComboBox->insertItem(0, tr("Cache"));
+  mPreviewModeComboBox->insertItem(1, tr("Render"));
+  mPreviewModeComboBox->insertItem(2, tr("Rectangle"));
+
+  if(composerMap)
+    {
+      connect(composerMap, SIGNAL(extentChanged()), this, SLOT(updateSettingsNoSignals()));
+    }
+
+  updateGuiElements();
 }
 
 QgsComposerMapWidget::~QgsComposerMapWidget()
 {
   
 }
+
+void QgsComposerMapWidget::on_mWidthLineEdit_editingFinished()
+{
+  if(mComposerMap)
+    {
+      bool conversionSuccess = true;
+      double newWidth = mWidthLineEdit->text().toDouble(&conversionSuccess);
+      if(!conversionSuccess)
+	{
+	  return;
+	}
+      QRectF composerMapRect = mComposerMap->rect();
+      QRectF newRect(composerMapRect.x(), composerMapRect.y(), newWidth, composerMapRect.height());
+      mComposerMap->setRect(newRect);
+    }
+}
+
+void QgsComposerMapWidget::on_mHeightLineEdit_editingFinished()
+{
+  if(mComposerMap)
+    {
+      bool conversionSuccess = true;
+      double newHeight = mHeightLineEdit->text().toDouble(&conversionSuccess);
+      if(!conversionSuccess)
+	{
+	  return;
+	}
+      QRectF composerMapRect = mComposerMap->rect();
+      mComposerMap->resize(composerMapRect.width(), newHeight);
+    }
+}
+
+void QgsComposerMapWidget::on_mPreviewModeComboBox_activated(int i)
+{
+  if(!mComposerMap)
+    {
+      return;
+    }
+
+  QString comboText = mPreviewModeComboBox->currentText();
+  if(comboText == tr("Cache"))
+    {
+      mComposerMap->setPreviewMode(QgsComposerMap::Cache);
+    }
+  else if(comboText == tr("Render"))
+    {
+      mComposerMap->setPreviewMode(QgsComposerMap::Render);
+    }
+  else if(comboText == tr("Rectangle"))
+    {
+      mComposerMap->setPreviewMode(QgsComposerMap::Rectangle);
+    }
+}
+
+void QgsComposerMapWidget::on_mCalculateComboBox_activated(int i)
+{
+  if(!mComposerMap)
+    {
+      return;
+    }
+  
+  QString comboText = mCalculateComboBox->currentText();
+  if(comboText == tr("Extent (calculate scale)"))
+    {
+      mComposerMap->setCalculationMode(QgsComposerMap::Scale);
+      mHeightLineEdit->setEnabled(true);
+      mWidthLineEdit->setEnabled(true);
+      mScaleLineEdit->setEnabled(false);
+    }
+  else if(comboText == tr("Scale (calculate extent)"))
+    {
+      mComposerMap->setCalculationMode(QgsComposerMap::Extent);
+      mHeightLineEdit->setEnabled(false);
+      mWidthLineEdit->setEnabled(false);
+      mScaleLineEdit->setEnabled(true);
+    }
+}
+
+void QgsComposerMapWidget::updateSettingsNoSignals()
+{
+  mHeightLineEdit->blockSignals(true);
+  mWidthLineEdit->blockSignals(true);
+  mScaleLineEdit->blockSignals(true);
+  mCalculateComboBox->blockSignals(true);
+  mPreviewModeComboBox->blockSignals(true);
+
+  updateGuiElements();
+  
+  mHeightLineEdit->blockSignals(false);
+  mWidthLineEdit->blockSignals(false);
+  mScaleLineEdit->blockSignals(false);
+  mCalculateComboBox->blockSignals(false);
+  mPreviewModeComboBox->blockSignals(false);
+}
+
+void QgsComposerMapWidget::updateGuiElements()
+{
+  if(mComposerMap)
+    {
+      //width, height, scale
+      QRectF composerMapRect = mComposerMap->rect();
+      mWidthLineEdit->setText(QString::number(composerMapRect.width()));
+      mHeightLineEdit->setText(QString::number(composerMapRect.height()));
+      mScaleLineEdit->setText(QString::number(mComposerMap->scale()));
+
+      //calculation mode
+      QgsComposerMap::Calculate calculationMode = mComposerMap->calculationMode();
+      int index = -1;
+      if(calculationMode == QgsComposerMap::Scale)
+	{
+	  index = mCalculateComboBox->findText(tr("Extent (calculate scale)"));
+	  mHeightLineEdit->setEnabled(true);
+	  mWidthLineEdit->setEnabled(true);
+	  mScaleLineEdit->setEnabled(false);
+	}
+      else if(calculationMode == QgsComposerMap::Extent)
+	{
+	  index = mCalculateComboBox->findText(tr("Scale (calculate extent)"));
+	  mHeightLineEdit->setEnabled(true);
+	  mWidthLineEdit->setEnabled(true);
+	  mScaleLineEdit->setEnabled(false);
+	}
+      if(index != -1)
+	{
+	  mCalculateComboBox->setCurrentIndex(index);
+	}
+
+      //preview mode
+      QgsComposerMap::PreviewMode previewMode = mComposerMap->previewMode();
+      index = -1;
+      if(previewMode == QgsComposerMap::Cache)
+	{
+	  index = mPreviewModeComboBox->findText(tr("Cache"));
+	}
+      else if(previewMode == QgsComposerMap::Render)
+	{
+	  index = mPreviewModeComboBox->findText(tr("Render"));
+	}
+      else if(previewMode == QgsComposerMap::Rectangle)
+	{
+	  index = mPreviewModeComboBox->findText(tr("Rectangle"));
+	}
+      if(index != -1)
+	{
+	  mPreviewModeComboBox->setCurrentIndex(index);
+	}
+    }
+}
+
+

Modified: branches/advanced_printing_branch/src/app/composer/qgscomposermapwidget.h
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposermapwidget.h	2008-05-27 11:42:22 UTC (rev 8528)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposermapwidget.h	2008-05-28 07:46:59 UTC (rev 8529)
@@ -32,8 +32,20 @@
   QgsComposerMapWidget(QgsComposerMap* composerMap);
   ~QgsComposerMapWidget();
 
+  public slots:
+  void on_mWidthLineEdit_editingFinished();
+  void on_mHeightLineEdit_editingFinished();
+  void on_mPreviewModeComboBox_activated(int i);
+  void on_mCalculateComboBox_activated(int i);
+
+  /**Updates width and height without notify the composer map (to avoid infinite recursion)*/
+  void updateSettingsNoSignals();
+
     private:
   QgsComposerMap* mComposerMap;
+
+  /**Sets the current composer map values to the GUI elements*/
+  void updateGuiElements();
 };
 
 #endif

Modified: branches/advanced_printing_branch/src/app/composer/qgscomposition.cpp
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposition.cpp	2008-05-27 11:42:22 UTC (rev 8528)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposition.cpp	2008-05-28 07:46:59 UTC (rev 8529)
@@ -22,6 +22,7 @@
 #include "qgscomposerlabel.h"
 
 #include "qgscomposermap.h"
+#include "qgscomposermapwidget.h"
 #include "qgscomposerpicture.h"
 #include "qgscomposerscalebar.h"
 #include "qgscomposervectorlegend.h"
@@ -201,20 +202,10 @@
 
 QgsComposition::~QgsComposition()
 {
-#ifdef QGISDEBUG
-  std::cerr << "QgsComposition::~QgsComposition" << std::endl;
-#endif
   mView->setScene ( 0 );
 
-  if ( mPaperItem ) delete mPaperItem;
-
-  for (std::list < QgsComposerItem * >::iterator it = mItems.begin(); 
-      it != mItems.end(); ++it) 
-  {
-    delete *it;
-  }
-
-  if ( mCanvas ) delete mCanvas;
+  delete mPaperItem;
+  delete mCanvas;
 }
 
 QgsMapCanvas *QgsComposition::mapCanvas(void) { return mMapCanvas; }
@@ -259,8 +250,9 @@
 	    if(selectedItem != mSelectedItem)
 	      {
 		mSelectedItem->setSelected(false);
-		//mComposer->showItemOptions(selectedItem->options()); //todo: separate items from input widgets
 		mSelectedItem = selectedItem;
+		mCanvas->update();
+		mComposer->showItemOptions(selectedItem);
 	      }
 	  }
 	break;
@@ -457,23 +449,28 @@
 
 	QgsComposerMap* m = 0;
 
-        if ( w > 0 && h > 0 ) {
-          mComposer->selectItem(); // usually just one map
+        if ( w > 0 && h > 0 ) 
+	  {
+	    mComposer->selectItem(); // usually just one map
 
-          m = new QgsComposerMap ( this, mNextItemId++, x, y, w, h );
+	    m = new QgsComposerMap ( this, mNextItemId++, x, y, w, h );
+	    QgsComposerMapWidget* w = new QgsComposerMapWidget(m);
+	    mComposer->addItem(m, w);
 
-          m->setPos(x, y);
+	    m->setPos(x, y);
 
-          m->setUserExtent( mMapCanvas->extent());
-          mItems.push_back(m);
-          m->setSelected ( true );
-
-          mComposer->showItemOptions ( m->options() );
-          mSelectedItem = dynamic_cast <QGraphicsItem *> (m);
-        } else {
-          mToolStep = 0;
-        }
-        mCanvas->update();
+	    m->setUserExtent( mMapCanvas->extent());
+	    mItems.push_back(m);
+	    m->setSelected ( true );
+	    mCanvas->update();
+	    mComposer->showItemOptions(m);
+	    mSelectedItem = m;
+	  } 
+	else 
+	  {
+	    mToolStep = 0;
+	  }
+        //mCanvas->update();
         mView->unsetCursor();
       }
       break;
@@ -544,17 +541,7 @@
   if ( e->key() == Qt::Key_Delete) { // delete
 
     QgsComposerItem *coi = dynamic_cast <QgsComposerItem *> (mSelectedItem);
-    coi->setSelected ( false );
-    coi->removeSettings();
-    for (std::list < QgsComposerItem * >::iterator it = mItems.begin(); 
-        it != mItems.end(); ++it) 
-    {
-      if ( (*it) == coi ) {
-        mItems.erase ( it );
-        break;
-      }
-    }
-    delete (mSelectedItem);
+    mComposer->removeItem(coi);
     mSelectedItem = 0;
     mCanvas->update();
   }
@@ -727,7 +714,7 @@
     mCanvas->update();
   }
   mSelectedItem = 0;
-  mComposer->showItemOptions ( (QWidget *) 0 );
+  mComposer->showItemOptions (0);
 
   if ( mNewCanvasItem ) {
     mNewCanvasItem->setPos(-1000, -1000);
@@ -749,7 +736,7 @@
     // Create new object outside the visible area
     QgsComposerVectorLegend *vl = new QgsComposerVectorLegend ( this, mNextItemId++, -1000, -1000, (int) (mPaperHeight/50));
     mNewCanvasItem = dynamic_cast <QGraphicsItem *> (vl);
-    mComposer->showItemOptions ( vl->options() );
+    mComposer->showItemOptions(vl);
 
     mView->viewport()->setMouseTracking ( true ); // to recieve mouse move
 
@@ -761,7 +748,7 @@
     QgsComposerLabel *lab = new QgsComposerLabel ( this, mNextItemId++, -1000, -1000, tr("Label"), (int) (mPaperHeight/20));
 
     mNewCanvasItem = dynamic_cast <QGraphicsItem *> (lab);
-    mComposer->showItemOptions ( lab->options() );
+    mComposer->showItemOptions(lab);
 
     mView->viewport()->setMouseTracking ( true ); // to recieve mouse move
   }
@@ -771,7 +758,7 @@
     // Create new object outside the visible area
     QgsComposerScalebar *sb = new QgsComposerScalebar ( this, mNextItemId++, -1000, -1000);
     mNewCanvasItem = dynamic_cast <QGraphicsItem*> (sb);
-    mComposer->showItemOptions ( sb->options() );
+    mComposer->showItemOptions(sb);
 
     mView->viewport()->setMouseTracking ( true ); // to recieve mouse move
   }
@@ -801,7 +788,7 @@
   	    std::cout << "picture is valid" << std::endl;
 #endif
 	    mNewCanvasItem = dynamic_cast <QGraphicsItem *> (pi);
-	    mComposer->showItemOptions ( pi->options() );
+	    mComposer->showItemOptions(pi);
 
 	    mView->viewport()->setMouseTracking ( true ); // start tracking the mouse
         break; //quit the loop

Modified: branches/advanced_printing_branch/src/app/composer/qgscomposition.h
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposition.h	2008-05-27 11:42:22 UTC (rev 8528)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposition.h	2008-05-28 07:46:59 UTC (rev 8529)
@@ -145,9 +145,6 @@
     /** \brief pointer to composer */
     QgsComposer *composer(void);
 
-    // Return pointer to widget with composition options 
-    //QWidget *options ( void );
-
     /** \brief Set this composition as active, show its canvas with items and show general options */
     void setActive ( bool active );
 

Modified: branches/advanced_printing_branch/src/ui/qgscomposerbase.ui
===================================================================
--- branches/advanced_printing_branch/src/ui/qgscomposerbase.ui	2008-05-27 11:42:22 UTC (rev 8528)
+++ branches/advanced_printing_branch/src/ui/qgscomposerbase.ui	2008-05-28 07:46:59 UTC (rev 8529)
@@ -14,12 +14,21 @@
   </property>
   <widget class="QWidget" name="centralwidget" >
    <layout class="QVBoxLayout" >
-    <property name="margin" >
-     <number>9</number>
-    </property>
     <property name="spacing" >
      <number>6</number>
     </property>
+    <property name="leftMargin" >
+     <number>9</number>
+    </property>
+    <property name="topMargin" >
+     <number>9</number>
+    </property>
+    <property name="rightMargin" >
+     <number>9</number>
+    </property>
+    <property name="bottomMargin" >
+     <number>9</number>
+    </property>
     <item>
      <widget class="QSplitter" name="mSplitter" >
       <property name="orientation" >
@@ -35,9 +44,7 @@
       </widget>
       <widget class="QTabWidget" name="mOptionsTabWidget" >
        <property name="sizePolicy" >
-        <sizepolicy>
-         <hsizetype>7</hsizetype>
-         <vsizetype>7</vsizetype>
+        <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
@@ -55,19 +62,31 @@
         </size>
        </property>
        <property name="currentIndex" >
-        <number>0</number>
+        <number>1</number>
        </property>
        <widget class="QWidget" name="tab" >
         <attribute name="title" >
          <string>General</string>
         </attribute>
         <layout class="QGridLayout" >
-         <property name="margin" >
+         <property name="leftMargin" >
           <number>9</number>
          </property>
-         <property name="spacing" >
+         <property name="topMargin" >
+          <number>9</number>
+         </property>
+         <property name="rightMargin" >
+          <number>9</number>
+         </property>
+         <property name="bottomMargin" >
+          <number>9</number>
+         </property>
+         <property name="horizontalSpacing" >
           <number>6</number>
          </property>
+         <property name="verticalSpacing" >
+          <number>6</number>
+         </property>
          <item row="1" column="0" colspan="2" >
           <widget class="QFrame" name="mCompositionOptionsFrame" >
            <property name="frameShape" >
@@ -84,9 +103,7 @@
             <bool>false</bool>
            </property>
            <property name="sizePolicy" >
-            <sizepolicy>
-             <hsizetype>7</hsizetype>
-             <vsizetype>0</vsizetype>
+            <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
              <horstretch>0</horstretch>
              <verstretch>0</verstretch>
             </sizepolicy>
@@ -96,9 +113,7 @@
          <item row="0" column="0" >
           <widget class="QLabel" name="textLabel1" >
            <property name="sizePolicy" >
-            <sizepolicy>
-             <hsizetype>7</hsizetype>
-             <vsizetype>5</vsizetype>
+            <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
              <horstretch>0</horstretch>
              <verstretch>0</verstretch>
             </sizepolicy>
@@ -115,20 +130,28 @@
          <string>Item</string>
         </attribute>
         <layout class="QGridLayout" >
-         <property name="margin" >
+         <property name="leftMargin" >
           <number>9</number>
          </property>
-         <property name="spacing" >
+         <property name="topMargin" >
+          <number>9</number>
+         </property>
+         <property name="rightMargin" >
+          <number>9</number>
+         </property>
+         <property name="bottomMargin" >
+          <number>9</number>
+         </property>
+         <property name="horizontalSpacing" >
           <number>6</number>
          </property>
+         <property name="verticalSpacing" >
+          <number>6</number>
+         </property>
          <item row="0" column="0" >
-          <widget class="QFrame" name="mItemOptionsFrame" >
-           <property name="frameShape" >
-            <enum>QFrame::StyledPanel</enum>
-           </property>
-           <property name="frameShadow" >
-            <enum>QFrame::Raised</enum>
-           </property>
+          <widget class="QStackedWidget" name="mItemStackedWidget" >
+           <widget class="QWidget" name="page" />
+           <widget class="QWidget" name="page_2" />
           </widget>
          </item>
         </layout>
@@ -138,12 +161,21 @@
     </item>
     <item>
      <layout class="QHBoxLayout" >
-      <property name="margin" >
-       <number>0</number>
-      </property>
       <property name="spacing" >
        <number>6</number>
       </property>
+      <property name="leftMargin" >
+       <number>0</number>
+      </property>
+      <property name="topMargin" >
+       <number>0</number>
+      </property>
+      <property name="rightMargin" >
+       <number>0</number>
+      </property>
+      <property name="bottomMargin" >
+       <number>0</number>
+      </property>
       <item>
        <widget class="QPushButton" name="helpPButton" >
         <property name="text" >
@@ -180,8 +212,11 @@
     <enum>Qt::Horizontal</enum>
    </property>
    <attribute name="toolBarArea" >
-    <number>4</number>
+    <enum>TopToolBarArea</enum>
    </attribute>
+   <attribute name="toolBarBreak" >
+    <bool>false</bool>
+   </attribute>
    <addaction name="mActionOpenTemplate" />
    <addaction name="mActionSaveTemplateAs" />
    <addaction name="mActionExportAsImage" />



More information about the QGIS-commit mailing list