00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef kpresenter_view_h
00022 #define kpresenter_view_h
00023
00024 #ifdef HAVE_CONFIG_H
00025 #include <config.h>
00026 #endif
00027
00028 #include <qguardedptr.h>
00029 #include <qtimer.h>
00030 #include <qdatetime.h>
00031
00032 #include <KoView.h>
00033 #include "global.h"
00034 #include <KoBrush.h>
00035 #include <KoPen.h>
00036 #include <KoRuler.h>
00037
00038 class QPopupMenu;
00039 class QSplitter;
00040 class QLabel;
00041 class DCOPObject;
00042 class KPrView;
00043 class KPrBackDialog;
00044 class KoRuler;
00045 class QScrollBar;
00046 class AFChoose;
00047 class KPrPropertyEditor;
00048 class KPrPgConfDia;
00049 class KPrSlideTransitionDia;
00050 class KPrRotationDialogImpl;
00051 class KPrShadowDialogImpl;
00052 class KPrImageEffectDia;
00053 class ConfPieDia;
00054 class ConfRectDia;
00055 class ConfPolygonDia;
00056 class ConfPictureDia;
00057 class KPrPresDurationDia;
00058 class QToolButton;
00059 class KPrSideBar;
00060 class KPrNoteBar;
00061
00062 class KAction;
00063 class KActionMenu;
00064 class KToggleAction;
00065 class TKSelectColorAction;
00066 class KoPartSelectAction;
00067 class KoPicture;
00068 class KoParagStyle;
00069 class KoLineStyleAction;
00070 class KoLineWidthAction;
00071 class KoRect;
00072
00073 class KoCharSelectDia;
00074 class KoTextFormat;
00075 class KoTextObject;
00076 class KoTextZoomHandler;
00077
00078 class KCommand;
00079 class KMacroCommand;
00080 class KFontSizeAction;
00081 class KColorAction;
00082 class KSelectAction;
00083 class KFontAction;
00084 class KoParagCounter;
00085 class KActionMenu;
00086 class KoSearchContext;
00087 class KPrFindReplace;
00088 class KPrCanvas;
00089 class KoFontDia;
00090 class KoParagDia;
00091 class KPrObject;
00092 class KPrPixmapObject;
00093 class KPrDocument;
00094 class KPrPage;
00095 class KPrTextObject;
00096 class KoTextIterator;
00097 class KStatusBarLabel;
00098
00099 class KoSpell;
00100 #include <kspell2/broker.h>
00101 namespace KSpell2 {
00102 class Dialog;
00103 }
00104
00105 class PageBase : public QWidget
00106 {
00107 public:
00108 PageBase( QWidget *parent, KPrView *v ) : QWidget( parent ), view( v ) {}
00109 void resizeEvent( QResizeEvent *e );
00110
00111 private:
00112 KPrView *view;
00113
00114 };
00115
00116
00117 class KPrView : public KoView
00118 {
00119 friend class PageBase;
00120 Q_OBJECT
00121
00122 public:
00123 KPrView( KPrDocument* _doc, QWidget *_parent = 0, const char *_name = 0 );
00124 ~KPrView();
00125
00126 void initGui();
00127 virtual DCOPObject* dcopObject();
00128
00129
00130 int getCurrentPresPage() const;
00131 int getCurrentPresStep() const;
00132 int getPresStepsOfPage() const;
00133 int getNumPresPages() const;
00134 bool gotoPresPage( int pg );
00135
00136 virtual void setupPrinter( KPrinter &printer );
00137 virtual void print( KPrinter &printer );
00138
00139 void showFormat( const KoTextFormat &format );
00140
00141 void showZoom( int zoom );
00142 void setZoom( int zoom, bool updateViews );
00143 void changeZoomMenu( int zoom=-1);
00144 void showStyle( const QString & styleName );
00145 void updateStyleList();
00146
00147 KoTextZoomHandler *zoomHandler() const;
00148
00149
00150
00151 void unZoomDocument(int &dpiX,int &dpiY);
00152 void zoomDocument(int zoom);
00153
00154
00155 void updateHeaderFooterButton();
00156 void updateDisplayObjectMasterPageButton();
00157
00158 void updateDisplayBackgroundButton();
00159 virtual int leftBorder() const { return canvas()->mapTo(const_cast<KPrView *>(this), QPoint(0,0)).x(); };
00160 virtual int rightBorder() const { return width() - canvas()->mapTo(const_cast<KPrView *>(this), QPoint(canvas()->width(), 0)).x(); };
00161 virtual int topBorder() const { return canvas()->mapTo(const_cast<KPrView *>(this), QPoint(0,0)).y(); };
00162 virtual int bottomBorder() const { return height() - canvas()->mapTo(const_cast<KPrView *>(this), QPoint(0, canvas()->height())).y(); };
00163
00164 void updateGuideLineButton();
00165
00166 void updateGridButton();
00167 void savePicture( const QString& oldName, KoPicture& picture);
00168 void savePicture( KPrPixmapObject* obj );
00169
00170 void insertFile(const QString &path);
00171 void testAndCloseAllTextObjectProtectedContent();
00172 void updateRulerInProtectContentMode();
00173 QPtrList<KAction> listOfResultOfCheckWord( const QString &word );
00174
00178 KSpell2::Broker *broker() const;
00179 bool editMaster() const { return m_editMaster;}
00180
00181 signals:
00182 void currentPageChanged( int );
00183 void presentationFinished();
00184
00185 public slots:
00186
00187 void editCut();
00188 void editCopy();
00189 void editPaste();
00190 void editDelete();
00191 void editSelectAll();
00192 void editDeSelectAll();
00193 void editCopyPage();
00194 void editDuplicatePage();
00195 void editDelPage();
00196 void editFind();
00197 void editReplace();
00198
00199
00200 void viewShowSideBar();
00201 void viewShowNoteBar();
00202 void viewSlideMaster();
00203 void viewZoom( const QString &s );
00204
00205 void viewFooter();
00206 void viewHeader();
00207 void insertComment();
00208 void editComment();
00209
00210 void viewGuideLines();
00211
00212 void viewGrid();
00213
00214 void viewSnapToGrid();
00215
00216
00217 void insertPage();
00218 void insertPicture();
00219 void insertPicture(const QString &file);
00220 void insertSpecialChar();
00221
00222
00223 void toolsMouse();
00224 void toolsRotate();
00225 void toolsZoom();
00226 void toolsLine();
00227 void toolsLinePopup();
00228 void toolsShapePopup();
00229 void toolsRectangle();
00230 void toolsCircleOrEllipse();
00231 void toolsPie();
00232 void toolsText();
00233 void toolsAutoform();
00234 void toolsDiagramm();
00235 void toolsTable();
00236 void toolsFormula();
00237 void toolsObject();
00238 void toolsFreehand();
00239 void toolsPolyline();
00240 void toolsQuadricBezierCurve();
00241 void toolsCubicBezierCurve();
00242 void toolsConvexOrConcavePolygon();
00243 void toolsClosedLinePopup();
00244 void toolsClosedFreehand();
00245 void toolsClosedPolyline();
00246 void toolsClosedQuadricBezierCurve();
00247 void toolsClosedCubicBezierCurve();
00248
00249
00250 void extraProperties();
00251 void extraRaise();
00252 void extraLower();
00253 void extraRotate();
00254 void extraSendBackward();
00255 void extraBringForward();
00256 void extraArrangePopup();
00257
00258 void extraShadow();
00259 void extraBackground();
00260 void extraLayout();
00261 void extraConfigure();
00262 void extraLineBegin();
00263 void extraLineEnd();
00264 void extraWebPres();
00265 void extraMSPres();
00266 void extraCreateTemplate();
00267 void extraDefaultTemplate();
00268 void extraGroup();
00269 void extraUnGroup();
00270 void extraPenStyle( int newStyle );
00271 void extraPenWidth( double newWidth );
00272
00273 void configureCompletion();
00274
00275 void extraAlignObjLeft();
00276 void extraAlignObjCenterH();
00277 void extraAlignObjRight();
00278 void extraAlignObjTop();
00279 void extraAlignObjCenterV();
00280 void extraAlignObjBottom();
00281
00282
00283 void screenConfigPages();
00284 void screenAssignEffect();
00285 void screenTransEffect();
00286 void screenStart();
00287 void screenStartFromFirst();
00288 void screenStop();
00289 void screenPause();
00290 void screenFirst();
00296 void screenPrev( bool gotoPreviousPage = false );
00302 void screenNext( bool gotoNextPage = false );
00303 void screenLast();
00304 void screenSkip();
00305
00306
00307 void sizeSelected( int size );
00308 void fontSelected( const QString &fontFamily );
00309 void textBold();
00310 void textItalic();
00311 void textUnderline();
00312 void textStrikeOut();
00313 void textColor();
00314 void textAlignLeft();
00315 void textAlignCenter();
00316 void textAlignRight();
00317 void textAlignBlock();
00318 void mtextFont();
00319
00320 void slotCounterStyleSelected();
00321
00322 void textDepthPlus();
00323 void textDepthMinus();
00324 void textContentsToHeight();
00325 void textObjectToContents();
00326 void textInsertPageNum();
00327 void textDefaultFormat();
00328
00329
00330 void penChosen();
00331 void brushChosen();
00332
00333 void skipToPage( int _num );
00334 void nextPage();
00335 void prevPage();
00336
00340 void updateSideBarItem( KPrPage * page );
00341 void addSideBarItem( int pos );
00342 void moveSideBarItem( int oldPos, int newPos );
00343 void removeSideBarItem( int pos );
00344
00345
00346 void updatePageInfo();
00347 void updateObjectStatusBarItem();
00348 void pageNumChanged();
00349 void updateSideBarMenu();
00350
00351 void objectSelectedChanged();
00352
00353 void renamePageTitle();
00354
00355 void picViewOriginalSize();
00356 void picViewOrig640x480();
00357 void picViewOrig800x600();
00358 void picViewOrig1024x768();
00359 void picViewOrig1280x1024();
00360 void picViewOrig1600x1200();
00361
00362 void chPic();
00363 void imageEffect();
00364
00365 void textSubScript();
00366 void textSuperScript();
00367
00368 void slotSpecialChar(QChar, const QString &);
00369 void slotSpecialCharDlgClosed();
00370
00371 void insertLink();
00372 void changeLink();
00373 void copyLink();
00374 void removeLink();
00375 void addToBookmark();
00376 void slotSoftHyphen();
00377 void slotNonbreakingSpace();
00378 void slotNonbreakingHyphen();
00379 void slotLineBreak();
00380 void slotIncreaseNumberingLevel();
00381 void slotDecreaseNumberingLevel();
00382
00383 void extraAutoFormat();
00384 void slotSpellCheck();
00385
00386
00387 void spellCheckerDone( const QString & );
00388 void spellCheckerCancel();
00389 void startKSpell();
00390 void spellAddAutoCorrect (const QString & originalword, const QString & newword);
00391 void spellCheckerMisspelling( const QString &, int );
00392 void spellCheckerCorrected( const QString &, int, const QString & );
00393 void alignChanged( int );
00394
00395 void formatParagraph();
00396 void changeNbOfRecentFiles(int _nb);
00397
00398 void insertVariable();
00399
00400 void insertCustomVariable();
00401 void insertNewCustomVariable();
00402 void refreshCustomMenu();
00403
00404 void editCustomVars ();
00405 void openLink();
00406
00407 void increaseFontSize();
00408 void decreaseFontSize();
00409
00410 void tabListChanged( const KoTabulatorList & tabList );
00411
00412 void newLeftIndent( double _leftIndent);
00413 void newFirstIndent( double _firstIndent);
00414 void newRightIndent( double _rightIndent);
00415 void slotUpdateRuler();
00416
00417 void slotHRulerDoubleClicked( double ptpos );
00418 void slotHRulerDoubleClicked();
00419
00420 void changeCaseOfText();
00421 void slotStyleSelected();
00422 void textStyleSelected( int );
00423 void extraStylist();
00424
00425 void slotAllowAutoFormat();
00426
00427 void slotCompletion();
00428
00429 void removeComment();
00430 void copyTextOfComment();
00431
00432
00433 void zoomMinus();
00434 void zoomPageWidth();
00435 void zoomEntirePage();
00436 void zoomPlus();
00437 void zoomSelectedObject();
00438 void zoomPageHeight();
00439 void zoomAllObject();
00440
00441 void flipHorizontal();
00442 void flipVertical();
00443 void closeObject();
00444
00445 void duplicateObj();
00446 void applyAutoFormat();
00447 void createStyleFromSelection();
00448
00449 void alignVerticalTop();
00450 void alignVerticalBottom();
00451 void alignVerticalCenter();
00452
00453
00454 void savePicture();
00455 void autoSpellCheck();
00456
00457 void insertFile();
00458 void editCustomVariable();
00459 void importStyle();
00460
00461 void backgroundPicture();
00462 void updateBgSpellCheckingState();
00463 void updatePresentationButton(bool);
00464 void refreshGroupButton();
00465 void slotAddIgnoreAllWord();
00466 void addWordToDictionary();
00467 void customSlideShow();
00468
00469 void displayObjectFromMasterPage();
00470 void displayBackground();
00471 void slotUnitChanged(KoUnit::Unit);
00472 void documentModified( bool );
00473
00474 public:
00475
00476 virtual void createGUI();
00477
00478
00479 unsigned int getCurrPgNum() const;
00484 void recalcCurrentPageNum();
00485
00486
00487 KPrDocument *kPresenterDoc() const {return m_pKPresenterDoc; }
00488
00489
00490 void changePicture( const QString & );
00491
00492 KPrCanvas* getCanvas() const { return m_canvas;}
00493
00494 void setRulerMouseShow( bool _show );
00495 void setRulerMousePos( int mx, int my );
00496
00497
00498 void setRanges();
00499
00500 KoRuler *getHRuler() const { return h_ruler; }
00501 KoRuler *getVRuler() const { return v_ruler; }
00502 KoTabChooser *getTabChooser() const { return tabChooser; }
00503 QScrollBar *getHScrollBar() const { return horz; }
00504 QScrollBar *getVScrollBar() const { return vert; }
00505
00514 void showObjectRect( const KPrObject * object );
00515
00516 PieType getPieType() const { return pieType; }
00517 int getPieAngle() const { return pieAngle; }
00518 int getPieLength() const { return pieLength; }
00519 KoPen getPen() const { return pen; }
00520 QBrush getBrush() const { return brush; }
00521 LineEnd getLineBegin() const { return lineBegin; }
00522 LineEnd getLineEnd() const{ return lineEnd; }
00523 QColor getGColor1() const { return gColor1; }
00524 QColor getGColor2() const { return gColor2; }
00525 BCType getGType() const { return gType; }
00526 FillType getFillType() const { return fillType; }
00527 bool getGUnbalanced() const { return gUnbalanced; }
00528 int getGXFactor() const { return gXFactor; }
00529 int getGYFactor() const { return gYFactor; }
00530 TKSelectColorAction* getActionBrushColor() const { return actionBrushColor; }
00531 TKSelectColorAction* getActionPenColor() const { return actionPenColor; }
00532
00533 void setPieType(PieType _pieType) { pieType = _pieType; }
00534 void setPieAngle(int _pieAngle) { pieAngle = _pieAngle; }
00535 void setPieLength(int _pieLength) { pieLength = _pieLength; }
00536 void setPen(KoPen _pen) { pen = _pen; }
00537 void setBrush(QBrush _brush) { brush = _brush; }
00538 void setLineBegin(LineEnd _lineBegin) { lineBegin = _lineBegin; }
00539 void setLineEnd(LineEnd _lineEnd){ lineEnd = _lineEnd; }
00540 void setGColor1(QColor _gColor1) { gColor1 = _gColor1; }
00541 void setGColor2(QColor _gColor2) { gColor2 = _gColor2; }
00542 void setGType(BCType _gType) { gType = _gType; }
00543 void setFillType(FillType _fillType) { fillType = _fillType; }
00544 void setGUnbalanced(bool _gUnbalanced) { gUnbalanced = _gUnbalanced; }
00545 void setGXFactor(int _gXFactor) { gXFactor = _gXFactor; }
00546 void setGYFactor(int _gYFactor) { gYFactor = _gYFactor; }
00547
00548 void setTool( ToolEditMode toolEditMode );
00549
00550 int getRndX() const { return rndX; }
00551 int getRndY() const { return rndY; }
00552
00553 void setRndX(int _rndX) { rndX = _rndX; }
00554 void setRndY(int _rndY) { rndY = _rndY; }
00555
00556
00557
00558
00559 void enableWebPres();
00560 void enableMSPres();
00561
00565 bool doubleClickActivation() const;
00569 QWidget* canvas() const;
00573 int canvasXOffset() const;
00577 int canvasYOffset() const;
00578
00582 void updateSideBar();
00583
00584 void refreshPageButton();
00585
00586 void setCanvasXOffset( int _x );
00587 void setCanvasYOffset( int _y );
00588
00589 void openPopupMenuObject( const QString & name , const QPoint & _point );
00590 void openPopupMenuMenuPage( const QPoint & _point );
00591 void openPopupMenuSideBar(const QPoint & _point);
00592
00593 void openPopupMenuZoom( const QPoint & _point );
00594
00595 void penColorChanged( const KoPen & _pen );
00596 void brushColorChanged( const QBrush & _brush );
00597
00602 void restartAutoPresTimer();
00603
00608 void continueAutoPresTimer();
00609
00614 void stopAutoPresTimer();
00615
00620 void setAutoPresTimer( int sec );
00621
00622 void showCounter( KoParagCounter &c );
00623
00624 QPopupMenu * popupMenu( const QString& name );
00625
00626 void showRulerIndent( double _leftMargin, double _firstLine, double _rightMargin, bool rtl );
00627
00628 void reorganize();
00629
00630
00631 KPrNoteBar *getNoteBar() const { return notebar; }
00632
00633
00634 QPtrList<KAction>& actionList() { return m_actionList; }
00635
00636 QPtrList<KAction> &variableActionList() { return m_variableActionList; }
00637
00638
00639 bool getCheckConcavePolygon() const { return checkConcavePolygon; }
00640 int getCornersValue() const { return cornersValue; }
00641 int getSharpnessValue() const { return sharpnessValue; }
00642
00643 void setCheckConcavePolygon(bool _concavePolygon) { checkConcavePolygon = _concavePolygon; }
00644 void setCornersValue(int _cornersValue) { cornersValue = _cornersValue; }
00645 void setSharpnessValue(int _sharpnessValue) { sharpnessValue = _sharpnessValue; }
00646
00647
00648 PictureMirrorType getPictureMirrorType() const { return mirrorType; }
00649 int getPictureDepth() const { return depth; }
00650 bool getPictureSwapRGB() const { return swapRGB; }
00651 bool getPictureGrayscal() const { return grayscal; }
00652 int getPictureBright() const { return bright; }
00653
00659 void setPageDuration( int _pgNum );
00660
00666 void setZoomRect( const KoRect & rect );
00667 void changeVerticalAlignmentStatus(VerticalAlignmentType _type );
00668
00669 void closeTextObject();
00670 void deSelectAllObjects();
00671
00672 void insertDirectCursor(bool b);
00673 void updateDirectCursorButton();
00674
00675 void setEditMaster( bool editMaster );
00676
00677 protected slots:
00678
00679 void backOk( KPrBackDialog*, bool );
00680 void afChooseOk( const QString & );
00681 void slotAfchooseCanceled();
00682 void propertiesOk();
00683 void pgConfOk();
00684 void rotateOk();
00685 void shadowOk();
00686 void pddClosed();
00687
00688
00689 void scrollH( int );
00690 void scrollV( int );
00691
00692
00693 void fontChanged( const QFont & );
00694 void colorChanged( const QColor &color );
00695
00696 void extraLineBeginNormal();
00697 void extraLineBeginArrow();
00698 void extraLineBeginRect();
00699 void extraLineBeginCircle();
00700 void extraLineBeginLineArrow();
00701 void extraLineBeginDimensionLine();
00702 void extraLineBeginDoubleArrow();
00703 void extraLineBeginDoubleLineArrow();
00704 void setExtraLineBegin(LineEnd lb);
00705 void extraLineEndNormal();
00706 void extraLineEndArrow();
00707 void extraLineEndRect();
00708 void extraLineEndCircle();
00709 void extraLineEndLineArrow();
00710 void extraLineEndDimensionLine();
00711 void extraLineEndDoubleArrow();
00712 void extraLineEndDoubleLineArrow();
00713 void setExtraLineEnd(LineEnd le);
00714
00715 void setExtraPenStyle( Qt::PenStyle style );
00716 void setExtraPenWidth( double width );
00717
00722 void restartPresentation() { m_autoPresRestart = true; }
00727 void stopAutomaticPresentation() { m_autoPresStop = true; }
00728
00729 void newPageLayout( const KoPageLayout &_layout );
00730 void openPageLayoutDia() { extraLayout(); }
00731 void unitChanged( KoUnit::Unit );
00732
00733 void doAutomaticScreenPres();
00734
00735 void getPageMouseWheelEvent( QWheelEvent *e );
00736 void updateRuler();
00737
00738 void refreshAllVariable();
00739 void slotViewFormattingChars();
00740 void slotUpdateScrollBarRanges();
00741
00742 void addGuideLine();
00743
00744 void refreshRuler( bool state );
00745 void slotApplyFont();
00746 void slotApplyParag();
00747 void slotObjectEditChanged();
00748 void slotChangeCutState(bool );
00749
00750 void insertDirectCursor();
00751 void slotCorrectWord();
00752 void editFindNext();
00753 void editFindPrevious();
00754
00755 void initialLayoutOfSplitter();
00756
00757 virtual void slotChildActivated(bool a);
00758
00759 void loadingFinished();
00760
00761 protected:
00762 virtual void resizeEvent( QResizeEvent* );
00763 virtual void dragEnterEvent( QDragEnterEvent *e );
00764 virtual void dragMoveEvent( QDragMoveEvent *e );
00765 virtual void dragLeaveEvent( QDragLeaveEvent *e );
00766 virtual void dropEvent( QDropEvent *e );
00767
00768 virtual void keyPressEvent( QKeyEvent* );
00769
00770 virtual void guiActivateEvent( KParts::GUIActivateEvent *ev );
00771
00772
00773 void setupActions();
00774 void setupPopupMenus();
00775 void setupScrollbars();
00776 void setupRulers();
00777
00778 void startScreenPres( int pgNum = -1 );
00779
00780 virtual void updateReadWrite( bool readwrite );
00781
00782 void addVariableActions( int type, const QStringList & texts,
00783 KActionMenu * parentMenu, const QString & menuText );
00784
00785 void showParagraphDialog( int initialPage = -1, double initialTabPos = 0.0 );
00786
00787 QValueList<KoTextObject *> spellAddTextObject() const;
00788
00789 bool switchInOtherPage( const QString & text );
00790
00791 void openThePresentationDurationDialog();
00792 QString presentationDurationDataFormatChange( int _time );
00793
00794 int getZoomEntirePage() const;
00795
00796 KCommand * applyAutoFormatToCurrentPage( const QPtrList<KoTextObject> & lst);
00797 void textStyleSelected( KoParagStyle *_sty );
00798
00799
00800
00801
00802
00803 KCommand * getPenCmd( const QString &name, KoPen pen, LineEnd lb, LineEnd le, int flags );
00804
00805 void spellCheckerRemoveHighlight();
00806
00807 void updateNoteBarText();
00808 private:
00809 void clearSpellChecker(bool cancelSpellCheck = false);
00810
00811
00812
00813
00814 KPrDocument *m_pKPresenterDoc;
00815
00816
00821 bool m_autoPresRestart;
00822
00827 bool m_autoPresStop;
00828 bool m_screenSaverWasEnabled;
00829
00830
00831 QPopupMenu *rb_lbegin, *rb_lend;
00832 QPopupMenu *m_arrangeObjectsPopup;
00833 QPtrList<KAction> m_actionList;
00834 QPtrList<KAction> m_variableActionList;
00835
00836
00837 QScrollBar *vert, *horz;
00838
00839
00840 AFChoose *afChoose;
00841 KPrPropertyEditor *m_propertyEditor;
00842 KPrPgConfDia *pgConfDia;
00843 KPrRotationDialogImpl *rotateDia;
00844 KPrShadowDialogImpl *shadowDia;
00845 KPrImageEffectDia *imageEffectDia;
00846 KPrPresDurationDia *presDurationDia;
00847
00848
00849 KoPen pen;
00850 QBrush brush;
00851 LineEnd lineBegin;
00852 LineEnd lineEnd;
00853 QColor gColor1, gColor2;
00854 BCType gType;
00855 FillType fillType;
00856 PieType pieType;
00857 bool gUnbalanced;
00858 int gXFactor, gYFactor;
00859 int pieLength, pieAngle;
00860 int rndX, rndY;
00861
00862 bool checkConcavePolygon;
00863 int cornersValue;
00864 int sharpnessValue;
00866 QPoint m_mousePos;
00867
00868
00869 PictureMirrorType mirrorType;
00870 int depth;
00871 bool swapRGB;
00872 bool grayscal;
00873 int bright;
00874
00875
00876 KPrCanvas *m_canvas;
00877 KoRuler *h_ruler, *v_ruler;
00878 KoTabChooser *tabChooser;
00879
00880 QFont tbFont;
00881 int tbAlign;
00882 QColor tbColor;
00883
00884 bool m_bShowGUI;
00885 bool presStarted;
00889 bool m_editMaster;
00890 bool allowWebPres;
00891 bool allowMSPres;
00892 int currPg;
00893
00894 QSize oldSize;
00895
00896 int screensaver_pid;
00897
00898
00899 QLabel * m_sbPageLabel;
00900 QLabel * m_sbObjectLabel;
00901 QLabel *m_sbSavingLabel;
00902 KStatusBarLabel* m_sbModifiedLabel;
00903 KStatusBarLabel* m_sbUnitLabel;
00904 KStatusBarLabel* m_sbZoomLabel;
00905
00906
00907 KAction *actionEditCut;
00908 KAction *actionEditCustomVars;
00909 KAction *actionEditCopy;
00910 KAction *actionEditPaste;
00911 KAction *actionEditDelete;
00912 KAction *actionEditSelectAll;
00913 KAction *actionEditDeSelectAll;
00914 KAction *actionEditCopyPage;
00915 KAction *actionEditDuplicatePage;
00916 KAction *actionEditDelPage;
00917
00918 KToggleAction *actionViewShowSideBar;
00919 KToggleAction *actionViewShowNoteBar;
00920 KToggleAction *actionViewSlideMaster;
00921
00922 KToggleAction *actionViewShowGuideLine;
00923
00924 KToggleAction *actionViewFormattingChars;
00925 KToggleAction *actionViewShowGrid;
00926 KToggleAction *actionViewSnapToGrid;
00927
00928 KAction *actionInsertPage;
00929 KAction *actionInsertPicture;
00930
00931 KToggleAction *actionToolsMouse;
00932 KToggleAction *actionToolsRotate;
00933 KToggleAction *actionToolsZoom;
00934 KToggleAction *actionToolsLine;
00935 KToggleAction *actionToolsRectangle;
00936 KToggleAction *actionToolsCircleOrEllipse;
00937 KToggleAction *actionToolsPie;
00938 KToggleAction *actionToolsText;
00939 KToggleAction *actionToolsAutoform;
00940 KToggleAction *actionToolsDiagramm;
00941 KToggleAction *actionToolsTable;
00942 KToggleAction *actionToolsFormula;
00943 KToggleAction *actionToolsFreehand;
00944 KToggleAction *actionToolsPolyline;
00945 KToggleAction *actionToolsQuadricBezierCurve;
00946 KToggleAction *actionToolsCubicBezierCurve;
00947 KToggleAction *actionToolsConvexOrConcavePolygon;
00948 KToggleAction *actionToolsClosedFreehand;
00949 KToggleAction *actionToolsClosedPolyline;
00950 KToggleAction *actionToolsClosedQuadricBezierCurve;
00951 KToggleAction *actionToolsClosedCubicBezierCurve;
00952 KoPartSelectAction *actionToolsObject;
00953 KActionMenu *actionToolsLinePopup;
00954 KActionMenu *actionToolsShapePopup;
00955 KActionMenu *actionToolsClosedLinePopup;
00956
00957 KAction *actionTextFont;
00958 KFontSizeAction *actionTextFontSize;
00959 KFontAction *actionTextFontFamily;
00960 KToggleAction *actionTextAlignLeft;
00961 KToggleAction *actionTextAlignCenter;
00962 KToggleAction *actionTextAlignRight;
00963 KToggleAction *actionTextAlignBlock;
00964
00965 KActionMenu *actionFormatBullet;
00966 KActionMenu *actionFormatNumber;
00967
00968
00969 KAction *actionTextDepthPlus;
00970 KAction *actionTextDepthMinus;
00971 KAction *actionTextExtentCont2Height;
00972 KAction *actionTextExtendObj2Cont;
00973 KToggleAction *actionTextBold;
00974 KToggleAction *actionTextItalic;
00975 KToggleAction *actionTextUnderline;
00976 KToggleAction *actionFormatStrikeOut;
00977 KAction *actionTextInsertPageNum;
00978
00979 KAction *actionExtraProperties;
00980 KAction *actionExtraRaise;
00981 KAction *actionExtraLower;
00982
00983 KAction *actionExtraBringForward;
00984 KAction *actionExtraSendBackward;
00985 KActionMenu *actionExtraArrangePopup;
00986
00987 KAction *actionExtraRotate;
00988 KAction *actionExtraShadow;
00989 KActionMenu *actionExtraAlignObjsPopup;
00990 KAction *actionExtraAlignObjLeft;
00991 KAction *actionExtraAlignObjCenterH;
00992 KAction *actionExtraAlignObjRight;
00993 KAction *actionExtraAlignObjTop;
00994 KAction *actionExtraAlignObjCenterV;
00995 KAction *actionExtraAlignObjBottom;
00996 KAction *actionExtraBackground;
00997 KAction *actionExtraLayout;
00998 KAction *actionExtraConfigure;
00999 KAction *actionExtraWebPres;
01000 KAction *actionExtraMSPres;
01001 KAction *actionExtraCreateTemplate;
01002 KAction *actionExtraLineBegin;
01003 KAction *actionExtraLineEnd;
01004 KAction *actionExtraGroup;
01005 KAction *actionExtraUnGroup;
01006 KoLineStyleAction *actionExtraPenStyle;
01007 KoLineWidthAction *actionExtraPenWidth;
01008
01009 KAction *actionScreenConfigPages;
01010 KAction *actionScreenAssignEffect;
01011 KAction *actionScreenTransEffect;
01012 KAction *actionScreenStart;
01013 KAction *actionScreenStartFromFirst;
01014 KAction *actionScreenStop;
01015 KAction *actionScreenPause;
01016 KAction *actionScreenFirst;
01017 KAction *actionScreenPrev;
01018 KAction *actionScreenNext;
01019 KAction *actionScreenLast;
01020 KAction *actionScreenSkip;
01021
01022 KAction *actionEditFind;
01023 KAction *actionEditFindNext;
01024 KAction *actionEditFindPrevious;
01025 KAction *actionEditReplace;
01026
01027 KAction *actionCustomSlideShow;
01028
01029 KAction *actionColorBar;
01030 KAction *actionExtraDefaultTemplate;
01031
01032 TKSelectColorAction* actionBrushColor;
01033 TKSelectColorAction* actionPenColor;
01034 TKSelectColorAction* actionTextColor;
01035
01036
01037 KAction *actionResizeTextObject;
01038 KAction *actionExtendObjectHeight;
01039 KAction *actionObjectProperties;
01040
01041 KAction *actionRenamePage;
01042
01043 KAction *actionPicOriginalSize;
01044 KAction *actionPic640x480;
01045 KAction *actionPic800x600;
01046 KAction *actionPic1024x768;
01047 KAction *actionPic1280x1024;
01048 KAction *actionPic1600x1200;
01049 KAction *actionChangePic;
01050 KAction *actionExtraSpellCheck;
01051 KAction *actionFormatDefault;
01052
01053 KAction *actionImageEffect;
01054
01055 KAction *actionInsertComment;
01056 KAction *actionEditComment;
01057 KAction *actionRemoveComment;
01058 KAction *actionCopyTextOfComment;
01059
01060 KAction *actionImportStyle;
01061
01062 DCOPObject *dcop;
01063
01064 QToolButton *pgNext, *pgPrev;
01065 KPrSideBar *sidebar;
01066 KPrNoteBar *notebar;
01067 QSplitter *splitter;
01068 PageBase *pageBase;
01069
01070 KToggleAction *actionFormatSuper;
01071 KToggleAction *actionFormatSub;
01072
01073 KToggleAction *m_actionExtraHeader;
01074 KToggleAction *m_actionExtraFooter;
01075
01076 KAction* actionInsertSpecialChar;
01077 KAction *actionInsertLink;
01078
01079 KAction * actionChangeLink;
01080 KAction *actionCopyLink;
01081 KAction *actionRemoveLink;
01082
01083 KAction *actionAddLinkToBookmak;
01084 KAction *actionFormatParag;
01085 KAction *actionOpenLink;
01086 KAction *actionIncreaseFontSize;
01087 KAction *actionDecreaseFontSize;
01088 KAction *actionChangeCase;
01089 KAction *actionRefreshAllVariable;
01090
01091 KSelectAction *actionViewZoom;
01092
01093 KSelectAction *actionFormatStyle;
01094
01095 KToggleAction *actionAllowAutoFormat;
01096
01097 KToggleAction *actionDisplayObjectFromMasterPage;
01098
01099 KToggleAction *actionDisplayBackgroundPage;
01100
01101 KAction *actionFormatStylist;
01102
01103 KAction *actionAddGuideLine;
01104
01105 KAction *actionConfigureCompletion;
01106
01107 KAction *actionZoomMinus;
01108 KAction *actionZoomPageWidth;
01109 KAction *actionZoomEntirePage;
01110 KAction *actionZoomPlus;
01111 KAction *actionZoomSelectedObject;
01112 KAction *actionZoomPageHeight;
01113 KAction *actionZoomAllObject;
01114
01115 KAction *actionFlipHorizontal;
01116 KAction *actionFlipVertical;
01117 KAction *actionCloseObject;
01118
01119 KAction *actionDuplicateObj;
01120 KAction *actionApplyAutoFormat;
01121
01122 KAction *actionCreateStyleFromSelection;
01123
01124 KAction *actionSavePicture;
01125
01126 KAction *actionSaveBackgroundPicture;
01127
01128
01129 KAction *actionInsertFile;
01130
01131 KAction *actionSpellIgnoreAll;
01132
01133 KToggleAction *actionAlignVerticalTop;
01134 KToggleAction *actionAlignVerticalBottom;
01135 KToggleAction *actionAlignVerticalCenter;
01136
01137 KToggleAction *actionAllowBgSpellCheck;
01138 KAction *actionEditCustomVarsEdit;
01139 KActionMenu *actionFormatStyleMenu;
01140 KToggleAction *actionInsertDirectCursor;
01141
01142 KAction *actionAddWordToPersonalDictionary;
01143
01145 QTimer m_autoPresTimer;
01147 QTime m_autoPresTime;
01149 int m_autoPresElapsedTime;
01151 int m_autoPresTimerValue;
01153 bool m_autoPresTimerConnected;
01154
01156 QTime m_duration;
01158 QValueList<int> m_presentationDurationList;
01159
01160 KoCharSelectDia *m_specialCharDlg;
01161
01162
01163 enum CurrentLineTool {
01164 LtLine = 1,
01165 LtFreehand = 2,
01166 LtPolyline = 4,
01167 LtQuadricBezier = 8,
01168 LtCubicBezier = 16
01169 };
01170
01171 CurrentLineTool m_currentLineTool;
01172
01173
01174 enum CurrentShapeTool {
01175 StRectangle = 1,
01176 StCircle = 2,
01177 StPie = 4,
01178 StPolygon = 8
01179 };
01180
01181 CurrentShapeTool m_currentShapeTool;
01182
01183
01184 enum CurrentClosedLineTool {
01185 CltFreehand = 1,
01186 CltPolyline = 2,
01187 CltQuadricBezier = 4,
01188 CltCubicBezier = 8
01189 };
01190
01191 CurrentClosedLineTool m_currentClosedLineTool;
01192
01193
01194 struct {
01195 KoSpell *kospell;
01196 KMacroCommand * macroCmdSpellCheck;
01197 QStringList replaceAll;
01198 KoTextIterator * textIterator;
01199 KSpell2::Dialog *dlg;
01200 } m_spell;
01201
01202 KSpell2::Broker::Ptr m_broker;
01203
01204
01205
01206 KActionMenu *actionInsertVariable;
01207 KActionMenu *actionInsertCustom;
01208
01209 struct VariableDef {
01210 int type;
01211 int subtype;
01212 };
01213 typedef QMap<KAction *, VariableDef> VariableDefMap;
01214 VariableDefMap m_variableDefMap;
01215
01216 KoSearchContext *m_searchEntry, *m_replaceEntry;
01217 KPrFindReplace *m_findReplace;
01218 KoFontDia *m_fontDlg;
01219 KoParagDia *m_paragDlg;
01220 int m_switchPage;
01221 int m_initSwitchPage;
01222
01223 int xOffsetSaved, yOffsetSaved;
01224 bool m_bDisplayFieldCode;
01225 };
01226
01227 #endif