kscreensaver.h
/* This file is part of the KDE libraries
Copyright (c) 2001 Martin R. Jones <mjones@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KSCREENSAVER_H
#define KSCREENSAVER_H
#include <qwidget.h>
#include <kdelibs_export.h>
class QTimer;
class KScreenSaverPrivate;
class KBlankEffectPrivate;
class KDE_EXPORT KScreenSaver : public QWidget
{
Q_OBJECT
public:
KScreenSaver( WId id=0 );
~KScreenSaver();
protected:
void embed( QWidget *widget );
bool eventFilter( QObject *o, QEvent * );
private:
KScreenSaverPrivate *d;
};
class KBlankEffect : public QObject
{
Q_OBJECT
public:
KBlankEffect( QObject *parent=0 );
~KBlankEffect();
enum Effect { Random=-1, Blank=0, SweepRight, SweepDown, Blocks,
MaximumEffects };
void blank( QWidget *w, Effect effect=Random );
typedef void (KBlankEffect::*BlankEffect)();
signals:
void doneBlank();
protected slots:
void timeout();
protected:
void finished();
void blankNormal();
void blankSweepRight();
void blankSweepDown();
void blankBlocks();
protected:
static BlankEffect effects[];
KBlankEffectPrivate *d;
};
#endif
KBlankEffect::blank
void blank(QWidget *w, Effect effect=Random)
Blank a widget using the specified effect.
Definition: kscreensaver.cpp:140
KBlankEffect::doneBlank
void doneBlank()
emitted when a blanking effect has completed.
KScreenSaver
Provides a QWidget for a screensaver to draw into.
Definition: kscreensaver.h:59
KBlankEffect
Blanks a widget using various effects.
Definition: kscreensaver.h:94

KDE Home | KDE Accessibility Home | Description of Access Keys