2013-08-08 13:28:08 +02:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2014-01-07 13:27:11 +01:00
|
|
|
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
2013-08-08 13:28:08 +02:00
|
|
|
** Contact: http://www.qt-project.org/legal
|
|
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator.
|
|
|
|
|
**
|
|
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
|
|
|
** a written agreement between you and Digia. For licensing terms and
|
|
|
|
|
** conditions see http://qt.digia.com/licensing. For further information
|
|
|
|
|
** use the contact form at http://qt.digia.com/contact-us.
|
|
|
|
|
**
|
|
|
|
|
** GNU Lesser General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
|
|
|
** General Public License version 2.1 as published by the Free Software
|
|
|
|
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
|
|
|
** packaging of this file. Please review the following information to
|
|
|
|
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
|
|
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
|
|
|
**
|
|
|
|
|
** In addition, as a special exception, Digia gives you certain additional
|
|
|
|
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
|
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef QMLPROFILERTIMELINEMODELPROXY_H
|
|
|
|
|
#define QMLPROFILERTIMELINEMODELPROXY_H
|
|
|
|
|
|
2014-06-12 16:01:04 +02:00
|
|
|
#include "abstracttimelinemodel.h"
|
2013-08-08 13:28:08 +02:00
|
|
|
#include <qmldebug/qmlprofilereventtypes.h>
|
|
|
|
|
#include <qmldebug/qmlprofilereventlocation.h>
|
|
|
|
|
#include <QVariantList>
|
2014-02-18 17:32:20 +01:00
|
|
|
#include "qmlprofilerdatamodel.h"
|
2013-08-08 13:28:08 +02:00
|
|
|
#include <QColor>
|
|
|
|
|
|
|
|
|
|
namespace QmlProfiler {
|
|
|
|
|
class QmlProfilerModelManager;
|
|
|
|
|
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
2014-06-12 16:01:04 +02:00
|
|
|
class RangeTimelineModel : public AbstractTimelineModel
|
2013-08-08 13:28:08 +02:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
struct QmlRangeEventStartInstance {
|
2013-12-04 16:05:02 +01:00
|
|
|
QmlRangeEventStartInstance(int eventId = -1) :
|
|
|
|
|
eventId(eventId),
|
|
|
|
|
displayRowExpanded(QmlDebug::Constants::QML_MIN_LEVEL),
|
|
|
|
|
displayRowCollapsed(QmlDebug::Constants::QML_MIN_LEVEL),
|
|
|
|
|
bindingLoopHead(-1) {}
|
|
|
|
|
|
2013-08-08 13:28:08 +02:00
|
|
|
int eventId;
|
|
|
|
|
|
|
|
|
|
// not-expanded, per type
|
|
|
|
|
int displayRowExpanded;
|
|
|
|
|
int displayRowCollapsed;
|
|
|
|
|
int bindingLoopHead;
|
|
|
|
|
};
|
|
|
|
|
|
2014-06-06 17:36:11 +02:00
|
|
|
RangeTimelineModel(QmlDebug::RangeType rangeType, QObject *parent = 0);
|
2013-08-08 13:28:08 +02:00
|
|
|
|
|
|
|
|
void loadData();
|
|
|
|
|
void clear();
|
|
|
|
|
|
2014-09-09 18:22:58 +02:00
|
|
|
static QString categoryLabel(QmlDebug::RangeType categoryIndex);
|
|
|
|
|
quint64 features() const;
|
2013-08-08 13:28:08 +02:00
|
|
|
|
2014-07-08 14:43:15 +02:00
|
|
|
int row(int index) const;
|
|
|
|
|
int eventId(int index) const;
|
|
|
|
|
int bindingLoopDest(int index) const;
|
|
|
|
|
QColor color(int index) const;
|
2013-08-08 13:28:08 +02:00
|
|
|
|
2014-07-08 14:43:15 +02:00
|
|
|
QVariantList labels() const;
|
2014-07-07 14:02:29 +02:00
|
|
|
QVariantMap details(int index) const;
|
2014-07-08 14:43:15 +02:00
|
|
|
QVariantMap location(int index) const;
|
2013-08-08 13:28:08 +02:00
|
|
|
|
2014-07-08 14:43:15 +02:00
|
|
|
int eventIdForTypeIndex(int typeIndex) const;
|
|
|
|
|
int eventIdForLocation(const QString &filename, int line, int column) const;
|
2013-08-08 13:28:08 +02:00
|
|
|
|
|
|
|
|
private:
|
2014-06-06 17:36:11 +02:00
|
|
|
class RangeTimelineModelPrivate;
|
|
|
|
|
Q_DECLARE_PRIVATE(RangeTimelineModel)
|
2013-08-08 13:28:08 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|