0,0 → 1,52 |
/*************************************************************************** |
* Copyright (C) 2009 by Manuel Schrape * |
* manuel.schrape@gmx.de * |
* * |
* This program is free software; you can redistribute it and/or modify * |
* it under the terms of the GNU General Public License as published by * |
* the Free Software Foundation; either version 2 of the License. * |
* * |
* This program is distributed in the hope that it will be useful, * |
* but WITHOUT ANY WARRANTY; without even the implied warranty of * |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
* GNU General Public License for more details. * |
* * |
* You should have received a copy of the GNU General Public License * |
* along with this program; if not, write to the * |
* Free Software Foundation, Inc., * |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
***************************************************************************/ |
#include "dlg_Preferences.h" |
|
dlg_Preferences::dlg_Preferences(QWidget *parent) : QDialog(parent) |
{ |
setupUi(this); |
} |
|
void dlg_Preferences::set_Settings(cSettings *t_Settings) |
{ |
o_Settings = t_Settings; |
|
le_TCP_Port->setText(QString("%1").arg(o_Settings->SERVER.TCP_PORT)); |
le_UDP_Port->setText(QString("%1").arg(o_Settings->SERVER.UDP_PORT)); |
le_Password->setText(o_Settings->SERVER.Password); |
|
le_LiveServer->setText(o_Settings->LIVEDATA.Server); |
le_LivePort->setText(o_Settings->LIVEDATA.Port); |
le_LiveUser->setText(o_Settings->LIVEDATA.User); |
le_LivePassword->setText(o_Settings->LIVEDATA.Password); |
} |
|
cSettings *dlg_Preferences::get_Settings() |
{ |
o_Settings->SERVER.Password = le_Password->text(); |
o_Settings->SERVER.TCP_PORT = le_TCP_Port->text().toInt(); |
o_Settings->SERVER.UDP_PORT = le_UDP_Port->text().toInt(); |
|
o_Settings->LIVEDATA.Server = le_LiveServer->text(); |
o_Settings->LIVEDATA.Port = le_LivePort->text(); |
o_Settings->LIVEDATA.User = le_LiveUser->text(); |
o_Settings->LIVEDATA.Password = le_LivePassword->text(); |
|
return o_Settings; |
} |