A label to display a LaTeX-formula-output-like image. More...
#include <klfdisplaylabel.h>
Public Types | |
enum | DisplayState { Clear = 0, Ok, Error } |
Public Slots | |
virtual void | setEnableToolTipPreview (bool enable) |
virtual void | displayClear () |
virtual void | display (QImage displayimg, QImage tooltipimage, bool labelenabled=true) |
virtual void | displayError (bool labelenabled=false) |
virtual void | displayError (const QString &errorMessage, bool labelenabled=false) |
void | setGlowEffect (bool on) |
void | setGlowEffectColor (const QColor &color) |
void | setGlowEffectRadius (int r) |
void | setLabelEnabled (bool enabled) |
Signals | |
void | labelDrag () |
Public Member Functions | |
KLFDisplayLabel (QWidget *parent) | |
virtual | ~KLFDisplayLabel () |
virtual DisplayState | currentDisplayState () const |
virtual QSize | labelSize () const |
maximum pixmap size we can display | |
virtual bool | enableToolTipPreview () const |
virtual QString | bigPreviewText () const |
bool | glowEffect () const |
QColor | glowEffectColor () const |
int | glowEffectRadius () const |
bool | labelEnabled () const |
Protected Member Functions | |
virtual void | mouseMoveEvent (QMouseEvent *e) |
Properties | |
bool | enableToolTipPreview |
QString | bigPreviewText |
bool | glowEffect |
QColor | glowEffectColor |
int | glowEffectRadius |
bool | labelEnabled |
A label to display a LaTeX-formula-output-like image.
This widget displays an image, and sets another image as tooltip. It can also set itself in "display error" mode, changing its look and displaying the error message as tooltip.
It emits labelDrag() whenever the user drags the display's contents, but only if the display's property labelEnabled
is TRUE (see setLabelEnabled()).
As a gadget, it can add an alien glow to the images it displays.
labelFixedSize
property dissapeared, it is no longer used. Use QWidget::setFixedSize() directly instead. Definition at line 46 of file klfdisplaylabel.h.
Definition at line 61 of file klfdisplaylabel.h.
KLFDisplayLabel::KLFDisplayLabel | ( | QWidget * | parent | ) |
Definition at line 35 of file klfdisplaylabel.cpp.
References QPalette::setColor().
KLFDisplayLabel::~KLFDisplayLabel | ( | ) | [virtual] |
Definition at line 57 of file klfdisplaylabel.cpp.
virtual QString KLFDisplayLabel::bigPreviewText | ( | ) | const [inline, virtual] |
Definition at line 74 of file klfdisplaylabel.h.
virtual DisplayState KLFDisplayLabel::currentDisplayState | ( | ) | const [inline, virtual] |
Definition at line 62 of file klfdisplaylabel.h.
void KLFDisplayLabel::display | ( | QImage | displayimg, |
QImage | tooltipimage, | ||
bool | labelenabled = true |
||
) | [virtual, slot] |
Definition at line 79 of file klfdisplaylabel.cpp.
References KLF_DEBUG_BLOCK, KLF_FUNC_NAME, and Ok.
void KLFDisplayLabel::displayClear | ( | ) | [virtual, slot] |
Definition at line 72 of file klfdisplaylabel.cpp.
References Clear.
virtual void KLFDisplayLabel::displayError | ( | bool | labelenabled = false | ) | [inline, virtual, slot] |
Definition at line 90 of file klfdisplaylabel.h.
References displayError().
Referenced by displayError().
void KLFDisplayLabel::displayError | ( | const QString & | errorMessage, |
bool | labelenabled = false |
||
) | [virtual, slot] |
Definition at line 90 of file klfdisplaylabel.cpp.
References Error.
virtual bool KLFDisplayLabel::enableToolTipPreview | ( | ) | const [inline, virtual] |
Definition at line 72 of file klfdisplaylabel.h.
bool KLFDisplayLabel::glowEffect | ( | ) | const [inline] |
Definition at line 76 of file klfdisplaylabel.h.
QColor KLFDisplayLabel::glowEffectColor | ( | ) | const [inline] |
Definition at line 77 of file klfdisplaylabel.h.
int KLFDisplayLabel::glowEffectRadius | ( | ) | const [inline] |
Definition at line 78 of file klfdisplaylabel.h.
void KLFDisplayLabel::labelDrag | ( | ) | [signal] |
Referenced by mouseMoveEvent().
bool KLFDisplayLabel::labelEnabled | ( | ) | const [inline] |
Definition at line 80 of file klfdisplaylabel.h.
virtual QSize KLFDisplayLabel::labelSize | ( | ) | const [inline, virtual] |
maximum pixmap size we can display
For now, it just returns size().
Definition at line 70 of file klfdisplaylabel.h.
void KLFDisplayLabel::mouseMoveEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Definition at line 223 of file klfdisplaylabel.cpp.
References labelDrag().
virtual void KLFDisplayLabel::setEnableToolTipPreview | ( | bool | enable | ) | [inline, virtual, slot] |
Definition at line 86 of file klfdisplaylabel.h.
void KLFDisplayLabel::setGlowEffect | ( | bool | on | ) | [inline, slot] |
Definition at line 94 of file klfdisplaylabel.h.
void KLFDisplayLabel::setGlowEffectColor | ( | const QColor & | color | ) | [inline, slot] |
Definition at line 95 of file klfdisplaylabel.h.
void KLFDisplayLabel::setGlowEffectRadius | ( | int | r | ) | [inline, slot] |
Definition at line 96 of file klfdisplaylabel.h.
void KLFDisplayLabel::setLabelEnabled | ( | bool | enabled | ) | [inline, slot] |
Definition at line 98 of file klfdisplaylabel.h.
Definition at line 50 of file klfdisplaylabel.h.
bool KLFDisplayLabel::enableToolTipPreview [read, write] |
Definition at line 50 of file klfdisplaylabel.h.
bool KLFDisplayLabel::glowEffect [read, write] |
Definition at line 52 of file klfdisplaylabel.h.
QColor KLFDisplayLabel::glowEffectColor [read, write] |
Definition at line 53 of file klfdisplaylabel.h.
int KLFDisplayLabel::glowEffectRadius [read, write] |
Definition at line 54 of file klfdisplaylabel.h.
bool KLFDisplayLabel::labelEnabled [read, write] |
Definition at line 55 of file klfdisplaylabel.h.