File indexing completed on 2024-04-21 04:04:03
0001 /*************************************************************************** 0002 kdialogsetupjoueur.cpp - description 0003 ------------------- 0004 begin : Thu Jul 19 2001 0005 copyright : (C) 2001 by Gaƫl de Chalendar 0006 email : Gael.de.Chalendar@free.fr 0007 ***************************************************************************/ 0008 0009 /*************************************************************************** 0010 * * 0011 * This program is free software; you can redistribute it and/or modify * 0012 * it under the terms of the GNU General Public License as published by * 0013 * the Free Software Foundation; either either version 2 0014 of the License, or (at your option) any later version.of the License, or * 0015 * (at your option) any later version. * 0016 * * 0017 * You should have received a copy of the GNU General Public License 0018 * along with this program; if not, write to the Free Software 0019 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 0020 * 02110-1301, USA 0021 ***************************************************************************/ 0022 0023 #include "joingame.h" 0024 0025 #include <QString> 0026 #include <QLineEdit> 0027 0028 #include <KLocalizedString> 0029 #include "ksirk_debug.h" 0030 0031 namespace Ksirk 0032 { 0033 JoinGameDialog::JoinGameDialog(QString& host, 0034 int& port, 0035 QWidget *parent) : 0036 QDialog(parent), Ui::JoinGameDialog(), 0037 m_host(host), 0038 m_port(port) 0039 { 0040 qCDebug(KSIRK_LOG); 0041 setupUi(this); 0042 hostEdit-> setText(m_host); 0043 portEdit-> setText(QString::number(m_port)); 0044 0045 hostEdit->setFocus(); 0046 } 0047 0048 JoinGameDialog::~JoinGameDialog(){ 0049 hide(); 0050 } 0051 0052 void JoinGameDialog::accept() 0053 { 0054 qCDebug(KSIRK_LOG); 0055 0056 m_host = hostEdit->text(); 0057 m_port = hostEdit->text().toInt(); 0058 QDialog::accept(); 0059 } 0060 0061 void JoinGameDialog::reject() { 0062 // qCDebug(KSIRK_LOG) << "I not allow to close the dialog!"; 0063 QDialog::reject(); 0064 } 0065 0066 0067 } 0068 0069 #include "moc_joingame.cpp"