0,0 → 1,89 |
/*************************************************************************** |
* 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_Terminal.h" |
|
dlg_Terminal::dlg_Terminal(QWidget *parent) : QDialog(parent) |
{ |
setupUi(this); |
|
connect(btn_Delete, SIGNAL(clicked()), this, SLOT(slot_btn_Delete())); |
} |
|
void dlg_Terminal::slot_btn_Delete() |
{ |
te_Out->clear(); |
} |
|
void dlg_Terminal::show_Data(int t_Typ, QString t_Data) |
{ |
te_Out->moveCursor(QTextCursor::End, QTextCursor::MoveAnchor); |
|
switch(t_Typ) |
{ |
case 1: |
{ |
if (cb_Data->isChecked()) |
{ |
te_Out->insertHtml("<span style=\"color:#00ffff;\">" + t_Data + "<br /></span>"); |
} |
} |
break; |
case 2: |
{ |
if ((t_Data.length() > 0) && (cb_Info->isChecked())) |
{ |
te_Out->insertHtml("<span style=\"color:#00ff00;\">" + t_Data + "</span><br />"); |
} |
} |
break; |
case 3: |
{ |
if (cb_Send->isChecked()) |
{ |
te_Out->insertHtml("<span style='color:#ff0000;'>" + t_Data + "<br /></span>"); |
} |
} |
break; |
case 4: |
{ |
if (cb_TCP->isChecked()) |
{ |
te_Out->insertHtml("<span style='color:#ff00ff;'>" + t_Data + "<br /></span>"); |
} |
} |
break; |
case 5: |
{ |
if (cb_TCP->isChecked()) |
{ |
te_Out->insertHtml("<span style='color:#ffff00;'>" + t_Data + "<br /></span>"); |
} |
} |
break; |
case 6: |
{ |
if (cb_TCP->isChecked()) |
{ |
te_Out->insertHtml("<span style='color:#ffffff;'>" + t_Data + "<br /></span>"); |
} |
} |
break; |
} |
} |
|