/***************************************************************************
                          systemtray.h  -  description
                             -------------------
    begin                : December 2007
    copyright            : (c) 2007 by Iven Wold - 526f6c616e642053756368616e
    email                : hour.glass2@yahoo.com
    license              : GPL v 2.0
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This file is part of QTrans.                                          *
 *                                                                         *
 *   QTrans 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; version 2 of the License.               *
 *                                                                         *
 *   QTrans 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.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with QTrans. If not, see <http://www.gnu.org/licenses/> or      *
 *   write to the Free Software Foundation, Inc.,                          *
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.         *
 *                                                                         *
 ***************************************************************************/

#ifndef SYSTEMTRAY_H
#define SYSTEMTRAY_H

//#include <qwidget.h>
#include <QWidget>
//#include <KMenu>  //o
#include <QMenu>    //x
//#include <KAboutApplicationDialog>
//#include <KAction>    //o
#include <QAction>      //x

//#include <KSystemTrayIcon>    //o
#include <QSystemTrayIcon>      //x
#include <QMouseEvent>

//#include "qtrans.h"
//#include "settings.h"
//#include "variables.h"   //ooo


//class SystemTray : public KSystemTrayIcon  {  //o
class SystemTray : public QSystemTrayIcon  {    //x
	Q_OBJECT

public:
	SystemTray(QWidget *parent=0/*, KAboutData *aboutData=0*/);
	~SystemTray();
	bool isFirstTime;
	//KMenu *systemTrayIconMenu;   //o
    QMenu *systemTrayIconMenu;     //x

	//KAction *disableAct; //o
	QAction *disableAct;   //x
	//KAction *enableAct;  //o
	QAction *enableAct;    //x
	//KAction *exitAct;    //o
	QAction *exitAct;      //x

	bool hideTask;   //ooo

private:
	//KAction *aboutApplicationAct;    //o
    QAction *aboutApplicationAct;      //x
	//KAction *settingsAct;            //o
	QAction *settingsAct;              //x
	bool application_enabled;
	//KAboutApplicationDialog *aboutApplicationDialog;
	QIcon normalIcon;
	QIcon grayIcon;

protected:
	QWidget *Par;
/*private slots:
	void toggleMinimizeRestore();*/

public slots:
	void disable_application();
	void enable_application();
	bool is_enabled();
	void iconActivated(QSystemTrayIcon::ActivationReason reason);

};

#endif //SYSTEMTRAY_H
