[libkorigin Index] [libkorigin Heirarchy]
QPen selection dialog. More...
#include </home/mh/korigin/korigin/doc/tmp/kpen.h>
Inherits: QDialog
KDE (Q)Pen Selector Dialog.
Features style selection, color selection, width selection, pen preview, least recent pen history.
When the user clicks okay, the then selected pen is appended to the least recent pen list. The least recent pen list will not duplicate pens in the list. Up to eight pens are remembered.
Simplest use:
QPen pen = KPenDialog::selectPen();
See class KPenButton for a button for pen selection.
Construct a KPenDialog. The parameters parent and name resemble a standard QDialog. The third parameter, title, defines the caption of the dialog.
The KPenDialog by default offers a black pen, width zero, no line. If this is inapprotriate, use setPen() to preselect a different pen.
To show and execute the dialog, just call the (inherited) function exec().
Shut down a KPenDialog. Just an ordinary destructor.
Get current pen.
Preselect a pen. This defines the specified pen to be the default pen.
Let the user select a pen and return it. This is probably what you´re looking for. It displays the dialog and returns the selected pen. Preselected pen is the least recent pen. If you want a special pen to be preselected, just pass it as an argument.
When the user clicks okay, the then selected pen is appended to the least recent pen list.
Let the user manipulate/select a pen and return it. This is probably what you´re looking for. It displays the dialog and returns the selected pen. Preselected pen is the pen passed as the argument. If the user cancels the dialog, the predefined pen is returned. If you want an "empty" pen (i.e. a Qt default pen), omit the parameter.
When the user clicks okay, the then selected pen is appended to the least recent pen list.
predef | the pen to use as default |
Produce an return a QPixmap demonstrating the specified pen. The pixmap is meant to show the user what kind of lines the selected pen will draw.
width | the proposed width of the pixmap |
height | the proposed height of the pixmap |
pen | the pen to use for the pixmap |
Emitted when the OK button is pressed.
Emitted when the Cancel button is pressed.
Emitted when the Help button is pressed.
| Kdoc |