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

Plasma

flashinglabel.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 PLASMA_FLASHINGLABEL_H
00022 #define PLASMA_FLASHINGLABEL_H
00023 
00024 #include <QtGui/QGraphicsWidget>
00025 #include <QtGui/QTextOption>
00026 
00027 #include <plasma/plasma_export.h>
00028 
00029 namespace Plasma
00030 {
00031 
00032 class FlashingLabelPrivate;
00033 
00039 class PLASMA_EXPORT FlashingLabel : public QGraphicsWidget
00040 {
00041     Q_OBJECT
00042     public:
00043         explicit FlashingLabel(QGraphicsItem *parent = 0);
00044         virtual ~FlashingLabel();
00045 
00046         void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
00047 
00048         void setFont(const QFont &);
00049         void setColor(const QColor &);
00050         void setDuration(int duration);
00051 
00052         void flash(const QString &text, int duration = 0,
00053                    const QTextOption &option = QTextOption(Qt::AlignCenter));
00054         void flash(const QPixmap &pixmap, int duration = 0,
00055                    Qt::Alignment align = Qt::AlignCenter);
00056 
00057         void setAutohide(bool autohide);
00058         bool autohide() const;
00059 
00060     public Q_SLOTS:
00061         void kill();
00062 
00063     protected Q_SLOTS:
00064         void fadeIn();
00065         void fadeOut();
00066 
00067     private:
00068         Q_PRIVATE_SLOT(d, void elementAnimationFinished(int))
00069         FlashingLabelPrivate *const d;
00070 };
00071 
00072 }
00073 
00074 #endif

Plasma

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
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