Subversion Repositories Projects

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
674 KeyOz 1
/***************************************************************************
2
 *   Copyright (C) 2009 by Manuel Schrape                                  *
3
 *   manuel.schrape@gmx.de                                                 *
4
 *                                                                         *
5
 *   This program is free software; you can redistribute it and/or modify  *
6
 *   it under the terms of the GNU General Public License as published by  *
7
 *   the Free Software Foundation; either version 2 of the License.        *
8
 *                                                                         *
9
 *   This program is distributed in the hope that it will be useful,       *
10
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
11
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
12
 *   GNU General Public License for more details.                          *
13
 *                                                                         *
14
 *   You should have received a copy of the GNU General Public License     *
15
 *   along with this program; if not, write to the                         *
16
 *   Free Software Foundation, Inc.,                                       *
17
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
18
 ***************************************************************************/
19
#include "dlg_Terminal.h"
20
 
21
dlg_Terminal::dlg_Terminal(QWidget *parent) : QDialog(parent)
22
{
23
    setupUi(this);
24
 
25
    connect(btn_Delete,   SIGNAL(clicked()), this, SLOT(slot_btn_Delete()));
26
}
27
 
28
void dlg_Terminal::slot_btn_Delete()
29
{
30
    te_Out->clear();
31
}
32
 
33
void dlg_Terminal::show_Data(int t_Typ, QString t_Data)
34
{
35
    te_Out->moveCursor(QTextCursor::End,  QTextCursor::MoveAnchor);
36
 
37
    switch(t_Typ)
38
    {
39
        case 1:
40
        {
41
            if (cb_Data->isChecked())
42
            {
43
                te_Out->insertHtml("<span style=\"color:#00ffff;\">" + t_Data + "<br /></span>");
44
            }
45
        }
46
        break;
47
        case 2:
48
        {
49
            if ((t_Data.length() > 0) && (cb_Info->isChecked()))
50
            {
51
                te_Out->insertHtml("<span style=\"color:#00ff00;\">" + t_Data + "</span><br />");
52
            }
53
        }
54
        break;
55
        case 3:
56
        {
57
            if (cb_Send->isChecked())
58
            {
59
                te_Out->insertHtml("<span style='color:#ff0000;'>" + t_Data + "<br /></span>");
60
            }
61
        }
62
        break;
63
    }
64
}
65