Dive pictures: remove close-button optimization

One close-button object was used for all dive pictures. This seems
like a brittle premature optimization and the pixmap is shared
anyway. Make the button a subobject of the dive picture object.

Change the object-hierarchy to be based on QGraphicsItem instead
of QObject. The QObject here is only used as a kludge to support
signals and properties (the latter are necessary for animations).

Remove a comment, which does not seem to be relevant after this
change.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-03-04 01:01:52 +01:00 committed by Dirk Hohndel
parent e811c7306d
commit 630862971f
4 changed files with 37 additions and 53 deletions

View file

@ -12,7 +12,7 @@
extern struct ev_select *ev_namelist;
extern int evn_used;
DiveEventItem::DiveEventItem(QObject *parent) : DivePixmapItem(parent),
DiveEventItem::DiveEventItem(QGraphicsItem *parent) : DivePixmapItem(parent),
vAxis(NULL),
hAxis(NULL),
dataModel(NULL),