Commit 4223d76c authored by Ulf Hermann's avatar Ulf Hermann

QmlProfiler: Rename "events" to "statistics" view

Change-Id: Id552e0ead056214a7d72dd618c54897b55cd5e38
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@theqtcompany.com>
parent df4e46ff
......@@ -521,9 +521,9 @@
\li None
\endtable
\section1 Viewing Events
\section1 Viewing Statistics
The \uicontrol Events view displays the number of times each binding, create,
The \uicontrol Statistics view displays the number of times each binding, create,
compile, JavaScript, or signal event is triggered and the average time it
takes. This allows you to examine which events you need to optimize. A high
number of occurrences might indicate that an event is triggered
......@@ -533,7 +533,7 @@
Click on an event to move to it in the source code
in the code editor.
\image qtcreator-analyzer-bindings.png "Events view"
\image qtcreator-analyzer-bindings.png "Statistics view"
The \uicontrol Callers and \uicontrol Callees panes show dependencies between events.
They allow you to examine the internal functions of the application.
......@@ -545,13 +545,13 @@
Click on an event to move to it in the source code in the code editor.
When you select an event in the \uicontrol Timeline view, information about it is
displayed in the \uicontrol Events view. To view an event range in the \uicontrol Events
view, select \uicontrol {Limit Events Pane to Current Range} in the context menu
in the \uicontrol Timeline view.
displayed in the \uicontrol Statistics view. To view an event range in the
\uicontrol Statistics view, select \uicontrol {Limit Statistics Pane to Current Range}
in the context menu in the \uicontrol Timeline view.
To copy the contents of one view or row to the clipboard, select
\uicontrol {Copy Table} or \uicontrol {Copy Row} in the context menu.
JavaScript events are shown in the \uicontrol Events view only for applications
JavaScript events are shown in the \uicontrol Statistics view only for applications
that use Qt Quick 2 and are compiled with Qt 5.3 or later.
*/
......@@ -14,7 +14,6 @@ SOURCES += \
qmlprofilerdatamodel.cpp \
qmlprofilerdetailsrewriter.cpp \
qmlprofilereventsmodelproxy.cpp \
qmlprofilereventview.cpp \
qmlprofilermodelmanager.cpp \
qmlprofilernotesmodel.cpp \
qmlprofileroptionspage.cpp \
......@@ -26,6 +25,7 @@ SOURCES += \
qmlprofilersettings.cpp \
qmlprofilerstatemanager.cpp \
qmlprofilerstatewidget.cpp \
qmlprofilerstatisticsview.cpp \
qmlprofilertimelinemodel.cpp \
qmlprofilertimelinemodelfactory.cpp \
qmlprofilertool.cpp \
......@@ -45,7 +45,7 @@ HEADERS += \
qmlprofilerdatamodel.h \
qmlprofilerdetailsrewriter.h \
qmlprofilereventsmodelproxy.h \
qmlprofilereventview.h \
qmlprofilereventsview.h \
qmlprofilermodelmanager.h \
qmlprofilernotesmodel.h \
qmlprofileroptionspage.h \
......@@ -57,6 +57,7 @@ HEADERS += \
qmlprofilersettings.h \
qmlprofilerstatemanager.h \
qmlprofilerstatewidget.h \
qmlprofilerstatisticsview.h \
qmlprofilertimelinemodel.h \
qmlprofilertimelinemodelfactory.h \
qmlprofilertool.h \
......
......@@ -30,7 +30,7 @@ QtcPlugin {
"qmlprofilerdatamodel.cpp", "qmlprofilerdatamodel.h",
"qmlprofilerdetailsrewriter.cpp", "qmlprofilerdetailsrewriter.h",
"qmlprofilereventsmodelproxy.cpp", "qmlprofilereventsmodelproxy.h",
"qmlprofilereventview.cpp", "qmlprofilereventview.h",
"qmlprofilereventsview.h",
"qmlprofilermodelmanager.cpp", "qmlprofilermodelmanager.h",
"qmlprofilernotesmodel.cpp", "qmlprofilernotesmodel.h",
"qmlprofileroptionspage.cpp", "qmlprofileroptionspage.h",
......@@ -42,6 +42,7 @@ QtcPlugin {
"qmlprofilersettings.cpp", "qmlprofilersettings.h",
"qmlprofilerstatemanager.cpp", "qmlprofilerstatemanager.h",
"qmlprofilerstatewidget.cpp", "qmlprofilerstatewidget.h",
"qmlprofilerstatisticsview.cpp", "qmlprofilerstatisticsview.h",
"qmlprofilertimelinemodel.cpp", "qmlprofilertimelinemodel.h",
"qmlprofilertimelinemodelfactory.cpp", "qmlprofilertimelinemodelfactory.h",
"qmlprofilertool.cpp", "qmlprofilertool.h",
......
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing
**
** 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 The Qt Company. For licensing terms and
** conditions see http://www.qt.io/terms-conditions. For further information
** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef QMLPROFILEREVENTSVIEW_H
#define QMLPROFILEREVENTSVIEW_H
#include "qmlprofiler_global.h"
#include <QAbstractItemModel>
#include <QWidget>
namespace QmlProfiler {
class QMLPROFILER_EXPORT QmlProfilerEventsView : public QWidget
{
Q_OBJECT
public:
QmlProfilerEventsView(QWidget *parent = 0) : QWidget(parent) {}
virtual void clear() = 0;
virtual void restrictToRange(qint64 rangeStart, qint64 rangeEnd) = 0;
virtual bool isRestrictedToRange() const = 0;
signals:
void gotoSourceLocation(const QString &fileName, int lineNumber, int columnNumber);
void typeSelected(int typeIndex);
public slots:
virtual void selectByTypeId(int typeIndex) = 0;
virtual void onVisibleFeaturesChanged(quint64 features) = 0;
};
}
#endif // QMLPROFILEREVENTSVIEW_H
......@@ -28,12 +28,13 @@
**
****************************************************************************/
#ifndef QMLPROFILEREVENTVIEW_H
#define QMLPROFILEREVENTVIEW_H
#ifndef QMLPROFILERSTATISTICSVIEW_H
#define QMLPROFILERSTATISTICSVIEW_H
#include "qmlprofilermodelmanager.h"
#include "qmlprofilereventsmodelproxy.h"
#include "qmlprofilerviewmanager.h"
#include "qmlprofilereventsview.h"
#include <qmldebug/qmlprofilereventtypes.h>
#include <analyzerbase/ianalyzertool.h>
......@@ -44,9 +45,8 @@
namespace QmlProfiler {
namespace Internal {
class QmlProfilerEventsMainView;
class QmlProfilerEventChildrenView;
class QmlProfilerEventRelativesView;
class QmlProfilerStatisticsMainView;
class QmlProfilerStatisticsRelativesView;
enum ItemRole {
SortRole = Qt::UserRole + 1, // Sort by data, not by displayed string
......@@ -77,27 +77,26 @@ enum Fields {
MaxFields
};
class QmlProfilerEventsWidget : public QWidget
class QmlProfilerStatisticsView : public QmlProfilerEventsView
{
Q_OBJECT
public:
explicit QmlProfilerEventsWidget(QWidget *parent,
QmlProfilerTool *profilerTool,
QmlProfilerViewManager *container,
QmlProfilerModelManager *profilerModelManager );
~QmlProfilerEventsWidget();
explicit QmlProfilerStatisticsView(QWidget *parent, QmlProfilerTool *profilerTool,
QmlProfilerViewManager *container,
QmlProfilerModelManager *profilerModelManager);
~QmlProfilerStatisticsView();
void clear();
void restrictToRange(qint64 rangeStart, qint64 rangeEnd);
bool isRestrictedToRange() const;
void clear() override;
void restrictToRange(qint64 rangeStart, qint64 rangeEnd) override;
bool isRestrictedToRange() const override;
signals:
void gotoSourceLocation(const QString &fileName, int lineNumber, int columnNumber);
void typeSelected(int typeIndex);
public slots:
void selectByTypeId(int typeIndex);
void onVisibleFeaturesChanged(quint64 features);
void selectByTypeId(int typeIndex) override;
void onVisibleFeaturesChanged(quint64 features) override;
protected:
void contextMenuEvent(QContextMenuEvent *ev);
......@@ -110,17 +109,17 @@ private:
void setShowExtendedStatistics(bool show);
bool showExtendedStatistics() const;
class QmlProfilerEventsWidgetPrivate;
QmlProfilerEventsWidgetPrivate *d;
class QmlProfilerStatisticsViewPrivate;
QmlProfilerStatisticsViewPrivate *d;
};
class QmlProfilerEventsMainView : public Utils::TreeView
class QmlProfilerStatisticsMainView : public Utils::TreeView
{
Q_OBJECT
public:
explicit QmlProfilerEventsMainView(QWidget *parent,
QmlProfilerEventsModelProxy *modelProxy);
~QmlProfilerEventsMainView();
explicit QmlProfilerStatisticsMainView(QWidget *parent,
QmlProfilerEventsModelProxy *modelProxy);
~QmlProfilerStatisticsMainView();
void setFieldViewable(Fields field, bool show);
void setShowAnonymousEvents( bool showThem );
......@@ -156,18 +155,18 @@ private:
QStandardItem *itemFromIndex(const QModelIndex &index) const;
private:
class QmlProfilerEventsMainViewPrivate;
QmlProfilerEventsMainViewPrivate *d;
class QmlProfilerStatisticsMainViewPrivate;
QmlProfilerStatisticsMainViewPrivate *d;
};
class QmlProfilerEventRelativesView : public Utils::TreeView
class QmlProfilerStatisticsRelativesView : public Utils::TreeView
{
Q_OBJECT
public:
explicit QmlProfilerEventRelativesView(QmlProfilerEventRelativesModelProxy *modelProxy,
QWidget *parent );
~QmlProfilerEventRelativesView();
explicit QmlProfilerStatisticsRelativesView(QmlProfilerEventRelativesModelProxy *modelProxy,
QWidget *parent );
~QmlProfilerStatisticsRelativesView();
signals:
void typeClicked(int typeIndex);
......@@ -183,11 +182,11 @@ private:
void updateHeader();
QStandardItemModel *treeModel();
class QmlProfilerEventParentsViewPrivate;
QmlProfilerEventParentsViewPrivate *d;
class QmlProfilerStatisticsRelativesViewPrivate;
QmlProfilerStatisticsRelativesViewPrivate *d;
};
} // namespace Internal
} // namespace QmlProfiler
#endif // QMLPROFILEREVENTVIEW_H
#endif // QMLPROFILERSTATISTICSVIEW_H
......@@ -248,11 +248,11 @@ void QmlProfilerTraceView::showContextMenu(QPoint position)
menu.addSeparator();
QAction *getLocalStatsAction = menu.addAction(tr("Limit Events Pane to Current Range"));
QAction *getLocalStatsAction = menu.addAction(tr("Limit Statistics Pane to Current Range"));
if (!d->m_viewContainer->hasValidSelection())
getLocalStatsAction->setEnabled(false);
QAction *getGlobalStatsAction = menu.addAction(tr("Show Full Range in Events Pane"));
QAction *getGlobalStatsAction = menu.addAction(tr("Show Full Range in Statistics Pane"));
if (!d->m_viewContainer->isEventsRestrictedToRange())
getGlobalStatsAction->setEnabled(false);
......
......@@ -31,7 +31,7 @@
#include "qmlprofilerviewmanager.h"
#include "qmlprofilertraceview.h"
#include "qmlprofilereventview.h"
#include "qmlprofilerstatisticsview.h"
#include "qmlprofilertool.h"
#include "qmlprofilerstatemanager.h"
#include "qmlprofilermodelmanager.h"
......@@ -54,7 +54,7 @@ public:
QDockWidget *timelineDock;
QmlProfilerTraceView *traceView;
QmlProfilerEventsWidget *eventsView;
QmlProfilerStatisticsView *eventsView;
QmlProfilerStateManager *profilerState;
QmlProfilerModelManager *profilerModelManager;
QmlProfilerTool *profilerTool;
......@@ -96,17 +96,17 @@ void QmlProfilerViewManager::createViews()
connect(d->traceView, &QmlProfilerTraceView::gotoSourceLocation,
this, &QmlProfilerViewManager::gotoSourceLocation);
d->eventsView = new QmlProfilerEventsWidget(mw, d->profilerTool, this,
d->eventsView = new QmlProfilerStatisticsView(mw, d->profilerTool, this,
d->profilerModelManager);
d->eventsView->setWindowTitle(tr("Events"));
connect(d->eventsView, &QmlProfilerEventsWidget::gotoSourceLocation,
d->eventsView->setWindowTitle(tr("Statistics"));
connect(d->eventsView, &QmlProfilerStatisticsView::gotoSourceLocation,
this, &QmlProfilerViewManager::gotoSourceLocation);
connect(d->eventsView, &QmlProfilerEventsWidget::typeSelected,
connect(d->eventsView, &QmlProfilerStatisticsView::typeSelected,
d->traceView, &QmlProfilerTraceView::selectByTypeId);
connect(d->traceView, &QmlProfilerTraceView::typeSelected,
d->eventsView, &QmlProfilerEventsWidget::selectByTypeId);
d->eventsView, &QmlProfilerStatisticsView::selectByTypeId);
connect(d->profilerModelManager, &QmlProfilerModelManager::visibleFeaturesChanged,
d->eventsView, &QmlProfilerEventsWidget::onVisibleFeaturesChanged);
d->eventsView, &QmlProfilerStatisticsView::onVisibleFeaturesChanged);
QDockWidget *eventsDock = AnalyzerManager::createDockWidget
(Constants::QmlProfilerToolId, d->eventsView);
......
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