Skip to content
Permalink
Browse files
real width
git-svn-id: http://svn.osgeo.org/qgis/trunk@5470 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed May 18, 2006
1 parent b309a12 commit 0fecc915201ea9d9946837ae3266f9b4eec98aea
Showing with 6 additions and 6 deletions.
  1. +5 −5 src/composer/qgscomposerscalebar.cpp
  2. +1 −1 src/composer/qgscomposerscalebar.h
@@ -348,15 +348,15 @@ void QgsComposerScalebar::sizeChanged ( )
{
mSegmentLength = mSegmentLengthLineEdit->text().toDouble();
mNumSegments = mNumSegmentsLineEdit->text().toInt();
mPen.setWidth ( mLineWidthSpinBox->value() );
mPen.setWidthF ( mLineWidthSpinBox->value() );
mMapUnitsPerUnit = mMapUnitsPerUnitLineEdit->text().toInt();
recalculate();
Q3CanvasPolygonalItem::update();
Q3CanvasPolygonalItem::canvas()->update();
writeSettings();
}

void QgsComposerScalebar::on_mLineWidthSpinBox_returnPressed() { sizeChanged(); }
void QgsComposerScalebar::on_mLineWidthSpinBox_valueChanged() { sizeChanged(); }
void QgsComposerScalebar::on_mMapUnitsPerUnitLineEdit_returnPressed() { sizeChanged(); }
void QgsComposerScalebar::on_mNumSegmentsLineEdit_returnPressed() { sizeChanged(); }
void QgsComposerScalebar::on_mSegmentLengthLineEdit_returnPressed() { sizeChanged(); }
@@ -411,7 +411,7 @@ void QgsComposerScalebar::setOptions ( void )
mUnitLabelLineEdit->setText( mUnitLabel );
mMapUnitsPerUnitLineEdit->setText( QString::number(mMapUnitsPerUnit ) );

mLineWidthSpinBox->setValue ( mPen.width() );
mLineWidthSpinBox->setValue ( mPen.widthF() );

// Maps
mMapComboBox->clear();
@@ -478,7 +478,7 @@ bool QgsComposerScalebar::writeSettings ( void )
QgsProject::instance()->writeEntry( "Compositions", path+"font/underline", mFont.underline() );
QgsProject::instance()->writeEntry( "Compositions", path+"font/strikeout", mFont.strikeOut() );

QgsProject::instance()->writeEntry( "Compositions", path+"pen/width", (int)mPen.width() );
QgsProject::instance()->writeEntry( "Compositions", path+"pen/width", (double)mPen.widthF() );

return true;
}
@@ -505,7 +505,7 @@ bool QgsComposerScalebar::readSettings ( void )
mFont.setUnderline( QgsProject::instance()->readBoolEntry("Compositions", path+"font/underline", false, &ok) );
mFont.setStrikeOut( QgsProject::instance()->readBoolEntry("Compositions", path+"font/strikeout", false, &ok) );

mPen.setWidth( QgsProject::instance()->readNumEntry("Compositions", path+"pen/width", 1, &ok) );
mPen.setWidthF( QgsProject::instance()->readDoubleEntry("Compositions", path+"pen/width", 1, &ok) );

recalculate();

@@ -97,7 +97,7 @@ public slots:
void on_mUnitLabelLineEdit_returnPressed ( void );

// Size changed
void on_mLineWidthSpinBox_returnPressed ( void );
void on_mLineWidthSpinBox_valueChanged ( void );
void on_mMapUnitsPerUnitLineEdit_returnPressed ( void );
void on_mNumSegmentsLineEdit_returnPressed ( void );
void on_mSegmentLengthLineEdit_returnPressed ( void );

0 comments on commit 0fecc91

Please sign in to comment.