/*
 * orphanedfilesdialog.h
 *
 * Copyright (c) 2002, 2003 Frerich Raabe <raabe@kde.org>
 *
 * 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. For licensing and distribution details, check the
 * accompanying file 'COPYING'.
 */
#ifndef ORPHANEDFILESDIALOG_H
#define ORPHANEDFILESDIALOG_H

#include <kdialogbase.h>

class KFileDetailView;
class KSqueezedTextLabel;

class QCustomEvent;
class QTimer;

class DirTraverserThread;

namespace Barry
{
	class OrphanedFilesDialog : public KDialogBase
	{
		Q_OBJECT
		public:
			OrphanedFilesDialog( QWidget *parent, const char *name = 0 );

			virtual void show();

		protected:
			virtual void customEvent( QCustomEvent *e );

		protected slots:
			virtual void slotCancel();

		private slots:
			void showContextMenu( KListView *lv, QListViewItem *i, const QPoint &p );
			void showProperties();
			void openFile();
			void deleteFile();
			void addFileToIgnoreList();
			void addDirectoryToIgnoreList();

		private:
			QStringList determineRegisteredFiles();
			QStringList determineIgnoredFiles();
			void scanDirectory( const QString &path );
			void addItemToIgnoreList( const QString &item );
			void search();

			QTimer *m_timer;
			KFileDetailView *m_foundFiles;
			KSqueezedTextLabel *m_statusText;
			DirTraverserThread *m_traverserThread;
	};
}

#endif // ORPHANEDFILESDIALOG_H
// vim:ts=4:sw=4:noet:list


syntax highlighted by Code2HTML, v. 0.9.1