OpenWalnut  1.5.0dev
Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | Private Types | Private Slots | Private Member Functions | Private Attributes | List of all members
WQtNetworkItemGrid Class Reference

Implement a virtual grid for placing QGraphicsItems. More...

#include <WQtNetworkItemGrid.h>

+ Inheritance diagram for WQtNetworkItemGrid:
+ Collaboration diagram for WQtNetworkItemGrid:

Public Types

typedef std::shared_ptr< WQtNetworkItemGridSPtr
 Convenience typedef for a std::shared_ptr< WQtNetworkItemGrid >. More...
 
typedef std::shared_ptr< const WQtNetworkItemGridConstSPtr
 Convenience typedef for a std::shared_ptr< const WQtNetworkItemGrid >. More...
 

Public Slots

void blendIn ()
 Allows blending in the underlaying layout structure. More...
 
void blendOut ()
 Allows blending out the underlaying layout structure. More...
 

Signals

void updatedBounds ()
 emitted when the grid shrinks or grows to update scene bounds More...
 

Public Member Functions

 WQtNetworkItemGrid ()
 Default constructor. More...
 
virtual ~WQtNetworkItemGrid ()
 Destructor. More...
 
virtual QRectF boundingRect () const
 The bounding area of the item. More...
 
virtual QRect getGridBoundingRect () const
 Returns the boundaries in grid coordinates. More...
 
void updateDimensions ()
 Update the m_dimensions. More...
 
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
 Paint the item. More...
 
int getFirstFreeColumn () const
 Return the index of the first empty column. More...
 
bool setItem (QGraphicsItem *item, int col, int row)
 Set the specified item to the specified position. More...
 
bool setItem (QGraphicsItem *item, QPoint cell)
 Set the specified item to the specified position. More...
 
void removeItem (int col, int row)
 Remove the item at the given position. More...
 
bool removeItem (QGraphicsItem *item)
 Remove the item from the list. More...
 
bool moveItem (QGraphicsItem *item, int col, int row)
 Move item from its current position to the specified one. More...
 
bool moveItem (QGraphicsItem *item, QPoint cell)
 Move item from its current position to the specified one. More...
 
bool isOccupied (int col, int row)
 Is there an element at the given position? More...
 
bool isOccupied (QPoint cell)
 Is there an element at the given position? More...
 
virtual QPointF mapToWorld (int col, int row)
 Map the grid coordinate to world coordinates. More...
 
virtual QPointF mapToWorld (QPoint gridCoord)
 Map the grid coordinate to world coordinates. More...
 
virtual QRectF mapCellAreaToWorld (QPoint cell)
 Build a rect which covers the cell area in world space. More...
 
virtual QRectF mapCellAreaToWorld (int row, int col)
 Build a rect which covers the cell area in world space. More...
 
virtual QPoint whereIs (QGraphicsItem *item)
 Find the position of the specified item. More...
 
virtual bool isInGrid (QGraphicsItem *item)
 Check whether the item is managed in the grid. More...
 
virtual QPoint findNearestCell (QPointF worldSpace)
 Find the nearest cell matching the specified world coordinates. More...
 
virtual void physicalMoveTo (QGraphicsItem *item, int col, int row, bool animate=true)
 Move the item to the position physically. More...
 
virtual void physicalMoveTo (QGraphicsItem *item, QPoint cell, bool animate)
 Move the item to the position physically. More...
 
void highlightCell (QPoint cell, QColor color)
 Highlights the specified cell. More...
 
void highlightCell ()
 Turns off highlight. More...
 
void disableBoundsUpdate (bool disable=true)
 Allows for temporarily disabling bounds update signal. More...
 

Protected Member Functions

virtual QGraphicsItemat (int col, int row)
 Return the element at the given position. More...
 
virtual QGraphicsItemsetItemImpl (QGraphicsItem *item, int col, int row, bool suppressUpdate=false)
 Really sets the item to the grid position. More...
 
virtual bool removeItemImpl (QGraphicsItem *item, bool suppressUpdate=false)
 Remove the item from the grid if existing. More...
 

Private Types

typedef std::map< QPoint, QGraphicsItem * > Grid
 List of lists of QGraphicsItem. More...
 
typedef std::map< QGraphicsItem *, QPoint > ItemCoordinateMap
 Maps between item and its grid coordinates. More...
 

Private Slots

void animationBlendInTick (qreal value)
 Called when the animation timers tick and progress in timeline. More...
 
void animationBlendOutTick (qreal value)
 Called when the animation timers tick and progress in timeline. More...
 

Private Member Functions

void updateBoundingRect ()
 Use to update bounding box when you modify the m_grid dimensions. More...
 

Private Attributes

Grid m_grid
 The virtual grid. More...
 
ItemCoordinateMap m_gridReverse
 Keeps track of the item coordinates. More...
 
QRect m_dimensions
 The largest number of entries in a column/row. More...
 
QRectF m_bb
 Bounding Rect of the Grid in world coordinates. More...
 
QPoint m_highlightCell
 Current cell to highlight. More...
 
QColor m_highlightColor
 Color of the highlight. More...
 
bool m_highlightCellEnabled
 En/Dis-able highlughting. More...
 
QTimeLine * m_blendInTimer
 Timer used for blend in effects of the grid. More...
 
QTimeLine * m_blendOutTimer
 Timer used for blend in effects of the grid. More...
 
bool m_disableUpdateBounds
 Disable updateBounds signal. More...
 

Detailed Description

Implement a virtual grid for placing QGraphicsItems.

It itself is a QGraphicsItem to allow drawing the grid or parts of the grid.

Note
all coordinates are originating from zero

Definition at line 54 of file WQtNetworkItemGrid.h.

Member Typedef Documentation

◆ ConstSPtr

typedef std::shared_ptr< const WQtNetworkItemGrid > WQtNetworkItemGrid::ConstSPtr

Convenience typedef for a std::shared_ptr< const WQtNetworkItemGrid >.

Definition at line 66 of file WQtNetworkItemGrid.h.

◆ Grid

typedef std::map< QPoint, QGraphicsItem* > WQtNetworkItemGrid::Grid
private

List of lists of QGraphicsItem.

Definition at line 357 of file WQtNetworkItemGrid.h.

◆ ItemCoordinateMap

typedef std::map< QGraphicsItem*, QPoint > WQtNetworkItemGrid::ItemCoordinateMap
private

Maps between item and its grid coordinates.

Definition at line 367 of file WQtNetworkItemGrid.h.

◆ SPtr

typedef std::shared_ptr< WQtNetworkItemGrid > WQtNetworkItemGrid::SPtr

Convenience typedef for a std::shared_ptr< WQtNetworkItemGrid >.

Definition at line 61 of file WQtNetworkItemGrid.h.

Constructor & Destructor Documentation

◆ WQtNetworkItemGrid()

WQtNetworkItemGrid::WQtNetworkItemGrid ( )

Default constructor.

Definition at line 38 of file WQtNetworkItemGrid.cpp.

References animationBlendInTick(), animationBlendOutTick(), m_blendInTimer, and m_blendOutTimer.

+ Here is the call graph for this function:

◆ ~WQtNetworkItemGrid()

WQtNetworkItemGrid::~WQtNetworkItemGrid ( )
virtual

Destructor.

Definition at line 55 of file WQtNetworkItemGrid.cpp.

References m_blendInTimer, and m_blendOutTimer.

Member Function Documentation

◆ animationBlendInTick

void WQtNetworkItemGrid::animationBlendInTick ( qreal  value)
privateslot

Called when the animation timers tick and progress in timeline.

Used to blend the item in.

Parameters
valuethe value between 0 and 1

Definition at line 462 of file WQtNetworkItemGrid.cpp.

Referenced by WQtNetworkItemGrid().

+ Here is the caller graph for this function:

◆ animationBlendOutTick

void WQtNetworkItemGrid::animationBlendOutTick ( qreal  value)
privateslot

Called when the animation timers tick and progress in timeline.

Used to blend the item out.

Parameters
valuethe value between 0 and 1

Definition at line 467 of file WQtNetworkItemGrid.cpp.

Referenced by WQtNetworkItemGrid().

+ Here is the caller graph for this function:

◆ at()

QGraphicsItem * WQtNetworkItemGrid::at ( int  col,
int  row 
)
protectedvirtual

Return the element at the given position.

If the position is invalid, NULL is returned.

Parameters
colthe column ( x coordinate )
rowthe row ( y coordinate )
Returns
the item or NULL if not valid

Definition at line 240 of file WQtNetworkItemGrid.cpp.

References m_grid.

Referenced by isOccupied().

+ Here is the caller graph for this function:

◆ blendIn

void WQtNetworkItemGrid::blendIn ( )
slot

Allows blending in the underlaying layout structure.

Definition at line 426 of file WQtNetworkItemGrid.cpp.

References m_blendInTimer, and m_blendOutTimer.

Referenced by WQtNetworkSceneLayout::blendIn().

+ Here is the caller graph for this function:

◆ blendOut

void WQtNetworkItemGrid::blendOut ( )
slot

Allows blending out the underlaying layout structure.

Definition at line 444 of file WQtNetworkItemGrid.cpp.

References m_blendInTimer, and m_blendOutTimer.

Referenced by WQtNetworkSceneLayout::blendOut().

+ Here is the caller graph for this function:

◆ boundingRect()

QRectF WQtNetworkItemGrid::boundingRect ( ) const
virtual

The bounding area of the item.

Returns
the bounding rect

Definition at line 62 of file WQtNetworkItemGrid.cpp.

References m_bb.

Referenced by WQtNetworkSceneLayout::getBoundingBox(), and paint().

+ Here is the caller graph for this function:

◆ disableBoundsUpdate()

void WQtNetworkItemGrid::disableBoundsUpdate ( bool  disable = true)

Allows for temporarily disabling bounds update signal.

This is needed sometimes, where bounds are updated during another Qt event, causing the update event again, causing the Qt event again, causing the update event again, segfault.

Note
Always remember to enable again.
Parameters
disabletrue to disable.

Definition at line 472 of file WQtNetworkItemGrid.cpp.

References m_disableUpdateBounds.

Referenced by WQtNetworkItem::mouseMoveEvent().

+ Here is the caller graph for this function:

◆ findNearestCell()

QPoint WQtNetworkItemGrid::findNearestCell ( QPointF  worldSpace)
virtual

Find the nearest cell matching the specified world coordinates.

Parameters
worldSpacethe coordinates to find the next cell for.
Returns
cell coordinates

Definition at line 394 of file WQtNetworkItemGrid.cpp.

Referenced by WQtNetworkSceneLayout::snapAccept(), and WQtNetworkSceneLayout::snapTemporarily().

+ Here is the caller graph for this function:

◆ getFirstFreeColumn()

int WQtNetworkItemGrid::getFirstFreeColumn ( ) const

Return the index of the first empty column.

Returns
the index

Definition at line 295 of file WQtNetworkItemGrid.cpp.

References m_dimensions.

Referenced by WQtNetworkSceneLayout::addItem(), and WQtNetworkEditorProjectFileIO::done().

+ Here is the caller graph for this function:

◆ getGridBoundingRect()

QRect WQtNetworkItemGrid::getGridBoundingRect ( ) const
virtual

Returns the boundaries in grid coordinates.

If you need world coords, use boundingRect instead.

Returns
the grid bounds

Definition at line 477 of file WQtNetworkItemGrid.cpp.

References m_dimensions.

Referenced by WQtNetworkEditorProjectFileIO::save().

+ Here is the caller graph for this function:

◆ highlightCell() [1/2]

void WQtNetworkItemGrid::highlightCell ( )

Turns off highlight.

Definition at line 417 of file WQtNetworkItemGrid.cpp.

References m_highlightCellEnabled, and updateBoundingRect().

+ Here is the call graph for this function:

◆ highlightCell() [2/2]

void WQtNetworkItemGrid::highlightCell ( QPoint  cell,
QColor  color 
)

Highlights the specified cell.

Note that only one cell can be highlighted. If you call this method with another cell, the old highlight fades out.

Parameters
cellthe cell to highlight
colorthe color of the highlight

Definition at line 404 of file WQtNetworkItemGrid.cpp.

References m_highlightCell, m_highlightCellEnabled, m_highlightColor, and updateBoundingRect().

Referenced by WQtNetworkSceneLayout::snapAccept(), and WQtNetworkSceneLayout::snapTemporarily().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isInGrid()

bool WQtNetworkItemGrid::isInGrid ( QGraphicsItem item)
virtual

Check whether the item is managed in the grid.

Parameters
itemthe item
Returns
true if managed

Definition at line 333 of file WQtNetworkItemGrid.cpp.

References m_gridReverse.

Referenced by WQtNetworkEditorProjectFileIO::save().

+ Here is the caller graph for this function:

◆ isOccupied() [1/2]

bool WQtNetworkItemGrid::isOccupied ( int  col,
int  row 
)

Is there an element at the given position?

Parameters
colthe column ( x coordinate )
rowthe row ( y coordinate )
Returns
true if there is an item already

Definition at line 230 of file WQtNetworkItemGrid.cpp.

References at().

Referenced by WQtNetworkSceneLayout::connection(), isOccupied(), moveItem(), setItem(), and WQtNetworkSceneLayout::snapTemporarily().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isOccupied() [2/2]

bool WQtNetworkItemGrid::isOccupied ( QPoint  cell)

Is there an element at the given position?

Parameters
cellthe cell
Returns
true if there is an item already

Definition at line 235 of file WQtNetworkItemGrid.cpp.

References isOccupied().

+ Here is the call graph for this function:

◆ mapCellAreaToWorld() [1/2]

QRectF WQtNetworkItemGrid::mapCellAreaToWorld ( int  row,
int  col 
)
virtual

Build a rect which covers the cell area in world space.

Parameters
rowthe row
colthe col
Returns
the rect covering the cell

Definition at line 312 of file WQtNetworkItemGrid.cpp.

References mapToWorld().

+ Here is the call graph for this function:

◆ mapCellAreaToWorld() [2/2]

QRectF WQtNetworkItemGrid::mapCellAreaToWorld ( QPoint  cell)
virtual

Build a rect which covers the cell area in world space.

Parameters
cellthe cell to create the rect for
Returns
the rect covering the cell

Definition at line 318 of file WQtNetworkItemGrid.cpp.

Referenced by paint().

+ Here is the caller graph for this function:

◆ mapToWorld() [1/2]

QPointF WQtNetworkItemGrid::mapToWorld ( int  col,
int  row 
)
virtual

Map the grid coordinate to world coordinates.

Parameters
colthe column ( x coordinate )
rowthe row ( y coordinate )
Returns
the top,left corner of the grid box

Definition at line 301 of file WQtNetworkItemGrid.cpp.

Referenced by mapCellAreaToWorld(), mapToWorld(), and physicalMoveTo().

+ Here is the caller graph for this function:

◆ mapToWorld() [2/2]

QPointF WQtNetworkItemGrid::mapToWorld ( QPoint  gridCoord)
virtual

Map the grid coordinate to world coordinates.

Parameters
gridCoordthe grid coordinates
Returns
the world coords

Definition at line 307 of file WQtNetworkItemGrid.cpp.

References mapToWorld().

+ Here is the call graph for this function:

◆ moveItem() [1/2]

bool WQtNetworkItemGrid::moveItem ( QGraphicsItem item,
int  col,
int  row 
)

Move item from its current position to the specified one.

If the item does not exist right now, it will get moved from its current position. If the target position is occupied right now, nothing happens and false will be returned.

Parameters
itemthe item
coltarget columns
rowtarget row
Returns
true if successful. False if the target was occupied.

Definition at line 202 of file WQtNetworkItemGrid.cpp.

References isOccupied(), physicalMoveTo(), removeItemImpl(), setItemImpl(), and updateDimensions().

Referenced by WQtNetworkSceneLayout::connection(), moveItem(), and WQtNetworkSceneLayout::snapAccept().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ moveItem() [2/2]

bool WQtNetworkItemGrid::moveItem ( QGraphicsItem item,
QPoint  cell 
)

Move item from its current position to the specified one.

If the item does not exist right now, it will get moved from its current position. If the target position is occupied right now, nothing happens and false will be returned.

Parameters
itemthe item
celltarget cell
Returns
true if successful. False if the target was occupied.

Definition at line 225 of file WQtNetworkItemGrid.cpp.

References moveItem().

+ Here is the call graph for this function:

◆ paint()

void WQtNetworkItemGrid::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget 
)
virtual

Paint the item.

Parameters
painterimplements drawing commands
optionprovides style options for the item, such as its state, exposed area and its level-of-detail hints
widgetthe widget on which is painted. Can be NULL.

Definition at line 96 of file WQtNetworkItemGrid.cpp.

References boundingRect(), m_highlightCell, m_highlightCellEnabled, m_highlightColor, and mapCellAreaToWorld().

+ Here is the call graph for this function:

◆ physicalMoveTo() [1/2]

void WQtNetworkItemGrid::physicalMoveTo ( QGraphicsItem item,
int  col,
int  row,
bool  animate = true 
)
virtual

Move the item to the position physically.

This does not modify the grid. It only moves the QGraphicsItem in the scene.

Parameters
rowtarget row
coltarget col
animateif true, the item uses its build in animations
itemitem to move

Definition at line 143 of file WQtNetworkItemGrid.cpp.

References WQtNetworkItem::animatedMoveTo(), mapToWorld(), and WQtNetworkItem::moveTo().

Referenced by moveItem(), physicalMoveTo(), setItem(), WQtNetworkSceneLayout::snapAccept(), and WQtNetworkSceneLayout::snapTemporarily().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ physicalMoveTo() [2/2]

void WQtNetworkItemGrid::physicalMoveTo ( QGraphicsItem item,
QPoint  cell,
bool  animate 
)
virtual

Move the item to the position physically.

This does not modify the grid. It only moves the QGraphicsItem in the scene.

Parameters
celltarget cell
animateif true, the item uses its build in animations
itemitem to move

Definition at line 165 of file WQtNetworkItemGrid.cpp.

References physicalMoveTo().

+ Here is the call graph for this function:

◆ removeItem() [1/2]

void WQtNetworkItemGrid::removeItem ( int  col,
int  row 
)

Remove the item at the given position.

Parameters
colthe column ( x coordinate )
rowthe row ( y coordinate )

Definition at line 192 of file WQtNetworkItemGrid.cpp.

References m_grid, and removeItemImpl().

Referenced by WQtNetworkSceneLayout::removeItem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeItem() [2/2]

bool WQtNetworkItemGrid::removeItem ( QGraphicsItem item)

Remove the item from the list.

Parameters
itemthe item
Returns
true if found and removed.

Definition at line 197 of file WQtNetworkItemGrid.cpp.

References removeItemImpl().

+ Here is the call graph for this function:

◆ removeItemImpl()

bool WQtNetworkItemGrid::removeItemImpl ( QGraphicsItem item,
bool  suppressUpdate = false 
)
protectedvirtual

Remove the item from the grid if existing.

Parameters
itemitem to remove
suppressUpdateif true, the call will not call updateDimensionsRemove. Useful when using this method in another, more complex operation.
Returns
true if something was removed. False if the item is not in the grid.

Definition at line 269 of file WQtNetworkItemGrid.cpp.

References m_grid, m_gridReverse, and updateDimensions().

Referenced by moveItem(), and removeItem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setItem() [1/2]

bool WQtNetworkItemGrid::setItem ( QGraphicsItem item,
int  col,
int  row 
)

Set the specified item to the specified position.

Parameters
itemthe item to set
colthe column ( x coordinate )
rowthe row ( y coordinate )
Returns
false if there already is an element

Definition at line 170 of file WQtNetworkItemGrid.cpp.

References isOccupied(), physicalMoveTo(), and setItemImpl().

Referenced by WQtNetworkSceneLayout::addItem(), and setItem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setItem() [2/2]

bool WQtNetworkItemGrid::setItem ( QGraphicsItem item,
QPoint  cell 
)

Set the specified item to the specified position.

Parameters
itemthe item to set
cellthe column ( x coordinate )
Returns
false if there already is an element

Definition at line 187 of file WQtNetworkItemGrid.cpp.

References setItem().

+ Here is the call graph for this function:

◆ setItemImpl()

QGraphicsItem * WQtNetworkItemGrid::setItemImpl ( QGraphicsItem item,
int  col,
int  row,
bool  suppressUpdate = false 
)
protectedvirtual

Really sets the item to the grid position.

Ignores previous items. You should manage any previous existing item at that grid position for yourself.

Parameters
itemthe item
colthe column ( x coordinate )
rowthe row ( y coordinate )
suppressUpdateif true, the call will not call updateDimensionsAdd. Useful when using this method in another, more complex operation.
Returns
the previous item at this position, or NULL if there was none.

Definition at line 250 of file WQtNetworkItemGrid.cpp.

References m_grid, m_gridReverse, and updateDimensions().

Referenced by moveItem(), and setItem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateBoundingRect()

void WQtNetworkItemGrid::updateBoundingRect ( )
private

Use to update bounding box when you modify the m_grid dimensions.

Definition at line 67 of file WQtNetworkItemGrid.cpp.

References m_bb, m_dimensions, m_disableUpdateBounds, m_highlightCell, m_highlightCellEnabled, and updatedBounds().

Referenced by highlightCell(), and updateDimensions().

+ Here is the caller graph for this function:

◆ updatedBounds

void WQtNetworkItemGrid::updatedBounds ( )
signal

emitted when the grid shrinks or grows to update scene bounds

Referenced by updateBoundingRect().

+ Here is the caller graph for this function:

◆ updateDimensions()

void WQtNetworkItemGrid::updateDimensions ( )

Update the m_dimensions.

This method rebuilds the bounding area of the grid by re-reading all items in the grid. This is useful, whenever you do a lot of complex operations while suppressing all updates. Then use this method to force a complete update of the dimensions.

Definition at line 339 of file WQtNetworkItemGrid.cpp.

References m_dimensions, m_grid, and updateBoundingRect().

Referenced by moveItem(), removeItemImpl(), and setItemImpl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ whereIs()

QPoint WQtNetworkItemGrid::whereIs ( QGraphicsItem item)
virtual

Find the position of the specified item.

Parameters
itemitem to search
Returns
QPoint() if not found. Else, the position in grid coordinates.

Definition at line 323 of file WQtNetworkItemGrid.cpp.

References m_gridReverse.

Referenced by WQtNetworkSceneLayout::connection(), WQtNetworkEditorProjectFileIO::save(), WQtNetworkSceneLayout::snapAccept(), and WQtNetworkSceneLayout::snapTemporarily().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_bb

QRectF WQtNetworkItemGrid::m_bb
private

Bounding Rect of the Grid in world coordinates.

Definition at line 382 of file WQtNetworkItemGrid.h.

Referenced by boundingRect(), and updateBoundingRect().

◆ m_blendInTimer

QTimeLine* WQtNetworkItemGrid::m_blendInTimer
private

Timer used for blend in effects of the grid.

Definition at line 407 of file WQtNetworkItemGrid.h.

Referenced by blendIn(), blendOut(), WQtNetworkItemGrid(), and ~WQtNetworkItemGrid().

◆ m_blendOutTimer

QTimeLine* WQtNetworkItemGrid::m_blendOutTimer
private

Timer used for blend in effects of the grid.

Definition at line 412 of file WQtNetworkItemGrid.h.

Referenced by blendIn(), blendOut(), WQtNetworkItemGrid(), and ~WQtNetworkItemGrid().

◆ m_dimensions

QRect WQtNetworkItemGrid::m_dimensions
private

The largest number of entries in a column/row.

Definition at line 377 of file WQtNetworkItemGrid.h.

Referenced by getFirstFreeColumn(), getGridBoundingRect(), updateBoundingRect(), and updateDimensions().

◆ m_disableUpdateBounds

bool WQtNetworkItemGrid::m_disableUpdateBounds
private

Disable updateBounds signal.

Definition at line 417 of file WQtNetworkItemGrid.h.

Referenced by disableBoundsUpdate(), and updateBoundingRect().

◆ m_grid

Grid WQtNetworkItemGrid::m_grid
private

The virtual grid.

Column-first. Means outer list is the list of x coordinates, containing a list of all items in this column.

Definition at line 362 of file WQtNetworkItemGrid.h.

Referenced by at(), removeItem(), removeItemImpl(), setItemImpl(), and updateDimensions().

◆ m_gridReverse

ItemCoordinateMap WQtNetworkItemGrid::m_gridReverse
private

Keeps track of the item coordinates.

Definition at line 372 of file WQtNetworkItemGrid.h.

Referenced by isInGrid(), removeItemImpl(), setItemImpl(), and whereIs().

◆ m_highlightCell

QPoint WQtNetworkItemGrid::m_highlightCell
private

Current cell to highlight.

Definition at line 392 of file WQtNetworkItemGrid.h.

Referenced by highlightCell(), paint(), and updateBoundingRect().

◆ m_highlightCellEnabled

bool WQtNetworkItemGrid::m_highlightCellEnabled
private

En/Dis-able highlughting.

Definition at line 402 of file WQtNetworkItemGrid.h.

Referenced by highlightCell(), paint(), and updateBoundingRect().

◆ m_highlightColor

QColor WQtNetworkItemGrid::m_highlightColor
private

Color of the highlight.

Definition at line 397 of file WQtNetworkItemGrid.h.

Referenced by highlightCell(), and paint().


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