Home · All Namespaces · All Classes

PannedWidgetController Class Reference

#include <statusindicatormenudropdownview.h>

Inheritance diagram for PannedWidgetController:
Inheritance graph
[legend]
Collaboration diagram for PannedWidgetController:
Collaboration graph
[legend]

List of all members.

Signals

void positionOrSizeChanged ()
 
void pressedOutSideContents ()

Public Member Functions

 PannedWidgetController (QGraphicsItem *parent=NULL)
const QGraphicsWidgetbottommostWidget () const
void setBottommostWidget (const QGraphicsWidget *widget)
virtual void setGeometry (const QRectF &rect)
 REIMPLEMENTATION
virtual void mousePressEvent (QGraphicsSceneMouseEvent *event)
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *event)

Detailed Description

A special panned widget for status indicator menu.

Definition at line 56 of file statusindicatormenudropdownview.h.


Constructor & Destructor Documentation

PannedWidgetController::PannedWidgetController ( QGraphicsItem *  parent = NULL  ) 

Constructs a layout change request listener widget

Parameters:
parent the parent QGraphicsItem

Definition at line 46 of file statusindicatormenudropdownview.cpp.

00046                                                                     :
00047     MWidgetController(parent),
00048     bottommostWidget_(NULL)
00049 {
00050 }


Member Function Documentation

const QGraphicsWidget * PannedWidgetController::bottommostWidget (  )  const

Gets the widget that is considered as the bottommost inside this widget.

Returns:
widget the bottommost widget.

Definition at line 52 of file statusindicatormenudropdownview.cpp.

00053 {
00054     return bottommostWidget_;
00055 }

void PannedWidgetController::mousePressEvent ( QGraphicsSceneMouseEvent *  event  )  [virtual]

Definition at line 68 of file statusindicatormenudropdownview.cpp.

00069 {
00070     event->accept();
00071 }

void PannedWidgetController::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event  )  [virtual]

Definition at line 73 of file statusindicatormenudropdownview.cpp.

00074 {
00075     if (bottommostWidget_) {
00076         // Test that the y position of the event is bigger than the bottom edge of the bottommost widget.
00077         // The calculations are done in this widget's coordinate space.
00078         if (event->pos().y() > bottommostWidget_->y() + bottommostWidget_->geometry().height()) {
00079             emit pressedOutSideContents();
00080         }
00081     }
00082 }

Here is the call graph for this function:

void PannedWidgetController::positionOrSizeChanged (  )  [signal]

Sent when the position or the size of the item changes

void PannedWidgetController::pressedOutSideContents (  )  [signal]

A signal that gets emitted when the widget is pressed outside of its contents.

void PannedWidgetController::setBottommostWidget ( const QGraphicsWidget widget  ) 

Sets the widget that is considered as the bottommost inside this widget. The pressedOutSideContents signal is emitted if a press event is received below this widget.

Parameters:
widget the bottom most widget.

Definition at line 57 of file statusindicatormenudropdownview.cpp.

00058 {
00059     bottommostWidget_ = widget;
00060 }

void PannedWidgetController::setGeometry ( const QRectF &  rect  )  [virtual]

REIMPLEMENTATION

Definition at line 62 of file statusindicatormenudropdownview.cpp.

00063 {
00064     MWidgetController::setGeometry(rect);
00065     emit positionOrSizeChanged();
00066 }

Here is the call graph for this function:


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

Copyright © 2010 Nokia Corporation Generated on Wed Nov 10 16:05:10 2010
Doxygen 1.6.1
MeeGo Touch