[KLF Backend][KLF Tools][KLF Home]
KLatexFormula Project
Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties
KLFDisplayLabel Class Reference

A label to display a LaTeX-formula-output-like image. More...

#include <klfdisplaylabel.h>

List of all members.

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

Detailed Description

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.

Note:
As of version 3.3.0, the labelFixedSize property dissapeared, it is no longer used. Use QWidget::setFixedSize() directly instead.

Definition at line 46 of file klfdisplaylabel.h.


Member Enumeration Documentation

Enumerator:
Clear 
Ok 
Error 

Definition at line 61 of file klfdisplaylabel.h.


Constructor & Destructor Documentation

KLFDisplayLabel::KLFDisplayLabel ( QWidget *  parent)

Definition at line 35 of file klfdisplaylabel.cpp.

References QPalette::setColor().

Definition at line 57 of file klfdisplaylabel.cpp.


Member Function Documentation

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.

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().

Todo:
subtract margins/frame border width/etc.

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.


Property Documentation

Definition at line 50 of file klfdisplaylabel.h.

Definition at line 50 of file klfdisplaylabel.h.

bool KLFDisplayLabel::glowEffect [read, write]

Definition at line 52 of file klfdisplaylabel.h.

Definition at line 53 of file klfdisplaylabel.h.

Definition at line 54 of file klfdisplaylabel.h.

bool KLFDisplayLabel::labelEnabled [read, write]

Definition at line 55 of file klfdisplaylabel.h.


The documentation for this class was generated from the following files:

Generated by doxygen 1.7.6.1. The KLatexFormula website is hosted on sourceforge.net