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

#include <trayicon.h>

#include <qpixmap.h>
#include <qimage.h>

class QTimer;
class QPopupMenu;

class BatteryTray : public TrayIcon {
	Q_OBJECT

public:
	BatteryTray();
	virtual	~BatteryTray();

	void start();
   
public slots:
	void updateStatus();
	virtual void mouseDoubleClickEvent(QMouseEvent *e);

protected slots:
	virtual void openConfigDialog();

private:
	QPopupMenu *menu;
	QTimer	*timer;
	QImage	imgBattery, imgRecharge;
	QPixmap	pixPower, pixPreviousRecharge;
	int		previousRechargeLife, previousPowerSource;
};

#endif /* __BATTERYTRAY_H */
