17,6 → 17,7 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
***************************************************************************/ |
|
#include <QCryptographicHash> |
#include <QMessageBox> |
#include <QDomDocument> |
#include <QFile> |
94,10 → 95,6 |
connect(ac_Connect, SIGNAL(triggered()), this, SLOT(slot_ac_Connect())); |
connect(ac_Toolbar, SIGNAL(triggered()), this, SLOT(slot_ac_Toolbar())); |
|
// About QMK-Kernel & About-QT Dialog einfügen |
connect(ac_About, SIGNAL(triggered()), this, SLOT(slot_ac_About())); |
menu_Help->addAction(trUtf8("Über &Qt"), qApp, SLOT(aboutQt())); |
|
connect(sb_Intervall, SIGNAL(valueChanged(int)), this, SLOT(slot_sb_Intervall(int))); |
|
connect(sl_Zoom, SIGNAL(valueChanged(int)), this, SLOT(slot_Zoom(int))); |
115,6 → 112,10 |
connect(ac_LoadMap, SIGNAL(triggered()), this, SLOT(slot_ac_LoadMapPic())); |
connect(ac_Record, SIGNAL(triggered()), this, SLOT(slot_ac_Record())); |
connect(ac_RouteDelete, SIGNAL(triggered()), this, SLOT(slot_ac_RouteDelete())); |
|
// About QMK-Kernel & About-QT Dialog einfügen |
connect(ac_About, SIGNAL(triggered()), this, SLOT(slot_ac_About())); |
menu_Help->addAction(trUtf8("Über &Qt"), qApp, SLOT(aboutQt())); |
} |
|
void dlg_Main::init_Directorys() |
163,11 → 164,35 |
|
switch(CMD) |
{ |
case 501 : |
case 101 : |
{ |
o_Input->send_Data(HandlerIP::make_Frame(0, 105, le_Password->text())); |
o_Input->send_Data(HandlerIP::make_Frame(ID_MAPS, 101, QA_NAME + " " + QA_VERSION)); |
} |
break; |
case 502 : |
{ |
switch (Data[3].toInt()) |
{ |
case 105 : |
{ |
QString s_MD5PW; |
QByteArray a_MD5PW; |
|
a_MD5PW = QCryptographicHash::hash(le_Password->text().toAscii(),QCryptographicHash::Md5); |
|
s_MD5PW = QString(a_MD5PW.toHex().data()); |
|
o_Input->send_Data(HandlerIP::make_Frame(ID_MAPS, 105, s_MD5PW)); |
} |
break; |
case 106 : |
{ |
o_Input->send_Data(HandlerIP::make_Frame(ID_MAPS, 106, DataFields)); |
} |
break; |
} |
} |
break; |
case 505 : |
{ |
if (Data[3] == "OK") |
534,7 → 559,7 |
// TODO: Check auf Entfernung zur IST-Position. |
void dlg_Main::send_Target(Point *t_Target) |
{ |
if (l_Track.length() > 0) |
if (l_Track.count() > 0) |
{ |
s_MK_WayPoint s_WayPoint; |
|
681,7 → 706,7 |
} |
|
} |
else |
else // Connect über TCPIP |
{ |
o_Input = new Input_TCP(); |
o_Input->Init(); |
730,7 → 755,7 |
// qDebug(QString("CRC-Error - " + t_Data).toLatin1().data()); |
} |
} |
else if (o_Input->Mode() == TCP) |
else if ((o_Input->Mode() == TCP) && (t_Data[0] == '$')) |
{ |
parse_IP_Data(t_Data); |
} |
742,13 → 767,10 |
cb_Server->setEnabled(true); |
le_Password->setEnabled(true); |
|
// qDebug("Close"); |
disconnect(o_Input, SIGNAL(sig_NewData(QString)), 0, 0); |
if (o_Input->Mode() == TCP) |
{ |
disconnect(o_Input, SIGNAL(sig_Disconnected(int)), 0, 0); |
disconnect(o_Input, SIGNAL(sig_Connected()), 0, 0); |
} |
disconnect(o_Input, SIGNAL(sig_Disconnected(int)), 0, 0); |
disconnect(o_Input, SIGNAL(sig_Connected()), 0, 0); |
|
ac_Connect->setChecked(false); |
ac_Connect->setText(tr("Verbinden")); |
btn_Connect->setChecked(false); |
787,7 → 809,6 |
{ |
connect(o_Input, SIGNAL(sig_NewData(QString)), this, SLOT(slot_Input_Data(QString))); |
|
o_Input->send_Data(HandlerIP::make_Frame(0, 101, QA_NAME + " " + QA_VERSION)); |
o_Input->send_Data(HandlerMK::make_Frame('v', 0, c_Data, 0).toLatin1().data(), DATA_VERSION); |
ac_Connect->setText(tr("Trennen")); |
} |
1003,14 → 1024,10 |
{ |
if (Show == true) |
{ |
// qDebug("Error 1"); |
if (l_RouteWP->hasPoints()) |
{ |
// qDebug("Error 2"); |
o_RouteWP->addGeometry(l_RouteWP); |
// qDebug("Error 3"); |
o_Map->updateRequestNew(); |
// qDebug("Error 4"); |
} |
} |
else |