umbrello  2.39.2
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
Public Slots | Signals | Public Member Functions | Protected Member Functions | Private Slots | Static Private Member Functions | Private Attributes | List of all members
BirdView Class Reference

The class BirdView controls the view of the whole scene. More...

#include <birdview.h>

Inheritance diagram for BirdView:

Public Slots

void slotViewChanged ()
 

Signals

void viewPositionChanged (QPointF delta)
 

Public Member Functions

 BirdView (QDockWidget *parent, UMLView *view)
 Constructor. More...
 
virtual ~BirdView ()
 
void setSlotsEnabled (bool enabled)
 

Protected Member Functions

virtual void mousePressEvent (QMouseEvent *event)
 
virtual void mouseMoveEvent (QMouseEvent *event)
 
virtual void mouseReleaseEvent (QMouseEvent *event)
 
virtual void keyPressEvent (QKeyEvent *event)
 

Private Slots

void slotDockSizeChanged (const QSize &size)
 
void slotDestroyed (QObject *object)
 

Static Private Member Functions

static void setBackgroundColor (QFrame *frame, const QColor &color)
 

Private Attributes

UMLViewm_view
 
QGraphicsView * m_birdView
 
QFrame * m_protectFrame
 
QPoint m_moveStartPos
 

Detailed Description

The class BirdView controls the view of the whole scene.

A view of the whole scene is shown together with a representation of the working window. This working window can be moved with the mouse and will therefore change the visible view of the working window. A frame is laid over the graphics view to prevent mouse events acting on the graphics elements.

Author
Andi Fischer

Constructor & Destructor Documentation

◆ BirdView()

BirdView::BirdView ( QDockWidget *  parent,
UMLView view 
)

Constructor.

Parameters
parentthe dock widget where the bird view is loaded
viewthe view to show

◆ ~BirdView()

BirdView::~BirdView ( )
virtual

Destructor.

Member Function Documentation

◆ keyPressEvent()

void BirdView::keyPressEvent ( QKeyEvent *  event)
protectedvirtual

Event handler for key press events.

Parameters
eventkey press event

◆ mouseMoveEvent()

void BirdView::mouseMoveEvent ( QMouseEvent *  event)
protectedvirtual

Event handler for mouse move events. Move the frame which represents the viewable window to a new position. Move is only done inside the container.

Parameters
eventmouse event

◆ mousePressEvent()

void BirdView::mousePressEvent ( QMouseEvent *  event)
protectedvirtual

Event handler for mouse press events. Keep the start position for later.

Parameters
eventmouse event

◆ mouseReleaseEvent()

void BirdView::mouseReleaseEvent ( QMouseEvent *  event)
protectedvirtual

Event handler for mouse release events.

Parameters
eventmouse event

◆ setBackgroundColor()

void BirdView::setBackgroundColor ( QFrame *  frame,
const QColor &  color 
)
staticprivate

Method to set the background color of a frame to a new color.

Parameters
frameframe where the new color has to be set
colornew color, which has to be set to the frame

◆ setSlotsEnabled()

void BirdView::setSlotsEnabled ( bool  enabled)

Enable or disable the value changed slots of the scroll bars of the view.

Parameters
enabledflag whether to enable or disable the slots

◆ slotDestroyed

void BirdView::slotDestroyed ( QObject *  object)
privateslot

Handle destroyed view.

◆ slotDockSizeChanged

void BirdView::slotDockSizeChanged ( const QSize &  size)
privateslot

Event handler for size changed events of the dock window.

Parameters
sizenew size to which the dock window was resized

◆ slotViewChanged

void BirdView::slotViewChanged ( )
slot

Event handler for view changed events of the graphics view. This is done by changing the scroll bars.

◆ viewPositionChanged

void BirdView::viewPositionChanged ( QPointF  delta)
signal

Member Data Documentation

◆ m_birdView

QGraphicsView* BirdView::m_birdView
private

◆ m_moveStartPos

QPoint BirdView::m_moveStartPos
private

◆ m_protectFrame

QFrame* BirdView::m_protectFrame
private

◆ m_view

UMLView* BirdView::m_view
private

The documentation for this class was generated from the following files: