Scribus
Open source desktop publishing at your fingertips
DocumentAPI Class Reference
Inheritance diagram for DocumentAPI:
Collaboration diagram for DocumentAPI:

Public Slots

bool check ()
 
bool close ()
 
bool save ()
 
bool saveAs (QString name)
 
void setInformation (QString author, QString title, QString desc)
 
QObject * newLayer (QString name)
 
void removeLayer (QString name)
 
QObject * getActiveLayer ()
 
QString getActiveLayerName ()
 
void setActiveLayer (QString name)
 
QObject * newColorCMYK (QString name, int c, int m, int y, int k)
 
QObject * newColorRGB (QString name, int r, int g, int b)
 
QObject * getColor (QString name)
 
QList< QVariant > supportedImageTypes ()
 
bool exportAsImages (QString dirName, QString type, double scale, double quality, double dpi, bool overwrite)
 
QObject * Printer ()
 
QList< QVariant > masterPages ()
 
void createMasterPage (QString name)
 
void deleteMasterPage (QString name)
 
void closeMasterPage (QString name)
 
void editMasterPage (QString name)
 
QList< QVariant > pages ()
 
void setActivePage (int pageNumber)
 
void loadStylesFromFile (QString name)
 
void moveSelectionToFront ()
 
void moveSelectionToBack ()
 
QObject * selectItem (QString name)
 
void deleteItem (QString name)
 
bool itemExists (QString name)
 
void deselectItems ()
 
QString groupItems (QList< QVariant > list)
 
void unGroupItems (QString name)
 
void scaleGroup (double factor, QString name)
 

Properties

QString name
 
bool available
 
QObject margins
 
bool modified
 
QObject activePage
 
int pageCount
 
QObject activeItem
 
QObject dimensions
 
QList< QVariant > items
 
QList< QVariant > selection
 
int selectionCount
 
QList< QVariant > colors
 
QList< QVariant > layers
 
QList< QVariant > masterPages
 
QList< QVariant > styles
 
QList< QVariant > pages
 
int unit
 

Member Function Documentation

bool DocumentAPI::check ( )
slot

Scripter.activeDocument.check returns True if found else False and raises error

bool DocumentAPI::close ( )
slot

Scripter.activeDocument.close()

closes the active document without asking save

void DocumentAPI::createMasterPage ( QString  name)
slot

Scripter.activeDocument.createMasterPage(name)

void DocumentAPI::deleteMasterPage ( QString  name)
slot

Scripter.activeDocument.deleteMasterPage(name)

bool DocumentAPI::save ( void  )
slot

Scripter.activeDocument.save()

Saves the activeDocument

bool DocumentAPI::saveAs ( QString  name)
slot

Scripter.activeDocument.saveAs(name)

saves a document

Property Documentation

QObject * DocumentAPI::activeItem
read

Scripter.activeDocument.activeItem Property Currently active page item

QObject * DocumentAPI::activePage
read

Scripter.activeDocument.activePage Property Page object of active page in active Document

bool DocumentAPI::available
read

Scripter.activeDocument.available Property bool value if a document is active

QList< QVariant > DocumentAPI::colors
read

Scripter.activeDocument.colors Property Colors of activeDocument

QObject * DocumentAPI::dimensions
read

Scripter.activeDocument.dimensions Property Dimensions object of active page

QList< QVariant > DocumentAPI::items
read

Scripter.activeDocument.items Property List of all Item objects of active document

QObject * DocumentAPI::margins
read

Scripter.activeDocument.margins Property Margins object of active document

int DocumentAPI::pageCount
read

Scripter.activeDocument.pageCount() returns number of pages in active document as int

QList< QVariant > DocumentAPI::selection
read

Scripter.activeDocument.selection Property List of selected Item objects on active document

Checking whether it is a textframe. If yes, we are trying to cast it onto TextWrapper class, which can effectively perform all the text operations


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