kpresenter

KPrDocument.h

00001 // -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*-
00002 /* This file is part of the KDE project
00003    Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>
00004    Copyright (C) 2005-2006 Thorsten Zachmann <zachmann@kde.org>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License as published by the Free Software Foundation; either
00009    version 2 of the License, or (at your option) any later version.
00010 
00011    This library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Library General Public License for more details.
00015 
00016    You should have received a copy of the GNU Library General Public License
00017    along with this library; see the file COPYING.LIB.  If not, write to
00018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #ifndef __kpresenter_doc_h__
00023 #define __kpresenter_doc_h__
00024 
00025 
00026 #ifdef HAVE_CONFIG_H
00027 #include <config.h>
00028 #endif
00029 
00030 class KoGenStyles;
00031 class KPrView;
00032 class DCOPObject;
00033 class KCommand;
00034 class KMacroCommand;
00035 class KoCommandHistory;
00036 class KoTextZoomHandler;
00037 class KoAutoFormat;
00038 class KoVariable;
00039 class KoVariableFormatCollection;
00040 class KPrVariableCollection;
00041 class KTempFile;
00042 class KoParagStyle;
00043 class KPrBgSpellCheck;
00044 class KoTextParag;
00045 class KoTextObject;
00046 class KPrLoadingInfo;
00047 class KPrGroupObject;
00048 
00049 class KoOasisContext;
00050 class KoOasisSettings;
00051 class KoXmlWriter;
00052 class QFile;
00053 class KoSavingContext;
00054 
00055 #include <KoDocument.h>
00056 #include <KoDocumentChild.h>
00057 
00058 #include <qptrlist.h>
00059 #include <qobject.h>
00060 #include <qstring.h>
00061 #include <qvaluelist.h>
00062 #include <qdatetime.h>
00063 #include <qdict.h>
00064 #include <KoPageLayoutDia.h>
00065 
00066 #include "global.h"
00067 #include <KoStyleStack.h>
00068 #include <KoPictureCollection.h>
00069 #include "KPrGradientCollection.h"
00070 #include <KoTextZoomHandler.h>
00071 #include <KoStyleCollection.h> // for KoStyleChangeDefMap
00072 #include <KoCommandHistory.h>
00073 
00074 class KoDocumentEntry;
00075 class KPrTextObject;
00076 class KPrPartObject;
00077 class KPrPage;
00078 class KPrObject;
00079 class KPrDocument;
00080 
00081 class KoParagStyle;
00082 class KoStyleCollection;
00083 
00084 class KPrChild : public KoDocumentChild
00085 {
00086 public:
00087 
00088     // constructor - destructor
00089     KPrChild( KPrDocument *_kpr, KoDocument* _doc, const QRect& _rect );
00090     KPrChild( KPrDocument *_kpr );
00091     ~KPrChild();
00092 
00093     // get parent
00094     KPrDocument* parent()const { return m_parent; }
00095 
00096     virtual KoDocument *hitTest( const QPoint &, const QWMatrix & );
00097 
00098 protected:
00099     KPrDocument *m_parent;
00100 };
00101 
00102 class KPrDocument : public KoDocument
00103 {
00104     Q_OBJECT
00105     Q_PROPERTY( int maxRecentFiles READ maxRecentFiles )
00106     Q_PROPERTY( int undoRedoLimit READ undoRedoLimit WRITE setUndoRedoLimit )
00107     Q_PROPERTY( double indentValue READ getIndentValue WRITE setIndentValue )
00108     Q_PROPERTY( int getLeftBorder READ getLeftBorder )
00109     Q_PROPERTY( int getTopBorder READ getTopBorder )
00110     Q_PROPERTY( int getBottomBorder READ getBottomBorder )
00111     Q_PROPERTY( int getRightBorder READ getRightBorder )
00112     Q_PROPERTY( bool cursorInProtectedArea READ cursorInProtectedArea WRITE setCursorInProtectedArea )
00113     Q_PROPERTY( bool insertDirectCursor READ insertDirectCursor WRITE setInsertDirectCursor )
00114     Q_PROPERTY( QString picturePath READ picturePath WRITE setPicturePath )
00115     Q_PROPERTY( QString globalLanguage READ globalLanguage WRITE setGlobalLanguage )
00116     Q_PROPERTY( bool globalHyphenation READ globalHyphenation WRITE setGlobalHyphenation )
00117     Q_PROPERTY( double tabStopValue READ tabStopValue WRITE setTabStopValue )
00118     Q_PROPERTY( bool snapToGrid READ snapToGrid WRITE setSnapToGrid )
00119     Q_PROPERTY( bool backgroundSpellCheckEnabled READ backgroundSpellCheckEnabled WRITE enableBackgroundSpellCheck )
00120     Q_PROPERTY( bool spInfiniteLoop READ spInfiniteLoop WRITE setInfiniteLoop )
00121     Q_PROPERTY( bool spManualSwitch READ spManualSwitch WRITE setManualSwitch )
00122     Q_PROPERTY( bool presentationDuration READ presentationDuration WRITE setPresentationDuration )
00123     Q_PROPERTY( QColor gridColor READ gridColor WRITE setGridColor )
00124     Q_PROPERTY( QColor txtBackCol READ txtBackCol WRITE setTxtBackCol )
00125 
00126 
00127   public:
00128     // constructor - destructor
00129     KPrDocument( QWidget *parentWidget = 0, const char *widgetName = 0, QObject* doc = 0,
00130                    const char* name = 0, bool singleViewMode = false );
00131     ~KPrDocument();
00132 
00133     // Drawing
00134     virtual void paintContent( QPainter& painter, const QRect& rect, bool transparent = false,
00135                                double zoomX = 1.0, double zoomY = 1.0 );
00136 
00137     // save
00138     virtual QDomDocument saveXML();
00139     virtual bool completeSaving( KoStore* _store );
00140     virtual bool saveOasis( KoStore* store, KoXmlWriter* manifestWriter );
00141 
00142     enum SaveFlag { SaveAll, SaveSelected, SavePage };
00143     void saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyles, QFile* masterStyles, 
00144                                   KoSavingContext & savingContext, SaveFlag saveFlag = SaveAll ) const;
00145     enum { STYLE_BACKGROUNDPAGE = 20, STYLE_BACKGROUNDPAGEAUTO, STYLE_GRADIENT,STYLE_OBJECTANIMATION, STYLE_STROKE, STYLE_MARKER, STYLE_PICTURE, STYLE_PRESENTATIONSTICKYOBJECT };
00146 
00147     // load
00148     virtual bool loadOasis( const QDomDocument& doc, KoOasisStyles& styles, const QDomDocument&, KoStore* store );
00149     /*
00150      * Load oasis object
00151      * @param pos: we use -1 for sticky page.
00152      */
00153     void loadOasisObject( KPrPage * page, QDomNode & drawPage, KoOasisContext & context, KPrGroupObject *groupObject = 0L);
00154 
00155     virtual bool loadXML( const QDomDocument& doc );
00156     virtual bool loadXML( QIODevice *, const QDomDocument & doc );
00157     virtual bool loadChildren( KoStore* _store );
00158 
00159     virtual int supportedSpecialFormats() const;
00160 
00161     virtual bool initDoc(InitDocFlags flags, QWidget* parentWidget=0);
00162     virtual void setEmpty();
00163 
00164     virtual void addView( KoView *_view );
00165     virtual void removeView( KoView *_view );
00166 
00167     // page layout
00168     void setPageLayout( const KoPageLayout &);
00169 
00170     virtual QPixmap generatePreview( const QSize &size );
00171 
00172     virtual void addShell( KoMainWindow *shell );
00173 
00174     //header-footer
00175     void createHeaderFooter();
00176     void updateHeaderFooterPosition();
00177 
00178     const QPtrList<KPrPage> & getPageList() const {return m_pageList;}
00179 
00180     // @return the master page
00181     KPrPage * masterPage() const { return m_masterPage; }
00182     KPrPage * activePage()const;
00183     // We need one that's not const, due to QPtrList::at() not being const
00184     QPtrList<KPrPage>& pageList() { return m_pageList;}
00185 
00186     void insertPixmapKey( KoPictureKey key );
00187 
00188     void insertObjectInPage(double offset, KPrObject *_obj, int pos = -1);
00189 
00190     void setGridValue( double rx, double ry, bool _replace = true );
00191 
00192     // get - set options for editmodi
00193     QColor txtBackCol() const { return _txtBackCol; }
00194     void setTxtBackCol( const QColor &c ) { _otxtBackCol = _txtBackCol; _txtBackCol = c; }
00195 
00196     // get - set roundedness
00197     unsigned int getRndX() const { return _xRnd; }
00198     unsigned int getRndY() const { return _yRnd; }
00199 
00200     // get values for screenpresentations
00201     bool spInfiniteLoop() const { return _spInfiniteLoop; }
00202     bool spManualSwitch() const { return _spManualSwitch; }
00203     bool presentationDuration() const { return _showPresentationDuration; }
00204     void setInfiniteLoop( bool il ) { _spInfiniteLoop = il; }
00205     void setManualSwitch( bool ms ) { _spManualSwitch = ms; }
00206     void setPresentationDuration( bool pd ) { _showPresentationDuration = pd; }
00207 
00208 
00209     // size of page
00210     QRect getPageRect( bool decBorders = true ) const;
00211 
00212     void insertObject(KPrChild* ch ){ insertChild(ch);}
00213 
00214     void savePage( const QString &file, int pgnum, bool ignore = false );
00215 
00216     void pastePage( const QMimeSource * data, int pgnum );
00217 
00218     QString templateFileName(bool chooseTemplate, const QString &theFile );
00219 
00220     int insertNewPage( const QString &cmdName,int _page, InsertPos _insPos, bool chooseTemplate, const QString &theFile );
00221 
00226     void insertPage( KPrPage *page, int currentPageNum, int insertPageNum );
00231     void takePage( KPrPage *page, int pageNum );
00232     void deletePage( int _page );
00233     void copyPageToClipboard( int pgnum );
00234 
00235     // repaint all views
00236     void repaint( bool );
00237 
00238     void repaint( const QRect& );
00239     void repaint( KPrObject* );
00240 
00241     // stuff for screen-presentations
00246     QValueList<int> getPageEffectSteps( unsigned int );
00247 
00248     QPen presPen() const { return _presPen; }
00249     void setPresPen( QPen p ) {_presPen = p; }
00250 
00251     void restoreBackground( KPrPage * );
00252     KCommand * loadPastedObjs( const QString &in, KPrPage* _page );
00253 
00254     void deSelectAllObj();
00255     void deSelectObj(KPrObject *obj);
00256     void updateHeaderFooterButton();
00257 
00258     KoPictureCollection *pictureCollection(){ return &m_pictureCollection; }
00259     KPrGradientCollection *gradientCollection() { return &_gradientCollection; }
00260 
00261     KoAutoFormat * getAutoFormat()const { return m_autoFormat; }
00262 
00263     void replaceObjs( bool createUndoRedo = true );
00264 
00265     int getLeftBorder() const;
00266     int getTopBorder() const;
00267     int getBottomBorder() const;
00268     int getRightBorder() const;
00269 
00270     void enableEmbeddedParts( bool f );
00271 
00272     KPrTextObject *header()const { return _header; }
00273     KPrTextObject *footer()const { return _footer; }
00274 
00275     void setHeader( bool b );
00276     void setFooter( bool b );
00277 
00278     void setDisplayObjectMasterPage( bool b );
00279     void setDisplayBackground( bool b );
00280 
00281     bool isHeader(const KPrObject *obj)const;
00282     bool isFooter(const KPrObject *obj)const;
00283     bool isHeaderFooter(const KPrObject *obj)const;
00284 
00285     // Returns true if the slide pgNum (0 based)
00286     bool isSlideSelected( int pgNum) ;
00287     // Returns the list of selected slides. Slide numbers are 0-based.
00288     QValueList<int> selectedSlides();
00289     QString selectedForPrinting();
00290 
00291     virtual DCOPObject* dcopObject();
00292 
00293     void initConfig();
00294     void saveConfig();
00295 
00296     KoStyleCollection * styleCollection()const { return m_styleColl;}
00297 
00298 
00299     void updateAllStyleLists();
00300     void applyStyleChange( KoStyleChangeDefMap changed );
00301     void updateStyleListOrder( const QStringList &list );
00302 
00303     void addCommand( KCommand * cmd );
00304 
00305     KoTextZoomHandler* zoomHandler() const { return m_zoomHandler; }
00306     QFont defaultFont() const { return m_defaultFont; }
00307     void setDefaultFont( const QFont & newFont) {
00308         m_defaultFont = newFont;
00309     }
00310 
00315     bool showStatusBar() const { return m_bShowStatusBar;}
00316     void setShowStatusBar( bool _status ) { m_bShowStatusBar = _status;}
00317 
00318     bool showGrid() const { return m_bShowGrid; }
00319     void setShowGrid ( bool _grid ) { m_bShowGrid = _grid; }
00320 
00321     double tabStopValue() const { return m_tabStop; }
00322     void setTabStopValue ( double _tabStop );
00323 
00324     // in pt
00325     double getIndentValue()const { return m_indent; }
00326     void setIndentValue(double _ind) { m_indent=_ind; }
00327 
00328     int maxRecentFiles() const { return m_maxRecentFiles; }
00329 
00330     KoVariableFormatCollection *variableFormatCollection()const { return m_varFormatCollection; }
00331 
00332     void recalcVariables( int type );
00333 
00334     void recalcPageNum();
00335 
00336     KPrVariableCollection *getVariableCollection()const {return m_varColl;}
00337 
00338     void refreshMenuCustomVariable();
00339 
00340     void setShowRuler(bool _ruler){ m_bShowRuler=_ruler; }
00341     bool showRuler() const { return m_bShowRuler; }
00342 
00343     void reorganizeGUI();
00344 
00345     int undoRedoLimit() const;
00346     void setUndoRedoLimit(int _val);
00347 
00348 
00349     void updateRuler();
00350     void updateRulerPageLayout();
00351 
00352     unsigned int getPageNums() const { return m_pageList.count(); }
00353 
00354     // Tell all views to stop editing this frameset, if they were doing so
00355     void terminateEditing( KPrTextObject * textObj )
00356         { emit sig_terminateEditing( textObj ); }
00357     KPrPage * initialActivePage() const;
00358 
00359     KPrView *firstView() const;
00360 
00361     void displayActivePage(KPrPage * _page);
00362 
00363     void updateZoomRuler();
00364     void newZoomAndResolution( bool updateViews, bool forPrint );
00365 
00366     void movePageTo( int oldPos, int newPos );
00367 
00368     void updateSideBarItem( KPrPage * page );
00369     KPrPage * findPage(KPrObject *object);
00370     KPrPage * findPage(QPtrList<KPrObject> &objects);
00371 
00372     void refreshAllNoteBar(int page, const QString &text, KPrView *exceptView);
00373     void refreshAllNoteBarMasterPage(const QString &text, KPrView *exceptView);
00374 
00375 
00376     bool backgroundSpellCheckEnabled() const;
00377     void enableBackgroundSpellCheck( bool b );
00378 
00379     void startBackgroundSpellCheck();
00380 
00381     //refresh obj when we active or disactive
00382     void reactivateBgSpellChecking(bool refreshTextObj=false);
00383     QPtrList<KoTextObject> allTextObjects() const;
00384     QValueList<KoTextObject *> visibleTextObjects( ) const;
00385 
00387     virtual QValueList<KoTextDocument *> allTextDocuments() const;
00388 
00389     bool allowAutoFormat() const { return m_bAllowAutoFormat; }
00390     void setAllowAutoFormat(bool _b){ m_bAllowAutoFormat=_b; }
00391 
00392     // This setting has to be here [instead of the view] because we need to
00393     // format paragraphs slightly differently (to add room for the CR char)
00394     bool viewFormattingChars() const { return m_bViewFormattingChars; }
00395     void setViewFormattingChars(bool _b) { m_bViewFormattingChars=_b; }
00396 
00397 
00398     bool showGuideLines() const { return m_bShowGuideLines; }
00399     void setShowGuideLines( bool b );
00400 
00406     QValueList<double> &horizontalGuideLines() { return m_hGuideLines; }
00407 
00413     QValueList<double> &verticalGuideLines() { return m_vGuideLines; }
00414 
00420     void horizontalGuideLines( const QValueList<double> &lines );
00421 
00427     void verticalGuideLines( const QValueList<double> &lines );
00428 
00435     void addGuideLine( Qt::Orientation o, double pos );
00436 
00437     void updateGuideLineButton();
00438 
00439     void updateGridButton();
00440 
00441     double getGridX()const { return m_gridX; }
00442     void setGridX(double _x) { m_gridX=_x; }
00443 
00444     double getGridY()const { return m_gridY; }
00445     void setGridY(double _y) { m_gridY=_y; }
00446 
00447     bool snapToGrid() const { return m_bSnapToGrid; }
00448     void setSnapToGrid( bool _b ) { m_bSnapToGrid = _b; }
00449 
00450     QColor gridColor() const { return m_gridColor; }
00451     void setGridColor( const QColor & _col ) { m_gridColor = _col; }
00452 
00453     QStringList spellCheckIgnoreList() const { return m_spellCheckIgnoreList; }
00454     void setSpellCheckIgnoreList( const QStringList& lst );
00455     void addSpellCheckIgnoreWord( const QString & );
00456 
00457     KoCommandHistory * commandHistory()const { return m_commandHistory; }
00458     void updateObjectStatusBarItem();
00459     void updateObjectSelected();
00460     void layout(KPrObject *kpobject);
00461     void layout();
00462     void changeBgSpellCheckingState( bool b );
00463 
00464     bool cursorInProtectedArea()const;
00465     void setCursorInProtectedArea( bool b );
00466 
00467     void insertFile(const QString & file );
00468 
00469     void spellCheckParagraphDeleted( KoTextParag *_parag,  KPrTextObject *frm);
00470 
00471     void loadPictureMap ( const QDomElement& domElement );
00472     void updateRulerInProtectContentMode();
00473     void updatePresentationButton();
00474     void refreshGroupButton();
00475 
00476     QString picturePath()const { return m_picturePath; }
00477     void setPicturePath( const QString & _path ) { m_picturePath = _path ; }
00478 
00479     bool insertDirectCursor() const { return m_bInsertDirectCursor; }
00480     void setInsertDirectCursor(bool _b);
00481     void updateDirectCursorButton();
00482 
00483     QString globalLanguage()const { return m_globalLanguage; }
00484     void setGlobalLanguage( const QString & _lang ){m_globalLanguage = _lang;}
00485 
00486     bool globalHyphenation() const { return m_bGlobalHyphenation; }
00487     void setGlobalHyphenation ( bool _hyphen ) { m_bGlobalHyphenation = _hyphen; }
00488 
00489     void addWordToDictionary( const QString & word);
00490 
00491     void loadImagesFromStore( KoStore *_store );
00492     void saveEmbeddedObject(KPrPage *page, const QPtrList<KoDocumentChild>& childList ,QDomDocument &doc,QDomElement &presenter );
00493     void insertEmbedded( KoStore *store, QDomElement elem, KMacroCommand * macroCmd, KPrPage *page, int pos );
00494 
00495     KPrBgSpellCheck* backSpeller() const { return m_bgSpellCheck; }
00496 
00497     void setCustomSlideShows( const CustomSlideShowMap & customSlideShows );
00498     QValueList <KPrPage *> customListPage( const QStringList & lst, bool loadOasis=false );
00499 
00500 
00501     QString presentationName() const { return m_presentationName; }
00502     void setPresentationName( const QString &_name ) { m_presentationName = _name; }
00503 
00504     QStringList presentationList();
00505     //return list of slide which be displaying:
00506     //return selected slide when presentation name is empty
00507     //otherwise return list of custom slide show
00508     QValueList<int> displaySelectedSlides();
00509     QValueList<int> listOfDisplaySelectedSlides( const QValueList<KPrPage*>& lst );
00510     void testCustomSlideShow( const QValueList<KPrPage *> &pages, KPrView *view );
00511     void clearTestCustomSlideShow();
00512 
00513     const CustomSlideShowMap & customSlideShows() { return m_customListSlideShow; }
00514 
00515 public slots:
00516     void movePage( int from, int to );
00517     void copyPage( int from );
00518 
00519     void selectPage( int pgNum, bool select );
00520     void clipboardDataChanged();
00521 
00522     void slotRepaintChanged( KPrTextObject * );
00523 
00524     static void writeAutomaticStyles( KoXmlWriter& contentWriter, KoGenStyles& mainStyles, KoSavingContext& context, bool stylesDotXml );
00525 
00526     void slotGuideLinesChanged( KoView *view );
00527 
00528     virtual void initEmpty();
00529 
00530 signals:
00531     void enablePaste( bool );
00532     void sig_refreshMenuCustomVariable();
00533     void pageNumChanged();
00534     void sig_updateRuler();
00535     void sig_terminateEditing( KPrTextObject * );
00536     void sig_updateMenuBar();
00537 
00538 protected slots:
00539     void slotDocumentRestored();
00540     void slotCommandExecuted();
00541     void slotDocumentInfoModifed();
00542 
00543     virtual void openExistingFile( const QString& file );
00544     virtual void openTemplate( const QString& file );
00545 
00546 protected:
00547     KoView* createViewInstance( QWidget* parent, const char* name );
00548     void testAndCloseAllTextObjectProtectedContent();
00549     // ************ functions ************
00553     virtual bool saveChildren( KoStore* _store );
00554 
00555     void loadStyleTemplates( const QDomElement &styles );
00556     void saveStyle( KoParagStyle *sty, QDomElement parentElem );
00557 
00558     QDomDocumentFragment saveBackground( QDomDocument& );
00559     QDomElement saveObjects( QDomDocument &doc );
00560     QDomElement saveTitle( QDomDocument &doc );
00561     QDomElement saveNote( QDomDocument &doc );
00562     QDomElement saveAttribute( QDomDocument &doc );
00563     QDomElement saveUsedSoundFileToXML( QDomDocument &_doc, QStringList _list );
00564     void loadTextStyle( const QDomElement& domElement );
00565     void saveEmbeddedObject(KPrPage *page, KoDocumentChild *chl,QDomDocument &doc,QDomElement &presenter, double offset );
00566     void saveGuideLines( QDomDocument &doc, QDomElement& element );
00567 
00568     void loadBackground( const QDomElement &element );
00569     void loadGuideLines( const QDomElement &element );
00570     KCommand * loadObjects( const QDomElement &element,bool paste=false );
00571     void loadTitle( const QDomElement &element );
00572     void loadNote( const QDomElement &element );
00573     void loadUsedSoundFileFromXML( const QDomElement &element );
00574 
00575     virtual bool completeLoading( KoStore* /* _store */ );
00576     void makeUsedPixmapList();
00577     void makeUsedSoundFileList();
00578 
00579     void saveUsedSoundFileToStore( KoStore *_store, QStringList _list );
00580     void loadUsedSoundFileFromStore( KoStore *_store, QStringList _list );
00581     void fillStyleStack( const QDomElement& object, KoOasisContext & context, const char* family );
00582     /*
00583      * increaseOrder = true by default, put to false when we have group of animation
00584      */
00585     int createPresentationAnimation(const QDomElement& element, int order = 0 ,bool increaseOrder = true);
00586 
00587     void saveOasisPresentationSettings( KoXmlWriter &contentTmpWriter, QMap<int, QString> &page2name );
00588     void loadOasisPresentationSettings( QDomNode &settingsDoc );
00589     void saveOasisPresentationCustomSlideShow( KoXmlWriter &contentTmpWriter, QMap<int, QString> &page2name );
00590     void loadOasisPresentationCustomSlideShow( QDomNode &settingsDoc );
00591 
00592     void loadOasisHeaderFooter( QDomNode & drawPage, KoOasisContext & context);
00593 
00594     void saveOasisSettings( KoXmlWriter &contentTmpWriter );
00595     void loadOasisSettings( const QDomDocument&settingsDoc );
00596 
00597     void saveOasisCustomFied( KoXmlWriter &writer )const;
00598 
00599     void loadOasisIgnoreList( const KoOasisSettings& settings );
00600 
00601     //we move presSpeed to each table => compatibility with old file format
00602     void compatibilityFromOldFileFormat();
00603 
00604     void parseOasisGuideLines( const QString &str );
00605 
00610     void pageOrderChanged();
00611     // ************ variables ************
00612 
00613     // screenpresentations
00614     bool _spInfiniteLoop, _spManualSwitch, _showPresentationDuration;
00615 
00616     // options
00617     int _xRnd, _yRnd;
00618 
00619     // options for editmode
00620     QColor _txtBackCol;
00621     QColor _otxtBackCol;
00622 
00623     bool _clean;
00624     int objStartY, objStartNum;
00625 
00626     QPen _presPen;
00627 
00628     KoPictureCollection m_pictureCollection;
00629     KPrGradientCollection _gradientCollection;
00630 
00631     KPrTextObject *_header, *_footer;
00632 
00633     QMap<KoPictureKey, QString> m_pictureMap;
00634 
00635     CustomSlideShowMap m_customListSlideShow;
00636 
00637 
00638     KoPageLayout __pgLayout;
00639     int lastObj;
00640 
00641     QString urlIntern;
00642 
00643     QValueList<KoPictureKey> usedPictures;
00644     QStringList usedSoundFile, haveNotOwnDiskSoundFile;
00645     QPtrList<KTempFile> tmpSoundFileList;
00646     DCOPObject *dcop;
00647 
00648     int saveOnlyPage;
00649     QString m_tempFileInClipboard;
00650     bool ignoreSticky;
00651 
00652     KoCommandHistory * m_commandHistory;
00653     KoTextZoomHandler* m_zoomHandler;
00654     QFont m_defaultFont;
00655     KoAutoFormat * m_autoFormat;
00656 
00657     bool m_bShowRuler;
00658     bool m_bShowStatusBar;
00659     bool m_bAllowAutoFormat;
00660     bool m_bShowGuideLines;
00661     bool m_bViewFormattingChars;
00662 
00663     bool m_bShowGrid;
00664 
00665     bool m_bSnapToGrid;
00666     double m_indent; // in pt
00667 
00668     double m_tabStop;
00669     int m_maxRecentFiles;
00670     bool m_cursorInProtectectedArea;
00671     KoVariableFormatCollection *m_varFormatCollection;
00672     KPrVariableCollection *m_varColl;
00673     QColor m_gridColor;
00674     bool _duplicatePage;
00675 private:
00677     QValueList<double> m_hGuideLines;
00679     QValueList<double> m_vGuideLines;
00680 
00681     QPtrList<KPrPage> m_pageList;
00682     QPtrList<KPrPage> m_deletedPageList;
00683 
00684     QStringList m_spellCheckIgnoreList; // per-document
00685     QStringList m_spellCheckPersonalDict; // per-user
00686 
00687     double m_gridX;
00688     double m_gridY;
00689     double oldGridX;
00690     double oldGridY;
00691     int m_insertFilePage;
00692     KPrPage *m_initialActivePage;
00693     KPrPage *m_pageWhereLoadObject;
00694     KPrPage *m_masterPage;
00695     KPrBgSpellCheck *m_bgSpellCheck;
00696     KoStyleCollection *m_styleColl;
00697     KPrObject *bgObjSpellChecked;
00698     QString m_picturePath;
00699     bool  m_bInsertDirectCursor;
00700     QString m_globalLanguage;
00701     QString m_presentationName;
00702     bool m_bGlobalHyphenation;
00703     KPrLoadingInfo *m_loadingInfo;
00704     QValueList<int> *m_customListTest;
00705 
00708     int m_childCountBeforeInsert;
00709 };
00710 
00711 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys