forked from qt-creator/qt-creator
Adapt to single category per model
Change-Id: I0af479f2405a9c71602b9635e8e8ec4b1bcb9554 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
@@ -93,10 +93,9 @@ PixmapCacheModel::PixmapCacheModel(QObject *parent)
|
||||
d->maxCacheSize = 1;
|
||||
}
|
||||
|
||||
int PixmapCacheModel::categoryDepth(int categoryIndex) const
|
||||
int PixmapCacheModel::rowCount() const
|
||||
{
|
||||
Q_D(const PixmapCacheModel);
|
||||
Q_UNUSED(categoryIndex);
|
||||
if (isEmpty())
|
||||
return 1;
|
||||
if (d->expanded)
|
||||
@@ -145,10 +144,9 @@ QString getFilenameOnly(QString absUrl)
|
||||
return absUrl;
|
||||
}
|
||||
|
||||
const QVariantList PixmapCacheModel::getLabelsForCategory(int category) const
|
||||
const QVariantList PixmapCacheModel::getLabels() const
|
||||
{
|
||||
Q_D(const PixmapCacheModel);
|
||||
Q_UNUSED(category);
|
||||
QVariantList result;
|
||||
|
||||
if (d->expanded && !isEmpty()) {
|
||||
|
@@ -55,14 +55,14 @@ public:
|
||||
|
||||
PixmapCacheModel(QObject *parent = 0);
|
||||
|
||||
Q_INVOKABLE int categoryDepth(int categoryIndex) const;
|
||||
int rowCount() const;
|
||||
|
||||
int getEventRow(int index) const;
|
||||
Q_INVOKABLE int getEventId(int index) const;
|
||||
Q_INVOKABLE QColor getColor(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;
|
||||
|
||||
|
@@ -69,9 +69,8 @@ SceneGraphTimelineModel::SceneGraphTimelineModel(QObject *parent)
|
||||
{
|
||||
}
|
||||
|
||||
int SceneGraphTimelineModel::categoryDepth(int categoryIndex) const
|
||||
int SceneGraphTimelineModel::rowCount() const
|
||||
{
|
||||
Q_UNUSED(categoryIndex);
|
||||
if (isEmpty())
|
||||
return 1;
|
||||
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_UNUSED(category);
|
||||
QVariantList result;
|
||||
|
||||
if (d->expanded && !isEmpty()) {
|
||||
|
@@ -43,13 +43,13 @@ public:
|
||||
|
||||
SceneGraphTimelineModel(QObject *parent = 0);
|
||||
|
||||
Q_INVOKABLE int categoryDepth(int categoryIndex) const;
|
||||
int rowCount() const;
|
||||
|
||||
int getEventRow(int index) const;
|
||||
Q_INVOKABLE int getEventId(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;
|
||||
|
||||
|
Reference in New Issue
Block a user