# class KSharedPixmap | Shared pixmap client. More...
Definition | `#include <ksharedpixmap.h>`
Inherits | KPixmap (kdecore) [public ], QWidget (qt) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- KSharedPixmap ()
- ~KSharedPixmap ()
- bool loadFromShared (QString name, QRect rect=QRect())
- bool isAvailable (QString name)

#### Signals

- void done (bool success)

#### Protected Methods

- bool x11Event (XEvent *)

## Detailed Description

Shared pixmap client.

A shared pixmap is a pixmap that resides on the X server, is referenced by a global id string, and can be accessed by all X clients.

This class is a client class to shared pixmaps in KDE. You can use it to copy (a part of) a shared pixmap into. KSharedPixmap inherits KPixmap for that purpose.

The server part of shared pixmaps is not implemented here. That part is provided by KPixmapServer, in the source file: kdebase/kdesktop/pixmapserver.cc.

An example: copy from a shared pixmap:

       KSharedPixmap *pm = new KSharedPixmap;
       connect(pm, SIGNAL(done(bool)), SLOT(slotDone(bool)));
       pm->loadFromShared("My Pixmap");

KSharedPixmap () | ### KSharedPixmap

Construct an empty pixmap.

~KSharedPixmap () | ### ~KSharedPixmap

Destroys the pixmap.

bool loadFromShared (QString name, QRect rect=QRect()) | ### loadFromShared

Load from a shared pixmap reference. The signal done() is emitted when the operation has finished.

Parameters:

name | The shared pixmap name.
rect | If you pass a nonzero rectangle, a tile is generated which is able to fill up the specified rectangle completely. This is solely for optimisation: in some cases the tile will be much smaller than the original pixmap. It reflects KSharedPixmap's original use: sharing of the desktop background to achieve pseudo transparency.

Returns: True if the shared pixmap exists and loading has started successfully, false otherwise.

bool isAvailable (QString name) | ### isAvailable

Check whether a shared pixmap is available.

Parameters:

name | The shared pixmap name.

Returns: True if the shared pixmap is available, false otherwise.

void done (bool success) | ### done

[signal]

This signal is raised when a pixmap load operation has finished.

Parameters:

success | True if successfull, false otherwise.

bool x11Event (XEvent *) | ### x11Event

[protected]

- Version: $Id: ksharedpixmap.h,v 1.3 2000/08/21 23:16:33 waba Exp $
- Author: Geert Jansen <jansen@kde.org>
- Generated: root@sparc.ports.openbsd.org on Wed May 2 09:37:45 2001, using kdoc 2.0a53.