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

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue May 27 04:22:32 EDT 2008


Author: mhugent
Date: 2008-05-27 04:22:31 -0400 (Tue, 27 May 2008)
New Revision: 8527

Added:
   branches/advanced_printing_branch/src/app/composer/qgscomposermapwidget.cpp
   branches/advanced_printing_branch/src/app/composer/qgscomposermapwidget.h
   branches/advanced_printing_branch/src/ui/qgscomposermapwidgetbase.ui
Removed:
   branches/advanced_printing_branch/src/ui/qgscomposermapbase.ui
Modified:
   branches/advanced_printing_branch/src/app/CMakeLists.txt
   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/qgscomposition.cpp
   branches/advanced_printing_branch/src/ui/CMakeLists.txt
Log:
Started separation of composer items from widget. Deactivated all elements besides map for now

Modified: branches/advanced_printing_branch/src/app/CMakeLists.txt
===================================================================
--- branches/advanced_printing_branch/src/app/CMakeLists.txt	2008-05-26 16:16:05 UTC (rev 8526)
+++ branches/advanced_printing_branch/src/app/CMakeLists.txt	2008-05-27 08:22:31 UTC (rev 8527)
@@ -69,6 +69,7 @@
   composer/qgscomposerlabel.cpp
   composer/qgscomposerpicture.cpp
   composer/qgscomposermap.cpp
+  composer/qgscomposermapwidget.cpp
   composer/qgscomposerscalebar.cpp
   composer/qgscomposervectorlegend.cpp
   composer/qgscomposerview.cpp
@@ -126,8 +127,9 @@
 
   composer/qgscomposer.h
   composer/qgscomposerlabel.h
+  composer/qgscomposermap.h
+  composer/qgscomposermapwidget.h
   composer/qgscomposerpicture.h
-  composer/qgscomposermap.h
   composer/qgscomposerscalebar.h
   composer/qgscomposervectorlegend.h
   composer/qgscomposerview.h

Modified: branches/advanced_printing_branch/src/app/composer/qgscomposer.cpp
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposer.cpp	2008-05-26 16:16:05 UTC (rev 8526)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposer.cpp	2008-05-27 08:22:31 UTC (rev 8527)
@@ -192,6 +192,7 @@
   }
 }
 
+/*
 void QgsComposer::showItemOptions ( QWidget *w )
 {
 #ifdef QGISDEBUG
@@ -207,6 +208,11 @@
     mItemOptionsLayout->addWidget( w, 0, 0 );
     mOptionsTabWidget->setCurrentPage (1);
   }
+  }*/
+
+void QgsComposer::showItemOptions(const QgsComposerItem* i)
+{
+  //todo...
 }
 
 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-26 16:16:05 UTC (rev 8526)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposer.h	2008-05-27 08:22:31 UTC (rev 8527)
@@ -18,6 +18,7 @@
 #ifndef QGSCOMPOSER_H
 #define QGSCOMPOSER_H
 #include "ui_qgscomposerbase.h"
+#include "qgscomposeritem.h"
 
 class QgisApp;
 class QgsComposerView;
@@ -76,7 +77,8 @@
     void showCompositionOptions ( QWidget *w );
     
     //! Show item options in widget
-    void showItemOptions ( QWidget *w );
+    //void showItemOptions ( QWidget *w );
+    void showItemOptions(const QgsComposerItem* i);
 
     /** \brief stores statei in project */
     bool writeSettings ( void );
@@ -197,6 +199,9 @@
     //! Size grip
     QSizeGrip *mSizeGrip;
 
+    //! To know which item to show if selection changes
+    QMap<QgsComposerItem*, QWidget*> mItemWidgetMap;
+
     //! Help context id
     static const int context_id = 985715179;
 

Modified: branches/advanced_printing_branch/src/app/composer/qgscomposermap.cpp
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposermap.cpp	2008-05-26 16:16:05 UTC (rev 8526)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposermap.cpp	2008-05-27 08:22:31 UTC (rev 8527)
@@ -41,12 +41,12 @@
 #endif
 
 QgsComposerMap::QgsComposerMap ( QgsComposition *composition, int id, int x, int y, int width, int height )
-    : QWidget(), QgsComposerItem(0,0,width,height,0)
+  : /*QWidget(),*/ QgsComposerItem(0,0,width,height,0)
 {
 #ifdef QGISDEBUG
     std::cout << "QgsComposerMap::QgsComposerMap()" << std::endl;
 #endif
-    setupUi(this);
+    //setupUi(this);
 
     mComposition = composition;
     mId = id;
@@ -68,7 +68,7 @@
 QgsComposerMap::QgsComposerMap ( QgsComposition *composition, int id )
     : QgsComposerItem(0,0,10,10,0)
 {
-    setupUi(this);
+  //setupUi(this);
 
     mComposition = composition;
     mId = id;
@@ -95,18 +95,18 @@
     mCacheUpdated = false;
 
     // Calculate
-    mCalculateComboBox->insertItem( tr("Extent (calculate scale)"), Scale );
-    mCalculateComboBox->insertItem( tr("Scale (calculate extent)"), Extent );
+    //mCalculateComboBox->insertItem( tr("Extent (calculate scale)"), Scale );
+    //mCalculateComboBox->insertItem( tr("Scale (calculate extent)"), Extent );
     mCalculate = Scale;
 
     setPlotStyle ( QgsComposition::Preview );
     
     // Preview style
     mPreviewMode = Cache;
-    mPreviewModeComboBox->insertItem ( tr("Cache"), Cache );
-    mPreviewModeComboBox->insertItem ( tr("Render"), Render );
-    mPreviewModeComboBox->insertItem ( tr("Rectangle"), Rectangle );
-    mPreviewModeComboBox->setCurrentItem ( Cache );
+    //mPreviewModeComboBox->insertItem ( tr("Cache"), Cache );
+    //mPreviewModeComboBox->insertItem ( tr("Render"), Render );
+    //mPreviewModeComboBox->insertItem ( tr("Rectangle"), Rectangle );
+    //mPreviewModeComboBox->setCurrentItem ( Cache );
 
     mWidthScale = 1.0 / mComposition->scale();
     mSymbolScale = 0.5;
@@ -290,6 +290,7 @@
   mDrawing = false;
 }
 
+/*
 void QgsComposerMap::sizeChanged ( void ) 
 {
     int w, h;
@@ -303,8 +304,9 @@
     QGraphicsRectItem::scene()->update();
     
     writeSettings();
-}
+    }*/
 
+/*
 void QgsComposerMap::on_mWidthLineEdit_editingFinished ( void ) { sizeChanged(); }
 void QgsComposerMap::on_mHeightLineEdit_editingFinished ( void ) { sizeChanged(); }
 
@@ -321,7 +323,7 @@
     }
     setOptions();
     writeSettings();
-}
+    }*/
 
 double QgsComposerMap::scaleFromUserScale ( double us ) 
 {
@@ -362,6 +364,7 @@
   return us;
 }
 
+/*
 void QgsComposerMap::on_mScaleLineEdit_editingFinished()
 {
 #ifdef QGISDEBUG
@@ -381,8 +384,9 @@
     
     writeSettings();
     mComposition->emitMapChanged ( mId );
-}
+    }*/
 
+ /*
 void QgsComposerMap::scaleChanged ( void ) 
 {
     mWidthScale = mWidthScaleLineEdit->text().toDouble();
@@ -395,11 +399,13 @@
     
     writeSettings();
     mComposition->emitMapChanged ( mId );
-}
+    }*/
 
+/*
 void QgsComposerMap::on_mFontScaleLineEdit_editingFinished ( void ) { scaleChanged(); }
 void QgsComposerMap::on_mSymbolScaleLineEdit_editingFinished ( void ) { scaleChanged(); }
 void QgsComposerMap::on_mWidthScaleLineEdit_editingFinished ( void ) { scaleChanged(); }
+*/
 
 void QgsComposerMap::mapCanvasChanged ( void ) 
 {
@@ -410,11 +416,12 @@
     QGraphicsRectItem::update();
 }
 
+/*
 void QgsComposerMap::on_mPreviewModeComboBox_activated ( int i )
 {
     mPreviewMode = (PreviewMode) i;
     writeSettings();
-}
+    }*/
 
 void QgsComposerMap::recalculate ( void ) 
 {
@@ -469,10 +476,11 @@
   std::cout << "mExtent = " << mExtent.stringRep().toLocal8Bit().data() << std::endl;
 #endif
 
-  setOptions();
+  //setOptions();
   mCacheUpdated = false;
 }
 
+/*
 void QgsComposerMap::on_mFrameCheckBox_clicked ( )
 {
     mFrame = mFrameCheckBox->isChecked();
@@ -480,37 +488,37 @@
     QGraphicsRectItem::scene()->update();
 
     writeSettings();
-}
+    }*/
 
-
+ /*
 void QgsComposerMap::setOptions ( void )
 {
 #ifdef QGISDEBUG
   std::cout << "QgsComposerMap::setOptions" << std::endl;
 #endif
     
-  mNameLabel->setText ( mName );
+  //mNameLabel->setText ( mName );
     
-  mCalculateComboBox->setCurrentItem( mCalculate );
+  //mCalculateComboBox->setCurrentItem( mCalculate );
     
-  mWidthLineEdit->setText ( QString("%1").arg( mComposition->toMM((int)QGraphicsRectItem::rect().width()), 0,'g') );
-  mHeightLineEdit->setText ( QString("%1").arg( mComposition->toMM((int)QGraphicsRectItem::rect().height()),0,'g') );
+  //mWidthLineEdit->setText ( QString("%1").arg( mComposition->toMM((int)QGraphicsRectItem::rect().width()), 0,'g') );
+  //mHeightLineEdit->setText ( QString("%1").arg( mComposition->toMM((int)QGraphicsRectItem::rect().height()),0,'g') );
     
   // Scale
   switch ( mComposition->mapCanvas()->mapUnits() ) {
     case QGis::METERS :
     case QGis::FEET :
-      mScaleLineEdit->setText ( QString("%1").arg((int)mUserScale) );
+      //mScaleLineEdit->setText ( QString("%1").arg((int)mUserScale) );
       break;
     case QGis::DEGREES :
     case QGis::UNKNOWN :
-      mScaleLineEdit->setText ( QString("%1").arg(mUserScale,0,'f') );
+      //mScaleLineEdit->setText ( QString("%1").arg(mUserScale,0,'f') );
       break;
   }
   if ( mCalculate == Scale ) {
-    mScaleLineEdit->setEnabled(false);  
+    //mScaleLineEdit->setEnabled(false);  
   } else {
-    mScaleLineEdit->setEnabled(true); 
+    //mScaleLineEdit->setEnabled(true); 
   }
     
   mWidthScaleLineEdit->setText ( QString("%1").arg(mWidthScale,0,'g',2) );
@@ -520,8 +528,9 @@
   mFrameCheckBox->setChecked ( mFrame );
     
   mPreviewModeComboBox->setCurrentItem( mPreviewMode );
-}
+  }*/
 
+/*
 void QgsComposerMap::on_mSetCurrentExtentButton_clicked ( void )
 { 
     mUserExtent = mMapCanvas->extent();
@@ -531,7 +540,7 @@
     setOptions();
     writeSettings();
     mComposition->emitMapChanged ( mId );
-}
+    }*/
 
 bool QgsComposerMap::selected( void )
 {
@@ -547,7 +556,7 @@
 
 QWidget *QgsComposerMap::options ( void )
 {
-    setOptions ();
+  //setOptions ();
     return ( dynamic_cast <QWidget *> (this) );
 }
 

Modified: branches/advanced_printing_branch/src/app/composer/qgscomposermap.h
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposermap.h	2008-05-26 16:16:05 UTC (rev 8526)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposermap.h	2008-05-27 08:22:31 UTC (rev 8527)
@@ -17,10 +17,11 @@
 #ifndef QGSCOMPOSERMAP_H
 #define QGSCOMPOSERMAP_H
 
-#include "ui_qgscomposermapbase.h"
+//#include "ui_qgscomposermapbase.h"
 #include "qgscomposeritem.h"
 #include "qgsrect.h"
 #include <QGraphicsRectItem>
+#include <QObject>
 #include <QPixmap>
 
 class QgsComposition;
@@ -34,9 +35,9 @@
  *  \brief Object representing map window. 
  */
 // NOTE: QgsComposerMapBase must be first, otherwise does not compile
-class QgsComposerMap : public QWidget, private Ui::QgsComposerMapBase, public QgsComposerItem
+class QgsComposerMap : /*public QWidget , private Ui::QgsComposerMapBase,*/ public QObject, public QgsComposerItem
 {
-    Q_OBJECT
+  Q_OBJECT
 
 public:
     /** Constructor. */
@@ -90,7 +91,7 @@
     void cache ( void );
 
     /** \brief Set values in GUI to current values */
-    void setOptions ( void );
+    //void setOptions ( void );
     
     /** \brief Map name, used in legend combobox etc. */
     QString name ( void );
@@ -115,38 +116,38 @@
 
 public slots:
     // Called by GUI if with or height was changed 
-    void on_mWidthLineEdit_editingFinished ( void );
-    void on_mHeightLineEdit_editingFinished ( void );
+    //void on_mWidthLineEdit_editingFinished ( void );
+    //void on_mHeightLineEdit_editingFinished ( void );
 
     // Set User extent to current map extent
-    void on_mSetCurrentExtentButton_clicked ( void );
+    //void on_mSetCurrentExtentButton_clicked ( void );
 
     // Called by GUI if calculate has changed 
-    void on_mCalculateComboBox_activated ( int i );
+    //void on_mCalculateComboBox_activated ( int i );
 
     // Called by GUI if map scale has changed 
-    void on_mScaleLineEdit_editingFinished ( void );
+    //void on_mScaleLineEdit_editingFinished ( void );
 
     // Called by GUI if with  scale was changed 
-    void on_mFontScaleLineEdit_editingFinished ( void );
-    void on_mSymbolScaleLineEdit_editingFinished ( void );
-    void on_mWidthScaleLineEdit_editingFinished ( void );
+    //void on_mFontScaleLineEdit_editingFinished ( void );
+    //void on_mSymbolScaleLineEdit_editingFinished ( void );
+    //void on_mWidthScaleLineEdit_editingFinished ( void );
 
     // Frame settings changed 
-    void on_mFrameCheckBox_clicked ( void );
+    //void on_mFrameCheckBox_clicked ( void );
 
     // Called by GUI if preview style was changed
-    void on_mPreviewModeComboBox_activated ( int i );
+    //void on_mPreviewModeComboBox_activated ( int i );
 
     // Called if map canvas has changed
     void mapCanvasChanged ( );
 
 private:
     // Called by GUI if with or height was changed 
-    void sizeChanged ( void );
+    //void sizeChanged ( void );
     
     // Called by GUI if with  scale was changed 
-    void scaleChanged ( void );
+    //void scaleChanged ( void );
 
     // Pointer to composition
     QgsComposition *mComposition;

Added: branches/advanced_printing_branch/src/app/composer/qgscomposermapwidget.cpp
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposermapwidget.cpp	                        (rev 0)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposermapwidget.cpp	2008-05-27 08:22:31 UTC (rev 8527)
@@ -0,0 +1,28 @@
+/***************************************************************************
+                         qgscomposermapwidget.cpp
+                         ------------------------
+    begin                : May 26, 2008
+    copyright            : (C) 2008 by Marco Hugentobler
+    email                : marco dot hugentobler at karto dot baug dot ethz dot ch
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ ***************************************************************************/
+
+#include "qgscomposermapwidget.h"
+
+QgsComposerMapWidget::QgsComposerMapWidget(QgsComposerMap* composerMap): QWidget(), mComposerMap(composerMap)
+{
+  setupUi(this);
+}
+
+QgsComposerMapWidget::~QgsComposerMapWidget()
+{
+  
+}

Added: branches/advanced_printing_branch/src/app/composer/qgscomposermapwidget.h
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposermapwidget.h	                        (rev 0)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposermapwidget.h	2008-05-27 08:22:31 UTC (rev 8527)
@@ -0,0 +1,39 @@
+/***************************************************************************
+                         qgscomposermapwidget.h
+                         ----------------------
+    begin                : May 26, 2008
+    copyright            : (C) 2008 by Marco Hugentobler
+    email                : marco dot hugentobler at karto dot baug dot ethz dot ch
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ ***************************************************************************/
+
+#ifndef QGSCOMPOSERMAPWIDGET_H
+#define QGSCOMPOSERMAPWIDGET_H
+
+#include "ui_qgscomposermapwidgetbase.h"
+
+class QgsComposerMap;
+
+/**Input widget for the configuration of QgsComposerMap*/
+class QgsComposerMapWidget: public QWidget, private Ui::QgsComposerMapWidgetBase
+{
+  Q_OBJECT
+
+    public:
+
+  QgsComposerMapWidget(QgsComposerMap* composerMap);
+  ~QgsComposerMapWidget();
+
+    private:
+  QgsComposerMap* mComposerMap;
+};
+
+#endif

Modified: branches/advanced_printing_branch/src/app/composer/qgscomposition.cpp
===================================================================
--- branches/advanced_printing_branch/src/app/composer/qgscomposition.cpp	2008-05-26 16:16:05 UTC (rev 8526)
+++ branches/advanced_printing_branch/src/app/composer/qgscomposition.cpp	2008-05-27 08:22:31 UTC (rev 8527)
@@ -259,64 +259,11 @@
 	    if(selectedItem != mSelectedItem)
 	      {
 		mSelectedItem->setSelected(false);
-		mComposer->showItemOptions(selectedItem->options());
+		//mComposer->showItemOptions(selectedItem->options()); //todo: separate items from input widgets
 		mSelectedItem = selectedItem;
 	      }
 	  }
 	break;
-
-//what is this doing?  Grabbing the first item in the list?
-/*
-        QList<QGraphicsItem*> l = mCanvas->items(p);
-        for ( QList<QGraphicsItem*>::Iterator it=l.fromLast(); it!=l.end(); --it) {
-          if (! (*it)->isActive() ) continue;
-          newItem = *it;
-        }
-*/
-#if 0
-
-        if ( newItem ) { // found
-          mGrabPoint = newItem->mapFromScene(p);
-          if ( newItem != mSelectedItem ) { // Show options
-
-            if ( mSelectedItem ) {
-              QgsComposerItem *coi = dynamic_cast <QgsComposerItem *> (mSelectedItem);
-              coi->setSelected ( false );
-            }
-
-            QgsComposerItem *coi = dynamic_cast <QgsComposerItem *> (newItem);
-            coi->setSelected ( true );
-
-            mComposer->showItemOptions ( coi->options() );
-            mSelectedItem = newItem;
-          }
-        } else { // not found
-          if ( mSelectedItem ) {
-            QgsComposerItem *coi = dynamic_cast <QgsComposerItem *> (mSelectedItem);
-            coi->setSelected ( false );
-          }
-          mSelectedItem = 0;
-          mComposer->showItemOptions ( (QWidget *) 0 ); // hide old options
-        }
-        mCanvas->update();
-      }
-      break;
-
-
-      if(newItem)
-	{
-	  QgsComposerItem* debugItem = dynamic_cast<QgsComposerItem*>(newItem);
-	  if(debugItem)
-	    {
-	      debugItem->setSelected(true);
-	      debugItem->update();
-	    }
-	  //newItem->setSelected(true);
-	  //newItem->update();
-	  //mComposer->showItemOptions((QWidget*)(newItem));
-	}
-      break;
-#endif //0
   }
 
     case AddMap:
@@ -336,7 +283,7 @@
       std::cerr << "mToolStep = " << mToolStep << std::endl;
 #endif
       break;
-
+      /* //other items besides map disabled for the moment
     case AddVectorLegend:
       {
         mNewCanvasItem->setPos(p);
@@ -414,6 +361,7 @@
         mToolStep = 1;
       }
       break;
+      */
  }
 }
 
@@ -452,7 +400,7 @@
         mCanvas->update();
       }//END if(mToolStep == 1)
       break;
-
+      /* //other items besides map disabled for the moment
     case AddPicture:
       if ( mToolStep == 1 )
       {
@@ -479,6 +427,7 @@
     case AddScalebar:
     case AddVectorLegend:
     case AddLabel:
+      */
 
       mNewCanvasItem->setPos(p);
       mCanvas->update();
@@ -528,7 +477,7 @@
         mView->unsetCursor();
       }
       break;
-
+      /* //other items besides map are disabled for the moment
     case AddPicture:
       {
         double w = mRectangleItem->rect().width();
@@ -562,6 +511,7 @@
         mView->unsetCursor();
       }
       break;
+      */
 
     case Select:
       if ( mSelectedItem ) {
@@ -572,10 +522,10 @@
       break;
 
     //We don't do anything special for labels, scalebars, or vector legends
-    case AddLabel:
+    /*case AddLabel:
     case AddScalebar:
     case AddVectorLegend:
-      break;
+    break;*/
 
   }
 }

Modified: branches/advanced_printing_branch/src/ui/CMakeLists.txt
===================================================================
--- branches/advanced_printing_branch/src/ui/CMakeLists.txt	2008-05-26 16:16:05 UTC (rev 8526)
+++ branches/advanced_printing_branch/src/ui/CMakeLists.txt	2008-05-27 08:22:31 UTC (rev 8527)
@@ -17,7 +17,7 @@
   qgsbookmarksbase.ui
   qgscomposerbase.ui
   qgscomposerlabelbase.ui
-  qgscomposermapbase.ui
+  qgscomposermapwidgetbase.ui
   qgscomposerpicturebase.ui
   qgscomposerscalebarbase.ui
   qgscomposervectorlegendbase.ui

Deleted: branches/advanced_printing_branch/src/ui/qgscomposermapbase.ui
===================================================================
--- branches/advanced_printing_branch/src/ui/qgscomposermapbase.ui	2008-05-26 16:16:05 UTC (rev 8526)
+++ branches/advanced_printing_branch/src/ui/qgscomposermapbase.ui	2008-05-27 08:22:31 UTC (rev 8527)
@@ -1,296 +0,0 @@
-<ui version="4.0" >
- <class>QgsComposerMapBase</class>
- <widget class="QWidget" name="QgsComposerMapBase" >
-  <property name="geometry" >
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>292</width>
-    <height>417</height>
-   </rect>
-  </property>
-  <property name="sizePolicy" >
-   <sizepolicy>
-    <hsizetype>7</hsizetype>
-    <vsizetype>7</vsizetype>
-    <horstretch>0</horstretch>
-    <verstretch>0</verstretch>
-   </sizepolicy>
-  </property>
-  <property name="windowTitle" >
-   <string>Map options</string>
-  </property>
-  <layout class="QGridLayout" >
-   <property name="margin" >
-    <number>9</number>
-   </property>
-   <property name="spacing" >
-    <number>6</number>
-   </property>
-   <item row="12" column="2" >
-    <spacer>
-     <property name="orientation" >
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeHint" >
-      <size>
-       <width>20</width>
-       <height>40</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="6" column="0" colspan="2" >
-    <widget class="QLabel" name="label_3" >
-     <property name="sizePolicy" >
-      <sizepolicy>
-       <hsizetype>7</hsizetype>
-       <vsizetype>5</vsizetype>
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="text" >
-      <string/>
-     </property>
-    </widget>
-   </item>
-   <item row="6" column="2" >
-    <widget class="QPushButton" name="mSetCurrentExtentButton" >
-     <property name="sizePolicy" >
-      <sizepolicy>
-       <hsizetype>7</hsizetype>
-       <vsizetype>0</vsizetype>
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="toolTip" >
-      <string>Set map extent to current extent in QGIS map canvas</string>
-     </property>
-     <property name="text" >
-      <string>Set Extent</string>
-     </property>
-    </widget>
-   </item>
-   <item row="5" column="1" >
-    <widget class="QLabel" name="label" >
-     <property name="text" >
-      <string>1:</string>
-     </property>
-     <property name="alignment" >
-      <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-     </property>
-    </widget>
-   </item>
-   <item row="5" column="0" >
-    <widget class="QLabel" name="label_2" >
-     <property name="sizePolicy" >
-      <sizepolicy>
-       <hsizetype>5</hsizetype>
-       <vsizetype>5</vsizetype>
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="text" >
-      <string>Scale:</string>
-     </property>
-     <property name="wordWrap" >
-      <bool>true</bool>
-     </property>
-    </widget>
-   </item>
-   <item row="9" column="2" >
-    <widget class="QLineEdit" name="mFontScaleLineEdit" />
-   </item>
-   <item row="8" column="2" >
-    <widget class="QLineEdit" name="mSymbolScaleLineEdit" />
-   </item>
-   <item row="7" column="2" >
-    <widget class="QLineEdit" name="mWidthScaleLineEdit" >
-     <property name="enabled" >
-      <bool>true</bool>
-     </property>
-     <property name="toolTip" >
-      <string>Width of one unit in millimeters</string>
-     </property>
-    </widget>
-   </item>
-   <item row="5" column="2" >
-    <widget class="QLineEdit" name="mScaleLineEdit" />
-   </item>
-   <item row="2" column="2" >
-    <widget class="QComboBox" name="mCalculateComboBox" >
-     <property name="enabled" >
-      <bool>true</bool>
-     </property>
-     <property name="sizePolicy" >
-      <sizepolicy>
-       <hsizetype>0</hsizetype>
-       <vsizetype>0</vsizetype>
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="minimumSize" >
-      <size>
-       <width>0</width>
-       <height>0</height>
-      </size>
-     </property>
-    </widget>
-   </item>
-   <item row="2" column="0" >
-    <widget class="QLabel" name="textLabel1_3" >
-     <property name="text" >
-      <string>Set</string>
-     </property>
-     <property name="wordWrap" >
-      <bool>true</bool>
-     </property>
-     <property name="buddy" >
-      <cstring>mCalculateComboBox</cstring>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="0" colspan="3" >
-    <widget class="Line" name="line1" >
-     <property name="frameShape" >
-      <enum>QFrame::HLine</enum>
-     </property>
-     <property name="frameShadow" >
-      <enum>QFrame::Sunken</enum>
-     </property>
-     <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
-     </property>
-    </widget>
-   </item>
-   <item row="0" column="0" colspan="3" >
-    <widget class="QLabel" name="mNameLabel" >
-     <property name="text" >
-      <string>&lt;b>Map&lt;/b></string>
-     </property>
-    </widget>
-   </item>
-   <item row="4" column="0" >
-    <widget class="QLabel" name="textLabel2" >
-     <property name="text" >
-      <string>Height</string>
-     </property>
-     <property name="wordWrap" >
-      <bool>true</bool>
-     </property>
-     <property name="buddy" >
-      <cstring>mHeightLineEdit</cstring>
-     </property>
-    </widget>
-   </item>
-   <item row="4" column="2" >
-    <widget class="QLineEdit" name="mHeightLineEdit" />
-   </item>
-   <item row="3" column="0" >
-    <widget class="QLabel" name="textLabel1" >
-     <property name="text" >
-      <string>Width</string>
-     </property>
-     <property name="wordWrap" >
-      <bool>true</bool>
-     </property>
-     <property name="buddy" >
-      <cstring>mWidthLineEdit</cstring>
-     </property>
-    </widget>
-   </item>
-   <item row="3" column="2" >
-    <widget class="QLineEdit" name="mWidthLineEdit" />
-   </item>
-   <item row="7" column="0" colspan="2" >
-    <widget class="QLabel" name="textLabel1_4" >
-     <property name="text" >
-      <string>Line width scale</string>
-     </property>
-     <property name="wordWrap" >
-      <bool>true</bool>
-     </property>
-     <property name="buddy" >
-      <cstring>mWidthScaleLineEdit</cstring>
-     </property>
-    </widget>
-   </item>
-   <item row="8" column="0" colspan="2" >
-    <widget class="QLabel" name="textLabel1_2" >
-     <property name="text" >
-      <string>Symbol scale</string>
-     </property>
-     <property name="wordWrap" >
-      <bool>true</bool>
-     </property>
-     <property name="buddy" >
-      <cstring>mSymbolScaleLineEdit</cstring>
-     </property>
-    </widget>
-   </item>
-   <item row="9" column="0" colspan="2" >
-    <widget class="QLabel" name="textLabel2_2" >
-     <property name="text" >
-      <string>Font size scale</string>
-     </property>
-     <property name="wordWrap" >
-      <bool>true</bool>
-     </property>
-     <property name="buddy" >
-      <cstring>mFontScaleLineEdit</cstring>
-     </property>
-    </widget>
-   </item>
-   <item row="10" column="0" colspan="3" >
-    <widget class="QCheckBox" name="mFrameCheckBox" >
-     <property name="text" >
-      <string>Frame</string>
-     </property>
-    </widget>
-   </item>
-   <item row="11" column="0" colspan="2" >
-    <widget class="QLabel" name="textLabel1_5" >
-     <property name="text" >
-      <string>Preview</string>
-     </property>
-     <property name="wordWrap" >
-      <bool>true</bool>
-     </property>
-     <property name="buddy" >
-      <cstring>mPreviewModeComboBox</cstring>
-     </property>
-    </widget>
-   </item>
-   <item row="11" column="2" >
-    <widget class="QComboBox" name="mPreviewModeComboBox" >
-     <property name="sizePolicy" >
-      <sizepolicy>
-       <hsizetype>7</hsizetype>
-       <vsizetype>0</vsizetype>
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <layoutdefault spacing="6" margin="11" />
- <tabstops>
-  <tabstop>mCalculateComboBox</tabstop>
-  <tabstop>mWidthLineEdit</tabstop>
-  <tabstop>mHeightLineEdit</tabstop>
-  <tabstop>mSetCurrentExtentButton</tabstop>
-  <tabstop>mWidthScaleLineEdit</tabstop>
-  <tabstop>mSymbolScaleLineEdit</tabstop>
-  <tabstop>mFontScaleLineEdit</tabstop>
-  <tabstop>mFrameCheckBox</tabstop>
-  <tabstop>mPreviewModeComboBox</tabstop>
- </tabstops>
- <resources/>
- <connections/>
-</ui>

Copied: branches/advanced_printing_branch/src/ui/qgscomposermapwidgetbase.ui (from rev 8478, branches/advanced_printing_branch/src/ui/qgscomposermapbase.ui)
===================================================================
--- branches/advanced_printing_branch/src/ui/qgscomposermapwidgetbase.ui	                        (rev 0)
+++ branches/advanced_printing_branch/src/ui/qgscomposermapwidgetbase.ui	2008-05-27 08:22:31 UTC (rev 8527)
@@ -0,0 +1,220 @@
+<ui version="4.0" >
+ <class>QgsComposerMapWidgetBase</class>
+ <widget class="QWidget" name="QgsComposerMapWidgetBase" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>486</width>
+    <height>347</height>
+   </rect>
+  </property>
+  <property name="sizePolicy" >
+   <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle" >
+   <string>Map options</string>
+  </property>
+  <layout class="QGridLayout" >
+   <item row="0" column="0" colspan="4" >
+    <widget class="QLabel" name="mNameLabel" >
+     <property name="text" >
+      <string>&lt;b>Map&lt;/b></string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0" colspan="4" >
+    <widget class="Line" name="line1" >
+     <property name="frameShape" >
+      <enum>QFrame::HLine</enum>
+     </property>
+     <property name="frameShadow" >
+      <enum>QFrame::Sunken</enum>
+     </property>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0" >
+    <widget class="QLabel" name="textLabel1_3" >
+     <property name="text" >
+      <string>Set</string>
+     </property>
+     <property name="wordWrap" >
+      <bool>true</bool>
+     </property>
+     <property name="buddy" >
+      <cstring>mCalculateComboBox</cstring>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="3" >
+    <widget class="QComboBox" name="mCalculateComboBox" >
+     <property name="enabled" >
+      <bool>true</bool>
+     </property>
+     <property name="sizePolicy" >
+      <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize" >
+      <size>
+       <width>0</width>
+       <height>0</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="0" >
+    <widget class="QLabel" name="textLabel1" >
+     <property name="text" >
+      <string>Width</string>
+     </property>
+     <property name="wordWrap" >
+      <bool>true</bool>
+     </property>
+     <property name="buddy" >
+      <cstring>mWidthLineEdit</cstring>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="3" >
+    <widget class="QLineEdit" name="mWidthLineEdit" />
+   </item>
+   <item row="4" column="0" >
+    <widget class="QLabel" name="textLabel2" >
+     <property name="text" >
+      <string>Height</string>
+     </property>
+     <property name="wordWrap" >
+      <bool>true</bool>
+     </property>
+     <property name="buddy" >
+      <cstring>mHeightLineEdit</cstring>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="3" >
+    <widget class="QLineEdit" name="mHeightLineEdit" />
+   </item>
+   <item row="5" column="0" >
+    <widget class="QLabel" name="label_2" >
+     <property name="sizePolicy" >
+      <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text" >
+      <string>Scale:</string>
+     </property>
+     <property name="wordWrap" >
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="5" column="1" >
+    <widget class="QLabel" name="label" >
+     <property name="text" >
+      <string>1:</string>
+     </property>
+     <property name="alignment" >
+      <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+     </property>
+    </widget>
+   </item>
+   <item row="5" column="3" >
+    <widget class="QLineEdit" name="mScaleLineEdit" />
+   </item>
+   <item row="6" column="0" colspan="2" >
+    <widget class="QLabel" name="label_3" >
+     <property name="sizePolicy" >
+      <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text" >
+      <string/>
+     </property>
+    </widget>
+   </item>
+   <item row="6" column="3" >
+    <widget class="QPushButton" name="mSetCurrentExtentButton" >
+     <property name="sizePolicy" >
+      <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="toolTip" >
+      <string>Set map extent to current extent in QGIS map canvas</string>
+     </property>
+     <property name="text" >
+      <string>Set Extent</string>
+     </property>
+    </widget>
+   </item>
+   <item row="7" column="0" colspan="4" >
+    <widget class="QCheckBox" name="mFrameCheckBox" >
+     <property name="text" >
+      <string>Frame</string>
+     </property>
+    </widget>
+   </item>
+   <item row="8" column="0" colspan="2" >
+    <widget class="QLabel" name="textLabel1_5" >
+     <property name="text" >
+      <string>Preview</string>
+     </property>
+     <property name="wordWrap" >
+      <bool>true</bool>
+     </property>
+     <property name="buddy" >
+      <cstring>mPreviewModeComboBox</cstring>
+     </property>
+    </widget>
+   </item>
+   <item row="8" column="2" colspan="2" >
+    <widget class="QComboBox" name="mPreviewModeComboBox" >
+     <property name="sizePolicy" >
+      <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+    </widget>
+   </item>
+   <item row="9" column="2" colspan="2" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>20</width>
+       <height>40</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <tabstops>
+  <tabstop>mCalculateComboBox</tabstop>
+  <tabstop>mWidthLineEdit</tabstop>
+  <tabstop>mHeightLineEdit</tabstop>
+  <tabstop>mSetCurrentExtentButton</tabstop>
+  <tabstop>mFrameCheckBox</tabstop>
+  <tabstop>mPreviewModeComboBox</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>



More information about the QGIS-commit mailing list