Skip to content

Commit

Permalink
real width
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5470 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed May 18, 2006
1 parent d6ace68 commit c925756
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/composer/qgscomposerscalebar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(); }
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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;
}
Expand All @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion src/composer/qgscomposerscalebar.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit c925756

Please sign in to comment.