Commit 0e267a55 authored by Ulf Hermann's avatar Ulf Hermann Committed by Kai Koehne
Browse files

Timeline: Clean up TimelineAbstractRenderer



Don't include things twice and don't signal const TimelineModel where
it isn't const. Also, allow creation of renderers without using the
private class.

Change-Id: I1c46d75c6abf1f38731dde6f4f3ebe8f5af2ad08
Reviewed-by: default avatarKai Koehne <kai.koehne@theqtcompany.com>
parent 9bcf730f
......@@ -60,6 +60,11 @@ void TimelineAbstractRenderer::setSelectedItem(int itemIndex)
}
}
TimelineAbstractRenderer::TimelineAbstractRenderer(QQuickItem *parent) : QQuickItem(parent),
d_ptr(new TimelineAbstractRendererPrivate)
{
}
bool TimelineAbstractRenderer::selectionLocked() const
{
Q_D(const TimelineAbstractRenderer);
......
......@@ -36,7 +36,6 @@
#include "timelinenotesmodel.h"
#include "timelinerenderpass.h"
#include <QQuickItem>
#include <QSGTransformNode>
#include <QQuickItem>
......@@ -55,6 +54,8 @@ class TIMELINE_EXPORT TimelineAbstractRenderer : public QQuickItem
Q_PROPERTY(int selectedItem READ selectedItem WRITE setSelectedItem NOTIFY selectedItemChanged)
public:
TimelineAbstractRenderer(QQuickItem *parent = 0);
bool selectionLocked() const;
int selectedItem() const;
......@@ -72,7 +73,7 @@ public:
bool rowHeightsDirty() const;
signals:
void modelChanged(const TimelineModel *model);
void modelChanged(TimelineModel *model);
void notesChanged(TimelineNotesModel *notes);
void zoomerChanged(TimelineZoomControl *zoomer);
void selectionLockedChanged(bool locked);
......
......@@ -35,7 +35,7 @@
namespace Timeline {
class TimelineAbstractRenderer::TimelineAbstractRendererPrivate {
class TIMELINE_EXPORT TimelineAbstractRenderer::TimelineAbstractRendererPrivate {
public:
TimelineAbstractRendererPrivate();
......@@ -50,8 +50,6 @@ public:
bool notesDirty;
QList<const TimelineRenderPass *> renderPasses;
};
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment