LeechCraft Monocle  0.6.70-13729-g7046a9d2a7
Modular document viewer for LeechCraft
LC::Monocle::IPendingFontInfoRequest Class Referenceabstract

A proxy object for a pending font info request. More...

#include "ihavefontinfo.h"

Public Member Functions

virtual ~IPendingFontInfoRequest ()
 
virtual QObject * GetQObject ()=0
 Returns this object as a QObject. More...
 
virtual QList< FontInfoGetFontInfos () const =0
 Returns the font information list for the document. More...
 

Protected Member Functions

virtual void ready ()=0
 Notifies that the request is completed. More...
 

Detailed Description

A proxy object for a pending font info request.

The IPendingFontInfoRequest object is returned from the IHaveFontInfo::RequestFontInfos() method. The object is initially in pending state until the ready() signal is emitted, after which the font info can be obtained via the GetFontInfos() method. The GetQObject() method can be used to get a QObject* to pass in connect().

The object is used to support asynchronous font info fetching, though some single-threaded format implementations may block.

The IPendingFontInfoRequest objects are self-owning, that is, they schedule their own destruction shortly after emitting the ready() signal. The object can be used no later than in slots connected to the ready() signal via Qt::DirectConnection.

Definition at line 85 of file ihavefontinfo.h.

Constructor & Destructor Documentation

◆ ~IPendingFontInfoRequest()

virtual LC::Monocle::IPendingFontInfoRequest::~IPendingFontInfoRequest ( )
inlinevirtual

Definition at line 88 of file ihavefontinfo.h.

Member Function Documentation

◆ GetFontInfos()

virtual QList<FontInfo> LC::Monocle::IPendingFontInfoRequest::GetFontInfos ( ) const
pure virtual

Returns the font information list for the document.

If the request object is ready, then the list of FontInfo structures is returned, otherwise an empty list is returned.

Returns
The list of font information structures, or an empty list if the object is not ready.
See also
ready()

◆ GetQObject()

virtual QObject* LC::Monocle::IPendingFontInfoRequest::GetQObject ( )
pure virtual

Returns this object as a QObject.

Returns
This object as a QObject.

◆ ready()

virtual void LC::Monocle::IPendingFontInfoRequest::ready ( )
protectedpure virtual

Notifies that the request is completed.

This signal is emitted to notify that the IPendingFontInfoRequest object became ready and can now be queried via the GetFontInfos() method.

The IPendingFontInfoRequest will schedule the self deletion after emitting this signal.

Note
This function is expected to be a signal.
See also
GetFontInfos()

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