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

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

#include <klfdisplaylabel.h>

Inheritance diagram for KLFDisplayLabel:
Inheritance graph
[legend]
Collaboration diagram for KLFDisplayLabel:
Collaboration graph
[legend]

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 More...
 
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

◆ DisplayState

Enumerator
Clear 
Ok 
Error 

Definition at line 61 of file klfdisplaylabel.h.

Constructor & Destructor Documentation

◆ KLFDisplayLabel()

KLFDisplayLabel::KLFDisplayLabel ( QWidget *  parent)

Definition at line 35 of file klfdisplaylabel.cpp.

References QPalette::setColor().

◆ ~KLFDisplayLabel()

KLFDisplayLabel::~KLFDisplayLabel ( )
virtual

Definition at line 57 of file klfdisplaylabel.cpp.

Member Function Documentation

◆ bigPreviewText()

virtual QString KLFDisplayLabel::bigPreviewText ( ) const
inlinevirtual

Definition at line 74 of file klfdisplaylabel.h.

◆ currentDisplayState()

virtual DisplayState KLFDisplayLabel::currentDisplayState ( ) const
inlinevirtual

Definition at line 62 of file klfdisplaylabel.h.

◆ display

void KLFDisplayLabel::display ( QImage  displayimg,
QImage  tooltipimage,
bool  labelenabled = true 
)
virtualslot

Definition at line 79 of file klfdisplaylabel.cpp.

References KLF_DEBUG_BLOCK, KLF_FUNC_NAME, and Ok.

◆ displayClear

void KLFDisplayLabel::displayClear ( )
virtualslot

Definition at line 72 of file klfdisplaylabel.cpp.

References Clear.

◆ displayError [1/2]

virtual void KLFDisplayLabel::displayError ( bool  labelenabled = false)
inlinevirtualslot

Definition at line 90 of file klfdisplaylabel.h.

◆ displayError [2/2]

void KLFDisplayLabel::displayError ( const QString errorMessage,
bool  labelenabled = false 
)
virtualslot

◆ enableToolTipPreview()

virtual bool KLFDisplayLabel::enableToolTipPreview ( ) const
inlinevirtual

Definition at line 72 of file klfdisplaylabel.h.

◆ glowEffect()

bool KLFDisplayLabel::glowEffect ( ) const
inline

Definition at line 76 of file klfdisplaylabel.h.

◆ glowEffectColor()

QColor KLFDisplayLabel::glowEffectColor ( ) const
inline

Definition at line 77 of file klfdisplaylabel.h.

◆ glowEffectRadius()

int KLFDisplayLabel::glowEffectRadius ( ) const
inline

Definition at line 78 of file klfdisplaylabel.h.

◆ labelDrag

void KLFDisplayLabel::labelDrag ( )
signal

Referenced by mouseMoveEvent().

◆ labelEnabled()

bool KLFDisplayLabel::labelEnabled ( ) const
inline

Definition at line 80 of file klfdisplaylabel.h.

◆ labelSize()

virtual QSize KLFDisplayLabel::labelSize ( ) const
inlinevirtual

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.

◆ mouseMoveEvent()

void KLFDisplayLabel::mouseMoveEvent ( QMouseEvent e)
protectedvirtual

Definition at line 223 of file klfdisplaylabel.cpp.

References labelDrag().

◆ setEnableToolTipPreview

virtual void KLFDisplayLabel::setEnableToolTipPreview ( bool  enable)
inlinevirtualslot

Definition at line 86 of file klfdisplaylabel.h.

◆ setGlowEffect

void KLFDisplayLabel::setGlowEffect ( bool  on)
inlineslot

Definition at line 94 of file klfdisplaylabel.h.

◆ setGlowEffectColor

void KLFDisplayLabel::setGlowEffectColor ( const QColor color)
inlineslot

Definition at line 95 of file klfdisplaylabel.h.

◆ setGlowEffectRadius

void KLFDisplayLabel::setGlowEffectRadius ( int  r)
inlineslot

Definition at line 96 of file klfdisplaylabel.h.

◆ setLabelEnabled

void KLFDisplayLabel::setLabelEnabled ( bool  enabled)
inlineslot

Definition at line 98 of file klfdisplaylabel.h.

Property Documentation

◆ bigPreviewText

QString KLFDisplayLabel::bigPreviewText
read

Definition at line 50 of file klfdisplaylabel.h.

◆ enableToolTipPreview

bool KLFDisplayLabel::enableToolTipPreview
readwrite

Definition at line 50 of file klfdisplaylabel.h.

◆ glowEffect

bool KLFDisplayLabel::glowEffect
readwrite

Definition at line 52 of file klfdisplaylabel.h.

◆ glowEffectColor

QColor KLFDisplayLabel::glowEffectColor
readwrite

Definition at line 53 of file klfdisplaylabel.h.

◆ glowEffectRadius

int KLFDisplayLabel::glowEffectRadius
readwrite

Definition at line 54 of file klfdisplaylabel.h.

◆ labelEnabled

bool KLFDisplayLabel::labelEnabled
readwrite

Definition at line 55 of file klfdisplaylabel.h.


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

Generated by doxygen 1.8.13