summaryrefslogtreecommitdiffstats
path: root/kmyfirewall/kmfwidgets/kmfchecklistitem.cpp
blob: a9135f1818db71000e42ed5d45da220635ed8172 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//
// C++ Implementation: kmfchecklistitem
//
// Description:
//
//
// Author: Christian Hubinger <chubinger@irrsinnig.org>, (C) 2003
//
// Copyright: See COPYING file that comes with this distribution
//
//
/***************************************************************************
 *                                                                         *
 *   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, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/


#include "kmfchecklistitem.h"

// TQt includes

// KDE includes
#include <kdebug.h>

// Project includes
#include "../core/netfilterobject.h"
#include "../core/kmfprotocol.h"
#include "../core/kmfprotocolusage.h"

namespace KMF {

KMFCheckListItem::KMFCheckListItem( TQListView *parent, TQListViewItem *after, const TQString& text, Type tt, KMFProtocolUsage* obj ) : TQCheckListItem( parent, after, text,  tt ) {
	loadKMFProtocolUsage( obj );
}
KMFCheckListItem::KMFCheckListItem( TQListViewItem *parent, const TQString& text , Type tt, KMFProtocolUsage* obj ) : TQCheckListItem( parent, text,  tt ) {
	loadKMFProtocolUsage( obj );
}
KMFCheckListItem::KMFCheckListItem( TQListViewItem *parent, TQListViewItem *after, const TQString& text, Type tt, KMFProtocolUsage* obj ) : TQCheckListItem( parent, after, text,  tt ) {
	loadKMFProtocolUsage( obj );
}

KMFCheckListItem::~KMFCheckListItem() {}


void KMFCheckListItem::loadKMFProtocolUsage( KMFProtocolUsage* obj ) {
	if ( KMFProtocolUsage *prot = dynamic_cast<KMFProtocolUsage*> ( obj ) ) {
		m_protocolUsage = prot;
	} else {
		kdDebug() << "ERROR: Given NetfilterObject has wrong type" << endl;
	}
}

}