• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

KParts

  • KParts
  • SelectorInterface
Classes | Public Types | Public Member Functions

KParts::SelectorInterface Class Reference

Optional base class for HtmlExtension-derived classes Provides DOM Selector like API: querySelector and querySelectorAll, in order to find specific elements in an HTML document. More...

#include <htmlextension.h>

List of all members.

Classes

class  Element

Public Types

enum  QueryMethod { None = 0x00, EntireContent = 0x01, SelectedContent = 0x02 }

Public Member Functions

virtual ~SelectorInterface ()
virtual Element querySelector (const QString &query, QueryMethod method) const =0
virtual QList< Element > querySelectorAll (const QString &query, QueryMethod method) const =0
virtual QueryMethods supportedQueryMethods () const

Detailed Description

Optional base class for HtmlExtension-derived classes Provides DOM Selector like API: querySelector and querySelectorAll, in order to find specific elements in an HTML document.

Example: const QList<SelectorInterface::Element> elements = selectorInterface->querySelectorAll("head > link[rel=\"alternate"]");

Definition at line 89 of file htmlextension.h.


Member Enumeration Documentation

enum KParts::SelectorInterface::QueryMethod

Query methods.

Enumerator:
None 

Quering is not possible.

EntireContent 

Query or can query the entire content.

SelectedContent 

Query or can query only the user selected content, if any.

Definition at line 98 of file htmlextension.h.


Constructor & Destructor Documentation

virtual KParts::SelectorInterface::~SelectorInterface ( ) [inline, virtual]

Destructor.

Definition at line 108 of file htmlextension.h.


Member Function Documentation

virtual Element KParts::SelectorInterface::querySelector ( const QString &  query,
QueryMethod  method 
) const [pure virtual]

Returns the first (in document order) element in this fragment matching the given CSS selector query and querying method method.

Note that since the returned item is static snapshot, i.e. not live, it will not be updated when the document changes.

If the quering method specified by method is not supported or cannot be handled, then a null element is returned.

See also:
supportedQueryMethods
QueryMethod
virtual QList<Element> KParts::SelectorInterface::querySelectorAll ( const QString &  query,
QueryMethod  method 
) const [pure virtual]

Returns all (in document order) elements in this fragment matching the given CSS selector query and querying method method.

Note that since the returned list is static snapshot, i.e. not live, it will not be updated when the document changes.

If the quering method specified by method is not supported or cannot be handled, then an empty list is returned.

See also:
supportedQueryMethods
QueryMethod
SelectorInterface::QueryMethods SelectorInterface::supportedQueryMethods ( ) const [virtual]

Returns the supported query methods.

By default this function returns None.

See also:
QueryMethod

Definition at line 48 of file htmlextension.cpp.


The documentation for this class was generated from the following files:
  • htmlextension.h
  • htmlextension.cpp

KParts

Skip menu "KParts"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal