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

#ifndef __PKGUPGRADETRAYNOTIFIER_H
#define __PKGUPGRADETRAYNOTIFIER_H

#include <qobject.h>

class PkgUpgradeController;
class PackageMgrTray;

/**
  * @brief Notifies the user of progress via a tray icon.
  *
  * @note The class expects to be instantiated when the process is started
  *       and destroyed when all operations are finished.
  */
class PkgUpgradeTrayNotifier : public QObject
{
Q_OBJECT
public:
    PkgUpgradeTrayNotifier(PkgUpgradeController *, PackageMgrTray *, const char *name = NULL);
    virtual ~PkgUpgradeTrayNotifier();

protected slots:
	void currentPackageChanged(const QString &);
	void overallProgressChanged(int percent);
	void userInputRequired(const QString &);

private:
	void updateToolTip();

	PackageMgrTray *tray;
	
	QString currentPackage;
	int overallProgress;
};

#endif /* __PKGUPGRADETRAYNOTIFIER_H */
