KScreenSaver Class Reference

`#include <kscreensaver.h>`

Inherits QWidget.

## Public Member Functions

| KScreenSaver (WId id=0)

## Protected Member Functions

void | embed (QWidget *widget)
bool | eventFilter (QObject *o, QEvent *)

## Detailed Description

Provides a QWidget for a screensaver to draw into.

You should derive from this widget and implement your screensaver's functionality. To use libkss, provide the following constants and functions:

extern "C" { const char *kss_applicationName = "yourappname"; const char *kss_description = I18N_NOOP( "Your screensaver" ); const char *kss_version = "1.0";

KScreenSaver *kss_create( WId d ) { // return your KScreenSaver derived screensaver }

QDialog *kss_setup() { // return your modal setup dialog } }

Provides a QWidget for a screensaver to draw into.

Author
  Martin R. Jones mjone.nosp@m.s@kd.nosp@m.e.org

Definition at line 59 of file kscreensaver.h.

## Constructor & Destructor Documentation

KScreenSaver::KScreenSaver | ( | WId | id = `0` | ) |

Parameters

  id | The winId() of the widget to draw the screensaver into.

Definition at line 42 of file kscreensaver.cpp.

## Member Function Documentation

void KScreenSaver::embed | ( | QWidget * | widget | ) |

protected

You cannot create a new widget with this widget as parent, since this widget may not be owned by your application.

In order to create widgets with a KScreenSaver as parent, create the widget with no parent, call embed(), and then show() the widget.

Parameters

  widget | The widget to embed in the screensaver widget.

Definition at line 78 of file kscreensaver.cpp.

The documentation for this class was generated from the following files:

- kscreensaver.h
- kscreensaver.cpp

KDE Home | KDE Accessibility Home | Description of Access Keys