kpresenter
KPrCanvas Class Reference
#include <KPrCanvas.h>
Detailed Description
Class KPCanvas - There is a single instance of this class for a given view.It manages the graphical representation of all the objects.
Definition at line 82 of file KPrCanvas.h.
Public Slots | |
void | exitEditMode (bool repaint=true) |
void | clipCut () |
void | clipCopy () |
void | clipPaste () |
void | deleteObjs () |
void | copyObjs () |
void | copyOasisObjs () |
void | chPic () |
void | picViewOriginalSize () |
void | picViewOrig640x480 () |
void | picViewOrig800x600 () |
void | picViewOrig1024x768 () |
void | picViewOrig1280x1024 () |
void | picViewOrig1600x1200 () |
void | picViewOrigFactor () |
void | setActivePage (KPrPage *active) |
void | setPaintGuides (bool state) |
Signals | |
void | fontChanged (const QFont &) |
void | colorChanged (const QColor &) |
void | alignChanged (int) |
void | stopAutomaticPresentation () |
void | restartPresentation () |
void | objectSelectedChanged () |
void | objectSizeChanged () |
void | currentObjectEditChanged () |
void | selectionChanged (bool hasSelection) |
void | sigMouseWheelEvent (QWheelEvent *) |
Public Member Functions | |
KPrCanvas (QWidget *parent=0, const char *name=0, KPrView *_view=0) | |
~KPrCanvas () | |
KPrView * | getView () const |
int | diffx () const |
int | diffy () const |
void | setDiffX (int _diffX) |
void | setDiffY (int _diffY) |
void | scrollX (int x) |
void | scrollY (int y) |
void | selectAllObj () |
void | deSelectAllObj () |
void | selectObj (KPrObject *) |
void | deSelectObj (KPrObject *) |
void | setTextFormat (const KoTextFormat &format, int flags) |
void | setTextColor (const QColor &) |
void | setTextBackgroundColor (const QColor &) |
void | setTextAlign (int) |
void | setTextDepthPlus () |
void | setTextDepthMinus () |
void | setNewRightIndent (double _rightIndent) |
void | setNewLeftIndent (double _leftIndent) |
void | setNewFirstIndent (double _firstIndent) |
void | setTabList (const KoTabulatorList &tabList) |
void | setTextBold (bool b) |
void | setTextItalic (bool b) |
void | setTextUnderline (bool b) |
void | setTextStrikeOut (bool b) |
void | setTextFamily (const QString &f) |
void | setTextPointSize (int s) |
void | setTextSubScript (bool b) |
void | setTextSuperScript (bool b) |
void | setTextDefaultFormat () |
void | setIncreaseFontSize () |
void | setDecreaseFontSize () |
KPrTextObject * | kpTxtObj () const |
void | startScreenPresentation (double zoomX, double zoomY, int curPgNum=-1) |
void | stopScreenPresentation () |
bool | pNext (bool gotoNextPage=false) |
bool | pPrev (bool gotoPreviousPage=false) |
unsigned int | presPage () const |
int | presStep () const |
int | numPresSteps () const |
int | numPresPages () const |
bool | canAssignEffect (QPtrList< KPrObject > &objs) const |
void | print (QPainter *, KPrinter *, float, float) |
void | setPartEntry (KoDocumentEntry &_e) |
void | setToolEditMode (ToolEditMode _m, bool updateView=true) |
void | setAutoForm (const QString &_autoform) |
void | drawPageInPix (QPixmap &, int pgnum, int zoom, bool forceRealVariableValue=false, int forceWidth=0, int forceHeight=0) |
bool | exportPage (int nPage, int nWidth, int nHeight, const KURL &fileURL, const char *format, int quality=-1) |
void | gotoPage (int pg) |
void | presGotoFirstPage () |
KPrPage * | activePage () const |
bool | oneObjectTextExist () const |
bool | oneObjectTextSelected () const |
bool | isOneObjectSelected () const |
QPtrList< KPrTextObject > | selectedTextObjs () const |
QPtrList< KoTextFormatInterface > | applicableTextInterfaces () const |
QPtrList< KPrTextObject > | applicableTextObjects () const |
void | setMouseSelectedObject (bool b) |
bool | haveASelectedPartObj () const |
bool | haveASelectedGroupObj () const |
bool | haveASelectedPixmapObj () const |
KPrTextView * | currentTextObjectView () const |
QPtrList< KPrObject > | objectList () const |
const QPtrList< KPrObject > & | getObjectList () const |
void | playSound (const QString &soundFileName) |
void | stopSound () |
void | dragStarted () |
void | setXimPosition (int x, int y, int w, int h, QFont *f) |
void | createEditing (KPrTextObject *textObj) |
void | insertLine (const KoPoint &startPoint, const KoPoint &endPoint) |
void | insertRect (const KoRect &rect) |
void | insertEllipse (const KoRect &rect) |
void | insertPie (const KoRect &rect) |
KPrTextObject * | insertTextObject (const KoRect &rect) |
void | insertPicture (const KoRect &rect) |
void | changePicture (const KURL &url, QWidget *window) |
int | numberOfObjectSelected () const |
KPrObject * | getSelectedObj () const |
KPrPixmapObject * | getSelectedImage () const |
bool | getEditMode () const |
void | ungroupObjects () |
void | groupObjects () |
unsigned int | objNums () const |
void | ensureVisible (int x, int y, int xmargin, int ymargin) |
KoRect | objectRect (bool all) const |
void | scrollTopLeftPoint (const QPoint &pos) |
void | textContentsToHeight () |
void | textObjectToContents () |
void | flipObject (bool _horizontal) |
void | lowerObjs (bool backward) |
void | raiseObjs (bool forward) |
void | alignObjects (AlignType at) |
bool | canMoveOneObject () const |
QPtrList< KPrTextObject > | listOfTextObjs () const |
QPixmap | getPicturePixmap () const |
void | closeObject (bool _close) |
void | layout () |
void | alignVertical (VerticalAlignmentType _type) |
void | savePicture () |
void | dropImage (QMimeSource *data, bool resizeImageToOriginalSize=false, int posX=10, int posX=10) |
KoGuides & | guideLines () |
void | objectPopup (KPrObject *object, const QPoint &point) |
Protected Member Functions | |
virtual void | paintEvent (QPaintEvent *) |
void | drawBackground (QPainter *painter, const QRect &rect, KPrPage *page, bool edit=false) const |
void | drawAllObjectsInPage (QPainter *painter, const QPtrList< KPrObject > &obj, int pageNum) const |
void | drawObjectsPres (QPainter *painter, const QPtrList< KPrObject > &_objects, PresStep step) const |
void | drawObjectsEdit (QPainter *painter, const KoRect &rect, const QPtrList< KPrObject > &_objects, SelectionMode selectionMode, int page) const |
void | drawObjects (QPainter *painter, const QPtrList< KPrObject > &objects, SelectionMode selectionMode, bool contour, KPrTextView *textView, int pageNum) const |
void | drawEditPage (QPainter *painter, const QRect &_rect, KPrPage *page, SelectionMode selectionMode) const |
void | drawPresPage (QPainter *painter, const QRect &_rect, PresStep step) const |
void | drawGrid (QPainter *painter, const QRect &rect2) const |
bool | finishObjectEffects () |
bool | finishPageEffect (bool cancel=false) |
void | drawCurrentPageInPix (QPixmap &) const |
virtual void | mousePressEvent (QMouseEvent *e) |
virtual void | mouseReleaseEvent (QMouseEvent *e) |
virtual void | mouseMoveEvent (QMouseEvent *e) |
virtual void | mouseDoubleClickEvent (QMouseEvent *e) |
virtual void | wheelEvent (QWheelEvent *e) |
virtual void | resizeEvent (QResizeEvent *e) |
KPrObject * | getObjectAt (const KoPoint &pos, bool withoutProtected=false) |
virtual void | focusInEvent (QFocusEvent *) |
virtual void | focusOutEvent (QFocusEvent *) |
virtual void | enterEvent (QEvent *e) |
virtual void | leaveEvent (QEvent *e) |
virtual void | dragEnterEvent (QDragEnterEvent *e) |
virtual void | dragMoveEvent (QDragMoveEvent *e) |
virtual void | dropEvent (QDropEvent *e) |
virtual void | keyPressEvent (QKeyEvent *e) |
virtual void | keyReleaseEvent (QKeyEvent *e) |
virtual void | imStartEvent (QIMEvent *e) |
virtual void | imComposeEvent (QIMEvent *e) |
virtual void | imEndEvent (QIMEvent *e) |
void | eraseEmptySpace (QPainter *painter, const QRegion &emptySpaceRegion, const QBrush &brush) const |
void | setupMenus () |
unsigned int | currPgNum () const |
QColor | txtBackCol () const |
bool | spInfiniteLoop () const |
bool | spManualSwitch () const |
QRect | getPageRect (bool decBorders=true) const |
unsigned int | pageNums () const |
void | _repaint (bool erase=true) |
void | _repaint (const QRect &r) |
void | _repaint (KPrObject *o) |
void | printPage (QPainter *, PresStep step, KPrinter *printer, int rows, int cols) |
void | doObjEffects (bool isAllreadyPainted=false) |
KPrPartObject * | insertObject (const KoRect &rect) |
void | insertAutoform (const KoRect &rect) |
void | insertFreehand (const KoPointArray &_pointArray) |
void | insertPolyline (const KoPointArray &_pointArray) |
void | insertCubicBezierCurve (const KoPointArray &_pointArray) |
void | insertPolygon (const KoPointArray &_pointArray) |
void | insertClosedLine (const KoPointArray &_pointArray) |
void | selectNext () |
void | selectPrev () |
void | scalePixmapToBeOrigIn (const KoSize ¤tSize, const KoSize &pgSize, const QSize &presSize, KPrPixmapObject *obj) |
bool | getPixmapOrigAndCurrentSize (KPrPixmapObject *&obj, KoSize *origSize, KoSize *currentSize) |
void | setTextBackground (KPrTextObject *obj) |
virtual bool | eventFilter (QObject *o, QEvent *e) |
virtual bool | focusNextPrevChild (bool) |
void | endDrawPolyline () |
void | drawCubicBezierCurve (QPainter &p, KoPointArray &points) |
void | endDrawCubicBezierCurve () |
void | redrawCubicBezierCurve (QPainter &p) |
void | printRTDebug (int info) |
KoRect | getAlignBoundingRect () const |
Classes | |
struct | PicCache |
Constructor & Destructor Documentation
|
constructor
Definition at line 95 of file KPrCanvas.cpp. |
|
destructor
Definition at line 176 of file KPrCanvas.cpp. |
Member Function Documentation
|
Align objects. This will align all selected non protected objects according to the align type at.
Definition at line 5446 of file KPrCanvas.cpp. |
|
Returns the list of interfaces to use for changing the text format. This can be either the currently edited text object, or the list of text objects currently selected Definition at line 2864 of file KPrCanvas.cpp. |
|
Returns the list of text objects, either selected or activated.
Definition at line 2853 of file KPrCanvas.cpp. |
|
Emitted when the current frameset edit changes.
|
|
This method animates the objects in the presentation.
Definition at line 3375 of file KPrCanvas.cpp. |
|
for KPrTextView
Definition at line 264 of file KPrCanvas.h. |
|
Draw obj to painter.
Definition at line 653 of file KPrCanvas.cpp. |
|
Draws the background of page to painter. Set edit to true if in edit mode, false in presentation mode. Definition at line 457 of file KPrCanvas.cpp. |
|
Draw a cubic bezier curve.
Definition at line 5042 of file KPrCanvas.cpp. |
|
Draw _objects of page to painter. This method is used for edit mode. Definition at line 600 of file KPrCanvas.cpp. |
|
draw grid
Definition at line 627 of file KPrCanvas.cpp. |
|
Draw _objects to painter. contour if true only countor of selected objects is drawn selectionMode selected objects use this selection mode textView if set print editable textobject (used by drawObjectsEdit) This method is used by drawObjectsPres and drawObjectsEdit. Definition at line 517 of file KPrCanvas.cpp. |
|
Draw _objects to painter. Only rect is painted. This method is used for edit mode. Definition at line 574 of file KPrCanvas.cpp. |
|
Draw _objects shown at step to painter. This method is used for presentation mode, printing. Definition at line 544 of file KPrCanvas.cpp. |
|
Draw page into QPixmap. Draws page pgnum of the currently open presentation into a QPixmap using the specified zoom factor (or fixed width/height dimensions, resp.) Set forceWidth and/or forceHeight to override the zoom factor and obtain a pixmap of the specified width and/or height. By omitting one of them you make sure that the aspect ratio of your page is used for the resulting image.
Definition at line 3225 of file KPrCanvas.cpp. |
|
Draw _objects of page shown at step to painter. This method is used for presentation mode, printing. Definition at line 614 of file KPrCanvas.cpp. |
|
Save page to bitmap file. Export a page of the currently open presentation to disk using a bitmap format like e.g. PNG. This method uses a QPixmap::save() call.
exportPage( 0, s, 800, 600, "/home/khz/page0.png", "PNG", 100 );
Definition at line 2336 of file KPrCanvas.cpp. |
|
Finish the object effects. This shown the last step of the effect. It stops the effect timer and disconnect it and the effect handler deleted. Definition at line 3484 of file KPrCanvas.cpp. |
|
Returns the object at position pos.
Definition at line 2221 of file KPrCanvas.cpp. |
|
Add a autoform object.
Definition at line 3700 of file KPrCanvas.cpp. |
|
Add a ellipse.
Definition at line 3684 of file KPrCanvas.cpp. |
|
Add a line.
Definition at line 3648 of file KPrCanvas.cpp. |
|
Add a object.
Definition at line 3708 of file KPrCanvas.cpp. |
|
Add a picture.
Definition at line 3783 of file KPrCanvas.cpp. |
|
Add a pie/arc/chord.
Definition at line 3691 of file KPrCanvas.cpp. |
|
Add a rectangle.
Definition at line 3677 of file KPrCanvas.cpp. |
|
Add a text object.
Definition at line 3641 of file KPrCanvas.cpp. |
|
Open the object popup.
Definition at line 5599 of file KPrCanvas.cpp. |
|
get the rect for the objects
Definition at line 5244 of file KPrCanvas.cpp. |
|
This method is used for repainting the canvas.
Definition at line 283 of file KPrCanvas.cpp. |
|
Go to the next step in the presentation. gotoNextPage: if is set to true go to beginning of the next page. Definition at line 2984 of file KPrCanvas.cpp. |
|
Go to previous step of the presentation. gotoPreviousPage: if is set to true go to beginning of the previous page. Definition at line 3150 of file KPrCanvas.cpp. |
|
Go to first slide of presentation. Used in presentation mode. Definition at line 4112 of file KPrCanvas.cpp. |
|
returns the current page of the presentation 1 based
Definition at line 157 of file KPrCanvas.h. |
|
returns the current step of the presentation
Definition at line 159 of file KPrCanvas.h. |
|
Draw page defined in step to painter. This method is used for printing a presentation. Definition at line 3325 of file KPrCanvas.cpp. |
|
Redraw the curve defined in m_pointArray.
Definition at line 5080 of file KPrCanvas.cpp. |
|
Emmitted when presentation should be restarted This is used in automatic screen and infinite loop mode.
|
|
Returns the list of selected text objects.
Definition at line 2890 of file KPrCanvas.cpp. |
|
Set the guide move state.
Definition at line 5206 of file KPrCanvas.cpp. |
|
setup popupmenus
Definition at line 2293 of file KPrCanvas.cpp. |
|
Start a screen presentation All pages if
Definition at line 2901 of file KPrCanvas.cpp. |
|
Emmitted when presentation should be restarted This is used in automatic screen and infinite loop mode.
|
The documentation for this class was generated from the following files: