LunaSysMgr
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ReorderableIconLayout Class Reference

#include <reorderableiconlayout.h>

Inheritance diagram for ReorderableIconLayout:
[legend]
Collaboration diagram for ReorderableIconLayout:
[legend]

Signals

void signalReorderStarted ()
 
void signalReorderEnded ()
 
void signalFSMTrackStarted_Trigger ()
 
void signalFSMTrackEnded_Trigger ()
 
void signalFSMLastTrackEndedTrigger ()
 
void signalFSMReorderStarted_Trigger ()
 
void signalFSMReorderEnded_Trigger ()
 

Public Member Functions

 ReorderableIconLayout (ReorderablePage *p_owner)
 
virtual ~ReorderableIconLayout ()
 
virtual void setLayoutRowSpacing (const qreal interRowSpace, const quint32 anchorRowNum=0)
 
virtual void resetLayoutRowSpacingToDefaultSettings ()
 
virtual void paint (QPainter *painter)
 
virtual void paint (QPainter *painter, const QRectF &sourceRect)
 
virtual void paint (QPainter *painter, const QRectF &sourceRect, qint32 renderOpt)
 
virtual void paint (const QPointF &translate, QPainter *painter)
 
virtual void paintOffscreen (QPainter *painter)
 
virtual void paintOffscreen (PixmapObject *p_pmo)
 
virtual void paintOffscreen (PixmapHugeObject *p_hugePmo)
 
virtual void enableAutoPaint ()
 
virtual void disableAutoPaint ()
 
virtual void relayout (bool force=false)
 
virtual void resizeWidth (const quint32 w)
 
virtual void setPosition (const QPointF &pos)
 
virtual void setUniformCellSize (const QSize &size)
 
virtual void iconCellReleaseIcon (const QPoint &cellCoordinate)
 
virtual IconCelliconCellAtLayoutCoordinate (const QPointF &coordinate)
 
virtual IconCelliconCellAtLayoutCoordinate (const QPointF &layoutCoordinate, QPoint &r_gridCoordinate)
 
virtual QRectF rowArea (quint32 rowIndex) const
 
virtual QPoint lastOccupiedGridPosition () const
 
virtual QPoint nextAppendGridPosition () const
 
virtual qint32 rowAtLayoutCoordinate (const QPointF &layoutCoordinate, bool clipMinMax=false)
 
virtual qint32 rowAtLayoutCoordinateFuzzy (const QPointF &layoutCoordinate, bool clipMinMax=false)
 
virtual IconCelliconCellAtGridCoordinate (const QPoint &gridCoordinate)
 
virtual bool layoutCoordinateForGridCoordinate (const QPoint &gridCoordinate, QPointF &r_layoutCoordinate)
 
virtual IconCellfindIconByUid (const QUuid &iconUid, QPoint &r_gridCoordinate, bool includePendingIconsInCells=false)
 
virtual QList< IconCell * > iconCellsInFlowOrder ()
 
virtual IconBasestartTrackingIcon (const QPoint &gridCoord, bool includePendingIconsInCells=false)
 
virtual IconBasestartTrackingIconFromTransfer (const QPoint &gridCoord, IconBase *iconTracked)
 
virtual bool startTrackingIcon (IconBase *p_icon, QPoint &r_gridCoord)
 
virtual bool trackedIconMovedTo (IconBase *p_icon, const QPoint &gridCoord, QPoint &r_newGridCoord)
 
virtual void stopTrackingIcon (IconBase *p_icon)
 
virtual void stopTrackingAll ()
 
virtual bool trackedIconLeavingLayout (const QUuid &trackedIconUid)
 
virtual IconBasegetTrackedIconByUid (const QUuid &trackedIconUid)
 
virtual bool lastTrackedPosition (const QUuid &iconUid, QPoint &r_lastGridCoord)
 
virtual QList< IconOperationopListForMove (const QPoint &sourceColumnRow, const QPoint &destColumnRow)
 
virtual QAnimationGroup * animationsForOpList (QList< IconOperation > &opList)
 
virtual bool initializePendingCellListFromOpList (QList< IconOperation > &opList)
 
virtual bool commitPending ()
 
virtual bool commitTracked (const QUuid &iconUid)
 
virtual bool commitTracked (const QUuid &iconUid, const QPoint &lastGridCoord)
 
virtual bool executeOpList (QList< IconOperation > &opList)
 
virtual IconReorderAnimationanimationForTrackedIconFinal (const QUuid &trackedIconUid)
 
virtual IconReorderAnimationanimationForTrackedIconFinal (const QUuid &trackedIconUid, const QPoint &lastGridCoord)
 
virtual void cancelAllReorder ()
 
virtual void commitPendingImmediately ()
 
virtual void commitTrackedImmediately (const QUuid &iconUid)
 
virtual void commitTrackedImmediately (const QUuid &iconUid, const QPoint &lastGridCoord)
 
virtual bool areTherePendingReorderAnimations ()
 
virtual quint32 addIcon (IconBase *p_icon)
 
virtual quint32 addIcon (IconCell *p_cell)
 
virtual QPoint addEmptyCell ()
 
virtual quint32 addIconAt (IconBase *p_icon, const QPoint &gridCoordinate)
 
virtual quint32 addIconAt (IconCell *p_cell, const QPoint &gridCoordinate)
 
virtual QPoint addEmptyCellAt (const QPoint &gridCoordinate)
 
virtual bool removeIconCell (const QPoint &gridCoordinate)
 
- Public Member Functions inherited from IconLayout
 IconLayout (Page *p_owner)
 
virtual ~IconLayout ()
 
virtual void paint (QPainter *painter, const QRectF &sourceRect, const QPointF &painterTranslate)
 
virtual void paint (QPainter *painter, const QRectF &sourceRect, const QPointF &painterTranslate, qint32 renderOpt)
 
virtual QRectF geometry ()
 
virtual QRectF relativeGeometry ()
 
virtual QPointF position ()
 
virtual QPointF sceneCoordinateFromLayoutCoordinate (const QPointF &layoutCoordinate)
 
virtual QPointF pageCoordinateFromLayoutCoordinate (const QPointF &layoutCoordinate)
 
virtual QPointF rawPageCoordinateFromLayoutCoordinate (const QPointF &layoutCoordinate) const
 
virtual QPointF rawLayoutCoordinateFromPageCoordinate (const QPointF &pageCoordinate) const
 
virtual QRectF rawPageRectFromLayoutRect (const QRectF &layoutRect) const
 
virtual QRectF rawLayoutRectFromPageRect (const QRectF &pageRect) const
 
virtual void recomputePageLayoutTransforms ()
 
virtual qreal verticalDistanceToNearestUpperRow (const QPointF &layoutCoordinate)
 
virtual qreal verticalDistanceToNearestLowerRow (const QPointF &layoutCoordinate)
 
virtual quint32 maximumRowHeight () const
 
virtual quint32 minimumRowHeight () const
 
- Public Member Functions inherited from LayoutItem
 LayoutItem ()
 
virtual ~LayoutItem ()
 

Static Public Member Functions

static void initLayoutFromSequentialIconList (ReorderableIconLayout &layout, const IconList iconList)
 

Protected Types

typedef QList< IconRow * > IconRowList
 
typedef IconRowList::const_iterator IconRowConstIter
 
typedef IconRowList::iterator IconRowIter
 

Protected Slots

virtual void slotReorderAnimationsFinished ()
 protected Q_SLOTS: More...
 
virtual void slotTrackedIconReplacementAnimationFinished ()
 
virtual void slotTrackForIconEnded ()
 
virtual void dbg_reorderFSMStateEntered ()
 

Protected Member Functions

virtual void destroyAllRows ()
 used by relayoutExisting() More...
 
virtual qint32 calculateAndSetHorizontalSpaceParameters ()
 
virtual void relayoutExisting ()
 
virtual void setupReorderFSM ()
 
virtual void startReorderFSM ()
 
virtual void stopReorderFSM ()
 
virtual bool isReorderStateConsistent () const
 
virtual void switchIconsToReorderGraphics ()
 
virtual void switchIconsToNormalGraphics ()
 
virtual void switchIconToReorderGraphics (IconCell *p_iconCell)
 
virtual void switchIconToNormalGraphics (IconCell *p_iconCell)
 
virtual void switchIconToReorderGraphics (IconBase *p_icon)
 
virtual void switchIconToNormalGraphics (IconBase *p_icon)
 

Protected Attributes

IconRowList m_iconRows
 
bool m_layoutSync
 
quint32 m_relayoutCount
 
bool m_disabledAutoPaint
 
bool m_usingReorderModeGraphics
 
quint32 m_maxWidthForRows
 
quint32 m_maxIconsPerRow
 
qint32 m_horizIconSpacingAdjust
 
quint32 m_interRowSpace
 
quint32 m_leftMarginForRows
 
quint32 m_topMarginForRows
 
quint32 m_anchorRow
 
More...
 
QSize m_iconCellSize
 
quint32 m_horizIconSpacing
 
QSize m_layoutSizeInPixels
 
quint32 m_reorderEventSampleRate
 
quint32 m_maxVelocityForSampling
 
quint64 m_timeNormalizationUnit
 
quint32 m_magFactor
 
quint64 m_lastTimeUsed
 
quint64 m_listIdInUse
 
QList< QPointer< IconCell > > m_reorderPendingCellList
 
QPointer< QAnimationGroup > m_qp_reorderAnimationGroup
 
QMap< QUuid, QPointer
< IconReorderAnimation > > 
m_trackedIconAnimations
 
QMap< QUuid, QPoint > m_trackedIconLastPosition
 
QStateMachinem_p_reorderFSM
 
QStatem_p_fsmStateConsistent
 
QStatem_p_fsmStateReorderPending
 
QStatem_p_fsmStateTrackedFloating
 
QStatem_p_fsmStateReorderPendingAndTrackedFloating
 
- Protected Attributes inherited from IconLayout
QPointer< Pagem_qp_ownerPage
 
QRectF m_geom
 
QPointF m_pos
 
QTransform m_layoutToPageTran
 
QTransform m_pageToLayoutTran
 

Static Protected Attributes

static const char * ReorderFSMPropertyName_isConsistent = "isConsistent"
 

Friends

class ReorderablePage
 
QDataStream & operator<< (QDataStream &stream, const ReorderableIconLayout &s)
 
More...
 
QDataStream & operator>> (QDataStream &stream, ReorderableIconLayout &s)
 
QDebug operator<< (QDebug dbg, const ReorderableIconLayout &s)
 

Member Typedef Documentation

typedef IconRowList::const_iterator ReorderableIconLayout::IconRowConstIter
protected
typedef IconRowList::iterator ReorderableIconLayout::IconRowIter
protected
typedef QList<IconRow *> ReorderableIconLayout::IconRowList
protected

Constructor & Destructor Documentation

ReorderableIconLayout::ReorderableIconLayout ( ReorderablePage p_owner)
ReorderableIconLayout::~ReorderableIconLayout ( )
virtual

Member Function Documentation

QPoint ReorderableIconLayout::addEmptyCell ( )
virtual
QPoint ReorderableIconLayout::addEmptyCellAt ( const QPoint &  gridCoordinate)
virtual
quint32 ReorderableIconLayout::addIcon ( IconBase p_icon)
virtual
quint32 ReorderableIconLayout::addIcon ( IconCell p_cell)
virtual
quint32 ReorderableIconLayout::addIconAt ( IconBase p_icon,
const QPoint &  gridCoordinate 
)
virtual
quint32 ReorderableIconLayout::addIconAt ( IconCell p_cell,
const QPoint &  gridCoordinate 
)
virtual
IconReorderAnimation * ReorderableIconLayout::animationForTrackedIconFinal ( const QUuid &  trackedIconUid)
virtual
IconReorderAnimation * ReorderableIconLayout::animationForTrackedIconFinal ( const QUuid &  trackedIconUid,
const QPoint &  lastGridCoord 
)
virtual
QAnimationGroup * ReorderableIconLayout::animationsForOpList ( QList< IconOperation > &  opList)
virtual
bool ReorderableIconLayout::areTherePendingReorderAnimations ( )
virtual
qint32 ReorderableIconLayout::calculateAndSetHorizontalSpaceParameters ( )
protectedvirtual
void ReorderableIconLayout::cancelAllReorder ( )
virtual
bool ReorderableIconLayout::commitPending ( )
virtual
void ReorderableIconLayout::commitPendingImmediately ( )
virtual
bool ReorderableIconLayout::commitTracked ( const QUuid &  iconUid)
virtual
bool ReorderableIconLayout::commitTracked ( const QUuid &  iconUid,
const QPoint &  lastGridCoord 
)
virtual
void ReorderableIconLayout::commitTrackedImmediately ( const QUuid &  iconUid)
virtual
void ReorderableIconLayout::commitTrackedImmediately ( const QUuid &  iconUid,
const QPoint &  lastGridCoord 
)
virtual
void ReorderableIconLayout::dbg_reorderFSMStateEntered ( )
protectedvirtualslot
void ReorderableIconLayout::destroyAllRows ( )
protectedvirtual
void ReorderableIconLayout::disableAutoPaint ( )
virtual

Reimplemented from IconLayout.

void ReorderableIconLayout::enableAutoPaint ( )
virtual

Reimplemented from IconLayout.

bool ReorderableIconLayout::executeOpList ( QList< IconOperation > &  opList)
virtual
IconCell * ReorderableIconLayout::findIconByUid ( const QUuid &  iconUid,
QPoint &  r_gridCoordinate,
bool  includePendingIconsInCells = false 
)
virtual
IconBase * ReorderableIconLayout::getTrackedIconByUid ( const QUuid &  trackedIconUid)
virtual
IconCell * ReorderableIconLayout::iconCellAtGridCoordinate ( const QPoint &  gridCoordinate)
virtual
IconCell * ReorderableIconLayout::iconCellAtLayoutCoordinate ( const QPointF &  coordinate)
virtual

Reimplemented from IconLayout.

IconCell * ReorderableIconLayout::iconCellAtLayoutCoordinate ( const QPointF &  layoutCoordinate,
QPoint &  r_gridCoordinate 
)
virtual

Reimplemented from IconLayout.

void ReorderableIconLayout::iconCellReleaseIcon ( const QPoint &  cellCoordinate)
virtual

Reimplemented from IconLayout.

QList< IconCell * > ReorderableIconLayout::iconCellsInFlowOrder ( )
virtual

Reimplemented from IconLayout.

bool ReorderableIconLayout::initializePendingCellListFromOpList ( QList< IconOperation > &  opList)
virtual
void ReorderableIconLayout::initLayoutFromSequentialIconList ( ReorderableIconLayout layout,
const IconList  iconList 
)
static

START THE LAYOUT

bool ReorderableIconLayout::isReorderStateConsistent ( ) const
protectedvirtual

can't be sure of state w/o the FSM

QPoint ReorderableIconLayout::lastOccupiedGridPosition ( ) const
virtual
bool ReorderableIconLayout::lastTrackedPosition ( const QUuid &  iconUid,
QPoint &  r_lastGridCoord 
)
virtual
bool ReorderableIconLayout::layoutCoordinateForGridCoordinate ( const QPoint &  gridCoordinate,
QPointF &  r_layoutCoordinate 
)
virtual
QPoint ReorderableIconLayout::nextAppendGridPosition ( ) const
virtual
QList< IconOperation > ReorderableIconLayout::opListForMove ( const QPoint &  sourceColumnRow,
const QPoint &  destColumnRow 
)
virtual
void ReorderableIconLayout::paint ( QPainter *  painter)
virtual

Reimplemented from IconLayout.

void ReorderableIconLayout::paint ( QPainter *  painter,
const QRectF &  sourceRect 
)
virtual

Reimplemented from IconLayout.

void ReorderableIconLayout::paint ( QPainter *  painter,
const QRectF &  sourceRect,
qint32  renderOpt 
)
virtual

Reimplemented from IconLayout.

void ReorderableIconLayout::paint ( const QPointF &  translate,
QPainter *  painter 
)
virtual

Reimplemented from IconLayout.

void ReorderableIconLayout::paintOffscreen ( QPainter *  painter)
virtual

Reimplemented from IconLayout.

void ReorderableIconLayout::paintOffscreen ( PixmapObject p_pmo)
virtual

Reimplemented from IconLayout.

void ReorderableIconLayout::paintOffscreen ( PixmapHugeObject p_hugePmo)
virtual

Reimplemented from IconLayout.

void ReorderableIconLayout::relayout ( bool  force = false)
virtual

Reimplemented from IconLayout.

void ReorderableIconLayout::relayoutExisting ( )
protectedvirtual
bool ReorderableIconLayout::removeIconCell ( const QPoint &  gridCoordinate)
virtual

ugh, horrible! go check code - something is seriously wrong!

void ReorderableIconLayout::resetLayoutRowSpacingToDefaultSettings ( )
virtual
void ReorderableIconLayout::resizeWidth ( const quint32  w)
virtual

Reimplemented from IconLayout.

QRectF ReorderableIconLayout::rowArea ( quint32  rowIndex) const
virtual

Reimplemented from IconLayout.

qint32 ReorderableIconLayout::rowAtLayoutCoordinate ( const QPointF &  layoutCoordinate,
bool  clipMinMax = false 
)
virtual

Reimplemented from IconLayout.

qint32 ReorderableIconLayout::rowAtLayoutCoordinateFuzzy ( const QPointF &  layoutCoordinate,
bool  clipMinMax = false 
)
virtual
void ReorderableIconLayout::setLayoutRowSpacing ( const qreal  interRowSpace,
const quint32  anchorRowNum = 0 
)
virtual
void ReorderableIconLayout::setPosition ( const QPointF &  pos)
virtual

Reimplemented from IconLayout.

void ReorderableIconLayout::setUniformCellSize ( const QSize &  size)
virtual

Reimplemented from IconLayout.

void ReorderableIconLayout::setupReorderFSM ( )
protectedvirtual
void ReorderableIconLayout::signalFSMLastTrackEndedTrigger ( )
signal
void ReorderableIconLayout::signalFSMReorderEnded_Trigger ( )
signal
void ReorderableIconLayout::signalFSMReorderStarted_Trigger ( )
signal
void ReorderableIconLayout::signalFSMTrackEnded_Trigger ( )
signal
void ReorderableIconLayout::signalFSMTrackStarted_Trigger ( )
signal
void ReorderableIconLayout::signalReorderEnded ( )
signal
void ReorderableIconLayout::signalReorderStarted ( )
signal
void ReorderableIconLayout::slotReorderAnimationsFinished ( )
protectedvirtualslot

protected Q_SLOTS:

void ReorderableIconLayout::slotTrackedIconReplacementAnimationFinished ( )
protectedvirtualslot
void ReorderableIconLayout::slotTrackForIconEnded ( )
protectedvirtualslot
void ReorderableIconLayout::startReorderFSM ( )
protectedvirtual
IconBase * ReorderableIconLayout::startTrackingIcon ( const QPoint &  gridCoord,
bool  includePendingIconsInCells = false 
)
virtual
bool ReorderableIconLayout::startTrackingIcon ( IconBase p_icon,
QPoint &  r_gridCoord 
)
virtual
IconBase * ReorderableIconLayout::startTrackingIconFromTransfer ( const QPoint &  gridCoord,
IconBase iconTracked 
)
virtual
void ReorderableIconLayout::stopReorderFSM ( )
protectedvirtual
void ReorderableIconLayout::stopTrackingAll ( )
virtual
void ReorderableIconLayout::stopTrackingIcon ( IconBase p_icon)
virtual
void ReorderableIconLayout::switchIconsToNormalGraphics ( )
protectedvirtual
void ReorderableIconLayout::switchIconsToReorderGraphics ( )
protectedvirtual
void ReorderableIconLayout::switchIconToNormalGraphics ( IconCell p_iconCell)
protectedvirtual
void ReorderableIconLayout::switchIconToNormalGraphics ( IconBase p_icon)
protectedvirtual
void ReorderableIconLayout::switchIconToReorderGraphics ( IconCell p_iconCell)
protectedvirtual
void ReorderableIconLayout::switchIconToReorderGraphics ( IconBase p_icon)
protectedvirtual
bool ReorderableIconLayout::trackedIconLeavingLayout ( const QUuid &  trackedIconUid)
virtual
bool ReorderableIconLayout::trackedIconMovedTo ( IconBase p_icon,
const QPoint &  gridCoord,
QPoint &  r_newGridCoord 
)
virtual

Friends And Related Function Documentation

QDataStream& operator<< ( QDataStream &  stream,
const ReorderableIconLayout s 
)
friend


QDebug operator<< ( QDebug  dbg,
const ReorderableIconLayout s 
)
friend
QDataStream& operator>> ( QDataStream &  stream,
ReorderableIconLayout s 
)
friend
friend class ReorderablePage
friend

Member Data Documentation

quint32 ReorderableIconLayout::m_anchorRow
protected


bool ReorderableIconLayout::m_disabledAutoPaint
protected
quint32 ReorderableIconLayout::m_horizIconSpacing
protected
qint32 ReorderableIconLayout::m_horizIconSpacingAdjust
protected
QSize ReorderableIconLayout::m_iconCellSize
protected
IconRowList ReorderableIconLayout::m_iconRows
protected
quint32 ReorderableIconLayout::m_interRowSpace
protected
quint64 ReorderableIconLayout::m_lastTimeUsed
protected
QSize ReorderableIconLayout::m_layoutSizeInPixels
protected
bool ReorderableIconLayout::m_layoutSync
protected
quint32 ReorderableIconLayout::m_leftMarginForRows
protected
quint64 ReorderableIconLayout::m_listIdInUse
protected
quint32 ReorderableIconLayout::m_magFactor
protected
quint32 ReorderableIconLayout::m_maxIconsPerRow
protected
quint32 ReorderableIconLayout::m_maxVelocityForSampling
protected
quint32 ReorderableIconLayout::m_maxWidthForRows
protected
QState* ReorderableIconLayout::m_p_fsmStateConsistent
protected
QState* ReorderableIconLayout::m_p_fsmStateReorderPending
protected
QState* ReorderableIconLayout::m_p_fsmStateReorderPendingAndTrackedFloating
protected
QState* ReorderableIconLayout::m_p_fsmStateTrackedFloating
protected
QStateMachine* ReorderableIconLayout::m_p_reorderFSM
protected
QPointer<QAnimationGroup> ReorderableIconLayout::m_qp_reorderAnimationGroup
protected
quint32 ReorderableIconLayout::m_relayoutCount
protected
quint32 ReorderableIconLayout::m_reorderEventSampleRate
protected
QList<QPointer<IconCell> > ReorderableIconLayout::m_reorderPendingCellList
protected
quint64 ReorderableIconLayout::m_timeNormalizationUnit
protected
quint32 ReorderableIconLayout::m_topMarginForRows
protected
QMap<QUuid,QPointer<IconReorderAnimation> > ReorderableIconLayout::m_trackedIconAnimations
protected
QMap<QUuid,QPoint> ReorderableIconLayout::m_trackedIconLastPosition
protected
bool ReorderableIconLayout::m_usingReorderModeGraphics
protected
const char * ReorderableIconLayout::ReorderFSMPropertyName_isConsistent = "isConsistent"
staticprotected

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