Plasma
ItemSpace::ItemGroup Class Reference
Represents a group of overlapping items. More...
#include <itemspace.h>
Classes | |
class | Request |
Public Member Functions | |
void | addRequest (ItemSpace *itemSpace, const class Request &request) |
void | applyResults (ItemSpace *itemSpace, int cameFrom) |
void | resetPush (int id) |
Public Attributes | |
QList< ItemSpaceItem > | m_groupItems |
int | m_id |
qreal | m_largestPushRequested |
qreal | m_pushAvailable |
Detailed Description
Represents a group of overlapping items.Definition at line 176 of file itemspace.h.
Member Function Documentation
Post a move request.
This adds the request to the group and calls activate on it.
Definition at line 518 of file itemspace.cpp.
void ItemSpace::ItemGroup::applyResults | ( | ItemSpace * | itemSpace, | |
int | cameFrom | |||
) |
Apply the results of initial push calculation, moving the items.
For each push request belonging to the calling/requesting group, the requesting group is checked for how much it still wants to move itself, and the value is compared to how much it wanted to when the request was posted. The amount of the request is reduced by the difference.
If all requests have been compensated, it updates the amount it would like to move (the maximum of all move requests) and physically moves its items. In that case it also calls applyResults on the item groups it has requested to move, which will see the new push amount. (Otherwise, another requesting group will reach it later on.)
Definition at line 524 of file itemspace.cpp.
void ItemSpace::ItemGroup::resetPush | ( | int | id | ) |
Definition at line 509 of file itemspace.cpp.
Member Data Documentation
Definition at line 253 of file itemspace.h.
Definition at line 256 of file itemspace.h.
Definition at line 258 of file itemspace.h.
Definition at line 260 of file itemspace.h.
The documentation for this class was generated from the following files: