kword

KWFrameViewManager Class Reference

#include <KWFrameViewManager.h>

List of all members.


Detailed Description

Class that knows about all the (visible) frames in the document and will act as a manager between the GUI code and the data objects to couple any GUI action to the right frame.

There is one KWFrameViewManager per view (stored in KWCanvas).

All coordinates used in this object are point (pt) based, i.e. the same as in KWFrame. Any coordinates in pixels should first be converted in the KoZoomHandler (in KWord that's the KWDocument)

Definition at line 51 of file KWFrameViewManager.h.


Public Types

 selected
 unselected
 nextUnselected
 frameOnTop
enum  SelectionType { selected, unselected, nextUnselected, frameOnTop }

Public Slots

void slotFrameSetAdded (KWFrameSet *fs)
void slotFrameSetRemoved (KWFrameSet *fs)
void slotFrameAdded (KWFrame *f)
void slotFrameRemoved (KWFrame *f)
void slotFrameMoved (KWFrame *f, double previousYPosition)
void slotFrameResized (KWFrame *f)
void slotFrameSelectionChanged ()
void slotFrameSetRenamed (KWFrameSet *fs)

Signals

void sigFrameSelectionChanged ()
void sigFrameSetRenamed ()
void sigFrameResized (const QValueList< KWFrame * > &)
void sigFrameMoved (const QValueList< KWFrame * > &)

Public Member Functions

 KWFrameViewManager ()
 KWFrameViewManager (KWDocument *doc)
virtual ~KWFrameViewManager ()
KWFrameViewview (const KoPoint &point, SelectionType select, bool borderOnly=false) const
KWFrameViewview (const KWFrame *frame) const
QValueList< KWFrameView * > selectedFrames () const
KWFrameViewselectedFrame () const
const QValueList< KWFrameView * > frameViewsIterator () const
MouseMeaning mouseMeaning (const KoPoint &point, int keyState) const
QCursor mouseCursor (const KoPoint &point, int keyState) const
void showPopup (const KoPoint &point, KWView *view, int keyState, const QPoint &popupPoint) const
void addKWFramesListener (KWFramesListener *listener)
void removeKWFramesListener (KWFramesListener *listener)
void selectFrames (const KoPoint &point, int keyState, bool leftClick)

Protected Slots

void fireEvents ()

Protected Member Functions

virtual void requestFireEvents ()

Member Enumeration Documentation

Used to change the behavior of view().

selected
return the first selected with the highest z-ordering (i.e. on top).
unselected
return the first unselected on top.
nextUnselected
return the first unselected directly under a selected frame, or the top most one if nothing is selected.
frameOnTop
return the frame highest z-ordering, regardless of selection.

Definition at line 76 of file KWFrameViewManager.h.


Constructor & Destructor Documentation

KWFrameViewManager::KWFrameViewManager ( KWDocument doc  ) 

Constructor that takes the already existing frames and framesets from doc and adds them.

Definition at line 37 of file KWFrameViewManager.cpp.


Member Function Documentation

void KWFrameViewManager::fireEvents (  )  [protected, slot]

This method will propagate all the events saved up to the listeners.

You don't normally want to call this method; call requestFireEvents() instead which will eventually call this method for you.

Definition at line 151 of file KWFrameViewManager.cpp.

QCursor KWFrameViewManager::mouseCursor ( const KoPoint &  point,
int  keyState 
) const

Similar to mouseMeaning(), but instead of returning the meaning this will return a mouse cursor to represent the action.

Parameters:
point the point where the mouse is hovering.
keyState the bitmask of keys that are pressed. Same as Event::state();

Definition at line 271 of file KWFrameViewManager.cpp.

MouseMeaning KWFrameViewManager::mouseMeaning ( const KoPoint &  point,
int  keyState 
) const

Return the MouseMeaning of what a click of the mouse would do at the point.

All the frames that have a presence at the point are considered and depending on what kind of frame and where in the frame the mouse is the meaning is calculated.

Parameters:
point the point where the mouse is hovering.
keyState the bitmask of keys that are pressed. Same as Event::state();

Definition at line 342 of file KWFrameViewManager.cpp.

void KWFrameViewManager::requestFireEvents (  )  [protected, virtual]

prepare or update the singleshot timer to fire events.

Definition at line 144 of file KWFrameViewManager.cpp.

KWFrameView * KWFrameViewManager::selectedFrame (  )  const

Returns the first selected frame.

Is the same as selectedFrames()[0]

Definition at line 366 of file KWFrameViewManager.cpp.

QValueList< KWFrameView * > KWFrameViewManager::selectedFrames (  )  const

Return all currently selected frames.

Definition at line 356 of file KWFrameViewManager.cpp.

void KWFrameViewManager::selectFrames ( const KoPoint &  point,
int  keyState,
bool  leftClick 
)

Select frames based on a mouse click at point using keystate.

Handles the click of a mouse and searches for frames at the location selecting and / or unselecting any frames based on this information.

Parameters:
leftClick true if this select is due to the main button being clicked.
point the point clicked.
keyState the bitmask of keys that are pressed. Same as Event::state();

Definition at line 396 of file KWFrameViewManager.cpp.

void KWFrameViewManager::showPopup ( const KoPoint &  point,
KWView view,
int  keyState,
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.
keyState the bitmask of keys that are pressed. Same as Event::state();
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 374 of file KWFrameViewManager.cpp.

void KWFrameViewManager::sigFrameMoved ( const QValueList< KWFrame * > &   )  [signal]

emitted after frames were moved

void KWFrameViewManager::sigFrameResized ( const QValueList< KWFrame * > &   )  [signal]

emitted after frames were resized

void KWFrameViewManager::sigFrameSelectionChanged (  )  [signal]

emitted after one or more incoming slotFrameSelectionChanged events.

void KWFrameViewManager::sigFrameSetRenamed (  )  [signal]

emitted after a frameset that had at least one selected frame was renamed.

void KWFrameViewManager::slotFrameAdded ( KWFrame f  )  [slot]

notify this slot if a Frame has been created and should become visible.

Definition at line 94 of file KWFrameViewManager.cpp.

void KWFrameViewManager::slotFrameMoved ( KWFrame f,
double  previousYPosition 
) [slot]

notify this slot if a Frame has been moved

Parameters:
f the frame
previousYPosition the pt-based location of the frame before it was moved. This is used to update any views in a more intelligent matter.

Definition at line 117 of file KWFrameViewManager.cpp.

void KWFrameViewManager::slotFrameRemoved ( KWFrame f  )  [slot]

notify this slot if a Frame has been removed

Definition at line 100 of file KWFrameViewManager.cpp.

void KWFrameViewManager::slotFrameResized ( KWFrame f  )  [slot]

notify this slot if a Frame has been resized

Definition at line 125 of file KWFrameViewManager.cpp.

void KWFrameViewManager::slotFrameSelectionChanged (  )  [slot]

notify this slot if one or more frames have been selected or unselected.

Definition at line 131 of file KWFrameViewManager.cpp.

void KWFrameViewManager::slotFrameSetAdded ( KWFrameSet fs  )  [slot]

notify this slot if a FrameSet has been created and should become visible.

Definition at line 66 of file KWFrameViewManager.cpp.

void KWFrameViewManager::slotFrameSetRemoved ( KWFrameSet fs  )  [slot]

notify this slot if a FrameSet has been removed

Definition at line 80 of file KWFrameViewManager.cpp.

void KWFrameViewManager::slotFrameSetRenamed ( KWFrameSet fs  )  [slot]

notify this slot if a frameset was renamed

Definition at line 138 of file KWFrameViewManager.cpp.

KWFrameView * KWFrameViewManager::view ( const KWFrame frame  )  const

Returns a frameView representing frame.

Definition at line 256 of file KWFrameViewManager.cpp.

KWFrameView * KWFrameViewManager::view ( const KoPoint &  point,
SelectionType  select,
bool  borderOnly = false 
) const

Returns a frameView representing a frame positioned at point, or 0 when no match found.

Parameters:
point the position of the frame
select this alters the behavior of which frame to return if more then one exist at the appointed location.
borderOnly If true frames only frames that have the border at the point will be looked at.

Definition at line 216 of file KWFrameViewManager.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys