/***************************************************************************
                          kfbutton.h  -  description
                             -------------------
    begin                : Tue Dec 11 2001
    copyright            : (C) 2001 by Christian Hubinger
    email                : e9806056@student.tuwien.ac.at
 ***************************************************************************/

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

#include <qwidget.h>
#include <qpixmap.h>

/**
  *@author Christian Hubinger
  */

class KFButton : public QWidget {
	Q_OBJECT
public:
	KFButton(QWidget *parent=0,const char *name=0);
	~KFButton();
	enum { LEFT, RIGHT, TEXT };

public slots:
	void repaintButtons();
	void setAngel(int);
	void setButtonStyle( int );
	void setBackground( QPixmap *pic, int x, int y );
	void setText( const QString& );
signals:
	void clicked();
	void pressed();
	void over();
	void out();

protected:
	void paintEvent (QPaintEvent * );
	void enterEvent (QEvent * );
	void leaveEvent (QEvent * );
	void mousePressEvent( QMouseEvent * );
	void mouseReleaseEvent( QMouseEvent *);
private:
	QPixmap paintButton(int);
	QString m_text;
	QString right_normal, right_over, right_active, right_mask,
				left_normal, left_over, left_active, left_mask;
	int ang;
	int state;
	int buttonStyle;
};

#endif
