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

spinxtop.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 KBFX_SPINX_TOP_H
#define KBFX_SPINX_TOP_H
#include <qwidget.h>
#include <qpixmap.h>
#include <qstring.h>
#include <qimage.h>
#include <qlabel.h>
#include <qpainter.h>
#include <qimage.h>
#include <kuser.h>            //drop suppor for kde 3.2 , sorry
#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>

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

   ~KbfxSpixTop ();

  virtual void paintEvent (QPaintEvent *);
  virtual void timerEvent (QTimerEvent * e);
  QPixmap compositePixmap (QPixmap src, QPixmap dest);
  void setUserImage (QPixmap pixmap)
  {
    userImage = pixmap;
  }
  void setBoundBox (QPixmap box)
  {
    boundBox = box;
  }
  QPixmap getKDEIcon (QString name);
  QString getUserName ();

  virtual void mousePressEvent (QMouseEvent * e);

  
  virtual void enterEvent (QEvent * e)
  {
     _timer->stop();
    _timer->start ( 13 , FALSE);
   _downOffSet = this->height()/2;
   _upOffSet = this->height()/2;
    this->update ();
    moseEnter = 1;
  }
  virtual void leaveEvent (QEvent *)
  {
    moseEnter = 0;
    _timer->stop();
    this->update ();

  }

  public slots:

void scrollArrowsOn()
{
      _timer->stop();
        _timer->start ( 13 , FALSE);
      moseEnter = 1; //I know some swedesh..well only one word mose=mouse;
      this->update();
}

void scrollArrowsOff()
{
      _timer->stop();
      _downOffSet = this->height()/2;;
      _upOffSet = this->height()/2;
      moseEnter = 0; //I know some swedesh..well only one word mose=mouse;
      this->update();

}
void animate ();
void animateScrollBar();

signals:
      void scroll(int);
      ;
private:
  QPixmap userImage;
  QPixmap boundBox;
  QPixmap up;
  QPixmap down;
  int moseEnter;
  QPixmap scrollText_down;
  QPixmap scrollText_up;
  QPixmap scrollText_settings;
  int _frame;
  int _in;
  double _inte;
  QTimer * _timer;
  int _upOffSet;
  int _downOffSet;
  double _opacity;
};

#endif

Generated by  Doxygen 1.6.0   Back to index