class KApplet

KDE Panel Applet class. More...

Definition#include <kapplet.h>
InheritsDCOPObject (dcop) [private], QWidget (qt)
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Public Slots


Detailed Description

KDE Panel Applet class

This class implements panel applets.

enum Stretch {Fixed=0, Small, Medium, Large, Huge}

Sizes to which your applet may be streched when laying out the toolbar.

 KApplet ( QWidget* parent = 0, const char* name = 0 )

Construct a KApplet widget just like any other widget.

KApplet ()

Destructor

void  init ( int& argc, char ** argv )

Initialize the applet according to the passed command line parameters

Evalutate some command line arguments, dock into the respective applet container and eventually call setupGeometry().

void  setupGeometry ( Orientation orientation, int width, int height )

[virtual]

Set up the applet's geometry. This function needs to be reimplemented by subclasses.

The size parameter is meant as a hint in case an applet supports different look&feels depending on the target size. Of course, an applet could do these things in resizeEvent(), but this way it's more convenient.

The applet container that will embed this applet will resize itself to the standard size of its applets. If your applet needs more space, ensure to set a proper minimum size with QWidget::setMinimumWidth() or QWidget::setMinimumHeight() depending on the applets orientation.

Keep in mind that setupGeometry() may be called several times during a life-cycle of your applet, for example when the applet container is resized, moved or changes orientation.

Parameters:
orientationThe applet's orientation, either Qt::Horizontal or Qt::Vertical.
widthWidth of the applet.
heightHeight of the applet.

void  setStretch (Stretch size)

Set the applet to be fixed size or stretchable (and to what size).

Stretch  stretch ()

Returns: Integer of type Stretch indicating whether the applet is fixed size or stretchable (and to what size).

QSize  sizeHint ()

[const]

Returns: A suggested size for the applet.

Reimplemented from QWidget

Orientation  orientation ()

[const]

Returns the current orientation set by the last KApplet::init() call.