Back to index

scribus-ng  1.3.4.dfsg+svn20071115
scribusdoc.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 /***************************************************************************
00008                           scribusdoc.h  -  description
00009                              -------------------
00010     begin                : Fre Apr  6 21:47:55 CEST 2001
00011     copyright            : (C) 2001 by Franz Schmid
00012     email                : Franz.Schmid@altmuehlnet.de
00013  ***************************************************************************/
00014 
00015 /***************************************************************************
00016  *                                                                         *
00017  *   This program is free software; you can redistribute it and/or modify  *
00018  *   it under the terms of the GNU General Public License as published by  *
00019  *   the Free Software Foundation; either version 2 of the License, or     *
00020  *   (at your option) any later version.                                   *
00021  *                                                                         *
00022  ***************************************************************************/
00023 #ifndef SCRIBUSDOC_H
00024 #define SCRIBUSDOC_H
00025 #ifdef HAVE_CONFIG_H
00026 #include "scconfig.h"
00027 #endif
00028 // include files for QT
00029 #include <qobject.h>
00030 #include <qdict.h>
00031 #include <qcolor.h>
00032 #include <qvaluelist.h>
00033 #include <qvaluevector.h>
00034 #include <qpixmap.h>
00035 #include <qptrlist.h>
00036 #include <qfont.h>
00037 #include <qmap.h>
00038 #include <qpointarray.h>
00039 #include <qstringlist.h>
00040 #include <qtimer.h>
00041 
00042 #include "gtgettext.h" //CB For the ImportSetup struct and itemadduserframe
00043 #include "scribusapi.h"
00044 #include "scribusstructs.h"
00045 #include "pagesize.h"
00046 #include "prefsstructs.h"
00047 #include "documentinformation.h"
00048 #include "undoobject.h"
00049 #include "page.h"
00050 #include "pageitem.h"
00051 #include "pageitem_line.h"
00052 #include "pageitem_textframe.h"
00053 #include "pagestructs.h"
00054 #include "usertaskstructs.h"
00055 #include "styles/styleset.h"
00056 #include "scpattern.h"
00057 #include "scguardedptr.h"
00058 
00059 #include CMS_INC
00060 
00061 #include <ft2build.h>
00062 #include FT_FREETYPE_H
00063 
00064 class UndoManager;
00065 class UndoState;
00066 class PDFOptions;
00067 class Hyphenator;
00068 class Selection;
00069 class ScribusView;
00070 class ScribusMainWindow;
00071 class ResourceCollection;
00072 
00073 class QProgressBar;
00074 
00075 
00078 class SCRIBUS_API ScribusDoc : public QObject, public UndoObject
00079 {
00080        Q_OBJECT
00081 
00082 public:
00083        ScribusDoc();
00084        ScribusDoc(const QString& docName, int unitIndex, const PageSize& pagesize, const MarginStruct& margins, const DocPagesSetup& pagesSetup);
00085        ~ScribusDoc();
00086        void init();
00087        void setup(const int, const int, const int, const int, const int, const QString&, const QString&);
00088        void setLoading(const bool);
00089        bool isLoading() const;
00090        void setModified(const bool);
00091        bool isModified() const;
00093        void setPage(double b, double h, double t, double l, double r, double bo, double sp, double ab, bool atf, int fp);
00094        void resetPage(double t, double l, double r, double bo, int fp);
00095 
00099        ScribusView* view() const;
00100        ScribusMainWindow* scMW() const {return m_ScMW;}
00101        void setGUI(bool hasgui, ScribusMainWindow* mw, ScribusView* view);
00102 
00106        const ScGuardedPtr<ScribusDoc>& guardedPtr() const;
00107        
00108        // Add, delete and move pages
00109        
00110        Page* addPage(const int pageNumber, const QString& masterPageName=QString::null, const bool addAutoFrame=false);
00111        void deletePage(const int);
00113        Page* addMasterPage(const int, const QString&);
00114        void deleteMasterPage(const int);
00116        bool renameMasterPage(const QString& oldPageName, const QString& newPageName);
00118        void createDefaultMasterPages();
00120        void createNewDocPages(int pageCount);
00126        int addAutomaticTextFrame(const int pageNumber);
00131        void setLocationBasedPageLRMargins(uint pageIndex);
00139        void movePage(const int from, const int to, const int ziel, const int art);
00140        
00148        void copyPage(int pageNumberToCopy, int existingPage, int whereToInsert, int copyCount);
00149        
00150        // Add, delete and move layers
00157        int addLayer(const QString& layerName=QString::null, const bool activate=false);
00164        void copyLayer(int layerNumberToCopy, int whereToInsert);
00171        bool deleteLayer(const int layerNumber, const bool deleteItems);
00176        int activeLayer();
00177 
00182        const QString& activeLayerName();
00188        bool setActiveLayer(const int layerToActivate);
00194        bool setActiveLayer(const QString & layerNameToActivate);
00201        bool setLayerPrintable(const int layerNumber, const bool isPrintable);
00207        bool layerPrintable(const int layerNumber);
00214        bool setLayerVisible(const int layerNumber, const bool isViewable);
00220        bool layerVisible(const int layerNumber);
00227        bool setLayerLocked(const int layerNumber, const bool isViewable);
00233        bool layerLocked(const int layerNumber);
00240        bool setLayerFlow(const int layerNumber, const bool flow);
00246        bool layerFlow(const int layerNumber);
00253        bool setLayerTransparency(const int layerNumber, double trans);
00259        double layerTransparency(const int layerNumber);
00266        bool setLayerBlendMode(const int layerNumber, int blend);
00272        int layerBlendMode(const int layerNumber);
00278        int layerLevelFromNumber(const int layerNumber);
00285        bool setLayerMarker(const int layerNumber, QColor color);
00291        QColor layerMarker(const int layerNumber);
00298        bool setLayerOutline(const int layerNumber, const bool outline);
00304        bool layerOutline(const int layerNumber);
00310        int layerNumberFromLevel(const int layerLevel);
00315        int layerCount() const;
00321        bool lowerLayer(const int layerNumber);
00327        bool lowerLayerByLevel(const int layerLevel);
00333        bool raiseLayer(const int layerNumber);
00339        bool raiseLayerByLevel(const int layerLevel);
00345        const QString &layerName(const int layerNumber) const;
00352        bool changeLayerName(const int layerNumber, const QString& newName);
00358        bool layerContainsItems(const int layerNumber);
00365        bool renumberLayer(const int layerNumber, const int newLayerNumber);
00370        void orderedLayerList(QStringList* list);
00371        //Items
00372        bool deleteTaggedItems();
00373 
00377        void getUsedProfiles(ProfilesL& usedProfiles);
00378        bool OpenCMSProfiles(ProfilesL InPo, ProfilesL InPoCMYK, ProfilesL MoPo, ProfilesL PrPo);
00379        void CloseCMSProfiles();
00384        void enableCMS(bool enable);
00385        
00386        const ParagraphStyle& paragraphStyle(QString name) { return docParagraphStyles[name]; }
00387        const StyleSet<ParagraphStyle>& paragraphStyles()   { return docParagraphStyles; }
00388        bool isDefaultStyle( const ParagraphStyle& p ) const { return docParagraphStyles.isDefault(p); }
00389        bool isDefaultStyle( const CharStyle& c ) const { return docCharStyles.isDefault(c); }
00390 //     bool isDefaultStyle( LineStyle& l ) const { return MLineStyles......; }
00391 
00392        void getNamedResources(ResourceCollection& lists) const;
00393        void replaceNamedResources(ResourceCollection& newNames);      
00394        
00395        void redefineStyles(const StyleSet<ParagraphStyle>& newStyles, bool removeUnused=false);
00401        void replaceStyles(const QMap<QString,QString>& newNameForOld);
00402        void loadStylesFromFile(QString fileName, StyleSet<ParagraphStyle> *tempStyles = NULL,
00403                                                  StyleSet<CharStyle> *tempCharStyles = NULL,
00404                                                  QMap<QString, multiLine> *tempLineStyles = NULL);
00405 
00406        const CharStyle& charStyle(QString name) { return docCharStyles[name]; }
00407        const StyleSet<CharStyle>& charStyles()  { return docCharStyles; }
00408        void redefineCharStyles(const StyleSet<CharStyle>& newStyles, bool removeUnused=false);
00414        void replaceCharStyles(const QMap<QString,QString>& newNameForOld);
00415 
00422        void lockGuides(bool isLocked);
00429        void restore(UndoState* state, bool isUndo);
00435        void setName(const QString& name);
00439        QStringList getItemAttributeNames();
00440 
00441        bool AddFont(QString name, int fsize = 10);
00445        void replaceLineStyleColors(const QMap<QString, QString>& colorMap);
00449        void getUsedFonts(QMap<QString,QMap<uint, FPointArray> > &Really);
00450        void checkItemForFonts(PageItem *it, QMap<QString, QMap<uint, FPointArray> > & Really, uint lc);
00454        void getUsedColors(ColorList &colorsToUse, bool spot = false);
00458        bool lineStylesUseColor(const QString& colorName);
00462        bool addPattern(QString &name, ScPattern& pattern);
00463        void setPatterns(QMap<QString, ScPattern> &patterns);
00467        QStringList getUsedPatterns();
00468        QStringList getUsedPatternsSelection();
00469        QStringList getUsedPatternsHelper(QString pattern, QStringList &results);
00473        void reorganiseFonts();
00477        void setUnitIndex(const int);
00478        int unitIndex() const;
00479        double unitRatio() const;
00483        bool applyMasterPage(const QString& pageName, const int pageNumber);
00487        void restoreMasterPageApplying(SimpleState *state, bool isUndo);
00488        void restorePageCopy(SimpleState *state, bool isUndo);
00492        bool save(const QString&);
00496        bool changePageMargins(const double initialTop, const double initialBottom, const double initialLeft, const double initialRight, const double initialHeight, const double initialWidth, const double Height, const double width, const int orientation, const QString& pageSize, const int pageNumber=-1, const int pageType = 0);
00500         void recalculateColors();
00504        void setScTextDefaultsFromDoc(ScText *);
00508        const bool copyPageToMasterPage(const int, const int, const int, const QString&);
00516        //TODO: void PasteItem(struct CopyPasteBuffer *Buffer, bool loading, bool drag = false);
00517        
00535        int itemAdd(const PageItem::ItemType itemType, const PageItem::ItemFrameType frameType, const double x, const double y, const double b, const double h, const double w, const QString& fill, const QString& outline, const bool itemFinalised);
00536 
00538        int itemAddArea(const PageItem::ItemType itemType, const PageItem::ItemFrameType frameType, const double x, const double y, const double w, const QString& fill, const QString& outline, const bool itemFinalised);
00539        
00556        int itemAddUserFrame(InsertAFrameData &iafData);
00557 
00563        bool itemAddCommit(const int itemNumber);
00564        
00569        void itemAddDetails(const PageItem::ItemType itemType, const PageItem::ItemFrameType frameType, const int itemNumber);
00570 
00571        uint getItemNrfromUniqueID(uint unique);
00572        //itemDelete
00573        //itemBlah...
00574        
00578        void updateFrameItems();
00586        void renumberItemsInListOrder();
00590        bool usesAutomaticTextFrames() const;
00591        void setUsesAutomaticTextFrames(const bool);
00592        
00597        bool LoadPict(QString fn, int ItNr, bool reload = false, bool showMsg = false);
00605        bool loadPict(QString fn, PageItem *pageItem, bool reload = false, bool showMsg = false);
00612        void RecalcPictures(ProfilesL *Pr, ProfilesL *PrCMYK, QProgressBar *dia = 0);
00616        void canvasMinMax(FPoint&, FPoint&);
00617        
00618        int OnPage(double x2, double  y2);
00619        int OnPage(PageItem *currItem);
00620        void GroupOnPage(PageItem *currItem);
00621        //void reformPages(double& maxX, double& maxY, bool moveObjects = true);
00622        void reformPages(bool moveObjects = true);
00623        
00629        const double getXOffsetForPage(const int);
00630        const double getYOffsetForPage(const int);
00631        void getBleeds(int pageNumber, double *bleedTop, double *bleedBottom, double *bleedLeft, double *bleedRight);
00632        void getBleeds(Page* page, double *bleedTop, double *bleedBottom, double *bleedLeft, double *bleedRight);
00633        
00637        PageItem* convertItemTo(PageItem *currItem, PageItem::ItemType newType, PageItem* secondaryItem=NULL);
00638        
00642        const int currentPageNumber();
00643        
00650        bool itemNameExists(const QString itemName);
00651        
00656        void setMasterPageMode(bool);
00657 
00658        /*** Is the document in master page mode? */
00659        bool masterPageMode() const { return m_masterPageMode; }
00660        
00665        void addSection(const int number=0, const QString& name=QString::null, const uint fromindex=0, const uint toindex=0, const  DocumentSectionType type=Type_1_2_3, const uint sectionstartindex=0, const bool reversed=false, const bool active=true);
00669        bool deleteSection(const uint);
00674        const QString getSectionPageNumberForPageIndex(const uint) const;
00679        int getSectionKeyForPageIndex(const uint pageIndex) const;
00684        void updateSectionPageNumbersToPages();
00691        void addPageToSection(const uint otherPageIndex, const uint location, const uint count=1);
00696        void removePageFromSection(const uint pageIndex);
00700        void setFirstSectionFromFirstPageNumber();
00704        void updateAllItemQColors();
00706        typedef enum {alignFirst, alignLast, alignPage, alignMargins, alignGuide, alignSelection } AlignTo;
00707        void buildAlignItemList(Selection* customSelection=0);
00708        bool startAlign();
00709        void endAlign();
00718        void insertColor(QString nam, double c, double m, double y, double k);
00719        
00720        QMap<QString, double>& constants() { return m_constants; }
00727        PageLocation locationOfPage(int pageIndex);
00728        
00729        bool sendItemSelectionToBack();
00730        bool bringItemSelectionToFront();
00731 
00732        void itemSelection_ApplyParagraphStyle(const ParagraphStyle & newstyle, Selection* customSelection=0);
00733        void itemSelection_SetParagraphStyle(const ParagraphStyle & newstyle, Selection* customSelection=0);
00734        void itemSelection_ApplyCharStyle(const CharStyle & newstyle, Selection* customSelection=0);
00735        void itemSelection_SetCharStyle(const CharStyle & newstyle, Selection* customSelection=0);
00736        void itemSelection_EraseParagraphStyle(Selection* customSelection=0);
00737        void itemSelection_EraseCharStyle(Selection* customSelection=0);
00738 
00739        void itemSelection_SetNamedParagraphStyle(const QString & name, Selection* customSelection=0);
00740        void itemSelection_SetNamedCharStyle(const QString & name, Selection* customSelection=0);
00741 
00742        void ChLineWidth(double w);
00743        void ChLineArt(Qt::PenStyle w);
00744        void ChLineJoin(Qt::PenJoinStyle w);
00745        void ChLineEnd(Qt::PenCapStyle w);
00746        void itemSelection_SetAlignment(int w, Selection* customSelection=0);
00747        void itemSelection_SetLineSpacing(double w, Selection* customSelection=0);
00748        void itemSelection_SetLineSpacingMode(int w, Selection* customSelection=0);
00749        //void ChLocalXY(double x, double y);
00750        //void ChLocalSc(double x, double y);
00751        void itemSelection_SetFont(QString fon, Selection* customSelection=0);
00752        void itemSelection_SetFillColor(QString farbe, Selection* customSelection=0);
00753        void itemSelection_SetFillShade(int sha, Selection* customSelection=0);
00754        void itemSelection_SetStrokeColor(QString farbe, Selection* customSelection=0);
00755        void itemSelection_SetStrokeShade(int sha, Selection* customSelection=0);
00756        void itemSelection_SetScaleV(int, Selection* customSelection=0);
00757        void itemSelection_SetScaleH(int, Selection* customSelection=0);
00758        void itemSelection_SetBaselineOffset(int, Selection* customSelection=0);
00759        void itemSelection_SetOutlineWidth(int, Selection* customSelection=0);
00760        void itemSelection_SetShadowOffsets(int shx, int shy, Selection* customSelection=0);
00761        void itemSelection_SetUnderline(int pos, int wid, Selection* customSelection=0);
00762        void itemSelection_SetStrikethru(int pos, int wid, Selection* customSelection=0);
00763        void itemSelection_SetEffects(int s, Selection* customSelection=0);
00764        void itemSelection_SetOpticalMargins(int i, Selection* customSelection=0);
00765        
00766 //     void chAbStyle(PageItem *currItem, int s);
00767 
00768        void itemSelection_SetTracking(int us, Selection* customSelection=0);
00769        void itemSelection_SetFontSize(int size, Selection* customSelection=0);
00770        //void FlipImageH();
00771        //void FlipImageV();
00772        void MirrorPolyH(PageItem *currItem);
00773        void MirrorPolyV(PageItem *currItem);
00774        
00775        void setRedrawBounding(PageItem *currItem);
00776        void adjustCanvas(FPoint minPos, FPoint maxPos, bool absolute = false);
00777        void recalcPicturesRes(bool applyNewRes = false);
00778        void connectDocSignals();
00779        void removeLayer(int l, bool dl = false); //FIXME: Make protected once scripter function no longer uses this directly
00784        void changed();
00787        Page* currentPage();
00790        void setCurrentPage(Page *newPage);
00791        bool hasGUI() const {return m_hasGUI;}
00793        QPoint ApplyGrid(const QPoint& in);
00795        FPoint ApplyGridF(const FPoint& in);
00797        bool hasTOCSetup() { return !docToCSetups.empty(); }
00799        void getClosestGuides(double xin, double yin, double *xout, double *yout);
00801        void SnapToGuides(PageItem *currItem);
00802        bool ApplyGuides(double *x, double *y);
00803        bool MoveItem(double newX, double newY, PageItem* ite, bool fromMP = false);
00804        void RotateItem(double win, int ite);
00805        void RotateItem(double win, PageItem *currItem);
00806        void MoveRotated(PageItem *currItem, FPoint npv, bool fromMP = false);
00807        bool SizeItem(double newX, double newY, int ite, bool fromMP = false, bool DoUpdateClip = true, bool redraw = true);
00808        bool SizeItem(double newX, double newY, PageItem *pi, bool fromMP = false, bool DoUpdateClip = true, bool redraw = true);
00809        bool MoveSizeItem(FPoint newX, FPoint newY, int ite, bool fromMP = false, bool constrainRotation=false);
00810        void AdjustItemSize(PageItem *currItem);
00811        
00812 protected:
00813        void addSymbols();
00814        bool m_hasGUI;
00815        ApplicationPrefs& prefsData;
00816        UndoManager * const undoManager;
00817        bool loading;
00818        bool modified;
00819        int ActiveLayer;
00820        int docUnitIndex;
00821        double docUnitRatio;
00822        bool automaticTextFrames; // Flag for automatic Textframes
00823        bool m_masterPageMode;
00824        QMap<QString, double> m_constants;
00825        ScribusMainWindow* m_ScMW;
00826        ScribusView* m_View;
00827        ScGuardedObject<ScribusDoc> m_guardedObject;
00828        
00829 public: // Public attributes
00830        bool is12doc; //public for now, it will be removed later
00831        int NrItems;
00832        int First;
00833        int Last;
00834        int viewCount;
00835        int viewID;
00836        bool SnapGuides;
00837        bool GuideLock;
00839        MarginStruct scratch;
00840 //     double ScratchLeft;
00841 //     double ScratchRight;
00842 //     double ScratchTop;
00843 //     double ScratchBottom;
00845        FPoint minCanvasCoordinate;
00846        FPoint maxCanvasCoordinate;
00847        double rulerXoffset;
00848        double rulerYoffset;
00850        QPtrList<Page>* Pages;
00852        QPtrList<Page> MasterPages;
00854        QPtrList<Page> DocPages;
00856        QMap<QString,int> MasterNames;
00858        QPtrList<PageItem>* Items;
00859        QPtrList<PageItem> MasterItems;
00860        QPtrList<PageItem> DocItems;
00861        QPtrList<PageItem> FrameItems;
00862        Selection* const m_Selection;
00864        double pageWidth;
00866        double pageHeight;
00867        /* Number of Pages */
00868        // int pageCount; Disabled CR no longer required
00870        MarginStruct pageMargins;
00871        QValueList<PageSet> pageSets;
00872        MarginStruct bleeds;
00873 //     double BleedTop;
00874 //     double BleedLeft;
00875 //     double BleedRight;
00876 //     double BleedBottom;
00878        double PageSp;
00880        double PageSpa;
00882        int currentPageLayout;
00884        int PageOri;
00885        QString m_pageSize;
00887        int FirstPnum;
00889        bool useRaster;
00891        ColorList PageColors;
00893        DocumentInformation documentInfo;
00894        int appMode;
00895        int SubMode;
00896        double *ShapeValues;
00897        int ValCount;
00898        QString DocName;
00899        QMap<QString,int> UsedFonts;
00900        SCFonts * const AllFonts;
00901        QValueList<AlignObjs> AObjects;
00902        QColor papColor;
00903        int CurrentSel;
00904        ParagraphStyle currentStyle;
00905 
00906        bool EditClip;
00907        int EditClipMode;
00908        typoPrefs typographicSettings;
00909        guidesPrefs guidesSettings;
00910        toolPrefs toolSettings;
00911        QMap<QString, checkerPrefs> checkerProfiles;
00912        QString curCheckProfile;
00914        PageItem *LastAuto;
00916        PageItem *FirstAuto;
00917        bool DragP;
00918        bool leaveDrag;
00919        PageItem *DraggedElem;
00920        PageItem *ElemToLink;
00921        QValueList<uint> DragElements;
00922 private:
00923        StyleSet<ParagraphStyle> docParagraphStyles;
00924        StyleSet<CharStyle> docCharStyles;
00925 public:
00926        QValueList<Layer> Layers;
00927        bool marginColored;
00928        int GroupCounter;
00929        CMSData CMSSettings;
00930        cmsHPROFILE DocInputImageRGBProf;
00931        cmsHPROFILE DocInputImageCMYKProf;
00932        cmsHPROFILE DocInputRGBProf;
00933        cmsHPROFILE DocInputCMYKProf;
00934        cmsHPROFILE DocOutputProf;
00935        cmsHPROFILE DocPrinterProf;
00936        cmsHTRANSFORM stdTransRGBMon;
00937        cmsHTRANSFORM stdTransCMYKMon;
00938        cmsHTRANSFORM stdProof;
00939        cmsHTRANSFORM stdTransImg;
00940        cmsHTRANSFORM stdProofImg;
00941        cmsHTRANSFORM stdProofImgCMYK;
00942        cmsHTRANSFORM stdTransCMYK;
00943        cmsHTRANSFORM stdProofCMYK;
00944        cmsHTRANSFORM stdTransRGB;
00945        cmsHTRANSFORM stdProofGC;
00946        cmsHTRANSFORM stdProofCMYKGC;
00947        bool SoftProofing;
00948        bool Gamut;
00949        int IntentColors;
00950        int IntentImages;
00951        bool HasCMS;
00952        QMap<QString,QString> JavaScripts;
00953        int TotalItems;
00954        int MinWordLen;
00955        int HyCount;
00956        QString Language;
00957        bool Automatic;
00958        bool AutoCheck;
00959        
00960        PDFOptions PDF_Options;
00961        PrintOptions Print_Options;
00962        bool RePos;
00963        struct BookMa {
00964                                    QString Title;
00965                                    QString Text;
00966                                    QString Aktion;
00967                                    PageItem *PageObject;
00968                                    int Parent;
00969                                    int ItemNr;
00970                                    int First;
00971                                    int Last;
00972                                    int Prev;
00973                                    int Next;
00974                                    };
00975        QValueList<BookMa> BookMarks;
00976        bool OldBM;
00977        bool hasName;
00978        int RotMode;
00979        bool AutoSave;
00980        int AutoSaveTime;
00981        QTimer * const autoSaveTimer;
00982        QMap<QString,multiLine> MLineStyles;
00983        QValueList<ArrowDesc> arrowStyles;
00984        QMap<QString, ScPattern> docPatterns;
00985        QWidget* WinHan;
00986        bool DoDrawing;
00987        struct OpenNodesList
00988        {
00989               int type;
00990               Page *page;
00991               PageItem *item;
00992        };
00993        QValueList<OpenNodesList> OpenNodes;
00994        QTimer *CurTimer;
00995        QMap<int, errorCodes> docLayerErrors;
00996        QMap<int, errorCodes> docItemErrors;
00997        QMap<int, errorCodes> masterItemErrors;
00998        //Attributes to be applied to frames
00999        ObjAttrVector docItemAttributes;
01000        ToCSetupVector docToCSetups;
01001        DocumentSectionMap sections;
01002        FPointArray symReturn;
01003        FPointArray symNewLine;
01004        FPointArray symTab;
01005        FPointArray symNonBreak;
01006        FPointArray symNewCol;
01007        FPointArray symNewFrame;
01008        
01009        Hyphenator * docHyphenator;
01010 private:
01011        bool _itemCreationTransactionStarted;
01012        Page* _currentPage;
01013        
01014 signals:
01015        //Lets make our doc talk to our GUI rather than confusing all our normal stuff
01019        void docChanged();
01020        void updateContents();
01021        void updateContents(const QRect &r);
01022        void refreshItem(PageItem *);
01023        void canvasAdjusted(double width, double height, double dX, double dY);
01024        void firstSelectedItemType(int);
01025        void setApplicationMode(int);
01035        void signalRebuildOutLinePalette();
01037        void widthAndHeight(double, double);
01038        
01039 public slots:
01040        void itemSelection_ToggleLock();
01041        void itemSelection_ToggleSizeLock();
01042        void itemSelection_ToggleImageShown();
01043        void itemSelection_TogglePrintEnabled();
01044        void itemSelection_ChangePreviewResolution(int id);
01045        void itemSelection_ClearItem(Selection* customSelection=0);
01047        void itemSelection_DeleteItem(Selection* customSelection=0, bool forceDeletion=false);
01048        void itemSelection_SetItemFillTransparency(double t);
01049        void itemSelection_SetItemLineTransparency(double t);
01050        void itemSelection_SetItemFillBlend(int t);
01051        void itemSelection_SetItemLineBlend(int t);
01052        void itemSelection_SetLineGradient(VGradient& newGradient, Selection* customSelection=0);
01053        void itemSelection_SetFillGradient(VGradient& newGradient, Selection* customSelection=0);
01054        void itemSelection_ApplyImageEffects(ScImageEffectList& newEffectList, Selection* customSelection=0);
01055        void itemSelection_FlipH();
01056        void itemSelection_FlipV();
01057        void itemSelection_DoHyphenate();
01058        void itemSelection_DoDeHyphenate();
01059        void itemSelection_SendToLayer(int layerNumber);
01060        void itemSelection_SetImageOffset(double x, double y, Selection* customSelection=0);
01061        void itemSelection_SetImageScale(double x, double y, Selection* customSelection=0);
01062        void itemSelection_SetImageScaleAndOffset(double ox, double oy, double sx, double sy, Selection* customSelection=0);
01063        void itemSelection_AlignLeftOut(AlignTo currAlignTo, double guidePosition);
01064        void itemSelection_AlignRightOut(AlignTo currAlignTo, double guidePosition);
01065        void itemSelection_AlignBottomIn(AlignTo currAlignTo, double guidePosition);
01066        void itemSelection_AlignRightIn(AlignTo currAlignTo, double guidePosition);
01067        void itemSelection_AlignBottomOut(AlignTo currAlignTo, double guidePosition);
01068        void itemSelection_AlignCenterHor(AlignTo currAlignTo, double guidePosition);
01069        void itemSelection_AlignLeftIn(AlignTo currAlignTo, double guidePosition);
01070        void itemSelection_AlignCenterVer(AlignTo currAlignTo, double guidePosition);
01071        void itemSelection_AlignTopOut(AlignTo currAlignTo, double guidePosition);
01072        void itemSelection_AlignTopIn(AlignTo currAlignTo, double guidePosition);
01073        void itemSelection_DistributeDistH(bool usingDistance=false, double distance=0.0);
01074        void itemSelection_DistributeAcrossPage(bool useMargins=false);
01075        void itemSelection_DistributeRight();
01076        void itemSelection_DistributeBottom();
01077        void itemSelection_DistributeCenterH();
01078        void itemSelection_DistributeDistV(bool usingDistance=false, double distance=0.0);
01079        void itemSelection_DistributeDownPage(bool useMargins=false);
01080        void itemSelection_DistributeLeft();
01081        void itemSelection_DistributeCenterV();
01082        void itemSelection_DistributeTop();
01083        void itemSelection_MultipleDuplicate(ItemMultipleDuplicateData&);
01084        void itemSelection_UniteItems(Selection* customSelection=0);
01085        void itemSelection_SplitItems(Selection* customSelection=0);
01089        void itemSelection_adjustFrametoImageSize(Selection* customSelection=0);
01091        void itemSelection_ApplyArrowHead(int startArrowID=-1, int endArrowID=-1, Selection* customSelection=0);
01092 
01093        void ItemPen(QString farbe);
01094        void ItemPenShade(int sha);
01095        void ItemBrush(QString farbe);
01096        void ItemBrushShade(int sha);
01097        void ItemGradFill(int typ);
01098        void ItemPatternFill(QString pattern);
01099        void ItemPatternProps(double scaleX, double scaleY, double offsetX, double offsetY, double rotation);
01100 
01101        void updatePic();
01102        void updatePict(QString name);
01103        void removePict(QString name);
01104 };
01105 
01106 #endif