HomeWindow chart move/drop

The previous commit enabling tile 'bumping' as
you move them around proved impractical with
charts that largely filled the screen.

This patch replaces this approach (original code
is retained though) by using a 'cursor' to show
where charts will be dropped / moved to and moving
or dropping to this position.

This means the layout code is complete, except for
potentially adding support for multiple layouts (e.g.
have saved layouts for different purposes like
LTM charts for last 6 months or 28 days or an
agenda view that shows past week next week calendar).
This commit is contained in:
Mark Liversedge
2011-01-09 18:47:02 +00:00
parent 8d3beaa3fb
commit 2ee04838ad
6 changed files with 225 additions and 12 deletions

View File

@@ -43,6 +43,12 @@ void GcWindowLayout::addItem(QLayoutItem *item)
itemList.append(item);
}
void GcWindowLayout::insert(int index, QWidget *widget)
{
addChildWidget(widget);
itemList.insert(index, new QWidgetItem(widget));
}
int GcWindowLayout::horizontalSpacing() const
{
if (m_hSpace >= 0) {