diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | bcb704366cb5e333a626c18c308c7e0448a8e69f (patch) | |
tree | f0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /kopete/protocols/oscar/icq/ui/icqauthreplydialog.cpp | |
download | tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/oscar/icq/ui/icqauthreplydialog.cpp')
-rw-r--r-- | kopete/protocols/oscar/icq/ui/icqauthreplydialog.cpp | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/kopete/protocols/oscar/icq/ui/icqauthreplydialog.cpp b/kopete/protocols/oscar/icq/ui/icqauthreplydialog.cpp new file mode 100644 index 00000000..76b56fba --- /dev/null +++ b/kopete/protocols/oscar/icq/ui/icqauthreplydialog.cpp @@ -0,0 +1,73 @@ +/* + Kopete Oscar Protocol + icqauthreplydialog.cpp - ICQ authorization reply dialog + + Copyright (c) 2004 Gustavo Pichorim Boiko <[email protected]> + + Kopete (c) 2002-2004 by the Kopete developers <[email protected]> + + ************************************************************************* + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + ************************************************************************* +*/ +#include "icqauthreplydialog.h" +#include "icqauthreplyui.h" + +#include <klocale.h> + +#include <qlabel.h> +#include <qradiobutton.h> +#include <qlineedit.h> + +ICQAuthReplyDialog::ICQAuthReplyDialog( QWidget *parent, const char *name, bool wasRequested ) + : KDialogBase( parent, name, true, i18n( "Authorization Reply" ), KDialogBase::Ok | KDialogBase::Cancel ) +{ + m_ui = new ICQAuthReplyUI( this ); + setMainWidget( m_ui ); + m_wasRequested = wasRequested; + + if ( !m_wasRequested ) + { + m_ui->lblReqReason->hide(); + m_ui->lblRequestReason->hide(); + } + else + { + this->setWFlags( this->getWFlags() | Qt::WDestructiveClose ); + } +} + +ICQAuthReplyDialog::~ICQAuthReplyDialog() +{ +} + +void ICQAuthReplyDialog::setUser( const QString & user ) +{ + if ( m_wasRequested ) + m_ui->lblUserReq->setText( + i18n( "<b>%1</b> requested authorization to add you to his/her contact list." ).arg( user ) ); + else + m_ui->lblUserReq->setText( i18n( "Authorization reply to <b>%1</b>." ).arg( user ) ); +} + +void ICQAuthReplyDialog::setRequestReason( const QString & reason ) +{ + m_ui->lblRequestReason->setText( reason ); +} + +QString ICQAuthReplyDialog::reason() +{ + return m_ui->leReason->text(); +} + +bool ICQAuthReplyDialog::grantAuth() +{ + return m_ui->rbGrant->isChecked(); +} + +#include "icqauthreplydialog.moc" |