diff options
Diffstat (limited to 'kio/kio/passdlg.cpp')
-rw-r--r-- | kio/kio/passdlg.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/kio/kio/passdlg.cpp b/kio/kio/passdlg.cpp index 83434906b..11257abdd 100644 --- a/kio/kio/passdlg.cpp +++ b/kio/kio/passdlg.cpp @@ -37,7 +37,7 @@ using namespace KIO; struct PasswordDialog::PasswordDialogPrivate { - TQGridLayout *layout; + TQGridLayout *tqlayout; TQLineEdit* userEdit; KLineEdit* passEdit; TQLabel* userNameLabel; @@ -77,8 +77,8 @@ void PasswordDialog::init( const TQString& prompt, const TQString& user, KConfig* cfg = KGlobal::config(); KConfigGroupSaver saver( cfg, "Passwords" ); - d->layout = new TQGridLayout( main, 9, 3, spacingHint(), marginHint()); - d->layout->addColSpacing(1, 5); + d->tqlayout = new TQGridLayout( main, 9, 3, spacingHint(), marginHint()); + d->tqlayout->addColSpacing(1, 5); // Row 0: pixmap prompt TQLabel* lbl; @@ -87,69 +87,69 @@ void PasswordDialog::init( const TQString& prompt, const TQString& user, { lbl = new TQLabel( main ); lbl->setPixmap( pix ); - lbl->setAlignment( Qt::AlignLeft|Qt::AlignVCenter ); - lbl->setFixedSize( lbl->sizeHint() ); - d->layout->addWidget( lbl, 0, 0, Qt::AlignLeft ); + lbl->tqsetAlignment( Qt::AlignLeft|Qt::AlignVCenter ); + lbl->setFixedSize( lbl->tqsizeHint() ); + d->tqlayout->addWidget( lbl, 0, 0, Qt::AlignLeft ); } d->prompt = new TQLabel( main ); - d->prompt->setAlignment( Qt::AlignLeft|Qt::AlignVCenter|Qt::WordBreak ); - d->layout->addWidget( d->prompt, 0, 2, Qt::AlignLeft ); + d->prompt->tqsetAlignment( Qt::AlignLeft|Qt::AlignVCenter|Qt::WordBreak ); + d->tqlayout->addWidget( d->prompt, 0, 2, Qt::AlignLeft ); if ( prompt.isEmpty() ) setPrompt( i18n( "You need to supply a username and a password" ) ); else setPrompt( prompt ); // Row 1: Row Spacer - d->layout->addRowSpacing( 1, 7 ); + d->tqlayout->addRowSpacing( 1, 7 ); // Row 2-3: Reserved for an additional comment // Row 4: Username field d->userNameLabel = new TQLabel( i18n("&Username:"), main ); - d->userNameLabel->setAlignment( Qt::AlignVCenter | Qt::AlignLeft ); - d->userNameLabel->setFixedSize( d->userNameLabel->sizeHint() ); + d->userNameLabel->tqsetAlignment( Qt::AlignVCenter | Qt::AlignLeft ); + d->userNameLabel->setFixedSize( d->userNameLabel->tqsizeHint() ); d->userNameHBox = new TQHBox( main ); d->userEdit = new KLineEdit( d->userNameHBox ); - TQSize s = d->userEdit->sizeHint(); + TQSize s = d->userEdit->tqsizeHint(); d->userEdit->setFixedHeight( s.height() ); d->userEdit->setMinimumWidth( s.width() ); d->userNameLabel->setBuddy( d->userEdit ); - d->layout->addWidget( d->userNameLabel, 4, 0 ); - d->layout->addWidget( d->userNameHBox, 4, 2 ); + d->tqlayout->addWidget( d->userNameLabel, 4, 0 ); + d->tqlayout->addWidget( d->userNameHBox, 4, 2 ); // Row 5: Row spacer - d->layout->addRowSpacing( 5, 4 ); + d->tqlayout->addRowSpacing( 5, 4 ); // Row 6: Password field lbl = new TQLabel( i18n("&Password:"), main ); - lbl->setAlignment( Qt::AlignVCenter | Qt::AlignLeft ); - lbl->setFixedSize( lbl->sizeHint() ); + lbl->tqsetAlignment( Qt::AlignVCenter | Qt::AlignLeft ); + lbl->setFixedSize( lbl->tqsizeHint() ); TQHBox* hbox = new TQHBox( main ); d->passEdit = new KLineEdit( hbox ); if ( cfg->readEntry("EchoMode", "OneStar") == "NoEcho" ) d->passEdit->setEchoMode( TQLineEdit::NoEcho ); else d->passEdit->setEchoMode( TQLineEdit::Password ); - s = d->passEdit->sizeHint(); + s = d->passEdit->tqsizeHint(); d->passEdit->setFixedHeight( s.height() ); d->passEdit->setMinimumWidth( s.width() ); lbl->setBuddy( d->passEdit ); - d->layout->addWidget( lbl, 6, 0 ); - d->layout->addWidget( hbox, 6, 2 ); + d->tqlayout->addWidget( lbl, 6, 0 ); + d->tqlayout->addWidget( hbox, 6, 2 ); if ( enableKeep ) { // Row 7: Add spacer - d->layout->addRowSpacing( 7, 4 ); + d->tqlayout->addRowSpacing( 7, 4 ); // Row 8: Keep Password hbox = new TQHBox( main ); d->keepCheckBox = new TQCheckBox( i18n("&Keep password"), hbox ); - d->keepCheckBox->setFixedSize( d->keepCheckBox->sizeHint() ); + d->keepCheckBox->setFixedSize( d->keepCheckBox->tqsizeHint() ); d->keep = cfg->readBoolEntry("Keep", false ); d->keepCheckBox->setChecked( d->keep ); connect(d->keepCheckBox, TQT_SIGNAL(toggled( bool )), TQT_SLOT(slotKeep( bool ))); - d->layout->addWidget( hbox, 8, 2 ); + d->tqlayout->addWidget( hbox, 8, 2 ); } // Configure necessary key-bindings and connect necessar slots and signals @@ -165,7 +165,7 @@ void PasswordDialog::init( const TQString& prompt, const TQString& user, d->userEdit->setFocus(); d->userEditCombo = 0; -// setFixedSize( sizeHint() ); +// setFixedSize( tqsizeHint() ); } TQString PasswordDialog::username() const @@ -198,7 +198,7 @@ static void calculateLabelSize(TQLabel *label) // Calculate a proper size for the text. { TQSimpleRichText rt(qt_text, label->font()); - TQRect d = KGlobalSettings::desktopGeometry(label->topLevelWidget()); + TQRect d = KGlobalSettings::desktopGeometry(label->tqtopLevelWidget()); pref_width = d.width() / 4; rt.setWidth(pref_width-10); @@ -239,14 +239,14 @@ void PasswordDialog::addCommentLine( const TQString& label, TQWidget *main = mainWidget(); TQLabel* lbl = new TQLabel( label, main); - lbl->setAlignment( Qt::AlignVCenter|Qt::AlignRight ); - lbl->setFixedSize( lbl->sizeHint() ); - d->layout->addWidget( lbl, d->nRow+2, 0, Qt::AlignLeft ); + lbl->tqsetAlignment( Qt::AlignVCenter|Qt::AlignRight ); + lbl->setFixedSize( lbl->tqsizeHint() ); + d->tqlayout->addWidget( lbl, d->nRow+2, 0, Qt::AlignLeft ); lbl = new TQLabel( comment, main); - lbl->setAlignment( Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak ); + lbl->tqsetAlignment( Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak ); calculateLabelSize(lbl); - d->layout->addWidget( lbl, d->nRow+2, 2, Qt::AlignLeft ); - d->layout->addRowSpacing( 3, 10 ); // Add a spacer + d->tqlayout->addWidget( lbl, d->nRow+2, 2, Qt::AlignLeft ); + d->tqlayout->addRowSpacing( 3, 10 ); // Add a spacer d->nRow++; } @@ -304,11 +304,11 @@ void PasswordDialog::setKnownLogins( const TQMap<TQString, TQString>& knownLogin delete d->userEdit; d->userEditCombo = new KComboBox( true, d->userNameHBox ); d->userEdit = d->userEditCombo->lineEdit(); - TQSize s = d->userEditCombo->sizeHint(); + TQSize s = d->userEditCombo->tqsizeHint(); d->userEditCombo->setFixedHeight( s.height() ); d->userEditCombo->setMinimumWidth( s.width() ); d->userNameLabel->setBuddy( d->userEditCombo ); - d->layout->addWidget( d->userNameHBox, 4, 2 ); + d->tqlayout->addWidget( d->userNameHBox, 4, 2 ); } d->knownLogins = knownLogins; @@ -321,7 +321,7 @@ void PasswordDialog::setKnownLogins( const TQMap<TQString, TQString>& knownLogin void PasswordDialog::slotActivated( const TQString& userName ) { - TQMap<TQString, TQString>::ConstIterator it = d->knownLogins.find( userName ); + TQMap<TQString, TQString>::ConstIterator it = d->knownLogins.tqfind( userName ); if ( it != d->knownLogins.end() ) setPassword( it.data() ); } |