mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-17 01:49:55 +00:00
Interval Sidebar show Interval Color
.. using same kind of decoration as the ride list with a small bar to indicate the chosen color for the interval.
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include <QStyle>
|
||||
#include <QStyleFactory>
|
||||
#include <QScrollBar>
|
||||
#include <QStyledItemDelegate>
|
||||
|
||||
|
||||
IntervalTreeView::IntervalTreeView(Context *context) : context(context)
|
||||
@@ -43,6 +44,9 @@ IntervalTreeView::IntervalTreeView(Context *context) : context(context)
|
||||
setMouseTracking(true);
|
||||
invisibleRootItem()->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
|
||||
|
||||
// we want the color rectangle
|
||||
setItemDelegate(new IntervalColorDelegate(this));
|
||||
|
||||
connect(this, SIGNAL(itemEntered(QTreeWidgetItem*,int)), this, SLOT(mouseHover(QTreeWidgetItem*,int)));
|
||||
}
|
||||
|
||||
@@ -139,3 +143,4 @@ IntervalTreeView::mimeData (const QList<QTreeWidgetItem *> items) const
|
||||
returning->setData("application/x-gc-intervals", rawData);
|
||||
return returning;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user