Home · All Namespaces · All Classes
Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | Static Protected Attributes

SwitcherButtonView Class Reference

SwitcherButtonView implements a switcher style view. More...

#include <switcherbuttonview.h>

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

List of all members.

Public Member Functions

 SwitcherButtonView (SwitcherButton *controller)
 Constructs a new SwitcherButtonView.
virtual ~SwitcherButtonView ()
 Destroys the SwitcherButtonView.
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
 REIMPLEMENTATION
virtual void drawBackground (QPainter *painter, const QStyleOptionGraphicsItem *option) const
virtual void drawContents (QPainter *painter, const QStyleOptionGraphicsItem *option) const
virtual void applyStyle ()
bool windowFullyObscured (Window window)
 

Protected Slots

virtual void updateData (const QList< const char * > &modifications)
 REIMPLEMENTATION
virtual void damageEvent (Qt::HANDLE &damage, short &x, short &y, unsigned short &width, unsigned short &height)
 
void setOnDisplay ()
 Starts getting damage events for the current X window.
void unsetOnDisplay ()
 Stops getting damage events for the current X window.

Protected Member Functions

void createDamage ()
void destroyDamage ()
virtual QPoint thumbnailPosition () const
 Returns the thumbnail position in parent coordinates.
virtual void setupModel ()
 REIMPLEMENTATION
void updateXWindowIconGeometryIfNecessary () const
 Starts a timer for updating the icon geometry if the icon geometry has changed after the last update.
void updateViewMode ()
 Updates the button style to reflect the current view mode.
 Q_DISABLE_COPY (SwitcherButtonView)

Protected Attributes

SwitcherButtoncontroller
 
Pixmap xWindowPixmap
 The X window's pixmap.
bool xWindowPixmapIsValid
 Whether the X window's pixmap is valid or not.
Damage xWindowPixmapDamage
 XDamage handle for the X window's pixmap.
QPixmap qWindowPixmap
 The X window's pixmap as a shared QPixmap.
QPointF dragStartPos
 The point where dragging started.
bool onDisplay
 Whether the button is being displayed or not.
QTimer updateXWindowIconGeometryTimer
 Timer for updating the icon's position in scene coordination.
QRectF updatedXWindowIconGeometry
 The icon's current geometry in scene coordinates.
QSharedPointer< XEventListenerxEventListener
 A listener object for X events.

Static Protected Attributes

static Atom iconGeometryAtom = 0
 X11 Atom for the icon geometry.

Detailed Description

SwitcherButtonView implements a switcher style view.


Constructor & Destructor Documentation

SwitcherButtonView::SwitcherButtonView ( SwitcherButton controller  ) 

Constructs a new SwitcherButtonView.

Parameters:
controller The button's controller
SwitcherButtonView::~SwitcherButtonView (  )  [virtual]

Destroys the SwitcherButtonView.


Member Function Documentation

void SwitcherButtonView::applyStyle (  )  [virtual]

Reimplemented in SwitcherButtonWithTitleBarView.

void SwitcherButtonView::createDamage (  )  [protected]

Creates an X damage structure based on the current X window pixmap.

void SwitcherButtonView::damageEvent ( Qt::HANDLE &  damage,
short &  x,
short &  y,
unsigned short &  width,
unsigned short &  height 
) [protected, virtual, slot]

A slot for receiving information about pixmap changes

void SwitcherButtonView::destroyDamage (  )  [protected]

Destroys the current X damage structure.

void SwitcherButtonView::drawBackground ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option 
) const [virtual]
void SwitcherButtonView::drawContents ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option 
) const [virtual]
void SwitcherButtonView::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget 
) [virtual]

REIMPLEMENTATION

SwitcherButtonView::Q_DISABLE_COPY ( SwitcherButtonView   )  [protected]
void SwitcherButtonView::setOnDisplay (  )  [protected, slot]

Starts getting damage events for the current X window.

void SwitcherButtonView::setupModel (  )  [protected, virtual]

REIMPLEMENTATION

Reimplemented in SwitcherButtonWithTitleBarView.

QPoint SwitcherButtonView::thumbnailPosition (  )  const [protected, virtual]

Returns the thumbnail position in parent coordinates.

Reimplemented in SwitcherButtonWithTitleBarView.

void SwitcherButtonView::unsetOnDisplay (  )  [protected, slot]

Stops getting damage events for the current X window.

void SwitcherButtonView::updateData ( const QList< const char * > &  modifications  )  [protected, virtual, slot]

REIMPLEMENTATION

Reimplemented in SwitcherButtonWithTitleBarView.

void SwitcherButtonView::updateViewMode (  )  [protected]

Updates the button style to reflect the current view mode.

void SwitcherButtonView::updateXWindowIconGeometryIfNecessary (  )  const [protected]

Starts a timer for updating the icon geometry if the icon geometry has changed after the last update.

bool SwitcherButtonView::windowFullyObscured ( Window  window  ) 

A method for notifying that a window got fully obscured. If the fully obscured window is the same window that this switcher button is representing, then the button gets updated.

Returns:
true if window was the window id this switcher button is representing.

Member Data Documentation

SwitcherButton controller

QPointF SwitcherButtonView::dragStartPos [protected]

The point where dragging started.

Atom SwitcherButtonView::iconGeometryAtom = 0 [static, protected]

X11 Atom for the icon geometry.

Whether the button is being displayed or not.

QPixmap SwitcherButtonView::qWindowPixmap [protected]

The X window's pixmap as a shared QPixmap.

The icon's current geometry in scene coordinates.

Timer for updating the icon's position in scene coordination.

A listener object for X events.

The X window's pixmap.

XDamage handle for the X window's pixmap.

Whether the X window's pixmap is valid or not.


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

Copyright © 2011 Nokia Corporation Generated on Thu Jul 7 2011 22:14:51
Doxygen 1.7.1
MeeGo Touch