Quark
0.1
|
A non-parameterized abstract base class for quad-tree models. More...
#include <QuadTreeModelBase.h++>
Signals | |
void | dataChanged () |
Emitted when the model has changed in some significant way. More... | |
void | itemAdded (const QPoint &location) |
Emitted when a new item has been added to the model. More... | |
void | itemModified (const QPoint &location) |
Emitted when an item in the model has changed. More... | |
void | itemRemoved (const QPoint &location) |
Emitted when an item has been removed from the model. More... | |
Public Member Functions | |
virtual | ~QuadTreeModelBase () |
Destructor. More... | |
QRect | region () const |
Returns the region covered by this model. More... | |
uint | itemCount () const |
Returns the number of items in the model. More... | |
bool | isEmpty () const |
Tests if the model is empty. More... | |
bool | setVisibleRegion (const QRect &visibleRegion) |
Sets the visible region for the model. More... | |
QRect | visibleRegion () const |
Returns the current visible region. More... | |
Protected Member Functions | |
QuadTreeModelBase (const QRect ®ion, uint maxItemsPerQuad=1) | |
Constructs a QuadTreeModelBase with the given region and density. More... | |
Protected Attributes | |
uint | _maxItemsPerQuad |
QRect | _region |
QRect | _visibleRegion |
uint | _itemCount |
A non-parameterized abstract base class for quad-tree models.
This class should not be subclassed directly.
|
virtual |
Destructor.
|
protected |
Constructs a QuadTreeModelBase with the given region and density.
|
signal |
Emitted when the model has changed in some significant way.
|
inline |
Tests if the model is empty.
|
signal |
Emitted when a new item has been added to the model.
location | The item's location. |
|
inline |
Returns the number of items in the model.
|
signal |
Emitted when an item in the model has changed.
location | The item's location. |
|
signal |
Emitted when an item has been removed from the model.
location | The item's location. |
|
inline |
Returns the region covered by this model.
bool setVisibleRegion | ( | const QRect & | visibleRegion | ) |
Sets the visible region for the model.
When a data item is added to, removed from, or changed in the model, the corresponding notification signal will only be emitted if that item's location was within the visible region.
The | new visible region. |
|
inline |
Returns the current visible region.
|
protected |
|
protected |
|
protected |
|
protected |