Added support for showing the Stars on the DiveTable

For the stars on the dive table I had to rework a bit my
StarRating widget, because it used a pixmap for each widget
that were created. Not it uses only 2 pixmaps: the active
and inactive ones.

A new file was created named modeldelegates(h, cpp) that
should hold all delegates of the models. For the GTK / C
folks, a 'Delegate' ia s way to bypass the default behavior
of the view that's displaying the data.

I also added the code to display the stars if no delegate
is set ( good for debugging. )

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
Tomaz Canabrava 2013-04-27 12:27:27 -03:00
parent 1d0d42f861
commit 2f4d6bbe53
9 changed files with 115 additions and 59 deletions

View file

@ -5,6 +5,8 @@
*
*/
#include "divelistview.h"
#include "models.h"
#include "modeldelegates.h"
DiveListView::DiveListView(QWidget *parent) : QTreeView(parent)
{