GLApplet Class Reference
from PyKDE4.plasma import *
Inherits: Plasma.Applet → QGraphicsWidget → QObject
Namespace: Plasma
Detailed Description
GLApplet plasma/glapplet.h <Plasma/GLApplet>
Plasma Applet that is fully rendered using OpengGL
Methods | |
__init__ (self, QGraphicsItem parent, QString serviceId, int appletId) | |
__init__ (self, QObject parent, [QVariant] args) | |
long | bindTexture (self, QImage image, long target=GL_TEXTURE_2D) |
deleteTexture (self, long texture_id) | |
makeCurrent (self) | |
paintGLInterface (self, QPainter painter, QStyleOptionGraphicsItem option) |
Method Documentation
__init__ | ( | self, | ||
QGraphicsItem | parent, | |||
QString | serviceId, | |||
int | appletId | |||
) |
@arg parent the QGraphicsItem this applet is parented to @arg serviceId the name of the .desktop file containing the information about the widget @arg appletId a unique id used to differentiate between multiple instances of the same Applet type
This constructor is to be used with the plugin loading systems found in KPluginInfo and KService. The argument list is expected to have two elements: the KService service ID for the desktop entry and an applet ID which must be a base 10 number.
@arg parent a QObject parent; you probably want to pass in 0 @arg args a list of strings containing two entries: the service id and the applet id
long bindTexture | ( | self, | ||
QImage | image, | |||
long | target=GL_TEXTURE_2D | |||
) |
deleteTexture | ( | self, | ||
long | texture_id | |||
) |
makeCurrent | ( | self ) |
paintGLInterface | ( | self, | ||
QPainter | painter, | |||
QStyleOptionGraphicsItem | option | |||
) |
Reimplement this method to render using OpenGL. QPainter passed to this method will always use OpenGL engine and rendering using OpenGL api directly is supported.