diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-06-10 16:49:49 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-06-10 16:49:49 (GMT) |
commit | 7214d768dca85a6d43892169d5008898249dce73 (patch) | |
tree | 0f8b2820c9cb58f058263c78306987d934fec526 /UI/Qt/QtJoinMUCDialog.cpp | |
parent | fd89da91d12b270d56f60544cad6f1ddc809af28 (diff) | |
download | swift-contrib-7214d768dca85a6d43892169d5008898249dce73.zip swift-contrib-7214d768dca85a6d43892169d5008898249dce73.tar.bz2 |
Moved UI/Qt -> Swift/QtUI.
Diffstat (limited to 'UI/Qt/QtJoinMUCDialog.cpp')
-rw-r--r-- | UI/Qt/QtJoinMUCDialog.cpp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/UI/Qt/QtJoinMUCDialog.cpp b/UI/Qt/QtJoinMUCDialog.cpp deleted file mode 100644 index b6f5814..0000000 --- a/UI/Qt/QtJoinMUCDialog.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include "QtJoinMUCDialog.h" -#include "QtSwiftUtil.h" - -namespace Swift { - -QtJoinMUCDialog::QtJoinMUCDialog(const QString& nick, const QString& muc, 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 QtJoinMUCDialog::accept() { - if (mucJID_->displayText().isEmpty()) { - showError("You must specify a room to join."); - return; - } - if (nick_->displayText().isEmpty()) { - showError("You must specify a nickname to join a room."); - return; - } - errorLabel_->hide(); - emit onJoinCommand(JID(Q2PSTRING(mucJID_->displayText())), nick_->displayText()); - QDialog::accept(); -} - -void QtJoinMUCDialog::showError(const QString& error) { - errorLabel_->setText(QString("<font color='red'>%1</font>").arg(error)); - errorLabel_->show(); -} -} |