[QGIS Commit] r11818 - in trunk/qgis/src: app/composer ui

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Oct 16 05:18:25 EDT 2009


Author: mhugent
Date: 2009-10-16 05:18:23 -0400 (Fri, 16 Oct 2009)
New Revision: 11818

Modified:
   trunk/qgis/src/app/composer/qgscomposermapwidget.cpp
   trunk/qgis/src/app/composer/qgscomposermapwidget.h
   trunk/qgis/src/ui/qgscomposermapwidgetbase.ui
Log:
Checkbox to set composer grid widget visible / invisible

Modified: trunk/qgis/src/app/composer/qgscomposermapwidget.cpp
===================================================================
--- trunk/qgis/src/app/composer/qgscomposermapwidget.cpp	2009-10-16 08:37:38 UTC (rev 11817)
+++ trunk/qgis/src/app/composer/qgscomposermapwidget.cpp	2009-10-16 09:18:23 UTC (rev 11818)
@@ -25,10 +25,11 @@
 QgsComposerMapWidget::QgsComposerMapWidget( QgsComposerMap* composerMap ): QWidget(), mComposerMap( composerMap )
 {
   setupUi( this );
+  mGridDockWidget->setVisible( false );
 
   //add widget for general composer item properties
   QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, composerMap );
-  gridLayout_3->addWidget( itemPropertiesWidget, 8, 0, 1, 1 );
+  gridLayout_3->addWidget( itemPropertiesWidget, 7, 0, 1, 1 );
   QDoubleValidator v( 0 );
 
   mWidthLineEdit->setValidator( &v );
@@ -671,3 +672,15 @@
   }
   mComposerMap->update();
 }
+
+void QgsComposerMapWidget::on_mShowGridDialogCheckBox_stateChanged( int state )
+{
+  if ( state == Qt::Checked )
+  {
+    mGridDockWidget->setVisible( true );
+  }
+  else
+  {
+    mGridDockWidget->setVisible( false );
+  }
+}

Modified: trunk/qgis/src/app/composer/qgscomposermapwidget.h
===================================================================
--- trunk/qgis/src/app/composer/qgscomposermapwidget.h	2009-10-16 08:37:38 UTC (rev 11817)
+++ trunk/qgis/src/app/composer/qgscomposermapwidget.h	2009-10-16 09:18:23 UTC (rev 11818)
@@ -62,6 +62,7 @@
     void on_mDrawAnnotationCheckBox_stateChanged( int state );
     void on_mAnnotationDirectionComboBox_currentIndexChanged( const QString& text );
     void on_mAnnotationTypeComboBox_currentIndexChanged( const QString& text );
+    void on_mShowGridDialogCheckBox_stateChanged( int state );
 
     /**Updates width and height without notify the composer map (to avoid infinite recursion)*/
     void updateSettingsNoSignals();

Modified: trunk/qgis/src/ui/qgscomposermapwidgetbase.ui
===================================================================
--- trunk/qgis/src/ui/qgscomposermapwidgetbase.ui	2009-10-16 08:37:38 UTC (rev 11817)
+++ trunk/qgis/src/ui/qgscomposermapwidgetbase.ui	2009-10-16 09:18:23 UTC (rev 11818)
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>472</width>
-    <height>675</height>
+    <height>708</height>
    </rect>
   </property>
   <property name="sizePolicy">
@@ -21,32 +21,6 @@
   </property>
   <layout class="QGridLayout" name="gridLayout_3">
    <item row="0" 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="1" column="0">
-    <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="QGroupBox" name="mMapGroupBox">
      <property name="title">
       <string>Map</string>
@@ -115,7 +89,7 @@
      </layout>
     </widget>
    </item>
-   <item row="3" column="0">
+   <item row="1" column="0">
     <widget class="QGroupBox" name="mMapExtentGroupBox">
      <property name="title">
       <string>Map extent</string>
@@ -213,7 +187,7 @@
      </layout>
     </widget>
    </item>
-   <item row="4" column="0">
+   <item row="2" column="0">
     <layout class="QHBoxLayout" name="horizontalLayout_2">
      <item>
       <widget class="QLabel" name="mPreviewModeLabel">
@@ -247,14 +221,21 @@
      </item>
     </layout>
    </item>
-   <item row="5" column="0">
+   <item row="3" column="0">
     <widget class="QCheckBox" name="mKeepLayerListCheckBox">
      <property name="text">
       <string>Keep layer list</string>
      </property>
     </widget>
    </item>
-   <item row="6" column="0">
+   <item row="4" column="0">
+    <widget class="QCheckBox" name="mShowGridDialogCheckBox">
+     <property name="text">
+      <string>Show composer grid widget</string>
+     </property>
+    </widget>
+   </item>
+   <item row="5" column="0">
     <widget class="QDockWidget" name="mGridDockWidget">
      <property name="floating">
       <bool>true</bool>
@@ -431,7 +412,7 @@
      </widget>
     </widget>
    </item>
-   <item row="7" column="0">
+   <item row="6" column="0">
     <spacer>
      <property name="orientation">
       <enum>Qt::Vertical</enum>



More information about the QGIS-commit mailing list