kword
KWFrameView Class Reference
#include <KWFrameView.h>
Detailed Description
an instance of a KWFrameView represents the view in the MVC model of a frame; there can be multiple KWFrameView objects per frame.Typically there is one per view (KWView). This class registers selectedness and has methods to show the frame and its interaction methods
Definition at line 82 of file KWFrameView.h.
Public Member Functions | |
KWFrameView (KWFrameViewManager *parent, KWFrame *frame) | |
virtual | ~KWFrameView () |
bool | selected () const |
void | setSelected (bool selected, MouseMeaning selectPolicy=MEANING_MOUSE_SELECT) |
KWFrame * | frame () const |
bool | isBorderHit (const KoPoint &point) const |
bool | contains (const KoPoint &point, bool fuzzy=true) const |
MouseMeaning | mouseMeaning (const KoPoint &point, int keyState) |
KWFrameViewManager * | parent () const |
void | showPopup (const KoPoint &point, KWView *view, const QPoint &popupPoint) const |
void | paintFrameAttributes (QPainter *painter, const QRect &crect, KWViewMode *vm, KoZoomHandler *zh) |
Constructor & Destructor Documentation
KWFrameView::KWFrameView | ( | KWFrameViewManager * | parent, | |
KWFrame * | frame | |||
) |
Constructor.
- Parameters:
-
parent the parent frame the frame this view represents.
Definition at line 42 of file KWFrameView.cpp.
Member Function Documentation
bool KWFrameView::contains | ( | const KoPoint & | point, | |
bool | fuzzy = true | |||
) | const |
returns if the point
is anywhere in te frame, if fuzzy is true; also a little outside
Definition at line 70 of file KWFrameView.cpp.
KWFrame* KWFrameView::frame | ( | ) | const [inline] |
bool KWFrameView::isBorderHit | ( | const KoPoint & | point | ) | const |
MouseMeaning KWFrameView::mouseMeaning | ( | const KoPoint & | point, | |
int | keyState | |||
) |
Return the MouseMeaning enum value for the parent view.
- Parameters:
-
point the point where the mouse is hovering. keyState the bitmask of keys that are pressed. Same as Event::state();
Definition at line 102 of file KWFrameView.cpp.
void KWFrameView::paintFrameAttributes | ( | QPainter * | painter, | |
const QRect & | crect, | |||
KWViewMode * | vm, | |||
KoZoomHandler * | zh | |||
) |
Paint view based items of the frameView, like selected state.
- Parameters:
-
painter the painter to paint to crect the clip rect; nothing outside this rect is important zh the zoomHandler to convert from internal coordinates to view coordinates vm the current Viewmode.
Definition at line 131 of file KWFrameView.cpp.
KWFrameViewManager* KWFrameView::parent | ( | ) | const [inline] |
Return the parent KWFrameViewManager this frameView belongs to.
Definition at line 118 of file KWFrameView.h.
bool KWFrameView::selected | ( | ) | const [inline] |
returns if this frameView is selected. A selected frame is shown differently on screen.
Definition at line 93 of file KWFrameView.h.
void KWFrameView::setSelected | ( | bool | selected, | |
MouseMeaning | selectPolicy = MEANING_MOUSE_SELECT | |||
) |
Set the selected state of this frameView.
- Parameters:
-
selected the new selected state selectPolicy an optionaly mouseMeaning at which the mouse was clicked to make this selection happen. See the FramePolicy::setSelected() for more info.
Definition at line 116 of file KWFrameView.cpp.
void KWFrameView::showPopup | ( | const KoPoint & | point, | |
KWView * | view, | |||
const QPoint & | popupPoint | |||
) | const |
Show a context-sensitive popup menu based on the location of 'point'.
- Parameters:
-
point the point at which the mouse was clicked. The context is based on what is present at that location. popupPoint the point in the same coordinate system as the parent widget of where the popup menu should be located. view the parent widget for the popup.
Definition at line 123 of file KWFrameView.cpp.
The documentation for this class was generated from the following files: