Back to index

scribus-ng  1.3.4.dfsg+svn20071115
pagestructs.h
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 #ifndef PAGESTRUCTS_H
00008 #define PAGESTRUCTS_H
00009 
00010 #include <qmap.h>
00011 #include <qvaluevector.h>
00012 #include <qstring.h>
00013 
00014 struct ObjectAttribute 
00015 {
00016        QString name;
00017        QString type;
00018        QString value;
00019        QString parameter;
00020        QString relationship;
00021        QString relationshipto;
00022        QString autoaddto;
00023 };
00024 
00025 typedef QValueVector<ObjectAttribute> ObjAttrVector;
00026 
00027 typedef enum {Beginning, End, NotShown} TOCPageLocation;
00028 
00029 struct ToCSetup
00030 {
00031        QString name; //Name of ToC
00032        QString itemAttrName; //Attribute to Scan for
00033        QString frameName; //Destination frame
00034        TOCPageLocation pageLocation; //Place the page number for the TOC at the beginning, end or not at all
00035        bool listNonPrintingFrames; //List non printing frames in the TOC
00036        QString textStyle; //Paragraph style for text
00037        //QString leaderParaStyle; //Paragraph style for leaders
00038        //QString pageNumberParaStyle; //Paragraph style for page numbers
00039 };
00040 
00041 typedef QValueVector<ToCSetup> ToCSetupVector;
00042 
00043 
00044 typedef enum 
00045 {
00046        Type_1_2_3,
00047        Type_i_ii_iii,
00048        Type_I_II_III,
00049        Type_a_b_c,
00050        Type_A_B_C,
00051        Type_None=99
00052 } DocumentSectionType;
00053 
00054 struct DocumentSection
00055 {
00056        uint number; //Just an index in the section list
00057        QString name; //User defined name for the section
00058        uint fromindex; //First page _index_ of the section in the document (old page number)
00059        uint toindex; //Last page _index_ of the section in the document (old page number)
00060        DocumentSectionType type; //Type of section numbering, ie i,ii,iii or a,b,c or 1,2,3, etc
00061        uint sectionstartindex; // Start of section, an index in the range of type, eg for type i,ii,iii, this would be 2 for "ii".
00062        bool reversed; // Counting 10-1 ?
00063        bool active; // Is the section active, ie, if the fromindex is 10, and theres 5 pages, this should be inactive.
00064 };
00065 
00066 typedef QMap<uint, DocumentSection> DocumentSectionMap;
00067 
00068 typedef enum
00069 {
00070        singlePage,
00071        doublePage,
00072        triplePage,
00073        quadroPage
00074 } PageLayout;
00075 
00076 typedef enum
00077 {
00078        LeftPage,
00079        MiddlePage,
00080        RightPage
00081 } PageLocation;
00082 
00083 
00084 #endif