2 #ifndef __libquark_gui_QuadTreeModel_hxx 3 #define __libquark_gui_QuadTreeModel_hxx 92 QList<T *>
items()
const;
98 bool addItemToNode(Node *node, T *item);
99 bool removeItemFromNode(Node *node, T *item);
100 void findItemsInRegionAtNode(Node *node,
const QRect ®ion,
101 QList<T *> &list)
const;
102 T *itemAtPointInNode(Node *node,
const QPoint &point)
const;
104 static bool lessThan(
const T *a,
const T *b);
110 #include <quark/QuadTreeModelImpl.h++> 115 #endif __libquark_gui_QuadTreeModel_hxx QuadTreeModel(const QRect ®ion, uint maxItemsPerQuad=1)
Constructs a new QuadTreeModel with the given range and density.
A non-parameterized abstract base class for quad-tree models.
Definition: QuadTreeModelBase.h++:17
T * itemAtLocation(const QPoint &location) const
Returns the item at the given location in the model.
virtual ~QuadTreeModel()
Destructor.
bool removeItem(T *item)
Removes an item from the model.
QList< T * > itemsInRegion(const QRect ®ion) const
Returns a list of all items in the model that are within the given region.
QRect region() const
Returns the region covered by this model.
Definition: QuadTreeModelBase.h++:27
void updateItem(T *item)
Notifies the model that the given item has changed.
void clear()
Removes all items from the model.
Definition: BarChartView.h++:6
bool addItem(T *item)
Adds an item to the model.
An abstract implementation of a quad-tree data model.
Definition: QuadTreeModel.h++:28
QList< T * > items() const
Returns all of the items in the model.