TarzaNN
TarzaNN neural network simulator
Public Member Functions | Protected Member Functions
UI_DesignerCanvasView Class Reference

#include <UI_DesignerCanvasView.h>

List of all members.

Public Member Functions

 UI_DesignerCanvasView (Q3Canvas *c, QWidget *parent=0, const char *name=0, Qt::WFlags f=0)
 ~UI_DesignerCanvasView ()

Protected Member Functions

void contentsMousePressEvent (QMouseEvent *e)
void contentsMouseMoveEvent (QMouseEvent *e)
void contentsContextMenuEvent (QContextMenuEvent *e)
void contentsMouseReleaseEvent (QMouseEvent *e)

Detailed Description

A UI_DesignerCanvasView is widget which provides a view of a the UI_DesignerCanvas. It is responsible for user interaction with the canvas. The view monitors the movement of the mouse on the canvas, and responds accordingly. Inherits from QCanvasView.


Constructor & Destructor Documentation

UI_DesignerCanvasView::UI_DesignerCanvasView ( Q3Canvas *  c,
QWidget *  parent = 0,
const char *  name = 0,
Qt::WFlags  f = 0 
)

Creates a new UI_DesignerCanvasView which displays the canvas c. The parent, name and widget flags f, are passed on to the QCanvasView constructor.

Parameters:
cThe canvas this view displays
parentThe parent widget
nameThe name of this widget
WFlagsThe widget flags
UI_DesignerCanvasView::~UI_DesignerCanvasView ( )

Destroys the object and frees any allocated resources.


Member Function Documentation

void UI_DesignerCanvasView::contentsContextMenuEvent ( QContextMenuEvent *  e) [protected]

This event handler is called whenever the QScrollView receives a contextMenuEvent() in e. The mouse position is translated to be a point on the contents. Displays a context menu relevant to the item which is under the mouse cursor.

Parameters:
eThe QContextMenuEvent generated by UI_DesignerCanvasView
void UI_DesignerCanvasView::contentsMouseMoveEvent ( QMouseEvent *  e) [protected]

This event handler is called whenever the QScrollView receives a mouseMoveEvent(). The mouse position in e is translated to be a point on the contents. If a mousePressEvent() is received as well the item located under the mouse cursor is moved with the mouse cursor.

Parameters:
eThe QMouseEvent generated by UI_DesignerCanvasView
See also:
moving
void UI_DesignerCanvasView::contentsMousePressEvent ( QMouseEvent *  e) [protected]

This event handler is called whenever the UI_DesignerCanvasView receives a mousePressEvent(). The press position in e is translated to be a point on the contents. Changes the selected item and the moving item according to the press position (NULL when the press was on the canvas itself).

Parameters:
eThe QMouseEvent generated by UI_DesignerCanvasView
See also:
moving
void UI_DesignerCanvasView::contentsMouseReleaseEvent ( QMouseEvent *  e) [protected]

This event handler is called whenever the QScrollView receives a mouseReleaseEvent(). The mouse position is translated to be a point on the contents. Sets moving to NULL.

Parameters:
eThe QContextMenuEvent generated by UI_DesignerCanvasView

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines