Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Functions
scripter2_styles.cpp File Reference
#include "cmdvar.h"
#include "scribusstructs.h"
#include "scribusdoc.h"
#include "scribus.h"

Go to the source code of this file.

Functions

ParagraphStyle & getStyleRef (const QString &styleName)
ParagraphStyle & getStyleRefi (int index)
ParagraphStyle getStyleVal (const QString &styleName)
ParagraphStyle getStyleVali (int index)
void addStyle (const ParagraphStyle &style)
dict getStylesVal ()
dict getStylesRef ()
list getStyleNames ()
void nothing ()
void export_styles ()

Function Documentation

void addStyle ( const ParagraphStyle &  style)

Definition at line 51 of file scripter2_styles.cpp.

{
       QValueList<ParagraphStyle>::iterator it(ScCore->primaryMainWindow()->doc->docParagraphStyles.begin());
       QValueList<ParagraphStyle>::iterator itEnd(ScCore->primaryMainWindow()->doc->docParagraphStyles.end());
       for ( ; it != itEnd; ++it)
       {
              if ((*it).Vname == style.Vname)
                     throw "Style of same name already exists";
       }
       ScCore->primaryMainWindow()->doc->docParagraphStyles.append(style);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void export_styles ( )

Definition at line 100 of file scripter2_styles.cpp.

{
       def("getStyleRef", getStyleRef, return_internal_reference<>());
       def("getStyleVal", getStyleVal);
       def("getStyleRefi", getStyleRefi, return_internal_reference<>());
       def("getStyleVali", getStyleVali);
       def("addStyle", addStyle);
       def("getStylesVal", getStylesVal);
       def("getStylesRef", getStylesRef);
       def("getStyleNames", getStyleNames);
}

Here is the call graph for this function:

Here is the caller graph for this function:

list getStyleNames ( )

Definition at line 87 of file scripter2_styles.cpp.

{
       list l;
       QValueList<ParagraphStyle>::iterator it(ScCore->primaryMainWindow()->doc->docParagraphStyles.begin());
       QValueList<ParagraphStyle>::iterator itEnd(ScCore->primaryMainWindow()->doc->docParagraphStyles.end());
       for ( ; it != itEnd; ++it)
              l.append((*it).Vname);
       return l;
}

Here is the call graph for this function:

Here is the caller graph for this function:

ParagraphStyle& getStyleRef ( const QString &  styleName)

Definition at line 24 of file scripter2_styles.cpp.

{
       QValueList<ParagraphStyle>::iterator it(ScCore->primaryMainWindow()->doc->docParagraphStyles.begin());
       QValueList<ParagraphStyle>::iterator itEnd(ScCore->primaryMainWindow()->doc->docParagraphStyles.end());
       for ( ; it != itEnd; ++it)
       {
              if ((*it).Vname == styleName)
                     return *it;
       }
       throw "Style not found";
}

Here is the call graph for this function:

Here is the caller graph for this function:

ParagraphStyle& getStyleRefi ( int  index)

Definition at line 36 of file scripter2_styles.cpp.

{
       return ScCore->primaryMainWindow()->doc->docParagraphStyles[index];
}

Here is the call graph for this function:

Here is the caller graph for this function:

dict getStylesRef ( )

Definition at line 77 of file scripter2_styles.cpp.

{
       dict d;
       QValueList<ParagraphStyle>::iterator it(ScCore->primaryMainWindow()->doc->docParagraphStyles.begin());
       QValueList<ParagraphStyle>::iterator itEnd(ScCore->primaryMainWindow()->doc->docParagraphStyles.end());
       for ( ; it != itEnd; ++it)
              d[(*it).Vname] = boost::ref(*it);
       return d;
}

Here is the call graph for this function:

Here is the caller graph for this function:

dict getStylesVal ( )

Definition at line 67 of file scripter2_styles.cpp.

{
       dict d;
       QValueList<ParagraphStyle>::iterator it(ScCore->primaryMainWindow()->doc->docParagraphStyles.begin());
       QValueList<ParagraphStyle>::iterator itEnd(ScCore->primaryMainWindow()->doc->docParagraphStyles.end());
       for ( ; it != itEnd; ++it)
              d[(*it).Vname] = *it;
       return d;
}

Here is the call graph for this function:

Here is the caller graph for this function:

ParagraphStyle getStyleVal ( const QString &  styleName)

Definition at line 41 of file scripter2_styles.cpp.

{
       return getStyleRef(styleName);
}

Here is the call graph for this function:

Here is the caller graph for this function:

ParagraphStyle getStyleVali ( int  index)

Definition at line 46 of file scripter2_styles.cpp.

{
       return getStyleRefi(index);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nothing ( )

Definition at line 97 of file scripter2_styles.cpp.

{ }