umbrello API Documentation

ObjectWidgetController Class Reference

Controller for ObjectWidget. More...

#include <objectwidgetcontroller.h>

Inheritance diagram for ObjectWidgetController:

UMLWidgetController List of all members.

Public Member Functions

 ObjectWidgetController (ObjectWidget *objectWidget)
 Constructor for ObjectWidgetController.
virtual ~ObjectWidgetController ()
 Destructor for ObjectWidgetController.

Protected Member Functions

virtual QCursor getResizeCursor ()
 Overriden from UMLWidgetController.
virtual void resizeWidget (int newW, int newH)
 Overriden from UMLWidgetController.
virtual void moveWidgetBy (int diffX, int diffY)
 Overriden from UMLWidgetController.
virtual void constrainMovementForAllWidgets (int &diffX, int &diffY)
 Overriden from UMLWidgetController.

Detailed Description

Controller for ObjectWidget.

When moving an ObjectWidget, it is only moved along X axis. Y axis movement is always ignored. So, if the ObjectWidget is being moved as part of a selection and that selection is moved in X and/or Y axis, the ObjectWidget will only move in X axis. Also, when constraining the move of the selection because the receiver of mouse move events is an ObjectWidget, all the widgets are moved only in X axis.

Only horizontal resize is allowed for ObjectWidget. Cursor is set to reflect this.

Author:
Umbrello UML Modeller Authors <uml-devel@lists.sourceforge.net>

Definition at line 33 of file objectwidgetcontroller.h.


Constructor & Destructor Documentation

ObjectWidgetController::ObjectWidgetController ObjectWidget objectWidget  ) 
 

Constructor for ObjectWidgetController.

Parameters:
objectWidget The object widget which uses the controller.

Definition at line 23 of file objectwidgetcontroller.cpp.

ObjectWidgetController::~ObjectWidgetController  )  [virtual]
 

Destructor for ObjectWidgetController.

Definition at line 27 of file objectwidgetcontroller.cpp.


Member Function Documentation

QCursor ObjectWidgetController::getResizeCursor  )  [protected, virtual]
 

Overriden from UMLWidgetController.

Returns the cursor to be shown when resizing the widget. The cursor shown is KCursor::sizeHorCursor().

Returns:
The cursor to be shown when resizing the widget.

Reimplemented from UMLWidgetController.

Definition at line 30 of file objectwidgetcontroller.cpp.

void ObjectWidgetController::resizeWidget int  newW,
int  newH
[protected, virtual]
 

Overriden from UMLWidgetController.

Resizes the width of the object widget. Object widgets can only be resized horizontally, so height isn't modified.

Parameters:
newW The new width for the widget.
newH The new height for the widget (isn't used).

Reimplemented from UMLWidgetController.

Definition at line 34 of file objectwidgetcontroller.cpp.

References UMLWidget::getHeight(), and UMLWidget::setSize().

void ObjectWidgetController::moveWidgetBy int  diffX,
int  diffY
[protected, virtual]
 

Overriden from UMLWidgetController.

Moves the widget to a new position using the difference between the current position and the new position. Y position is ignored, and widget is only moved along X axis.

Parameters:
diffX The difference between current X position and new X position.
diffY The difference between current Y position and new Y position (isn't used).

Reimplemented from UMLWidgetController.

Definition at line 38 of file objectwidgetcontroller.cpp.

References UMLWidget::getX(), and UMLWidget::setX().

void ObjectWidgetController::constrainMovementForAllWidgets int &  diffX,
int &  diffY
[protected, virtual]
 

Overriden from UMLWidgetController.

Modifies the value of the diffX and diffY variables used to move the widgets. All the widgets are constrained to be moved only in X axis (diffY is set to 0).

Parameters:
diffX The difference between current X position and new X position.
diffY The difference between current Y position and new Y position.

Reimplemented from UMLWidgetController.

Definition at line 42 of file objectwidgetcontroller.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for umbrello Version 3.1.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Jun 26 08:08:05 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003