/***************************************************************************
                          FolderItem.h  -  description
                             -------------------
    begin                : Fri Jul 27 2001
    copyright            : (C) 2001 by Alex Podolsky
    email                : alexpod@users.sourceforge.net
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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 FOLDERITEM_H
#define FOLDERITEM_H

#include <qlistview.h>
#include "CdboFileItem.h"


class FolderItem : public CdboFileItem  {

public:
	
	FolderItem(QListView * parent, QString path, bool foldersOnly = true, bool sh = false);
	FolderItem(CdboFileItem * parent, QString path, bool foldersOnly = true, bool sh = false);
	
   	void setOpen( bool );
	void reloadList();  	
	
	inline bool isReadable() { return readable;}
	inline bool isOpen() { return opened;}
	inline void setShowHidden(bool sh = false) { showHidden = sh;}
	
	//inline void showsHidden() { return showHidden;}
	/** used for sorting */
	virtual QString key ( int column, bool ascending ) const;
	void setup();
	
private:
	void init();

    bool readable;
    bool opened;
    bool foldersOnly;
    bool showHidden;

};
#endif
