Skip to content
Permalink
Browse files

Checkbox to set composer grid widget visible / invisible

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11818 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Oct 16, 2009
1 parent 7353a4a commit 7a1f386590c65d45526ee85b002b26094d48ffcc
@@ -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 @@ void QgsComposerMapWidget::on_mAnnotationTypeComboBox_currentIndexChanged( const
}
mComposerMap->update();
}

void QgsComposerMapWidget::on_mShowGridDialogCheckBox_stateChanged( int state )
{
if ( state == Qt::Checked )
{
mGridDockWidget->setVisible( true );
}
else
{
mGridDockWidget->setVisible( false );
}
}
@@ -62,6 +62,7 @@ class QgsComposerMapWidget: public QWidget, private Ui::QgsComposerMapWidgetBase
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();
@@ -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>

0 comments on commit 7a1f386

Please sign in to comment.
You can’t perform that action at this time.