Skip to main content

The DocImage Class Reference

Node representing an image. More...

Declaration

class DocImage { ... }

Included Headers

#include <src/docnode.h>

Base class

classDocCompoundNode

Base class for nodes with children. More...

Enumerations Index

enumType { ... }

Public Constructors Index

DocImage (DocParser *parser, DocNodeVariant *parent, const HtmlAttribList &attribs, const QCString &name, Type t, const QCString &url=QCString(), bool inlineImage=TRUE)

Public Member Functions Index

Typetype () const
QCStringname () const
boolhasCaption () const
QCStringwidth () const
QCStringheight () const
QCStringrelPath () const
QCStringurl () const
boolisInlineImage () const
boolisSVG () const
const HtmlAttribList &attribs () const
voidparse ()

Private Member Attributes Index

std::unique_ptr< Private >p

Description

Node representing an image.

Definition at line 641 of file docnode.h.

Enumerations

Type

enum DocImage::Type
Enumeration values
Html
Latex
Rtf
DocBook
Xml

Definition at line 644 of file docnode.h.

644 enum Type { Html, Latex, Rtf, DocBook, Xml };

Public Constructors

DocImage()

DocImage::DocImage (DocParser * parser, DocNodeVariant * parent, const HtmlAttribList & attribs, const QCString & name, Type t, const QCString & url=QCString(), bool inlineImage=TRUE)

Declaration at line 645 of file docnode.h, definition at line 1281 of file docnode.cpp.

1282 Type t,const QCString &url, bool inlineImage) :
1283 DocCompoundNode(parser,parent), p(std::make_unique<Private>(attribs, name, t, parser->context.relPath, url, inlineImage))
1284{
1285}

References attribs, DocCompoundNode::DocCompoundNode, name, p, DocNode::parent, DocNode::parser, relPath and url.

Public Member Functions

attribs()

const HtmlAttribList & DocImage::attribs ()
inline

Definition at line 656 of file docnode.h.

656 const HtmlAttribList &attribs() const { return p->attribs; }

Reference p.

Referenced by DocImage, HtmlDocVisitor::operator() and XmlDocVisitor::operator().

hasCaption()

bool DocImage::hasCaption ()
inline

height()

QCString DocImage::height ()
inline

isInlineImage()

bool DocImage::isInlineImage ()
inline

isSVG()

bool DocImage::isSVG ()

Declaration at line 655 of file docnode.h, definition at line 1287 of file docnode.cpp.

1287bool DocImage::isSVG() const
1288{
1289 QCString locName = p->url.isEmpty() ? p->name : p->url;
1290 int len = static_cast<int>(locName.length());
1291 int fnd = locName.find('?'); // ignore part from ? until end
1292 if (fnd==-1) fnd=len;
1293 return fnd>=4 && locName.mid(fnd-4,4)==".svg";
1294}

References QCString::find, QCString::length, QCString::mid and p.

Referenced by HtmlDocVisitor::operator().

name()

parse()

void DocImage::parse ()

Declaration at line 657 of file docnode.h, definition at line 1296 of file docnode.cpp.

References DocCompoundNode::children, CMD_IMAGE, DocParser::defaultHandleTitleAndSize, p, DocNode::parser and DocNode::thisVariant.

relPath()

QCString DocImage::relPath ()
inline

Definition at line 652 of file docnode.h.

652 QCString relPath() const { return p->relPath; }

Reference p.

Referenced by DocImage, DocbookDocVisitor::operator(), HtmlDocVisitor::operator() and XmlDocVisitor::operator().

type()

url()

QCString DocImage::url ()
inline

Definition at line 653 of file docnode.h.

653 QCString url() const { return p->url; }

Reference p.

Referenced by DocImage, HtmlDocVisitor::operator() and XmlDocVisitor::operator().

width()

QCString DocImage::width ()
inline

Private Member Attributes

p

std::unique_ptr<Private> DocImage::p

Definition at line 675 of file docnode.h.

675 std::unique_ptr<Private> p;

Referenced by attribs, DocImage, height, isInlineImage, isSVG, name, parse, relPath, type, url and width.


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


Generated via doxygen2docusaurus by Doxygen 1.14.0.