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 QMLPROFILERPAINTEVENTSMODELPROXY_H
|
|
|
|
|
#define QMLPROFILERPAINTEVENTSMODELPROXY_H
|
|
|
|
|
|
|
|
|
|
#include <QObject>
|
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 <QHash>
|
|
|
|
|
//#include <QVector>
|
|
|
|
|
#include <QVariantList>
|
|
|
|
|
//#include <QVariantMap>
|
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 PaintEventsModelProxy : public AbstractTimelineModel
|
2013-08-08 13:28:08 +02:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
struct QmlPaintEventData {
|
|
|
|
|
int framerate;
|
|
|
|
|
int animationcount;
|
2014-03-07 17:35:56 +01:00
|
|
|
QmlDebug::AnimationThread threadId;
|
2013-08-08 13:28:08 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
PaintEventsModelProxy(QObject *parent = 0);
|
|
|
|
|
|
|
|
|
|
void loadData();
|
|
|
|
|
void clear();
|
|
|
|
|
|
2014-06-23 12:38:53 +02:00
|
|
|
int rowMaxValue(int rowNumber) const;
|
|
|
|
|
|
2014-07-08 14:43:15 +02:00
|
|
|
int rowCount() const;
|
|
|
|
|
int eventId(int index) const;
|
|
|
|
|
int row(int index) const;
|
2014-02-14 16:20:13 +01:00
|
|
|
|
2014-07-08 14:43:15 +02:00
|
|
|
QColor color(int index) const;
|
|
|
|
|
float height(int index) const;
|
2013-08-08 13:28:08 +02:00
|
|
|
|
2014-07-08 14:43:15 +02:00
|
|
|
QVariantList labels() const;
|
|
|
|
|
QVariantList details(int index) const;
|
2013-08-08 13:28:08 +02:00
|
|
|
|
|
|
|
|
private slots:
|
2014-07-08 14:43:15 +02:00
|
|
|
bool accepted(const QmlProfilerDataModel::QmlEventTypeData &event) const;
|
2013-08-08 13:28:08 +02:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
class PaintEventsModelProxyPrivate;
|
2014-02-14 16:20:13 +01:00
|
|
|
Q_DECLARE_PRIVATE(PaintEventsModelProxy)
|
2013-08-08 13:28:08 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|