diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-02-07 19:02:49 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-02-07 19:02:49 (GMT) |
commit | a21d013c029bdeef960dad9327a3d07dfdcdaa30 (patch) | |
tree | 90268ef963d04f99050589b8fc395bc105506529 /Swift/QtUI/QtAddContactDialog.cpp | |
parent | 9a00b89112861cf81554da9e956b2b3b5cddbdf7 (diff) | |
download | swift-a21d013c029bdeef960dad9327a3d07dfdcdaa30.zip swift-a21d013c029bdeef960dad9327a3d07dfdcdaa30.tar.bz2 |
Removed AddContactDialog.
Diffstat (limited to 'Swift/QtUI/QtAddContactDialog.cpp')
-rw-r--r-- | Swift/QtUI/QtAddContactDialog.cpp | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/Swift/QtUI/QtAddContactDialog.cpp b/Swift/QtUI/QtAddContactDialog.cpp deleted file mode 100644 index a5f5a10..0000000 --- a/Swift/QtUI/QtAddContactDialog.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2010 Kevin Smith - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. - */ - -#include "QtAddContactDialog.h" -#include "QtSwiftUtil.h" - -namespace Swift { - -QtAddContactDialog::QtAddContactDialog(QWidget* parent) : QDialog(parent) { - setupUi(this); - errorLabel_->hide(); - setAttribute(Qt::WA_DeleteOnClose, true); - connect(buttons_, SIGNAL(accepted()), SLOT(accept())); - connect(buttons_, SIGNAL(rejected()), SLOT(reject())); -} - -void QtAddContactDialog::accept() { - if (contactJID_->displayText().isEmpty()) { - showError("You must specify a contact to add."); - return; - } - if (name_->displayText().isEmpty()) { - showError("You must specify a name for the contact."); - return; - } - errorLabel_->hide(); - emit onAddCommand(JID(Q2PSTRING(contactJID_->displayText())), name_->displayText()); - QDialog::accept(); -} - -void QtAddContactDialog::showError(const QString& error) { - errorLabel_->setText(QString("<font color='red'>%1</font>").arg(error)); - errorLabel_->show(); -} -} |