Scribus Developer Documentation - API
logo-pen

Scribus Developer Documentation - API

cmdutil.h File Reference

#include "cmdvar.h"

Include dependency graph for cmdutil.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

double PointToValue (double Val)
 Convert a value in points to a value in the current document units.
double ValueToPoint (double Val)
 Convert a value in the current document units to a value in points.
double pageUnitXToDocX (double pageUnitX)
 Convert an X co-ordinate part in page units to a document co-ordinate in system units.
double docUnitXToPageX (double pageUnitX)
 Doc units -> page-relative units.
double pageUnitYToDocY (double pageUnitY)
 Convert a Y co-ordinate part in page units to a document co-ordinate in system units. The document co-ordinates have their origin somewere up and left of the first page, where page co-ordinates have their origin on the top left of the current page.
double docUnitYToPageY (double pageUnitY)
 Doc units -> page-relative units.
int GetItem (QString Name)
void ReplaceColor (QString col, QString rep)
PageItemGetUniqueItem (QString name)
 Returns named PageItem, or selection if name '', or exception and NULL if no item.
PageItemgetPageItemByName (QString name)
 Returns named PageItem, or exception and NULL if not found.
bool checkHaveDocument ()
bool ItemExists (QString name)
QStringList getSelectedItemsByName ()
 Returns a list of the names of all selected PageItems.
bool setSelectedItemsByName (QStringList &itemNames)
 Replaces the current selection by selecting all the items named in the passed QStringList.


Function Documentation

bool checkHaveDocument (  ) 

Checks to see if there is a document open. If there is an open document, returns true. If there is no open document, sets a Python exception and returns false. 2004-10-27 Craig Ringer

Definition at line 192 of file cmdutil.cpp.

References ScribusMainWindow::HaveDoc, NoDocOpenError, ScribusCore::primaryMainWindow(), and ScCore.

Referenced by ImageExport_new(), ImageExport_save(), ImageExport_saveAs(), scribus_actualpage(), scribus_bezierline(), scribus_closedoc(), scribus_closemasterpage(), scribus_createcharstyle(), scribus_createlayer(), scribus_createmasterpage(), scribus_createparagraphstyle(), scribus_dehyphenatetext(), scribus_deletemasterpage(), scribus_deleteobj(), scribus_deletepage(), scribus_deletetext(), scribus_deselect(), scribus_docchanged(), scribus_duplicateobject(), scribus_editmasterpage(), scribus_getactlayer(), scribus_getallobj(), scribus_getcolumngap(), scribus_getcolumns(), scribus_getcornerrad(), scribus_getfillblend(), scribus_getfillcolor(), scribus_getfillshade(), scribus_getfilltrans(), scribus_getfont(), scribus_getfontsize(), scribus_getframetext(), scribus_getHguides(), scribus_getimgname(), scribus_getimgscale(), scribus_getlayers(), scribus_getlineblend(), scribus_getlinecolor(), scribus_getlineend(), scribus_getlinejoin(), scribus_getlineshade(), scribus_getlinespace(), scribus_getlinestyle(), scribus_getlinetrans(), scribus_getlinewidth(), scribus_getpageitems(), scribus_getpagemargins(), scribus_getposi(), scribus_getrotation(), scribus_getselobjnam(), scribus_getsize(), scribus_getstylenames(), scribus_gettext(), scribus_gettextlines(), scribus_gettextsize(), scribus_getunit(), scribus_getVguides(), scribus_glayerblend(), scribus_glayerflow(), scribus_glayerlock(), scribus_glayeroutline(), scribus_glayerprint(), scribus_glayertrans(), scribus_glayervisib(), scribus_gotopage(), scribus_groupobj(), scribus_hyphenatetext(), scribus_importpage(), scribus_inserttext(), scribus_islocked(), scribus_ispdfbookmark(), scribus_istextoverflowing(), scribus_layerblend(), scribus_layerflow(), scribus_layerlock(), scribus_layeroutline(), scribus_layerprint(), scribus_layertrans(), scribus_layervisible(), scribus_linktextframes(), scribus_loadimage(), scribus_loadstylesfromfile(), scribus_lockobject(), scribus_masterpagenames(), scribus_moveobjabs(), scribus_moveobjrel(), scribus_newellipse(), scribus_newimage(), scribus_newline(), scribus_newpage(), scribus_newrect(), scribus_newstyledialog(), scribus_newtext(), scribus_objectexists(), scribus_pagecount(), scribus_pagedimension(), scribus_pageposition(), scribus_pathtext(), scribus_placeeps(), scribus_placeodg(), scribus_placesvg(), scribus_placesxd(), scribus_polygon(), scribus_polyline(), scribus_redraw(), scribus_removelayer(), scribus_replcolor(), scribus_rotobjabs(), scribus_rotobjrel(), scribus_savedoc(), scribus_savedocas(), scribus_savepageeps(), scribus_scalegroup(), scribus_scaleimage(), scribus_scrolldocument(), scribus_selcount(), scribus_selectobj(), scribus_selecttext(), scribus_senttolayer(), scribus_setactlayer(), scribus_setalign(), scribus_setboxtext(), scribus_setcolumngap(), scribus_setcolumns(), scribus_setcornerrad(), scribus_setdoctype(), scribus_setfillblend(), scribus_setfillcolor(), scribus_setfillshade(), scribus_setfilltrans(), scribus_setfont(), scribus_setfontsize(), scribus_setgradfill(), scribus_setHguides(), scribus_setinfo(), scribus_setlineblend(), scribus_setlinecolor(), scribus_setlineend(), scribus_setlinejoin(), scribus_setlineshade(), scribus_setlinespace(), scribus_setlinestyle(), scribus_setlinetrans(), scribus_setlinewidth(), scribus_setmargins(), scribus_setmultiline(), scribus_setpdfbookmark(), scribus_setredraw(), scribus_setscaleimagetoframe(), scribus_setstyle(), scribus_settextfill(), scribus_settextshade(), scribus_settextstroke(), scribus_setunit(), scribus_setVguides(), scribus_sizeobjabs(), scribus_textflow(), scribus_tracetext(), scribus_ungroupobj(), scribus_unlinktextframes(), and scribus_zoomdocument().

double docUnitXToPageX ( double  pageUnitX  ) 

Doc units -> page-relative units.

Definition at line 36 of file cmdutil.cpp.

References ScribusDoc::currentPage(), ScribusMainWindow::doc, PointToValue(), ScribusCore::primaryMainWindow(), ScCore, and Page::xOffset().

Referenced by scribus_getposi().

double docUnitYToPageY ( double  pageUnitY  ) 

Doc units -> page-relative units.

Definition at line 50 of file cmdutil.cpp.

References ScribusDoc::currentPage(), ScribusMainWindow::doc, PointToValue(), ScribusCore::primaryMainWindow(), ScCore, and Page::yOffset().

Referenced by scribus_getposi().

int GetItem ( QString  Name  ) 

PageItem* getPageItemByName ( QString  name  ) 

Returns named PageItem, or exception and NULL if not found.

Author:
03/10/2004 Petr Vanek

05/02/02 Craig Ringer

Definition at line 151 of file cmdutil.cpp.

References ScribusMainWindow::doc, ScribusDoc::Items, NoValidObjectError, ScribusCore::primaryMainWindow(), and ScCore.

Referenced by getQObjectFromPyArg(), and GetUniqueItem().

QStringList getSelectedItemsByName (  ) 

Returns a list of the names of all selected PageItems.

Definition at line 202 of file cmdutil.cpp.

References ScribusMainWindow::doc, Selection::getSelectedItemsByName(), ScribusDoc::m_Selection, ScribusCore::primaryMainWindow(), and ScCore.

Referenced by scribus_groupobj().

PageItem* GetUniqueItem ( QString  name  ) 

Returns named PageItem, or selection if name '', or exception and NULL if no item.

Returns a pointer to a PageItem by looking it up by name - page independent. If `name' is empty, returns selected item. If the named item is not found, or `name' is empty and no item is selected, sets an exception and returns NULL.

Author:
03/10/2004 petr vanek

05/02/02 Craig Ringer

Definition at line 137 of file cmdutil.cpp.

References Selection::count(), ScribusMainWindow::doc, getPageItemByName(), Selection::itemAt(), ScribusDoc::m_Selection, NoValidObjectError, ScribusCore::primaryMainWindow(), and ScCore.

Referenced by scribus_dehyphenatetext(), scribus_deleteobj(), scribus_deletetext(), scribus_duplicateobject(), scribus_getcolumngap(), scribus_getcolumns(), scribus_getcornerrad(), scribus_getfillblend(), scribus_getfillcolor(), scribus_getfillshade(), scribus_getfilltrans(), scribus_getfont(), scribus_getfontsize(), scribus_getframetext(), scribus_getimgname(), scribus_getimgscale(), scribus_getlineblend(), scribus_getlinecolor(), scribus_getlineend(), scribus_getlinejoin(), scribus_getlineshade(), scribus_getlinespace(), scribus_getlinestyle(), scribus_getlinetrans(), scribus_getlinewidth(), scribus_getposi(), scribus_getrotation(), scribus_getsize(), scribus_gettext(), scribus_gettextlines(), scribus_gettextsize(), scribus_groupobj(), scribus_hyphenatetext(), scribus_inserttext(), scribus_islocked(), scribus_ispdfbookmark(), scribus_istextoverflowing(), scribus_linktextframes(), scribus_loadimage(), scribus_lockobject(), scribus_moveobjabs(), scribus_moveobjrel(), scribus_rotobjabs(), scribus_rotobjrel(), scribus_scalegroup(), scribus_scaleimage(), scribus_selectobj(), scribus_selecttext(), scribus_senttolayer(), scribus_setalign(), scribus_setboxtext(), scribus_setcolumngap(), scribus_setcolumns(), scribus_setcornerrad(), scribus_setfillblend(), scribus_setfillcolor(), scribus_setfillshade(), scribus_setfilltrans(), scribus_setfont(), scribus_setfontsize(), scribus_setgradfill(), scribus_setlineblend(), scribus_setlinecolor(), scribus_setlineend(), scribus_setlinejoin(), scribus_setlineshade(), scribus_setlinespace(), scribus_setlinestyle(), scribus_setlinetrans(), scribus_setlinewidth(), scribus_setmultiline(), scribus_setpdfbookmark(), scribus_setscaleimagetoframe(), scribus_setstyle(), scribus_settextfill(), scribus_settextshade(), scribus_settextstroke(), scribus_sizeobjabs(), scribus_textflow(), scribus_tracetext(), scribus_ungroupobj(), and scribus_unlinktextframes().

bool ItemExists ( QString  name  ) 

Checks to see if a pageItem named 'name' exists and return true if it does exist. Returns false if there is no such object, or if the empty string ("") is passed.

Definition at line 173 of file cmdutil.cpp.

References ScribusMainWindow::doc, ScribusDoc::Items, ScribusCore::primaryMainWindow(), and ScCore.

Referenced by scribus_bezierline(), scribus_newellipse(), scribus_newimage(), scribus_newline(), scribus_newrect(), scribus_newtext(), scribus_objectexists(), scribus_pathtext(), scribus_polygon(), and scribus_polyline().

double pageUnitXToDocX ( double  pageUnitX  ) 

Convert an X co-ordinate part in page units to a document co-ordinate in system units.

Convert an X co-ordinate part in page units to a document co-ordinate in system units.

Definition at line 30 of file cmdutil.cpp.

References ScribusDoc::currentPage(), ScribusMainWindow::doc, ScribusCore::primaryMainWindow(), ScCore, ValueToPoint(), and Page::xOffset().

Referenced by scribus_bezierline(), scribus_moveobjabs(), scribus_newellipse(), scribus_newimage(), scribus_newline(), scribus_newrect(), scribus_newtext(), scribus_pathtext(), scribus_placeeps(), scribus_placeodg(), scribus_placesvg(), scribus_placesxd(), scribus_polygon(), and scribus_polyline().

double pageUnitYToDocY ( double  pageUnitY  ) 

Convert a Y co-ordinate part in page units to a document co-ordinate in system units. The document co-ordinates have their origin somewere up and left of the first page, where page co-ordinates have their origin on the top left of the current page.

Convert a Y co-ordinate part in page units to a document co-ordinate in system units. The document co-ordinates have their origin somewere up and left of the first page, where page co-ordinates have their origin on the top left of the current page.

Definition at line 45 of file cmdutil.cpp.

References ScribusDoc::currentPage(), ScribusMainWindow::doc, ScribusCore::primaryMainWindow(), ScCore, ValueToPoint(), and Page::yOffset().

Referenced by scribus_bezierline(), scribus_moveobjabs(), scribus_newellipse(), scribus_newimage(), scribus_newline(), scribus_newrect(), scribus_newtext(), scribus_pathtext(), scribus_placeeps(), scribus_placeodg(), scribus_placesvg(), scribus_placesxd(), scribus_polygon(), and scribus_polyline().

double PointToValue ( double  Val  ) 

void ReplaceColor ( QString  col,
QString  rep 
)

bool setSelectedItemsByName ( QStringList &  itemNames  ) 

Replaces the current selection by selecting all the items named in the passed QStringList.

Returns false if one or more items can't be selected, true if all were selected. Selection state is undefined on failure.

Definition at line 214 of file cmdutil.cpp.

References ScribusView::Deselect(), ScribusMainWindow::doc, PageItem::ItemNr, ScribusDoc::Items, ScribusCore::primaryMainWindow(), ScCore, ScribusView::SelectItemNr(), and ScribusMainWindow::view.

Referenced by scribus_groupobj().

double ValueToPoint ( double  Val  ) 

Created with personalized Doxygen. This is documentation for GPL software Scribus - Open Source Desktop Publishing.