Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QDLClient Class Reference
[QtBaseModule]

The QDLClient class manages a set of QDLLinks for a client object. More...

    #include <QDLClient>

Inherits QObject.

Inherited by QDLEditClient.

Public Functions

Public Slots

Additional Inherited Members


Detailed Description

The QDLClient class manages a set of QDLLinks for a client object.

The QDLClient class stores a set of QDLLinks for a client object. QDLClient manages the stored QDLLinks, allows links to be requested from QDL data sources and to activate a link on a QDL source.

The links managed by the client object can be saved using QDLClient::saveLinks() and can be restored using QDLClient::loadLinks(). Alternatively if the client object belongs to a group, QDLClients::saveLinks() and QDL::loadLinks() should be used for convenience.

This class operates independently of any other object. The subclasses QDLBrowserClient and QDLEditClient extends this class to operate on a widget and its text dependently.

See also QDLBrowserClient and QDLEditClient.


Member Function Documentation

QDLClient::QDLClient ( QObject * parent, const QString & name )

Constructs a QDLClient, parent is passed on to QObject to establish the parent child relationship. The QDLClient is identified by name, which should be unique within a group of QDLClients. name should only contain alpha-numeric characters, underscores and spaces.

QDLClient::~QDLClient ()   [virtual]

Destroys a QDL Client.

void QDLClient::activateLink ( const int linkId )   [slot]

Activates the stored QDLLink identified by linkId on the QDL data source.

int QDLClient::addLink ( QDSData & link )   [virtual]

Adds the link stored in link to the client object. The link Id is returned if the link is added correctly, otherwise 0 is returned.

QDL sources create link, which is returned during QDLEditClient::requestLinks(). Therefore in normal usage this method isn't called directly by a client.

See also requestLinks(), setLink(), and removeLink().

void QDLClient::breakLink ( const int linkId, const bool broken = true )

Sets the broken state of the stored QDLLink identified by linkId to broken, which is used to indicate that the data item at the source is no longer available.

See also removeLink().

void QDLClient::clear ()   [slot]

Removes all links from the client object.

See also requestLinks().

QString QDLClient::hint () const

Returns the hint used when requesting QDLLinks

See also setHint().

QDLLink QDLClient::link ( const int linkId ) const

Retrieves a copy of the stored QDLLink identified by linkId. If the copy of the QDLLink is modified, QDLClient::setLink() should be used to update the stored QDLLink.

If linkId is invalid a null QDLLink will be returned.

See also setLink() and linkIds().

QString QDLClient::linkAnchorText ( const int linkId, const bool noIcon = false ) const

Returns the rich-text anchor for the QDLLink identified by linkId. The anchor will not contain the QDLLink icon if noIcon is true.

QList<int> QDLClient::linkIds () const

Returns a list of all the stored Link IDs.

See also link().

void QDLClient::loadLinks ( QDataStream & stream )   [virtual]

Loads the links in stream into the client object. stream is generated by QDLClient::saveLinks().

See also saveLinks().

void QDLClient::removeLink ( const int linkId )   [virtual]

Removes the link stored identified by linkId, and updates the anchor text for the link in the parent widget's text.

See also addLink() and setLink().

void QDLClient::requestLinks ( QWidget * parent )   [slot]

Requests QDL links from a source. The user selects the desired source from a list of available QDL sources, the list is a modal dialog connected to parent.

See also clear().

void QDLClient::requestLinks ( const QDSServiceInfo & qdlService )   [slot]

This is an overloaded member function, provided for convenience.

Requests QDL links from the QDL source described in qdlService. This method can be used when the QDL source is known.

See also clear().

void QDLClient::saveLinks ( QDataStream & stream ) const

Saves the stored links to stream.

See also loadLinks().

void QDLClient::setHint ( const QString & hint )

Sets the hint used when requesting QDLLinks

See also hint().

void QDLClient::setLink ( const int linkId, const QDLLink & link )   [virtual]

Updates the link stored identified by linkId with link.

See also link(), addLink(), and removeLink().

bool QDLClient::validLinkId ( const int linkId ) const

Returns true if linkId identifies a stored QDLLink; otherwise returns false.

See also linkIds().

void QDLClient::verifyLinks ()   [virtual slot]

Verifies the correctness of the links stored by the client object. This method determines if QDLLinks are broken, and ensures that all stored links have are properly configured.

See also addLink(), setLink(), and removeLink().


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3