From c3b707c026782768bd8c0e6ae6b574fe8a36802d Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 17 Feb 2010 01:04:17 +0000 Subject: Added old abandoned KDE3 version of kmyfirewall git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmyfirewall@1091559 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmyfirewall/kmfwidgets/kmfchecklistitem.cpp | 58 +++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 kmyfirewall/kmfwidgets/kmfchecklistitem.cpp (limited to 'kmyfirewall/kmfwidgets/kmfchecklistitem.cpp') diff --git a/kmyfirewall/kmfwidgets/kmfchecklistitem.cpp b/kmyfirewall/kmfwidgets/kmfchecklistitem.cpp new file mode 100644 index 0000000..171f1f7 --- /dev/null +++ b/kmyfirewall/kmfwidgets/kmfchecklistitem.cpp @@ -0,0 +1,58 @@ +// +// C++ Implementation: kmfchecklistitem +// +// Description: +// +// +// Author: Christian Hubinger , (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" + +// QT includes + +// KDE includes +#include + +// Project includes +#include "../core/netfilterobject.h" +#include "../core/kmfprotocol.h" +#include "../core/kmfprotocolusage.h" + +namespace KMF { + +KMFCheckListItem::KMFCheckListItem( QListView *parent, QListViewItem *after, const QString& text, Type tt, KMFProtocolUsage* obj ) : QCheckListItem( parent, after, text, tt ) { + loadKMFProtocolUsage( obj ); +} +KMFCheckListItem::KMFCheckListItem( QListViewItem *parent, const QString& text , Type tt, KMFProtocolUsage* obj ) : QCheckListItem( parent, text, tt ) { + loadKMFProtocolUsage( obj ); +} +KMFCheckListItem::KMFCheckListItem( QListViewItem *parent, QListViewItem *after, const QString& text, Type tt, KMFProtocolUsage* obj ) : QCheckListItem( parent, after, text, tt ) { + loadKMFProtocolUsage( obj ); +} + +KMFCheckListItem::~KMFCheckListItem() {} + + +void KMFCheckListItem::loadKMFProtocolUsage( KMFProtocolUsage* obj ) { + if ( KMFProtocolUsage *prot = dynamic_cast ( obj ) ) { + m_protocolUsage = prot; + } else { + kdDebug() << "ERROR: Given NetfilterObject has wrong type" << endl; + } +} + +} + -- cgit v1.2.3