Scribus API for plugins
A stable, high level and documented interface to the Scribus core that plugin developers can use to access the Scribus features.
Public Member Functions | List of all members
ScribusAPIDocument Class Reference

Main class for creating the GUI and interpreting the user input. More...

Inheritance diagram for ScribusAPIDocument:
Inheritance graph
[legend]
Collaboration diagram for ScribusAPIDocument:
Collaboration graph
[legend]

Public Member Functions

 ScribusAPIDocument (ScribusDoc *scribusDoc)
 
void set (ScribusDoc *scribusDoc)
 
void setPageRange (QList< int > pageRange)
 
QString getPath ()
 
ScribusAPIDocumentMetadata getMetadata ()
 
bool isPortrait (int pageNumber)
 
void render ()
 
void readItems ()
 Create a list ScribusAPIDocumentItem representing all document's items sorted by page and postion. More...
 
QList< ScribusAPIDocumentItem * > getPageItems (int page)
 
ScribusAPIDocumentItemgetCurrentItem ()
 
void readSections ()
 
QVector< QList< int > > getSections ()
 
QString getStylesAsCss ()
 
QStringList getParagraphStyleNames ()
 Get the list the names of all paragraph styles.
 
QStringList getCharacterStyleNames ()
 Get the list the names of all paragraph styles.
 
QByteArray getPageAsPNG (int pageNumber, int width, int height)
 Get the page as a PNG image. More...
 
QByteArray getPageAsPNG (int pageNumber, int maxSize)
 Get the page as a PNG image. More...
 
QByteArray getFirstPageAsCoverImage ()
 
int getPageCount ()
 
QString getPageNumberByIndex (int i)
 
int getSectionCount ()
 

Detailed Description

Main class for creating the GUI and interpreting the user input.

Test text comes here...

Member Function Documentation

◆ getMetadata()

ScribusAPIDocumentMetadata ScribusAPIDocument::getMetadata ( )

Returns the metadata

◆ getPageAsPNG() [1/2]

QByteArray ScribusAPIDocument::getPageAsPNG ( int  pageNumber,
int  width,
int  height 
)

Get the page as a PNG image.

Parameters
pageNumberthe page to be returned.
widthmaximal width; if 0, ignored.
heightmaximal height; if 0, ignored.
Todo:
implement this (what's the use case?); untested for now.

◆ getPageAsPNG() [2/2]

QByteArray ScribusAPIDocument::getPageAsPNG ( int  pageNumber,
int  maxSize 
)

Get the page as a PNG image.

Parameters
pageNumberthe page to be returned.
maxSizethe size of the longer measurement between widht and height

◆ getStylesAsCss()

QString ScribusAPIDocument::getStylesAsCss ( )

add OEBPS/Styles/style.css to the current epub file TODO: move to ScribusAPIDocumentStyle

◆ readItems()

void ScribusAPIDocument::readItems ( )

Create a list ScribusAPIDocumentItem representing all document's items sorted by page and postion.

Go through the full items list (PageItem) in the Scribus document (ScribusDoc) and collect the reference of the printable ones in a list sorted by page and by placement on the page.

TODO: correctly handle the page ranges (from .. to) TODO: rename it to signify that it only reads visible items on a page and collapses layers (and make it a getter?) -> readSortedItemsForExport()?

◆ set()

void ScribusAPIDocument::set ( ScribusDoc *  scribusDoc)
inline
Deprecated:
Construct one ScribusAPIDocument object for each scribusDoc.

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