/***************************************************************************
 *   Copyright (C) 2004, 2005 Thomas Nagy                                  *
 *   tnagy2^8@yahoo.fr                                                     *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License version 2        *
 *   as published by the Free Software Foundation (see COPYING)            *
 *                                                                         *
 *   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.                          *
 ***************************************************************************/

#include <kdebug.h>

#include "DGuiView.h"
#include "DGuiItem.h"

DGuiItem::DGuiItem(DGuiView * parent, int id) : DItem(id)
{
	// dangerous ? not if every view manages its items/children properly
	m_parent = parent;
}

DGuiItem::~DGuiItem()
{
}

DDataItem* DGuiItem::data() const
{
	if (!m_parent)
	{
		kdWarning()<<"bug in DGuiItem::data"<<endl;
		return NULL;
	}

	return m_parent->dataItem(Id());
}
