30#include <KoStyleCollection.h>
32#include <KoDocumentChild.h>
33#include <KoPictureCollection.h>
67 KPrPage(KPrDocument *_doc, KPrPage *masterPage = 0 );
77 virtual DCOPObject* dcopObject();
82 KPrDocument * kPresenterDoc() const { return m_doc; }
89 TQString manualTitle() const;
96 void insertManualTitle( const TQString & title);
108 TQString pageTitle( const TQString &_title = TQString() ) const;
115 void setNoteText( const TQString &_text );
122 TQString noteText( ) const;
129 void setMasterPage( KPrPage *_masterPage ) { m_masterPage = _masterPage; }
136 KPrPage * masterPage() const { return m_masterPage; }
144 bool isMasterPage() const;
151 const TQPtrList<KPrObject> & objectList() const { return m_objectList; }
160 KPrObject *getObject( int num );
170 void appendObject( KPrObject *_obj );
180 void appendObjects( const TQValueList<KPrObject *> &objects );
190 void replaceObject( KPrObject *oldObject, KPrObject *newObject );
199 int takeObject( KPrObject * object );
209 KCommand * deleteSelectedObjects();
220 void insertObject( KPrObject * object, int pos );
225 void completeLoading( bool _clean, int lastObj );
236 void unifyObjectName( KPrObject * object );
243 KoRect getPageRect() const;
250 TQRect getZoomPageRect() const;
257 void setObjectList( TQPtrList<KPrObject> objectLlist ) {
258 m_objectList.setAutoDelete( false ); m_objectList = objectLlist; m_objectList.setAutoDelete( false );
266 unsigned int objNums() const { return m_objectList.count(); }
275 int numTextObject() const;
286 KPrTextObject *textFrameSet( unsigned int _num ) const;
293 int numSelected() const;
298 void pasteObjs( const TQByteArray & data, int nbCopy = 1, double angle = 0.0 ,
299 double _increaseX=0.0, double increaseY = 0.0, double moveX=0.0, double moveY=0.0);
304 KCommand * replaceObjs( bool createUndoRedo, double _orastX, double _orastY,
305 const TQColor & _txtBackCol, const TQColor & _otxtBackCol);
310 void copyObjs(TQDomDocument &doc, TQDomElement &presenter, TQValueList<KoPictureKey> & lst) const;
318 KPrObject* getSelectedObj() const;
328 TQPtrList<KPrObject> getSelectedObjects( bool withoutHeaderFooter = false ) const;
336 KPrPixmapObject* getSelectedImage() const;
346 KCommand * setImageEffect(ImageEffect eff, TQVariant param1, TQVariant param2, TQVariant param3);
361 void ungroupObjects( KMacroCommand ** macro );
366 void raiseObjs( bool forward );
371 void lowerObjs( bool backward );
373 KCommand* setPen( const KoPen &pen, LineEnd lb, LineEnd le, int flags );
374 KCommand* setBrush( const TQBrush &brush, FillType ft, const TQColor& g1, const TQColor &g2,
375 BCType gt, bool unbalanced, int xfactor, int yfactor, int flags );
380 KCommand * insertObject( const TQString &name, KPrObject * object, const KoRect &r, bool addCommand = true );
382 virtual KPrPartObject* insertObject( const KoRect&, KoDocumentEntry& );
384 void insertRectangle( const KoRect &r, const KoPen & pen, const TQBrush &brush, FillType ft,
385 const TQColor &g1, const TQColor & g2,BCType gt, int rndX, int rndY,
386 bool unbalanced, int xfactor, int yfactor );
388 void insertCircleOrEllipse( const KoRect &r, const KoPen &pen, const TQBrush &brush, FillType ft,
389 const TQColor &g1, const TQColor &g2, BCType gt, bool unbalanced, int xfactor, int yfactor );
391 void insertPie( const KoRect &r, const KoPen &pen, const TQBrush &brush, FillType ft,
392 const TQColor &g1, const TQColor &g2,BCType gt, PieType pt, int _angle, int _len,
393 LineEnd lb,LineEnd le, bool unbalanced, int xfactor, int yfactor );
395 KPrTextObject* insertTextObject( const KoRect& r, const TQString& text = TQString(), KPrView *_view = 0L );
396 void insertLine( const KoRect &r, const KoPen &pen, LineEnd lb, LineEnd le, LineType lt );
398 void insertAutoform( const KoRect &r, const KoPen &pen, const TQBrush &brush, LineEnd lb, LineEnd le,
399 FillType ft, const TQColor &g1, const TQColor &g2, BCType gt, const TQString &fileName,
400 bool unbalanced, int xfactor, int yfactor );
402 void insertFreehand( const KoPointArray &points, const KoRect &r, const KoPen &pen,LineEnd lb, LineEnd le );
403 void insertPolyline( const KoPointArray &points, const KoRect &r, const KoPen &pen,LineEnd lb, LineEnd le );
404 void insertQuadricBezierCurve( const KoPointArray &points, const KoPointArray &allPoints, const KoRect &r,
405 const KoPen &pen,LineEnd lb, LineEnd le );
406 void insertCubicBezierCurve( const KoPointArray &points, const KoPointArray &allPoints, const KoRect &r,
407 const KoPen &pen,LineEnd lb, LineEnd le );
409 void insertPolygon( const KoPointArray &points, const KoRect &r, const KoPen &pen, const TQBrush &brush,
410 FillType ft, const TQColor &g1, const TQColor &g2, BCType gt, bool unbalanced,
411 int xfactor, int yfactor, bool _checkConcavePolygon, int _cornersValue, int _sharpnessValue );
413 void insertClosedLine( const KoPointArray &points, const KoRect &r, const KoPen &pen, const TQBrush &brush,
414 FillType ft, const TQColor &g1, const TQColor &g2,
415 BCType gt, bool unbalanced, int xfactor, int yfactor, ToolEditMode _mode );
417 void slotRepaintVariable();
418 void recalcPageNum();
419 void changePicture( const KURL & url, TQWidget *parent );
420 void insertPicture( const TQString &filename, const KoPoint &pos );
421 void insertPicture( const TQString &_file, const KoRect &_rect );
423 void enableEmbeddedParts( bool f );
425 KPrBackGround *background() { return m_kpbackground; }
427 void makeUsedPixmapList();
429 void setBackColor( const TQColor &backColor1, const TQColor &backColor2, BCType bcType,
430 bool unbalanced, int xfactor, int yfactor );
431 void setBackPicture( const KoPictureKey & key );
432 bool getBackUnbalanced( ) const;
433 void setBackView( BackView backView );
434 void setBackType( BackType backType );
436 void setPageEffect( PageEffect pageEffect );
437 void setPageEffectSpeed( EffectSpeed pageEffectSpeed );
438 void setPageTimer( int pageTimer );
439 void setPageSoundEffect( bool soundEffect );
440 void setPageSoundFileName( const TQString &fileName );
441 BackType getBackType( ) const ;
442 BackView getBackView( ) const ;
443 KoPictureKey getBackPictureKey( ) const ;
444 KoPicture getBackPicture( ) const ;
445 TQColor getBackColor1( ) const ;
446 TQColor getBackColor2() const ;
447 int getBackXFactor() const ;
448 int getBackYFactor( ) const;
449 BCType getBackColorType( ) const;
450 PageEffect getPageEffect( ) const;
451 EffectSpeed getPageEffectSpeed() const;
452 int getPageTimer( ) const;
453 bool getPageSoundEffect( ) const;
454 TQString getPageSoundFileName() const;
457 void setUseMasterBackground( bool useMasterBackground );
458 bool useMasterBackground() const;
463 TQValueList<int> getEffectSteps() const;
465 bool isSlideSelected() const { return m_selectedSlides;}
466 void slideSelected( bool _b){m_selectedSlides=_b;}
468 void setInsPictureFile( const TQString &_file ) { m_pictureFile = _file; }
470 TQString insPictureFile() const { return m_pictureFile; }
472 void deSelectAllObj();
473 void deSelectObj( KPrObject *kpobject );
474 TQDomElement saveObjects( TQDomDocument &doc, TQDomElement &objects, double yoffset,
475 int saveOnlyPage ) const;
477 bool oneObjectTextExist( bool forceAllTextObject = true) ;
478 bool oneObjectTextSelected();
479 bool isOneObjectSelected();
480 bool haveASelectedPartObj();
481 bool haveASelectedGroupObj();
482 bool haveASelectedPixmapObj();
492 KoRect getRealRect( bool all ) const;
493 bool chPic( KPrView *_view);
496 KCommand *moveObject(KPrView *_view, double diffx, double diffy);
497 KCommand *moveObject(KPrView *m_view, const KoPoint &_move, bool key);
499 KCommand *rotateSelectedObjects( float _newAngle, bool addAngle= false);
500 KCommand *shadowObj(ShadowDirection dir, int dist, const TQColor &col);
502 TQPtrList<KoTextObject> allTextObjects() const;
503 void addTextObjects(TQPtrList<KoTextObject>& lst) const;
507 KPrObject * getCursor( const TQPoint &pos );
508 KPrObject * getCursor( const KoPoint &pos );
516 KPrObject* getObjectAt( const KoPoint &pos, bool withoutProtected = false ) const;
517 KPrPixmapObject * picViewOrigHelper() const;
518 void applyStyleChange( KoStyleChangeDefMap changed );
520 void reactivateBgSpellChecking( bool refreshTextObj);
522 bool canMoveOneObject() const;
523 KCommand *alignVertical(VerticalAlignmentType _type );
524 void changeTabStopValue ( double _tabStop );
525 bool savePicture( KPrView *_view ) const;
526 bool findTextObject( KPrObject *obj );
527 KPrObject *nextTextObject(KPrTextObject *obj);
529 void getAllObjectSelectedList(TQPtrList<KPrObject> &lst, bool force = false );
530 void getAllEmbeddedObjectSelected(TQPtrList<KoDocumentChild> &embeddedObjects );
532 void load( const TQDomElement &element );
533 void loadOasis( KoOasisContext & context );
535 TQDomElement save( TQDomDocument &doc );
537 bool saveOasisPage( KoStore *store, KoXmlWriter &xmlWriter, int posPage, KoSavingContext& context,
538 int & indexObj, int &partIndexObj, KoXmlWriter* manifestWriter, TQMap<TQString, int> &pageNames ) const;
539 TQString saveOasisPageStyle( KoStore *store, KoGenStyles& mainStyles ) const;
540 TQString saveOasisPageEffect() const;
541 TQString saveOasisAdditionalPageEffect() const;
542 bool saveOasisNote( KoXmlWriter &xmlWriter ) const;
544 bool hasHeader() const { return m_bHasHeader; }
545 bool hasFooter() const { return m_bHasFooter; }
546 void setHeader( bool b, bool _updateDoc = true );
547 void setFooter( bool b, bool _updateDoc = true );
549 void setDisplayObjectFromMasterPage( bool _b );
550 bool displayObjectFromMasterPage() const { return m_displayObjectFromMasterPage;}
552 void setDisplayBackground( bool _b );
553 bool displayBackground() const { return m_displayBackground; }
555 TQString oasisNamePage( int posPage ) const;
558 void makeUsedPixmapListForGroupObject( KPrObject *_obj );
559 void completeLoadingForGroupObject( KPrObject *_obj );
560 bool objectNameExists( KPrObject * object, TQPtrList<KPrObject> &list );
561 void saveOasisObject( KoStore *store, KoXmlWriter &xmlWriter, KoSavingContext& context, int & indexObj, int &partIndexObj, KoXmlWriter* manifestWriter ) const;
565 TQPtrList<KPrObject> m_objectList;
567 KPrPage *m_masterPage;
568 KPrBackGround *m_kpbackground;
569 TQString m_manualTitle;
572 bool m_selectedSlides;
574 TQString m_pictureFile;
575 bool m_bHasHeader, m_bHasFooter;
576 bool m_useMasterBackground;
579 bool m_displayObjectFromMasterPage;
581 bool m_displayBackground;
586 PageEffect m_pageEffect;
590 EffectSpeed m_pageEffectSpeed;
600 TQString m_soundFileName;
|