Rev 711 | Rev 750 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 711 | Rev 715 | ||
---|---|---|---|
Line 26... | Line 26... | ||
26 | //////////////////////// |
26 | //////////////////////// |
27 | dlg_Main::dlg_Main() |
27 | dlg_Main::dlg_Main() |
28 | { |
28 | { |
29 | setupUi(this); |
29 | setupUi(this); |
Line -... | Line 30... | ||
- | 30 | ||
30 | 31 | s_Buffer = ""; |
|
Line 31... | Line 32... | ||
31 | o_Settings = new cSettings(); |
32 | o_Settings = new cSettings(); |
32 | 33 | ||
Line 750... | Line 751... | ||
750 | void dlg_Main::slot_Input_Connected() |
751 | void dlg_Main::slot_Input_Connected() |
751 | { |
752 | { |
752 | connect(o_Input, SIGNAL(sig_NewData(QString)), this, SLOT(slot_Input_Data(QString))); |
753 | connect(o_Input, SIGNAL(sig_NewData(QString)), this, SLOT(slot_Input_Data(QString))); |
Line 753... | Line 754... | ||
753 | 754 | ||
754 | o_Input->send_Data(HandlerIP::make_Frame(ID_COMMUNICATOR, 101, QA_NAME + " " + QA_VERSION)); |
755 | o_Input->send_Data(HandlerIP::make_Frame(ID_COMMUNICATOR, 101, QA_NAME + " " + QA_VERSION)); |
755 | // o_Input->send_Data(HandlerMK::make_Frame('v', 0, c_Data, 0).toLatin1().data(), DATA_VERSION); |
756 | o_Input->send_Data(HandlerMK::make_Frame('v', 0, c_Data, 0).toLatin1().data(), DATA_VERSION); |
756 | btn_Connect->setText(tr("Trennen")); |
757 | btn_Connect->setText(tr("Trennen")); |
Line 757... | Line 758... | ||
757 | } |
758 | } |
758 | 759 | ||
Line 851... | Line 852... | ||
851 | { |
852 | { |
852 | int ID = Socket->property("ID").toUInt(); |
853 | int ID = Socket->property("ID").toUInt(); |
853 | ID = ID; |
854 | ID = ID; |
Line 854... | Line 855... | ||
854 | 855 | ||
855 | // QString t_Data = QString(TCP_Socket->readLine(TCP_Socket->bytesAvailable())).remove(QChar('\n')); |
856 | // QString t_Data = QString(TCP_Socket->readLine(TCP_Socket->bytesAvailable())).remove(QChar('\n')); |
- | 857 | QString t_Data = s_Buffer + QString(Socket->readAll()); |
|
Line 856... | Line 858... | ||
856 | QString t_Data = QString(Socket->readAll()); |
858 | s_Buffer = ""; |
Line 857... | Line 859... | ||
857 | 859 | ||
858 | QStringList l_Data = t_Data.split('\r'); |
860 | QStringList l_Data = t_Data.split('\n'); |
859 | 861 | ||
860 | for (int z = 0; z < l_Data.count(); z++) |
862 | for (int z = 0; z < l_Data.count(); z++) |
- | 863 | { |
|
861 | { |
864 | if ((l_Data[z][l_Data[z].length() - 1] == '\r')) |
862 | if ((l_Data[z].length() > 3)) |
865 | { |
863 | { |
866 | l_Data[z].remove(QChar('\r')); |
864 | if (l_Data[z][0] == '$') |
867 | if (l_Data[z][0] == '$') |
865 | { |
868 | { |
Line 873... | Line 876... | ||
873 | show_Terminal(3, "MK> " + l_Data[z]); |
876 | show_Terminal(3, "MK> " + l_Data[z]); |
874 | o_Input->send_Data(l_Data[z]); |
877 | o_Input->send_Data(l_Data[z]); |
875 | } |
878 | } |
876 | } |
879 | } |
877 | } |
880 | } |
- | 881 | else |
|
- | 882 | { |
|
- | 883 | qDebug("Ohne Ende"); |
|
- | 884 | s_Buffer = s_Buffer + l_Data[z]; |
|
- | 885 | } |
|
- | 886 | ||
878 | } |
887 | } |
Line 879... | Line 888... | ||
879 | 888 | ||
880 | /* |
889 | /* |