/* 
 * This file is part of DesktopBSD, see the README file.
 *
 * Author: Peter Hofer <ph@desktopbsd.net>
 *         (C) 2004, 2005
 *
 * Copyright: BSD, see the COPYING file included in this distribution
 *
 */

#ifndef __MOUNTER_H
#define __MOUNTER_H

#include <qobject.h>
#include <qstring.h>
#include <qintdict.h>
#include <ksystemtray.h>

#include <mntdevice.h>

class QPixmap;
class KPopupMenu;

class  MounterTray : public KSystemTray {
   Q_OBJECT
   
public:
   MounterTray();
   ~MounterTray() {};

public slots:



protected:
	virtual void mousePressEvent(QMouseEvent *);
	virtual void showEvent (QShowEvent *);
   
private slots:
	void  showMenu();
	void  showMenu(const QPoint &);
   void  mountUnmount(int);
   void  browseDevs();
   void  refreshAll();
	void popupClicked();
	void showIntroductionPopup();

   
private:
   void  clearDevs();
   void  mntInsert(MntDevice *,  uint indent,  KPopupMenu *);
   
   virtual void  contextMenuAboutToShow(KPopupMenu *);
   
   QPixmap  getIcon(const QString&,  int);
	QPixmap getIcon();

   QIntDict<MntDevice>        itemDict;
   QMap<QString, MntDevice*>  devList;
};

#endif /* __MOUNTER_H */
