Krita Source Code Documentation
Loading...
Searching...
No Matches
TypeSelector Class Reference

Type selector, matching the type of an element. More...

+ Inheritance diagram for TypeSelector:

Public Member Functions

bool match (const QDomElement &e) override
 Matches the given element.
 
int priority () override
 
QString toString () const override
 Returns string representation of selector.
 
 TypeSelector (const QString &type)
 
- Public Member Functions inherited from CssSelectorBase
virtual ~CssSelectorBase ()
 

Private Attributes

QString m_type
 

Detailed Description

Type selector, matching the type of an element.

Definition at line 53 of file SvgCssHelper.cpp.

Constructor & Destructor Documentation

◆ TypeSelector()

TypeSelector::TypeSelector ( const QString & type)
inline

Definition at line 56 of file SvgCssHelper.cpp.

57 : m_type(type)
58 {
59 }

Member Function Documentation

◆ match()

bool TypeSelector::match ( const QDomElement & )
inlineoverridevirtual

Matches the given element.

Implements CssSelectorBase.

Definition at line 60 of file SvgCssHelper.cpp.

61 {
62 return e.tagName() == m_type;
63 }

References m_type.

◆ priority()

int TypeSelector::priority ( )
inlineoverridevirtual

Returns priority of selector see http://www.w3.org/TR/1998/REC-CSS2-19980512/cascade.html#specificity

Reimplemented from CssSelectorBase.

Definition at line 68 of file SvgCssHelper.cpp.

69 {
70 return 1;
71 }

◆ toString()

QString TypeSelector::toString ( ) const
inlineoverridevirtual

Returns string representation of selector.

Reimplemented from CssSelectorBase.

Definition at line 64 of file SvgCssHelper.cpp.

65 {
66 return m_type;
67 }

References m_type.

Member Data Documentation

◆ m_type

QString TypeSelector::m_type
private

Definition at line 74 of file SvgCssHelper.cpp.


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