Skip to content
Permalink
Browse files

Fixed ticket 827 by converting the returnPressed() handlers into

editingFinished() ones.


git-svn-id: http://svn.osgeo.org/qgis/trunk@7653 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
StevenB StevenB
StevenB authored and StevenB committed Nov 23, 2007
1 parent e15e36f commit 838fb92ee214704df40eeb893a4f9c31be915fcd
@@ -405,8 +405,8 @@ void QgsComposerMap::sizeChanged ( void )
writeSettings();
}

void QgsComposerMap::on_mWidthLineEdit_returnPressed ( void ) { sizeChanged(); }
void QgsComposerMap::on_mHeightLineEdit_returnPressed ( void ) { sizeChanged(); }
void QgsComposerMap::on_mWidthLineEdit_editingFinished ( void ) { sizeChanged(); }
void QgsComposerMap::on_mHeightLineEdit_editingFinished ( void ) { sizeChanged(); }

void QgsComposerMap::on_mCalculateComboBox_activated( int )
{
@@ -462,10 +462,10 @@ double QgsComposerMap::userScaleFromScale ( double s )
return us;
}

void QgsComposerMap::on_mScaleLineEdit_returnPressed()
void QgsComposerMap::on_mScaleLineEdit_editingFinished()
{
#ifdef QGISDEBUG
std::cout << "QgsComposerMap::on_mScaleLineEdit_returnPressed" << std::endl;
std::cout << "QgsComposerMap::on_mScaleLineEdit_editingFinished" << std::endl;
#endif
mCalculate = mCalculateComboBox->currentItem();

@@ -497,9 +497,9 @@ void QgsComposerMap::scaleChanged ( void )
mComposition->emitMapChanged ( mId );
}

void QgsComposerMap::on_mFontScaleLineEdit_returnPressed ( void ) { scaleChanged(); }
void QgsComposerMap::on_mSymbolScaleLineEdit_returnPressed ( void ) { scaleChanged(); }
void QgsComposerMap::on_mWidthScaleLineEdit_returnPressed ( void ) { scaleChanged(); }
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 )
{
@@ -109,8 +109,8 @@ class QgsComposerMap : public QWidget, private Ui::QgsComposerMapBase, public QG

public slots:
// Called by GUI if with or height was changed
void on_mWidthLineEdit_returnPressed ( void );
void on_mHeightLineEdit_returnPressed ( void );
void on_mWidthLineEdit_editingFinished ( void );
void on_mHeightLineEdit_editingFinished ( void );

// Set User extent to current map extent
void on_mSetCurrentExtentButton_clicked ( void );
@@ -119,12 +119,12 @@ public slots:
void on_mCalculateComboBox_activated ( int i );

// Called by GUI if map scale has changed
void on_mScaleLineEdit_returnPressed ( void );
void on_mScaleLineEdit_editingFinished ( void );

// Called by GUI if with scale was changed
void on_mFontScaleLineEdit_returnPressed ( void );
void on_mSymbolScaleLineEdit_returnPressed ( void );
void on_mWidthScaleLineEdit_returnPressed ( void );
void on_mFontScaleLineEdit_editingFinished ( void );
void on_mSymbolScaleLineEdit_editingFinished ( void );
void on_mWidthScaleLineEdit_editingFinished ( void );

// Frame settings changed
void on_mFrameCheckBox_clicked ( void );
@@ -341,10 +341,10 @@ void QgsComposerPicture::on_mFrameCheckBox_stateChanged ( int )
writeSettings();
}

void QgsComposerPicture::on_mAngleLineEdit_returnPressed ( )
void QgsComposerPicture::on_mAngleLineEdit_editingFinished ( )
{
#ifdef QGISDEBUG
std::cout << "QgsComposerPicture::on_mAngleLineEdit_returnPressed()" << std::endl;
std::cout << "QgsComposerPicture::on_mAngleLineEdit_editingFinished()" << std::endl;
#endif
mAngle = mAngleLineEdit->text().toDouble();

@@ -354,10 +354,10 @@ void QgsComposerPicture::on_mAngleLineEdit_returnPressed ( )

}

void QgsComposerPicture::on_mWidthLineEdit_returnPressed ( )
void QgsComposerPicture::on_mWidthLineEdit_editingFinished ( )
{
#ifdef QGISDEBUG
std::cout << "QgsComposerPicture::on_mWidthLineEdit_returnPressed()" << std::endl;
std::cout << "QgsComposerPicture::on_mWidthLineEdit_editingFinished()" << std::endl;
#endif

mWidth = mComposition->fromMM ( mWidthLineEdit->text().toDouble() );
@@ -409,7 +409,7 @@ void QgsComposerPicture::pictureChanged ( )
}
}

void QgsComposerPicture::on_mPictureLineEdit_returnPressed ( )
void QgsComposerPicture::on_mPictureLineEdit_editingFinished ( )
{
pictureChanged();
}
@@ -89,7 +89,7 @@ class QgsComposerPicture : public QWidget, private Ui::QgsComposerPictureBase,

public slots:
// Called when picture file is changed in edit line
void on_mPictureLineEdit_returnPressed ( void );
void on_mPictureLineEdit_editingFinished ( void );

// Select new picture in dialog box
void on_mPictureBrowseButton_clicked ( void );
@@ -98,10 +98,10 @@ public slots:
void on_mFrameCheckBox_stateChanged ( int );

// Angle changed
void on_mAngleLineEdit_returnPressed ( void );
void on_mAngleLineEdit_editingFinished ( void );

// Width changed
void on_mWidthLineEdit_returnPressed ( void );
void on_mWidthLineEdit_editingFinished ( void );

private:
// Pointer to composition
@@ -340,7 +340,7 @@ void QgsComposerScalebar::on_mFontButton_clicked(void)
}
}

void QgsComposerScalebar::on_mUnitLabelLineEdit_returnPressed()
void QgsComposerScalebar::on_mUnitLabelLineEdit_editingFinished()
{
mUnitLabel = mUnitLabelLineEdit->text();
recalculate();
@@ -384,17 +384,17 @@ void QgsComposerScalebar::on_mLineWidthSpinBox_valueChanged()
sizeChanged();
}

void QgsComposerScalebar::on_mMapUnitsPerUnitLineEdit_returnPressed()
void QgsComposerScalebar::on_mMapUnitsPerUnitLineEdit_editingFinished()
{
sizeChanged();
}

void QgsComposerScalebar::on_mNumSegmentsLineEdit_returnPressed()
void QgsComposerScalebar::on_mNumSegmentsLineEdit_editingFinished()
{
sizeChanged();
}

void QgsComposerScalebar::on_mSegmentLengthLineEdit_returnPressed()
void QgsComposerScalebar::on_mSegmentLengthLineEdit_editingFinished()
{
sizeChanged();
}
@@ -94,13 +94,13 @@ public slots:
void on_mFontButton_clicked ( void );

// Title changed
void on_mUnitLabelLineEdit_returnPressed ( void );
void on_mUnitLabelLineEdit_editingFinished ( void );

// Size changed
void on_mLineWidthSpinBox_valueChanged ( void );
void on_mMapUnitsPerUnitLineEdit_returnPressed ( void );
void on_mNumSegmentsLineEdit_returnPressed ( void );
void on_mSegmentLengthLineEdit_returnPressed ( void );
void on_mMapUnitsPerUnitLineEdit_editingFinished ( void );
void on_mNumSegmentsLineEdit_editingFinished ( void );
void on_mSegmentLengthLineEdit_editingFinished ( void );

// Called by GUI when map selection changed
void on_mMapComboBox_activated ( int i );
@@ -549,7 +549,7 @@ void QgsComposerVectorLegend::on_mFontButton_clicked ( void )
}
}

void QgsComposerVectorLegend::on_mTitleLineEdit_returnPressed ( void )
void QgsComposerVectorLegend::on_mTitleLineEdit_editingFinished ( void )
{
mTitle = mTitleLineEdit->text();
recalculate();
@@ -138,7 +138,7 @@ public slots:
void on_mFontButton_clicked ( void );

// Title changed
void on_mTitleLineEdit_returnPressed ( void );
void on_mTitleLineEdit_editingFinished ( void );

// Called by GUI if preview style was changed
void on_mPreviewModeComboBox_activated ( int i );
@@ -48,11 +48,11 @@ QgsCompositionPaper::~QgsCompositionPaper ( )
QgsComposition::QgsComposition( QgsComposer *c, int id )
{
setupUi(this);
connect(mPaperWidthLineEdit, SIGNAL(returnPressed()), this, SLOT(paperSizeChanged()));
connect(mPaperHeightLineEdit, SIGNAL(returnPressed()), this, SLOT(paperSizeChanged()));
connect(mPaperWidthLineEdit, SIGNAL(editingFinished()), this, SLOT(paperSizeChanged()));
connect(mPaperHeightLineEdit, SIGNAL(editingFinished()), this, SLOT(paperSizeChanged()));
connect(mPaperOrientationComboBox, SIGNAL(activated(int)), this, SLOT(paperSizeChanged()));
connect(mPaperSizeComboBox, SIGNAL(activated(int)), this, SLOT(paperSizeChanged()));
connect(mResolutionLineEdit, SIGNAL(returnPressed()), this, SLOT(resolutionChanged()));
connect(mResolutionLineEdit, SIGNAL(editingFinished()), this, SLOT(resolutionChanged()));

#ifdef QGISDEBUG
std::cerr << "QgsComposition::QgsComposition()" << std::endl;

0 comments on commit 838fb92

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