89 KPrCanvas( TQWidget *parent=0,
const char *name=0,KPrView *_view=0 );
93 KPrView * getView()
const {
return m_view; }
98 int diffx()
const {
return m_xOffset; }
99 int diffy()
const {
return m_yOffset; }
100 void setDiffX(
int _diffX ) { m_xOffset = _diffX; }
101 void setDiffY(
int _diffY ) { m_yOffset = _diffY; }
102 void scrollX(
int x );
103 void scrollY(
int y );
107 void deSelectAllObj();
108 void selectObj( KPrObject* );
109 void deSelectObj( KPrObject* );
110 void setTextFormat(
const KoTextFormat &format,
int flags);
112 void setTextColor(
const TQColor & );
113 void setTextBackgroundColor(
const TQColor & );
114 void setTextAlign(
int );
115 void setTextDepthPlus();
116 void setTextDepthMinus();
117 void setNewRightIndent(
double _rightIndent);
118 void setNewLeftIndent(
double _leftIndent);
119 void setNewFirstIndent(
double _firstIndent);
121 void setTabList(
const KoTabulatorList & tabList );
122 void setTextBold(
bool b );
123 void setTextItalic(
bool b );
124 void setTextUnderline(
bool b );
125 void setTextStrikeOut(
bool b );
126 void setTextFamily(
const TQString &f );
127 void setTextPointSize(
int s );
128 void setTextSubScript(
bool b );
129 void setTextSuperScript(
bool b );
130 void setTextDefaultFormat( );
131 void setIncreaseFontSize();
132 void setDecreaseFontSize();
133 KPrTextObject* kpTxtObj()
const;
140 void stopScreenPresentation();
147 bool pNext(
bool gotoNextPage =
false );
154 bool pPrev(
bool gotoPreviousPage =
false );
157 unsigned int presPage()
const {
return m_step.m_pageNumber + 1; }
160 int numPresSteps()
const {
return m_pageEffectSteps.count(); }
161 int numPresPages()
const {
return m_presentationSlides.count(); }
163 bool canAssignEffect( TQPtrList<KPrObject> &objs )
const;
165 void print( TQPainter*, KPrinter*,
float,
float );
168 void setPartEntry( KoDocumentEntry& _e )
170 void setToolEditMode( ToolEditMode _m,
bool updateView =
true );
171 void setAutoForm(
const TQString &_autoform )
172 { autoform = _autoform; }
188 bool forceRealVariableValue =
false,
190 int forceHeight = 0 );
216 bool exportPage(
int nPage,
int nWidth,
int nHeight,
221 void gotoPage(
int pg );
229 KPrPage* activePage()
const;
231 bool oneObjectTextExist()
const;
232 bool oneObjectTextSelected()
const;
233 bool isOneObjectSelected()
const;
247 void setMouseSelectedObject(
bool b);
249 bool haveASelectedPartObj()
const;
250 bool haveASelectedGroupObj()
const;
251 bool haveASelectedPixmapObj()
const;
253 KPrTextView *currentTextObjectView()
const {
return m_currentTextObjectView; }
255 TQPtrList<KPrObject> objectList()
const;
258 const TQPtrList<KPrObject> & getObjectList()
const;
260 void playSound(
const TQString &soundFileName );
266 void setXimPosition(
int x,
int y,
int w,
int h, TQFont *f );
267 void createEditing( KPrTextObject *textObj );
276 void insertLine(
const KoPoint &startPoint,
const KoPoint &endPoint );
312 void changePicture(
const KURL & url, TQWidget *window );
314 int numberOfObjectSelected()
const;
315 KPrObject *getSelectedObj()
const;
316 KPrPixmapObject *getSelectedImage()
const;
318 bool getEditMode()
const {
return editMode; }
320 void ungroupObjects();
323 unsigned int objNums()
const;
325 void ensureVisible(
int x,
int y,
int xmargin,
int ymargin );
337 void scrollTopLeftPoint(
const TQPoint & pos );
339 void textContentsToHeight();
340 void textObjectToContents();
342 void flipObject(
bool _horizontal );
344 void lowerObjs(
bool backward );
345 void raiseObjs(
bool forward );
357 bool canMoveOneObject()
const;
358 TQPtrList<KPrTextObject> listOfTextObjs()
const;
360 TQPixmap getPicturePixmap()
const;
361 void closeObject(
bool _close);
363 void alignVertical(VerticalAlignmentType _type );
366 void dropImage( TQMimeSource * data,
bool resizeImageToOriginalSize =
false ,
int posX = 10,
int posY=10 );
367 KoGuides & guideLines() {
return m_gl; }
375 void objectPopup( KPrObject *
object,
const TQPoint &point );
379 void exitEditMode(
bool repaint =
true );
386 void copyOasisObjs();
389 void picViewOriginalSize();
390 void picViewOrig640x480();
391 void picViewOrig800x600();
392 void picViewOrig1024x768();
393 void picViewOrig1280x1024();
394 void picViewOrig1600x1200();
395 void picViewOrigFactor();
396 void setActivePage( KPrPage* active );
409 void fontChanged(
const TQFont & );
410 void colorChanged(
const TQColor & );
411 void alignChanged(
int );
422 void objectSelectedChanged();
423 void objectSizeChanged();
427 void selectionChanged(
bool hasSelection );
428 void sigMouseWheelEvent( TQWheelEvent * );
448 void drawBackground( TQPainter* painter,
const TQRect& rect, KPrPage * page,
bool edit =
false )
const;
453 void drawAllObjectsInPage( TQPainter *painter,
const TQPtrList<KPrObject> & obj,
int pageNum )
const;
466 void drawObjectsEdit( TQPainter *painter,
const KoRect &rect,
const TQPtrList<KPrObject> &_objects,
467 SelectionMode selectionMode,
int page )
const;
476 void drawObjects( TQPainter *painter,
const TQPtrList<KPrObject> &objects, SelectionMode selectionMode,
477 bool contour, KPrTextView * textView,
int pageNum )
const;
483 void drawEditPage( TQPainter *painter,
const TQRect &_rect,
484 KPrPage *page, SelectionMode selectionMode )
const;
493 void drawGrid(TQPainter *painter,
const TQRect &rect2)
const;
502 bool finishPageEffect(
bool cancel =
false );
504 void drawCurrentPageInPix( TQPixmap& )
const;
505 virtual void mousePressEvent( TQMouseEvent *e );
506 virtual void mouseReleaseEvent( TQMouseEvent *e );
507 virtual void mouseMoveEvent( TQMouseEvent *e );
508 virtual void mouseDoubleClickEvent( TQMouseEvent *e );
509 virtual void wheelEvent( TQWheelEvent *e );
510 virtual void resizeEvent( TQResizeEvent *e );
511 virtual bool close(
bool alsoDelete );
518 KPrObject *
getObjectAt(
const KoPoint &pos,
bool withoutProtected =
false );
519 virtual void focusInEvent( TQFocusEvent* ) {}
520 virtual void focusOutEvent( TQFocusEvent* ) {}
521 virtual void enterEvent( TQEvent *e );
522 virtual void leaveEvent( TQEvent *e );
523 virtual void dragEnterEvent( TQDragEnterEvent *e );
524 virtual void dragMoveEvent( TQDragMoveEvent *e );
525 virtual void dropEvent( TQDropEvent *e );
526 virtual void keyPressEvent( TQKeyEvent *e );
527 virtual void keyReleaseEvent( TQKeyEvent *e );
528 virtual void imStartEvent( TQIMEvent * e );
529 virtual void imComposeEvent( TQIMEvent * e );
530 virtual void imEndEvent( TQIMEvent * e );
532 void eraseEmptySpace( TQPainter * painter,
const TQRegion & emptySpaceRegion,
const TQBrush & brush )
const;
537 unsigned int currPgNum()
const;
538 TQColor txtBackCol()
const;
539 bool spInfiniteLoop()
const;
540 bool spShowEndOfPresentationSlide()
const;
541 bool spManualSwitch()
const;
542 TQRect getPageRect(
bool decBorders =
true )
const;
543 unsigned int pageNums()
const;
545 void _repaint(
bool erase=
true );
546 void _repaint(
const TQRect &r );
547 void _repaint( KPrObject *o );
553 void printPage( TQPainter*, PresStep step, KPrinter *printer,
int rows,
int cols );
573 void insertFreehand(
const KoPointArray &_pointArray );
574 void insertPolyline(
const KoPointArray &_pointArray );
575 void insertCubicBezierCurve(
const KoPointArray &_pointArray );
576 void insertPolygon(
const KoPointArray &_pointArray );
577 void insertClosedLine(
const KoPointArray &_pointArray );
582 void scalePixmapToBeOrigIn(
const KoSize ¤tSize,
const KoSize &pgSize,
583 const TQSize &presSize, KPrPixmapObject *obj );
584 bool getPixmapOrigAndCurrentSize( KPrPixmapObject *&obj, KoSize *origSize, KoSize *currentSize );
585 void setTextBackground( KPrTextObject *obj );
586 virtual bool eventFilter( TQObject *o, TQEvent *e );
587 virtual bool focusNextPrevChild(
bool );
589 void endDrawPolyline();
596 void endDrawCubicBezierCurve();
607 void printRTDebug(
int info );
610 KoRect getAlignBoundingRect()
const;
613 void picViewOrigHelper(
int x,
int y);
621 void moveObjectsByKey(
int x,
int y );
629 void moveObjectsByMouse( KoPoint &pos,
bool keepXorYunchanged );
633 void resizeObject( ModifyType _modType,
const KoPoint & point,
bool keepRatio,
bool scaleAroundCenter );
635 void finishResizeObject(
const TQString &name,
bool layout =
true );
645 void raiseObject( KPrObject *
object );
659 const TQPtrList<KPrObject> displayObjectList()
const;
670 void drawPolygon( TQPainter &p,
const KoRect &rect );
673 void drawPieObject( TQPainter *p,
const KoRect &rect );
675 TQPoint limitOfPoint(
const TQPoint& _point)
const;
680 bool objectIsAHeaderFooterHidden(KPrObject *obj)
const;
682 KPrTextObject* textUnderMouse(
const TQPoint & point );
683 bool checkCurrentTextEdit( KPrTextObject * textObj );
698 KoPoint snapPoint( KoPoint &pos,
bool repaintSnapping =
true );
711 KoPoint diffGrid( KoRect &rect,
double diffx,
double diffy );
713 void recalcAutoGuides( );
720 KoPointArray getObjectPoints(
const KoPointArray &pointArray );
734 void updateInsertRect(
const KoPoint &point, TQt::ButtonState state );
742 void popupContextMenu();
745 void toFontChanged(
const TQFont &font ) { emit fontChanged( font ); }
746 void toColorChanged(
const TQColor &color ) { emit colorChanged( color ); }
747 void toAlignChanged(
int a ) { emit alignChanged( a ); }
753 void setDrawingMode();
760 void setSwitchingMode(
bool continueTimer =
true );
763 void terminateEditing( KPrTextObject * );
773 void slotDoPageEffect();
778 void slotAutoScroll(
const TQPoint &scrollDist);
784 void speakTextUnderMouse(TQWidget* w,
const TQPoint& p, uint flags);
788 static const int MOUSE_SNAP_DISTANCE;
790 static const int KEY_SNAP_DISTANCE;
793 TDEPopupMenu *m_presMenu;
794 bool showingLastSlide;
800 KPrObject * m_editObject;
804 bool editMode, goingBack;
814 bool m_drawLineInDrawMode;
821 TQValueVector<TQPointArray> m_drawModeLines;
827 int m_drawModeLineIndex;
829 bool mouseSelectedObject;
835 TQValueList<int> m_pageEffectSteps;
837 TQValueList<int> m_presentationSlides;
839 TQValueList<int>::Iterator m_presentationSlidesIterator;
841 KPrEffectHandler *m_effectHandler;
843 KPrPageEffects *m_pageEffect;
846 TQTimer m_effectTimer;
848 TQTimer m_pageEffectTimer;
859 KPrObject *m_resizeObject;
861 KoRect m_rectBeforeResize;
868 KoPoint m_moveStartPoint;
872 KPrObject *m_rotateObject;
874 KoPoint m_rotateCenter;
876 KoPoint m_rotateStart;
878 double m_angleBeforeRotate;
880 ToolEditMode toolEditMode;
883 KoDocumentEntry partEntry;
887 KPrTextView *m_currentTextObjectView;
889 KPrSoundPlayer *soundPlayer;
891 KoPointArray m_pointArray, m_oldCubicBezierPointArray;
892 TQPoint m_dragStartPoint, m_dragEndPoint, m_dragSymmetricEndPoint;
894 KoPoint m_startPoint;
897 KoPoint m_symmetricEndPoint;
898 KoPoint m_CubicBezierSecondPoint, m_CubicBezierThirdPoint;
899 int m_indexPointArray;
901 bool m_drawCubicBezierCurve;
902 bool m_drawLineWithCubicBezierCurve;
903 bool m_zoomRubberDraw;
905 KPrPage *m_activePage;
906 int m_xOffset, m_yOffset;
907 int m_xOffsetSaved, m_yOffsetSaved;
910 KoPoint m_moveStartPosMouse;
912 KoPoint m_moveSnapDiff;
914 bool m_disableSnapping;
916 KoPoint m_origMousePos;
918 KoPoint m_moveStartPosKey;
920 KPrPage * m_activePageBeforePresentation;
921 int m_zoomBeforePresentation;
923 bool m_keyPressEvent;
924 bool m_drawSymetricObject;
932 KPrObject * m_objectDisplayAbove;
935 KPrTextObject *m_prevSpokenTO;