diff --git a/recipientseditor.cpp b/recipientseditor.cpp index ead53b7e8..ea1578e33 100644 --- a/recipientseditor.cpp +++ b/recipientseditor.cpp @@ -232,6 +232,17 @@ void RecipientLine::setComboWidth( int w ) mCombo->setFixedWidth( w ); } +void RecipientLine::fixTabOrder( QWidget *previous ) +{ + setTabOrder( previous, mCombo ); + setTabOrder( mCombo, mEdit ); +} + +QWidget *RecipientLine::tabOut() const +{ + return mEdit; +} + RecipientsView::RecipientsView( QWidget *parent ) : QScrollView( parent ) @@ -276,6 +287,7 @@ RecipientLine *RecipientsView::addLine() if ( mLines.last() ) { line->setRecipientType( mLines.last()->recipientType() ); + line->fixTabOrder( mLines.last()->tabOut() ); } mLines.append( line ); @@ -345,7 +357,7 @@ void RecipientsView::slotDecideLineDeletion( RecipientLine *line ) } void RecipientsView::slotDeleteDueLine() -{ +{ RecipientLine *line = mCurDelLine; int pos = mLines.find( line ); @@ -467,9 +479,9 @@ SideWidget::SideWidget( RecipientsView *view, QWidget *parent ) topLayout->addWidget( mTotalLabel, 1 ); mTotalLabel->hide(); - QPushButton *button = new QPushButton( "&Select...", this ); - topLayout->addWidget( button ); - connect( button, SIGNAL( clicked() ), SLOT( pickRecipient() ) ); + mSelectButton = new QPushButton( "&Select...", this ); + topLayout->addWidget( mSelectButton ); + connect( mSelectButton, SIGNAL( clicked() ), SLOT( pickRecipient() ) ); initRecipientPicker(); } diff --git a/recipientseditor.h b/recipientseditor.h index 58d87d311..278b32d01 100644 --- a/recipientseditor.h +++ b/recipientseditor.h @@ -36,6 +36,7 @@ class KWindowPositioner; class QComboBox; class QLabel; +class QPushButton; class Recipient { @@ -102,6 +103,9 @@ class RecipientLine : public QWidget void setComboWidth( int w ); + void fixTabOrder( QWidget *previous ); + QWidget *tabOut() const; + signals: void returnPressed( RecipientLine * ); void downPressed( RecipientLine * ); @@ -198,6 +202,7 @@ class SideWidget : public QWidget private: RecipientsView *mView; QLabel *mTotalLabel; + QPushButton *mSelectButton; RecipientsPicker *mRecipientPicker; KWindowPositioner *mPickerPositioner; };