• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libplasma

flash.h

Go to the documentation of this file.
00001 /*
00002  *   Copyright 2007 by André Duffeck <duffeck@kde.org>
00003  *
00004  *   This program is free software; you can redistribute it and/or modify
00005  *   it under the terms of the GNU Library General Public License as
00006  *   published by the Free Software Foundation; either version 2, or
00007  *   (at your option) any later version.
00008 
00009  *
00010  *   This program is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details
00014  *
00015  *   You should have received a copy of the GNU Library General Public
00016  *   License along with this program; if not, write to the
00017  *   Free Software Foundation, Inc.,
00018  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00019  */
00020 
00021 #ifndef FLASH_H_
00022 #define FLASH_H_
00023 
00024 #include <QtCore/QObject>
00025 #include <QtGui/QGraphicsItem>
00026 #include <QtGui/QTextOption>
00027 
00028 #include <plasma/plasma_export.h>
00029 #include <plasma/widgets/widget.h>
00030 
00031 namespace Plasma
00032 {
00033 
00037 class PLASMA_EXPORT Flash : public Plasma::Widget
00038 {
00039     Q_OBJECT
00040     public:
00041         Flash(QGraphicsItem *parent = 0);
00042         virtual ~Flash();
00043 
00044         void paintWidget(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
00045         QRectF boundingRect() const;
00046 
00047         void setFont( const QFont & );
00048         void setColor( const QColor & );
00049         void setDuration( int duration );
00050 
00051         void flash( const QString &text, int duration = 0, const QTextOption &option = QTextOption(Qt::AlignCenter) );
00052         void flash( const QPixmap &pixmap, int duration = 0, Qt::Alignment align = Qt::AlignCenter );
00053 
00054     public Q_SLOTS:
00055         void kill();
00056 
00057     protected Q_SLOTS:
00058         void fadeIn();
00059         void fadeOut();
00060 
00061     protected:
00062         QPixmap renderPixmap();
00063 
00064     private:
00065         class Private;
00066         Private * const d;
00067 };
00068 
00069 }
00070 
00071 #endif

libplasma

Skip menu "libplasma"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal