Adapt to single category per model

Change-Id: I0af479f2405a9c71602b9635e8e8ec4b1bcb9554
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Ulf Hermann
2014-06-12 13:27:41 +02:00
parent 3c5b2dd704
commit c83e2cb3eb
4 changed files with 8 additions and 12 deletions

View File

@@ -93,10 +93,9 @@ PixmapCacheModel::PixmapCacheModel(QObject *parent)
d->maxCacheSize = 1; d->maxCacheSize = 1;
} }
int PixmapCacheModel::categoryDepth(int categoryIndex) const int PixmapCacheModel::rowCount() const
{ {
Q_D(const PixmapCacheModel); Q_D(const PixmapCacheModel);
Q_UNUSED(categoryIndex);
if (isEmpty()) if (isEmpty())
return 1; return 1;
if (d->expanded) if (d->expanded)
@@ -145,10 +144,9 @@ QString getFilenameOnly(QString absUrl)
return absUrl; return absUrl;
} }
const QVariantList PixmapCacheModel::getLabelsForCategory(int category) const const QVariantList PixmapCacheModel::getLabels() const
{ {
Q_D(const PixmapCacheModel); Q_D(const PixmapCacheModel);
Q_UNUSED(category);
QVariantList result; QVariantList result;
if (d->expanded && !isEmpty()) { if (d->expanded && !isEmpty()) {

View File

@@ -55,14 +55,14 @@ public:
PixmapCacheModel(QObject *parent = 0); PixmapCacheModel(QObject *parent = 0);
Q_INVOKABLE int categoryDepth(int categoryIndex) const; int rowCount() const;
int getEventRow(int index) const; int getEventRow(int index) const;
Q_INVOKABLE int getEventId(int index) const; Q_INVOKABLE int getEventId(int index) const;
Q_INVOKABLE QColor getColor(int index) const; Q_INVOKABLE QColor getColor(int index) const;
Q_INVOKABLE float getHeight(int index) const; Q_INVOKABLE float getHeight(int index) const;
Q_INVOKABLE const QVariantList getLabelsForCategory(int category) const; const QVariantList getLabels() const;
Q_INVOKABLE const QVariantList getEventDetails(int index) const; Q_INVOKABLE const QVariantList getEventDetails(int index) const;

View File

@@ -69,9 +69,8 @@ SceneGraphTimelineModel::SceneGraphTimelineModel(QObject *parent)
{ {
} }
int SceneGraphTimelineModel::categoryDepth(int categoryIndex) const int SceneGraphTimelineModel::rowCount() const
{ {
Q_UNUSED(categoryIndex);
if (isEmpty()) if (isEmpty())
return 1; return 1;
return 3; return 3;
@@ -117,10 +116,9 @@ QString labelForSGType(int t)
} }
} }
const QVariantList SceneGraphTimelineModel::getLabelsForCategory(int category) const const QVariantList SceneGraphTimelineModel::getLabels() const
{ {
Q_D(const SceneGraphTimelineModel); Q_D(const SceneGraphTimelineModel);
Q_UNUSED(category);
QVariantList result; QVariantList result;
if (d->expanded && !isEmpty()) { if (d->expanded && !isEmpty()) {

View File

@@ -43,13 +43,13 @@ public:
SceneGraphTimelineModel(QObject *parent = 0); SceneGraphTimelineModel(QObject *parent = 0);
Q_INVOKABLE int categoryDepth(int categoryIndex) const; int rowCount() const;
int getEventRow(int index) const; int getEventRow(int index) const;
Q_INVOKABLE int getEventId(int index) const; Q_INVOKABLE int getEventId(int index) const;
Q_INVOKABLE QColor getColor(int index) const; Q_INVOKABLE QColor getColor(int index) const;
Q_INVOKABLE const QVariantList getLabelsForCategory(int category) const; const QVariantList getLabels() const;
Q_INVOKABLE const QVariantList getEventDetails(int index) const; Q_INVOKABLE const QVariantList getEventDetails(int index) const;