Rev 674 | Rev 722 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 674 | Rev 711 | ||
---|---|---|---|
Line 15... | Line 15... | ||
15 | * along with this program; if not, write to the * |
15 | * along with this program; if not, write to the * |
16 | * Free Software Foundation, Inc., * |
16 | * Free Software Foundation, Inc., * |
17 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
17 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
18 | ***************************************************************************/ |
18 | ***************************************************************************/ |
Line -... | Line 19... | ||
- | 19 | ||
19 | 20 | #include <QCryptographicHash> |
|
20 | #include <QFileDialog> |
21 | #include <QFileDialog> |
21 | #include <QMessageBox> |
22 | #include <QMessageBox> |
Line 22... | Line 23... | ||
22 | #include <QSettings> |
23 | #include <QSettings> |
Line 165... | Line 166... | ||
165 | { |
166 | { |
166 | int CMD = Data[2].toInt(); |
167 | int CMD = Data[2].toInt(); |
Line 167... | Line 168... | ||
167 | 168 | ||
168 | switch(CMD) |
169 | switch(CMD) |
169 | { |
170 | { |
170 | case 501 : |
171 | case 101 : |
171 | { |
172 | { |
- | 173 | o_Input->send_Data(HandlerIP::make_Frame(ID_SETTINGS, 101, QA_NAME + " " + QA_VERSION)); |
|
- | 174 | } |
|
- | 175 | break; |
|
- | 176 | case 502 : |
|
- | 177 | { |
|
- | 178 | switch (Data[3].toInt()) |
|
- | 179 | { |
|
- | 180 | case 105 : |
|
- | 181 | { |
|
- | 182 | QString s_MD5PW; |
|
- | 183 | QByteArray a_MD5PW; |
|
- | 184 | ||
- | 185 | a_MD5PW = QCryptographicHash::hash(le_Password->text().toAscii(),QCryptographicHash::Md5); |
|
- | 186 | ||
- | 187 | s_MD5PW = QString(a_MD5PW.toHex().data()); |
|
- | 188 | ||
- | 189 | o_Input->send_Data(HandlerIP::make_Frame(ID_SETTINGS, 105, s_MD5PW)); |
|
- | 190 | } |
|
- | 191 | break; |
|
- | 192 | case 106 : |
|
- | 193 | { |
|
- | 194 | o_Input->send_Data(HandlerIP::make_Frame(ID_SETTINGS, 106, DataFields)); |
|
- | 195 | } |
|
- | 196 | break; |
|
172 | o_Input->send_Data(HandlerIP::make_Frame(ID_SETTINGS, 105, le_Password->text())); |
197 | } |
173 | } |
198 | } |
174 | break; |
199 | break; |
175 | case 505 : |
200 | case 505 : |
176 | { |
201 | { |
Line 387... | Line 412... | ||
387 | void dlg_Main::slot_Input_Disconnected(int Error) |
412 | void dlg_Main::slot_Input_Disconnected(int Error) |
388 | { |
413 | { |
389 | cb_Server->setEnabled(true); |
414 | cb_Server->setEnabled(true); |
390 | le_Password->setEnabled(true); |
415 | le_Password->setEnabled(true); |
Line 391... | Line -... | ||
391 | - | ||
392 | // qDebug("Close"); |
416 | |
393 | disconnect(o_Input, SIGNAL(sig_NewData(QString)), 0, 0); |
- | |
394 | if (o_Input->Mode() == TCP) |
- | |
395 | { |
417 | disconnect(o_Input, SIGNAL(sig_NewData(QString)), 0, 0); |
396 | disconnect(o_Input, SIGNAL(sig_Disconnected(int)), 0, 0); |
418 | disconnect(o_Input, SIGNAL(sig_Disconnected(int)), 0, 0); |
397 | disconnect(o_Input, SIGNAL(sig_Connected()), 0, 0); |
419 | disconnect(o_Input, SIGNAL(sig_Connected()), 0, 0); |
398 | } |
420 | |
399 | ac_Connect->setChecked(false); |
421 | ac_Connect->setChecked(false); |
Line 400... | Line 422... | ||
400 | ac_Connect->setText(tr("Verbinden")); |
422 | ac_Connect->setText(tr("Verbinden")); |
401 | 423 | ||
Line 430... | Line 452... | ||
430 | 452 | ||
431 | void dlg_Main::slot_Input_Connected() |
453 | void dlg_Main::slot_Input_Connected() |
432 | { |
454 | { |
Line 433... | Line -... | ||
433 | connect(o_Input, SIGNAL(sig_NewData(QString)), this, SLOT(slot_Input_Data(QString))); |
- | |
434 | 455 | connect(o_Input, SIGNAL(sig_NewData(QString)), this, SLOT(slot_Input_Data(QString))); |
|
435 | o_Input->send_Data(HandlerIP::make_Frame(ID_SETTINGS, 101, QA_NAME + " " + QA_VERSION)); |
456 | |
436 | o_Input->send_Data(HandlerMK::make_Frame('v', ADDRESS_ALL, c_Data, 0).toLatin1().data(), DATA_VERSION); |
457 | o_Input->send_Data(HandlerMK::make_Frame('v', ADDRESS_ALL, c_Data, 0).toLatin1().data(), DATA_VERSION); |
Line 437... | Line 458... | ||
437 | ac_Connect->setText(tr("Trennen")); |
458 | ac_Connect->setText(tr("Trennen")); |
Line 582... | Line 603... | ||
582 | Setting.setValue("GasLimit", t_Set.LoopGasLimit); |
603 | Setting.setValue("GasLimit", t_Set.LoopGasLimit); |
583 | Setting.setValue("StickThreshold", t_Set.LoopThreshold); |
604 | Setting.setValue("StickThreshold", t_Set.LoopThreshold); |
584 | Setting.setValue("LoopHysteresis", t_Set.LoopHysterese); |
605 | Setting.setValue("LoopHysteresis", t_Set.LoopHysterese); |
585 | Setting.setValue("TurnOverNick", t_Set.WinkelUmschlagNick); |
606 | Setting.setValue("TurnOverNick", t_Set.WinkelUmschlagNick); |
586 | Setting.setValue("TurnOverRoll", t_Set.WinkelUmschlagRoll); |
607 | Setting.setValue("TurnOverRoll", t_Set.WinkelUmschlagRoll); |
- | 608 | Setting.endGroup(); |
|
Line 587... | Line 609... | ||
587 | 609 | ||
588 | Setting.beginGroup("User"); |
610 | Setting.beginGroup("User"); |
589 | Setting.setValue("Parameter_1", t_Set.UserParam1); |
611 | Setting.setValue("Parameter_1", t_Set.UserParam1); |
590 | Setting.setValue("Parameter_2", t_Set.UserParam2); |
612 | Setting.setValue("Parameter_2", t_Set.UserParam2); |