/***************************************************************************
                          dcspy.h  -  description
                             -------------------
    begin                : Fre Nov 8 2002
    copyright            : (C) 2002 by Mathias Küster
    email                : mathen@users.berlios.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, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef DCSPY_H
#define DCSPY_H

#include <qwidget.h>
#include <qtimer.h>

#include <DCDialogSpy.h>

#include <dclib/dcobject.h>

/**
  *@author Mathias Küster
  */

class DCSpy : public DCDialogSpy  {
Q_OBJECT

public: 
	/** construtor */
	DCSpy(QWidget *parent, const char *name, int wflags);
	/** destructor */
	virtual ~DCSpy();
	
	/** */
	void InitDocument();
	/** */
	void DeInitDocument();

	/** search */
	void DC_Search( CMessageSearch * MessageSearch );

protected:
	/** close event handler */
	virtual void closeEvent(QCloseEvent*) {};

private:
	/** */
	QTimer m_Timer;
	
private slots:
	/** */
	void slotClickedClear();
	/** */
	void timerDone();
	/** */
	void slotContextMenuSpy( QListViewItem*, const QPoint &, int );
};

/** */
extern DCSpy * g_pSpy;

#endif
