Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Classes | Functions
pageitem_desaxe.cpp File Reference
#include "pageitem.h"
#include "util.h"
#include "desaxe/simple_actions.h"
#include "desaxe/saxiohelper.h"
#include "pageitem_imageframe.h"
#include "pageitem_textframe.h"
#include "pageitem_pathtext.h"
#include "pageitem_polyline.h"
#include "pageitem_polygon.h"
#include "pageitem_line.h"
#include "scribusdoc.h"
#include "colorutil.h"

Go to the source code of this file.

Classes

class  CreatePageItem_body
class  CreatePageItem
class  SetItemText_body
 PageItem StoryText -> PageItem StoryText. More...
class  SetItemText
class  Gradient_body
class  Gradient
class  Pattern_body
class  Pattern
class  ImageEffectsAndLayers_body
class  ImageEffectsAndLayers
class  LoadPicture_body
class  LoadPicture
class  AdjustGroupIds_body
class  AdjustGroupIds

Functions

FPointArray parseSVG (const Xml_string &str)
static Xml_attr PageItemXMLAttributes (const PageItem *item)

Function Documentation

static Xml_attr PageItemXMLAttributes ( const PageItem *  item) [static]

Definition at line 30 of file pageitem_desaxe.cpp.

{
       Xml_attr result;
       
       result.insert("id", "obj" + toXMLString(const_cast<PageItem*>(item)->getUId()));
       if (!item->AutoName)
              result.insert("name", item->itemName());
       const PageItem* nxt = item->nextInChain(); 
       if (nxt)
              result.insert("nextframe", "obj" + toXMLString(nxt->getUId())); 
       result.insert("layer", toXMLString(item->LayerNr));
       result.insert("level", toXMLString(item->ItemNr));
       result.insert("itemtype", toXMLString(item->itemType()));
       
       result.insert("is-annotation", toXMLString(item->isAnnotation()));
       result.insert("is-bookmark", toXMLString(item->isPDFBookmark()));
       result.insert("printable", toXMLString(item->printEnabled()));
       result.insert("locked", toXMLString(item->locked()));
       result.insert("size-locked", toXMLString(item->sizeLocked()));
       
       result.insert("width", toXMLString(item->width()));
       result.insert("height", toXMLString(item->height()));
       result.insert("ownpage", toXMLString(item->OwnPage));
       Page* page = item->doc()->Pages->at(item->OwnPage);
       if (page)
       {
              result.insert("xorigin", toXMLString(item->xPos() - page->xOffset()));
              result.insert("yorigin", toXMLString(item->yPos() - page->yOffset()));
       }
       else
       {
              result.insert("xorigin", toXMLString(item->xPos()));
              result.insert("yorigin", toXMLString(item->yPos()));
       }
       result.insert("rotation", toXMLString(item->rotation()));
       result.insert("fill-color", item->fillColor());
       result.insert("fill-shade", toXMLString(item->fillShade()));
       result.insert("fill-transparency", toXMLString(item->fillTransparency()));
       result.insert("fill-blendmode", toXMLString(item->fillBlendmode()));
       result.insert("fill-gradient-type", toXMLString(item->gradientType()));
       result.insert("fill-evenodd", toXMLString(item->fillEvenOdd()));
       result.insert("do-overprint", toXMLString(item->overprint()));
       
       result.insert("line-color", item->lineColor());
       result.insert("line-shade", toXMLString(item->lineShade()));
       result.insert("line-transparency", toXMLString(item->lineTransparency()));
       result.insert("line-blendmode", toXMLString(item->lineBlendmode()));
       result.insert("line-width", toXMLString(item->lineWidth()));
       result.insert("line-style", toXMLString(item->PLineArt));
       result.insert("line-cap", toXMLString(item->PLineEnd));
       result.insert("line-join", toXMLString(item->PLineJoin));
       result.insert("line-customstyle", item->customLineStyle());
       result.insert("line-start-arrow", toXMLString(item->startArrowIndex()));
       result.insert("line-end-arrow", toXMLString(item->endArrowIndex()));

       result.insert("frame-type", toXMLString(item->frameType()));
       result.insert("frame-shape", toXMLString(item->shape()));
       result.insert("frame-has-default-shape", toXMLString(item->hasDefaultShape()));     
       result.insert("corner-radius", toXMLString(item->cornerRadius()));    
       result.insert("frame-contour", toXMLString(item->contour()));
       result.insert("text-flow-mode", toXMLString((int) item->textFlowMode() ));
       
       result.insert("left-distance", toXMLString(item->textToFrameDistLeft()));
       result.insert("top-distance", toXMLString(item->textToFrameDistTop()));
       result.insert("bottom-distance", toXMLString(item->textToFrameDistBottom()));
       result.insert("right-distance", toXMLString(item->textToFrameDistRight()));

       result.insert("text-autoframes", toXMLString(item->isAutoFrame()));
       result.insert("text-columns", toXMLString(item->columns()));
       result.insert("text-columngap", toXMLString(item->columnGap()));
       result.insert("text-reversed", toXMLString(item->reversed()));
       result.insert("pathtext-type", toXMLString(item->pathTextType()));
       result.insert("pathtext-flipped", toXMLString(item->flipPathText()));
       result.insert("pathtext-baseoffset", toXMLString(item->pathTextBaseOffset()));
       result.insert("pathtext-showpath", toXMLString(item->pathTextShowFrame()));

       result.insert("image-scale-framesize", toXMLString(item->fitImageToFrame()));
       result.insert("image-scale-proportional", toXMLString(item->keepAspectRatio()));
       result.insert("image-x-scale", toXMLString(item->imageXScale()));
       result.insert("image-y-scale", toXMLString(item->imageYScale()));
       result.insert("image-x-position", toXMLString(item->imageXOffset()));
       result.insert("image-y-position", toXMLString(item->imageYOffset()));
       //     result.insert("image-x-dpi", toXMLString(item->imageXDpi()));
       //     result.insert("image-y-dpi", toXMLString(item->imageYDpi()));
       result.insert("image-shown", toXMLString(item->imageShown()));
       result.insert("image-use-embedded", toXMLString(item->useEmbeddedImageProfile()));
       result.insert("image-embedded-profile", item->embeddedImageProfile());
       result.insert("image-flipped-hor", toXMLString(item->imageFlippedH()));
       result.insert("image-flipped-vert", toXMLString(item->imageFlippedV()));
       result.insert("cms-profile", item->cmsProfile());
       result.insert("cms-intent", toXMLString(item->cmsRenderingIntent()));
       
       if (item->groups().count() > 0)
       {
              QString grouplist = "";
              QValueStack<int>::const_iterator it;
              for (it = item->groups().begin(); it != item->groups().end(); ++it)
                     grouplist += toXMLString( *it ) + " ";    
              result.insert("groups", toXMLString(grouplist));
              result.insert("isGroupControl", toXMLString(item->controlsGroup()));
              if (item->isGroupControl)
              {
                     if (item->groupsLastItem != 0)
                            result.insert("groupsLastItem", "obj" + toXMLString(item->groupsLastItem->getUId()));
              }
       }
       
       result.insert("isTableItem", toXMLString(item->isTableItem));
       if (item->isTableItem)
       {
              result.insert("TopLine", toXMLString(item->TopLine));
              result.insert("LeftLine", toXMLString(item->LeftLine));
              result.insert("RightLine", toXMLString(item->RightLine));
              result.insert("BottomLine", toXMLString(item->BottomLine));
              if (item->TopLink != 0)
                     result.insert("TopLINK", "obj" + toXMLString(item->TopLink->getUId()));
              if (item->LeftLink != 0)
                     result.insert("LeftLINK", "obj" + toXMLString(item->LeftLink->getUId()));
              if (item->RightLink != 0)
                     result.insert("RightLINK", "obj" + toXMLString(item->RightLink->getUId()));
              if (item->BottomLink != 0)
                     result.insert("BottomLINK", "obj" + toXMLString(item->BottomLink->getUId()));
       }
       
//     result.insert("ANNAME", !item->AutoName ? item->itemName() : QString(""));  // not used
       
       if ((item->itemType()==PageItem::ImageFrame || item->itemType()==PageItem::TextFrame) && (!item->externalFile().isEmpty()))
              result.insert("image-file", Path2Relative(item->externalFile()));
       if (!item->fileIconPressed().isEmpty())
              result.insert("icon-pressed-file", Path2Relative(item->fileIconPressed()));
       if (!item->fileIconRollover().isEmpty())
              result.insert("icon-rollover-file", Path2Relative(item->fileIconRollover()));       
       
       if (item->dashes().count() > 0)
              result.insert("line-dashes", toXMLString(item->dashes()));
       if (item->dashOffset() != 0.0)
              result.insert("line-dash-offset", toXMLString(item->dashOffset()));
       return result;
}      

Here is the call graph for this function:

FPointArray parseSVG ( const Xml_string str)

Definition at line 22 of file pageitem_desaxe.cpp.

{
       FPointArray result;
       result.parseSVG(str);
       return result;
}