[KLF Backend][KLF Tools][KLF Home]
KLatexFormula Project
KLFContLatexPreview Class Reference

#include <klflatexpreviewthread.h>

Inheritance diagram for KLFContLatexPreview:
Collaboration diagram for KLFContLatexPreview:

Public Slots

void setEnabled (bool enabled)
bool setInput (const KLFBackend::klfInput &input)
bool setSettings (const KLFBackend::klfSettings &settings, bool disableExtraFormats=true)
bool setPreviewSize (const QSize &previewSize)
bool setLargePreviewSize (const QSize &largePreviewSize)

Signals

void previewReset ()
void outputAvailable (const KLFBackend::klfOutput &output)
void previewAvailable (const QImage &preview, const QImage &largePreview, const QImage &fullPreview)
void previewImageAvailable (const QImage &preview)
void previewLargeImageAvailable (const QImage &largePreview)
void previewFullImageAvailable (const QImage &fullPreview)
void previewError (const QString &errorString, int errorCode)
void compiling (bool isCompiling)

Public Member Functions

 KLFContLatexPreview (KLFLatexPreviewThread *thread=NULL)
bool enabled () const
KLFBackend::klfInput intput () const
KLFBackend::klfSettings settings () const
QSize previewSize () const
QSize largePreviewSize () const
void setThread (KLFLatexPreviewThread *thread)
Public Member Functions inherited from QObject
 QObject (QObject *parent)
virtual bool event (QEvent *e)
virtual bool eventFilter (QObject *watched, QEvent *event)
virtual const QMetaObjectmetaObject () const
QString objectName () const
void setObjectName (const QString &name)
bool isWidgetType () const
bool isWindowType () const
bool signalsBlocked () const
bool blockSignals (bool block)
QThreadthread () const
void moveToThread (QThread *targetThread)
int startTimer (int interval, Qt::TimerType timerType)
void killTimer (int id)
findChild (const QString &name, Qt::FindChildOptions options) const
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const
const QObjectList & children () const
void setParent (QObject *parent)
void installEventFilter (QObject *filterObj)
void removeEventFilter (QObject *obj)
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
bool disconnect (const char *signal, const QObject *receiver, const char *method) const
bool disconnect (const QObject *receiver, const char *method) const
void dumpObjectTree ()
void dumpObjectInfo ()
bool setProperty (const char *name, const QVariant &value)
QVariant property (const char *name) const
QList< QByteArraydynamicPropertyNames () const
void destroyed (QObject *obj)
void objectNameChanged (const QString &objectName)
QObjectparent () const
bool inherits (const char *className) const
void deleteLater ()

Properties

QSize previewSize
QSize largePreviewSize
Properties inherited from QObject
 objectName

Additional Inherited Members

Static Public Member Functions inherited from QObject
QString tr (const char *sourceText, const char *disambiguation, int n)
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
bool disconnect (const QMetaObject::Connection &connection)
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
Protected Member Functions inherited from QObject
QObjectsender () const
int senderSignalIndex () const
int receivers (const char *signal) const
bool isSignalConnected (const QMetaMethod &signal) const
virtual void timerEvent (QTimerEvent *event)
virtual void childEvent (QChildEvent *event)
virtual void customEvent (QEvent *event)
virtual void connectNotify (const QMetaMethod &signal)
virtual void disconnectNotify (const QMetaMethod &signal)

Detailed Description

A helper that runs in a different thread that generates previews in real-time as user types text, without blocking the GUI.

.......... UPDATE DOC FOR NEW THREAD OBJECT STRUCTURE ........

Note
returns (max.) three different image sizes set by setPreviewSize(), setLargePreviewSize() and the original image size. Setting an invalid size disables image generation of that particular preview size (might save resources by not resizing the image to that size).

Definition at line 152 of file klflatexpreviewthread.h.

Constructor & Destructor Documentation

◆ KLFContLatexPreview()

KLFContLatexPreview::KLFContLatexPreview ( KLFLatexPreviewThread * thread = NULL)

Definition at line 422 of file klflatexpreviewthread.cpp.

◆ ~KLFContLatexPreview()

KLFContLatexPreview::~KLFContLatexPreview ( )
virtual

Definition at line 432 of file klflatexpreviewthread.cpp.

Member Function Documentation

◆ compiling

void KLFContLatexPreview::compiling ( bool isCompiling)
signal

Is emitted whenever there currently is a LaTeX formula compiling

References setInput(), setLargePreviewSize(), setPreviewSize(), and setSettings().

◆ enabled()

bool KLFContLatexPreview::enabled ( ) const

Definition at line 443 of file klflatexpreviewthread.cpp.

◆ outputAvailable

void KLFContLatexPreview::outputAvailable ( const KLFBackend::klfOutput & output)
signal

Emitted when a preview was successfully generated (i.e., output.status==0). The full KLFBackend::klfOutput object is given here.

Note that this signal is emitted before the other preview***Available() functions.

◆ previewAvailable

void KLFContLatexPreview::previewAvailable ( const QImage & preview,
const QImage & largePreview,
const QImage & fullPreview )
signal

Emitted when a preview was successfully generated. All three images are given here (preview size, large preview size, original image)

◆ previewError

void KLFContLatexPreview::previewError ( const QString & errorString,
int errorCode )
signal

Emitted when generation of the latex preview raised an error. See the error codes defined in klfbackend.h

◆ previewFullImageAvailable

void KLFContLatexPreview::previewFullImageAvailable ( const QImage & fullPreview)
signal

Emitted when a preview was successfully generated. The original image is given.

◆ previewImageAvailable

void KLFContLatexPreview::previewImageAvailable ( const QImage & preview)
signal

Emitted when a preview was successfully generated. Preview Size image. See also setPreviewSize().

◆ previewLargeImageAvailable

void KLFContLatexPreview::previewLargeImageAvailable ( const QImage & largePreview)
signal

Emitted when a preview was successfully generated. Large preview size image. See also setLargePreviewSize().

◆ previewReset

void KLFContLatexPreview::previewReset ( )
signal

Emitted whenever there is no preview to generate (input latex string empty)

◆ setEnabled

void KLFContLatexPreview::setEnabled ( bool enabled)
slot

Definition at line 448 of file klflatexpreviewthread.cpp.

◆ setInput

bool KLFContLatexPreview::setInput ( const KLFBackend::klfInput & input)
slot
Returns
TRUE if the input was set, FALSE if current input is already equal to input. The thread will then take care to generate the corresponding preview and emit the previewAvailable() etc. signals.

Definition at line 459 of file klflatexpreviewthread.cpp.

Referenced by compiling().

◆ setLargePreviewSize

bool KLFContLatexPreview::setLargePreviewSize ( const QSize & largePreviewSize)
slot
Returns
TRUE if the largePreviewSize was set, FALSE if current large preview size is already equal to largePreviewSize

Definition at line 495 of file klflatexpreviewthread.cpp.

Referenced by compiling().

◆ setPreviewSize

bool KLFContLatexPreview::setPreviewSize ( const QSize & previewSize)
slot
Returns
TRUE if the previewSize was set, FALSE if current preview size is already equal to previewSize

Definition at line 487 of file klflatexpreviewthread.cpp.

Referenced by compiling().

◆ setSettings

bool KLFContLatexPreview::setSettings ( const KLFBackend::klfSettings & settings,
bool disableExtraFormats = true )
slot
Returns
TRUE if the settings were set, FALSE if current settings are already equal to settings

Definition at line 470 of file klflatexpreviewthread.cpp.

References KLFBackend::klfSettings::wantPDF, KLFBackend::klfSettings::wantRaw, and KLFBackend::klfSettings::wantSVG.

Referenced by compiling().

◆ setThread()

void KLFContLatexPreview::setThread ( KLFLatexPreviewThread * thread)

Definition at line 454 of file klflatexpreviewthread.cpp.

Property Documentation

◆ largePreviewSize

QSize KLFContLatexPreview::largePreviewSize
readwrite

Definition at line 157 of file klflatexpreviewthread.h.

◆ previewSize

QSize KLFContLatexPreview::previewSize
readwrite

Definition at line 156 of file klflatexpreviewthread.h.


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

Generated by doxygen 1.14.0