Home · All Classes · Main Classes · Deprecated
Public Member Functions | Protected Attributes

MBackgroundTiles Class Reference

This class holds 16 pieces of scalable images which represent every possible position in a layout. More...

List of all members.

Public Member Functions

 MBackgroundTiles ()
 MBackgroundTiles (const MBackgroundTiles &other)
 MBackgroundTiles (const QString &imageId, int left, int right, int top, int bottom)
virtual ~MBackgroundTiles ()
const MScalableImageoperator[] (M::Position tile) const
bool operator== (const MBackgroundTiles &other) const
MBackgroundTilesoperator= (const MBackgroundTiles &other)
bool isValid () const

Protected Attributes

MBackgroundTilesPrivate * d_ptr

Detailed Description

This class holds 16 pieces of scalable images which represent every possible position in a layout.

All 16 pieces are fetched from MTheme with different suffixes. For example if you use imageId 'bg' this class will fetch the following images corresponding to M::Position:

This class is mainly meant to be used with the style system, so that the imageId can be given from css, and the M::Position from application code. A working example is the background of any widget. MWidgetStyle::backgroundTiles defines the id and the margins while MWidgetController::setLayoutPosition can be used for defining which tile is the one to be rendered. Some layout policies have this functionality to automatically set the correct position for each widget, e.g. MLinearLayoutPolicy::setNotifyWidgetsOfLayoutPositionEnabled.

See also:
M::Position

Constructor & Destructor Documentation

MBackgroundTiles::MBackgroundTiles (  ) 
MBackgroundTiles::MBackgroundTiles ( const MBackgroundTiles other  ) 
MBackgroundTiles::MBackgroundTiles ( const QString imageId,
int  left,
int  right,
int  top,
int  bottom 
)
MBackgroundTiles::~MBackgroundTiles (  )  [virtual]

Member Function Documentation

bool MBackgroundTiles::isValid (  )  const
MBackgroundTiles & MBackgroundTiles::operator= ( const MBackgroundTiles other  ) 
bool MBackgroundTiles::operator== ( const MBackgroundTiles other  )  const
const MScalableImage * MBackgroundTiles::operator[] ( M::Position  tile  )  const

Member Data Documentation

MBackgroundTilesPrivate* MBackgroundTiles::d_ptr [protected]

Copyright © 2010 Nokia Corporation
MeeGo Touch