Logo Search packages:      
Sourcecode: kbfx version File versions  Download package

spinxbutton.h

/***************************************************************************
 *   Copyright (C) 2005 by Siraj Razick                                    *
 *   sirajr@gmail.com                                                      *
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 *   This program 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 this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#ifndef SPINX_BUTTON_H
#define SPINX_BUTTON_H
#include <qwidget.h>
#include <qpixmap.h>
#include <qstring.h>
#include <qimage.h>
#include <qlabel.h>
#include <qpainter.h>
#include <dcopref.h>
#include <qvariant.h>
#include <qlabel.h>
#include <qtabwidget.h>
#include <qwidget.h>
#include <qiconview.h>
#include <qframe.h>
#include <qlayout.h>
//#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qaction.h>
#include <qmenubar.h>
#include <qpopupmenu.h>
#include <qtoolbar.h>
#include <qimage.h>
#include <qpixmap.h>
#include <qdir.h>
#include <kdesktopfile.h>
#include <kiconloader.h>
#include <kmessagebox.h>
#include <kicontheme.h>
#include <kprocess.h>
#include <qheader.h>
#include <qfileinfo.h>
#include <kmessagebox.h>
#include <krun.h>
#include <kurl.h>
#include <kservice.h>
#include <kservicegroup.h>
#include <qstringlist.h>
#include <kstandarddirs.h>
#include <kservicetype.h>
#include <qimage.h>
#include <qpixmap.h>
#include <kimageeffect.h>
#include <kcombobox.h>
#include <ktabwidget.h>
#include <kuser.h>
#include <qcursor.h>

/**
@author Siraj Razick
*/
00071 class SpinxButton : public QLabel 
{
  Q_OBJECT
public:
  SpinxButton(QWidget *parent = 0, const char *name = 0);

  ~SpinxButton();
  
 void setPixmap(QPixmap normal , QPixmap  hover);
 virtual void paintEvent(QPaintEvent *);
 QPixmap getKDEIcon(QString src);

virtual void mouseReleaseEvent ( QMouseEvent * e ) 
{
e = e;
emit clicked();

}

virtual void enterEvent ( QEvent * e)
{
e=e;
_current = _hover;
repaint();
      
                    QCursor   kbfxCursor;
                  kbfxCursor.setShape(Qt::PointingHandCursor); 
                  this->setCursor((const QCursor ) kbfxCursor);   

}
virtual void leaveEvent ( QEvent * e)
{
e = e;
_current  = _normal;
repaint();
}

  public slots:
  
  signals:
void clicked(); 
  private:
  
  QLabel * _canvas;
  QPixmap _hover;
  QPixmap _normal;  
  QPixmap _current;


//mng ??

  };

#endif

Generated by  Doxygen 1.6.0   Back to index