diff --git a/src/libs/libs.pro b/src/libs/libs.pro
index bc8e6ac3e93..10860cfb766 100644
--- a/src/libs/libs.pro
+++ b/src/libs/libs.pro
@@ -12,7 +12,8 @@ SUBDIRS = \
qmldebug \
qmleditorwidgets \
glsl \
- ssh
+ ssh \
+ timeline
for(l, SUBDIRS) {
QTC_LIB_DEPENDS =
diff --git a/src/libs/libs.qbs b/src/libs/libs.qbs
index 6a43b7b2c0a..b0144285224 100644
--- a/src/libs/libs.qbs
+++ b/src/libs/libs.qbs
@@ -13,6 +13,7 @@ Project {
"qmldebug/qmldebug.qbs",
"qtcreatorcdbext/qtcreatorcdbext.qbs",
"ssh/ssh.qbs",
+ "timeline/timeline.qbs",
"utils/process_stub.qbs",
"utils/process_ctrlc_stub.qbs",
"utils/utils.qbs",
diff --git a/src/libs/timeline/README b/src/libs/timeline/README
new file mode 100644
index 00000000000..bc5b4331765
--- /dev/null
+++ b/src/libs/timeline/README
@@ -0,0 +1,34 @@
+
+The timeline library can be used to display timeline data, primarily for performance analysis. It
+provides a comprehensive set of visual components as well as a set of models that can be extended to
+hold custom timeline data. You can use all the provided QML to get a complete GUI similar to the QML
+profiler or you can mix and match the QML components with your own.
+
+Models
+------
+
+At the core of the timeline library is the TimelineModel. You can create multiple TimelineModels to
+represent different categories of data. The TimelineModelAggregator class is then used to manage
+those models. TimelineModels are expected to load their contents all at once and then only change if
+you clear() and possibly reload them. To complement that, you can use the TimelineNotesModel. The
+TimelineNotesModel is designed to hold less, but mutable, data that spans all TimelineModels in a
+TimelineModelAggregator.
+
+Views
+-----
+
+Expose the TimelineRenderer class to QML and add a TimelineModel to it to get a visualization of the
+data in the model. TimelineRenderer will generally use the TimelineRenderPasses the TimelineModel
+suggests. It contains a caching system for keeping different versions of the visualization,
+depending on position and zoom level, so that the picture always stays sharp and numerical overflows
+are avoided. To do that it needs a TimelineZoomControl which manages zooming and scrolling.
+
+A simplified display for the contents of a TimelineModel, based on the same render passes as the
+TimelineRenderer, can be found in TimelineOverviewRenderer. TimelineOverviewRenderer will squeeze
+the data into a fixed height and only allow all the data to be displayed at once. It won't react to
+zooming or scrolling and can easily be used for a more concise overview.
+
+Various utilities are provided in the QML code. CategoryLabels can be used to provide a legend for
+data rendered using a TimelineRenderer. TimeMarks provides colored bars that can be layered behind
+a TimelineRenderer to make the rows easier to distinguish. TimeDisplay provides a legend for the
+time spanned by a timeline.
diff --git a/src/plugins/qmlprofiler/qml/ButtonsBar.qml b/src/libs/timeline/qml/ButtonsBar.qml
similarity index 90%
rename from src/plugins/qmlprofiler/qml/ButtonsBar.qml
rename to src/libs/timeline/qml/ButtonsBar.qml
index c65200ddca2..21de537148a 100644
--- a/src/plugins/qmlprofiler/qml/ButtonsBar.qml
+++ b/src/libs/timeline/qml/ButtonsBar.qml
@@ -84,7 +84,7 @@ ToolBar {
anchors.bottom: parent.bottom
implicitWidth: buttonWidth
- iconSource: "qrc:/qmlprofiler/ico_prev.png"
+ iconSource: "qrc:/timeline/ico_prev.png"
tooltip: qsTr("Jump to previous event.")
onClicked: buttons.jumpToPrev()
}
@@ -95,7 +95,7 @@ ToolBar {
anchors.bottom: parent.bottom
implicitWidth: buttonWidth
- iconSource: "qrc:/qmlprofiler/ico_next.png"
+ iconSource: "qrc:/timeline/ico_next.png"
tooltip: qsTr("Jump to next event.")
onClicked: buttons.jumpToNext()
}
@@ -106,7 +106,7 @@ ToolBar {
anchors.bottom: parent.bottom
implicitWidth: buttonWidth
- iconSource: "qrc:/qmlprofiler/ico_zoom.png"
+ iconSource: "qrc:/timeline/ico_zoom.png"
tooltip: qsTr("Show zoom slider.")
checkable: true
checked: false
@@ -119,7 +119,7 @@ ToolBar {
anchors.bottom: parent.bottom
implicitWidth: buttonWidth
- iconSource: "qrc:/qmlprofiler/ico_filter.png"
+ iconSource: "qrc:/timeline/ico_filter.png"
tooltip: qsTr("Filter Categories")
checkable: true
onCheckedChanged: buttons.filterMenuChanged()
@@ -131,8 +131,8 @@ ToolBar {
anchors.bottom: parent.bottom
implicitWidth: buttonWidth
- iconSource: checked ? "qrc:/qmlprofiler/ico_rangeselected.png" :
- "qrc:/qmlprofiler/ico_rangeselection.png"
+ iconSource: checked ? "qrc:/timeline/ico_rangeselected.png" :
+ "qrc:/timeline/ico_rangeselection.png"
tooltip: qsTr("Select range.")
checkable: true
checked: false
@@ -145,7 +145,7 @@ ToolBar {
anchors.bottom: parent.bottom
implicitWidth: buttonWidth
- iconSource: "qrc:/qmlprofiler/ico_selectionmode.png"
+ iconSource: "qrc:/timeline/ico_selectionmode.png"
tooltip: qsTr("View event information on mouseover.")
checkable: true
checked: false
diff --git a/src/plugins/qmlprofiler/qml/CategoryLabel.qml b/src/libs/timeline/qml/CategoryLabel.qml
similarity index 100%
rename from src/plugins/qmlprofiler/qml/CategoryLabel.qml
rename to src/libs/timeline/qml/CategoryLabel.qml
diff --git a/src/plugins/qmlprofiler/qml/Detail.qml b/src/libs/timeline/qml/Detail.qml
similarity index 100%
rename from src/plugins/qmlprofiler/qml/Detail.qml
rename to src/libs/timeline/qml/Detail.qml
diff --git a/src/plugins/qmlprofiler/qml/MainView.qml b/src/libs/timeline/qml/MainView.qml
similarity index 100%
rename from src/plugins/qmlprofiler/qml/MainView.qml
rename to src/libs/timeline/qml/MainView.qml
diff --git a/src/plugins/qmlprofiler/qml/Overview.qml b/src/libs/timeline/qml/Overview.qml
similarity index 100%
rename from src/plugins/qmlprofiler/qml/Overview.qml
rename to src/libs/timeline/qml/Overview.qml
diff --git a/src/plugins/qmlprofiler/qml/RangeDetails.qml b/src/libs/timeline/qml/RangeDetails.qml
similarity index 100%
rename from src/plugins/qmlprofiler/qml/RangeDetails.qml
rename to src/libs/timeline/qml/RangeDetails.qml
diff --git a/src/plugins/qmlprofiler/qml/RangeMover.qml b/src/libs/timeline/qml/RangeMover.qml
similarity index 100%
rename from src/plugins/qmlprofiler/qml/RangeMover.qml
rename to src/libs/timeline/qml/RangeMover.qml
diff --git a/src/plugins/qmlprofiler/qml/SelectionRange.qml b/src/libs/timeline/qml/SelectionRange.qml
similarity index 100%
rename from src/plugins/qmlprofiler/qml/SelectionRange.qml
rename to src/libs/timeline/qml/SelectionRange.qml
diff --git a/src/plugins/qmlprofiler/qml/SelectionRangeDetails.qml b/src/libs/timeline/qml/SelectionRangeDetails.qml
similarity index 100%
rename from src/plugins/qmlprofiler/qml/SelectionRangeDetails.qml
rename to src/libs/timeline/qml/SelectionRangeDetails.qml
diff --git a/src/plugins/qmlprofiler/qml/TimeDisplay.qml b/src/libs/timeline/qml/TimeDisplay.qml
similarity index 100%
rename from src/plugins/qmlprofiler/qml/TimeDisplay.qml
rename to src/libs/timeline/qml/TimeDisplay.qml
diff --git a/src/plugins/qmlprofiler/qml/TimeMarks.qml b/src/libs/timeline/qml/TimeMarks.qml
similarity index 100%
rename from src/plugins/qmlprofiler/qml/TimeMarks.qml
rename to src/libs/timeline/qml/TimeMarks.qml
diff --git a/src/plugins/qmlprofiler/qml/TimelineContent.qml b/src/libs/timeline/qml/TimelineContent.qml
similarity index 100%
rename from src/plugins/qmlprofiler/qml/TimelineContent.qml
rename to src/libs/timeline/qml/TimelineContent.qml
diff --git a/src/plugins/qmlprofiler/qml/TimelineLabels.qml b/src/libs/timeline/qml/TimelineLabels.qml
similarity index 100%
rename from src/plugins/qmlprofiler/qml/TimelineLabels.qml
rename to src/libs/timeline/qml/TimelineLabels.qml
diff --git a/src/plugins/qmlprofiler/qml/arrow_down.png b/src/libs/timeline/qml/arrow_down.png
similarity index 100%
rename from src/plugins/qmlprofiler/qml/arrow_down.png
rename to src/libs/timeline/qml/arrow_down.png
diff --git a/src/plugins/qmlprofiler/qml/arrow_right.png b/src/libs/timeline/qml/arrow_right.png
similarity index 100%
rename from src/plugins/qmlprofiler/qml/arrow_right.png
rename to src/libs/timeline/qml/arrow_right.png
diff --git a/src/plugins/qmlprofiler/qml/dialog_shadow.png b/src/libs/timeline/qml/dialog_shadow.png
similarity index 100%
rename from src/plugins/qmlprofiler/qml/dialog_shadow.png
rename to src/libs/timeline/qml/dialog_shadow.png
diff --git a/src/plugins/qmlprofiler/qml/ico_edit.png b/src/libs/timeline/qml/ico_edit.png
similarity index 100%
rename from src/plugins/qmlprofiler/qml/ico_edit.png
rename to src/libs/timeline/qml/ico_edit.png
diff --git a/src/plugins/qmlprofiler/qml/ico_filter.png b/src/libs/timeline/qml/ico_filter.png
similarity index 100%
rename from src/plugins/qmlprofiler/qml/ico_filter.png
rename to src/libs/timeline/qml/ico_filter.png
diff --git a/src/plugins/qmlprofiler/qml/ico_next.png b/src/libs/timeline/qml/ico_next.png
similarity index 100%
rename from src/plugins/qmlprofiler/qml/ico_next.png
rename to src/libs/timeline/qml/ico_next.png
diff --git a/src/plugins/qmlprofiler/qml/ico_note.png b/src/libs/timeline/qml/ico_note.png
similarity index 100%
rename from src/plugins/qmlprofiler/qml/ico_note.png
rename to src/libs/timeline/qml/ico_note.png
diff --git a/src/plugins/qmlprofiler/qml/ico_prev.png b/src/libs/timeline/qml/ico_prev.png
similarity index 100%
rename from src/plugins/qmlprofiler/qml/ico_prev.png
rename to src/libs/timeline/qml/ico_prev.png
diff --git a/src/plugins/qmlprofiler/qml/ico_rangeselected.png b/src/libs/timeline/qml/ico_rangeselected.png
similarity index 100%
rename from src/plugins/qmlprofiler/qml/ico_rangeselected.png
rename to src/libs/timeline/qml/ico_rangeselected.png
diff --git a/src/plugins/qmlprofiler/qml/ico_rangeselection.png b/src/libs/timeline/qml/ico_rangeselection.png
similarity index 100%
rename from src/plugins/qmlprofiler/qml/ico_rangeselection.png
rename to src/libs/timeline/qml/ico_rangeselection.png
diff --git a/src/plugins/qmlprofiler/qml/ico_selectionmode.png b/src/libs/timeline/qml/ico_selectionmode.png
similarity index 100%
rename from src/plugins/qmlprofiler/qml/ico_selectionmode.png
rename to src/libs/timeline/qml/ico_selectionmode.png
diff --git a/src/plugins/qmlprofiler/qml/ico_zoom.png b/src/libs/timeline/qml/ico_zoom.png
similarity index 100%
rename from src/plugins/qmlprofiler/qml/ico_zoom.png
rename to src/libs/timeline/qml/ico_zoom.png
diff --git a/src/plugins/qmlprofiler/qml/lock_closed.png b/src/libs/timeline/qml/lock_closed.png
similarity index 100%
rename from src/plugins/qmlprofiler/qml/lock_closed.png
rename to src/libs/timeline/qml/lock_closed.png
diff --git a/src/plugins/qmlprofiler/qml/lock_open.png b/src/libs/timeline/qml/lock_open.png
similarity index 100%
rename from src/plugins/qmlprofiler/qml/lock_open.png
rename to src/libs/timeline/qml/lock_open.png
diff --git a/src/plugins/qmlprofiler/qml/notes.frag b/src/libs/timeline/qml/notes.frag
similarity index 100%
rename from src/plugins/qmlprofiler/qml/notes.frag
rename to src/libs/timeline/qml/notes.frag
diff --git a/src/plugins/qmlprofiler/qml/notes.vert b/src/libs/timeline/qml/notes.vert
similarity index 100%
rename from src/plugins/qmlprofiler/qml/notes.vert
rename to src/libs/timeline/qml/notes.vert
diff --git a/src/plugins/qmlprofiler/qml/range_handle.png b/src/libs/timeline/qml/range_handle.png
similarity index 100%
rename from src/plugins/qmlprofiler/qml/range_handle.png
rename to src/libs/timeline/qml/range_handle.png
diff --git a/src/libs/timeline/qml/timeline.qrc b/src/libs/timeline/qml/timeline.qrc
new file mode 100644
index 00000000000..f0eb2afaa4f
--- /dev/null
+++ b/src/libs/timeline/qml/timeline.qrc
@@ -0,0 +1,36 @@
+
+
+ Detail.qml
+ CategoryLabel.qml
+ MainView.qml
+ RangeDetails.qml
+ RangeMover.qml
+ TimeDisplay.qml
+ lock_closed.png
+ lock_open.png
+ ico_edit.png
+ TimeMarks.qml
+ Overview.qml
+ SelectionRange.qml
+ SelectionRangeDetails.qml
+ arrow_down.png
+ arrow_right.png
+ dialog_shadow.png
+ range_handle.png
+ ico_selectionmode.png
+ ico_zoom.png
+ ico_prev.png
+ ico_next.png
+ ico_rangeselection.png
+ ico_rangeselected.png
+ ico_note.png
+ ButtonsBar.qml
+ ico_filter.png
+ timelineitems.vert
+ timelineitems.frag
+ notes.vert
+ notes.frag
+ TimelineLabels.qml
+ TimelineContent.qml
+
+
diff --git a/src/plugins/qmlprofiler/qml/timelineitems.frag b/src/libs/timeline/qml/timelineitems.frag
similarity index 100%
rename from src/plugins/qmlprofiler/qml/timelineitems.frag
rename to src/libs/timeline/qml/timelineitems.frag
diff --git a/src/plugins/qmlprofiler/qml/timelineitems.vert b/src/libs/timeline/qml/timelineitems.vert
similarity index 100%
rename from src/plugins/qmlprofiler/qml/timelineitems.vert
rename to src/libs/timeline/qml/timelineitems.vert
diff --git a/src/libs/timeline/timeline.pro b/src/libs/timeline/timeline.pro
new file mode 100644
index 00000000000..4b556057588
--- /dev/null
+++ b/src/libs/timeline/timeline.pro
@@ -0,0 +1,45 @@
+QT += qml quick
+DEFINES += TIMELINE_LIBRARY
+
+include(../../qtcreatorlibrary.pri)
+
+SOURCES += \
+ $$PWD/timelinemodel.cpp \
+ $$PWD/timelinemodelaggregator.cpp \
+ $$PWD/timelinerenderer.cpp \
+ $$PWD/timelinezoomcontrol.cpp \
+ $$PWD/timelineitemsrenderpass.cpp \
+ $$PWD/timelineselectionrenderpass.cpp \
+ $$PWD/timelinenotesrenderpass.cpp \
+ $$PWD/timelinerenderpass.cpp \
+ $$PWD/timelinerenderstate.cpp \
+ $$PWD/timelinenotesmodel.cpp \
+ $$PWD/timelineabstractrenderer.cpp \
+ $$PWD/timelineoverviewrenderer.cpp
+
+
+HEADERS += \
+ $$PWD/timeline_global.h \
+ $$PWD/timelinemodel.h \
+ $$PWD/timelinemodel_p.h \
+ $$PWD/timelinemodelaggregator.h \
+ $$PWD/timelinerenderer.h \
+ $$PWD/timelinezoomcontrol.h \
+ $$PWD/timelineitemsrenderpass.h \
+ $$PWD/timelineselectionrenderpass.h \
+ $$PWD/timelinenotesrenderpass.h \
+ $$PWD/timelinerenderpass.h \
+ $$PWD/timelinerenderstate.h \
+ $$PWD/timelinenotesmodel.h \
+ $$PWD/timelinenotesmodel_p.h \
+ $$PWD/timelinerenderer_p.h \
+ $$PWD/timelinerenderstate_p.h \
+ $$PWD/timelineabstractrenderer.h \
+ $$PWD/timelineabstractrenderer_p.h \
+ $$PWD/timelineoverviewrenderer_p.h \
+ $$PWD/timelineoverviewrenderer.h
+
+RESOURCES += \
+ $$PWD/qml/timeline.qrc
+
+DISTFILES += README
diff --git a/src/libs/timeline/timeline.qbs b/src/libs/timeline/timeline.qbs
new file mode 100644
index 00000000000..b4c9bffef0c
--- /dev/null
+++ b/src/libs/timeline/timeline.qbs
@@ -0,0 +1,37 @@
+import qbs 1.0
+
+import QtcLibrary
+
+QtcLibrary {
+ name: "Timeline"
+
+ Depends { name: "Qt"; submodules: ["qml", "quick", "gui"] }
+ Depends { name: "Utils" }
+
+ Group {
+ name: "General"
+ files: [
+ "README",
+ "timelineabstractrenderer.cpp", "timelineabstractrenderer.h",
+ "timelineabstractrenderer_p.h",
+ "timelineitemsrenderpass.cpp", "timelineitemsrenderpass.h",
+ "timelinemodel.cpp", "timelinemodel.h", "timelinemodel_p.h",
+ "timelinemodelaggregator.cpp", "timelinemodelaggregator.h",
+ "timelinenotesmodel.cpp", "timelinenotesmodel.h", "timelinenotesmodel_p.h",
+ "timelinenotesrenderpass.cpp", "timelinenotesrenderpass.h",
+ "timelineoverviewrenderer.cpp", "timelineoverviewrenderer.h",
+ "timelineoverviewrenderer_p.h",
+ "timelinerenderer.cpp", "timelinerenderer.h", "timelinerenderer_p.h",
+ "timelinerenderpass.cpp", "timelinerenderpass.h",
+ "timelinerenderstate.cpp", "timelinerenderstate.h", "timelinerenderstate_p.h",
+ "timelineselectionrenderpass.cpp", "timelineselectionrenderpass.h",
+ "timelinezoomcontrol.cpp", "timelinezoomcontrol.h"
+ ]
+ }
+
+ Group {
+ name: "QML"
+ prefix: "qml/"
+ files: ["timeline.qrc"]
+ }
+}
diff --git a/src/libs/timeline/timeline_dependencies.pri b/src/libs/timeline/timeline_dependencies.pri
new file mode 100644
index 00000000000..2a17a9cb38e
--- /dev/null
+++ b/src/libs/timeline/timeline_dependencies.pri
@@ -0,0 +1,4 @@
+QTC_LIB_NAME = Timeline
+
+QTC_LIB_DEPENDS = utils
+
diff --git a/src/libs/timeline/timeline_global.h b/src/libs/timeline/timeline_global.h
new file mode 100644
index 00000000000..09a312e1ca7
--- /dev/null
+++ b/src/libs/timeline/timeline_global.h
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** 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://www.qt.io/licensing. 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, 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 TIMELINE_GLOBAL_H
+#define TIMELINE_GLOBAL_H
+
+#include
+
+#if defined(TIMELINE_LIBRARY)
+# define TIMELINE_EXPORT Q_DECL_EXPORT
+#else
+# define TIMELINE_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif // TIMELINE_GLOBAL_H
+
diff --git a/src/plugins/qmlprofiler/timelineabstractrenderer.cpp b/src/libs/timeline/timelineabstractrenderer.cpp
similarity index 100%
rename from src/plugins/qmlprofiler/timelineabstractrenderer.cpp
rename to src/libs/timeline/timelineabstractrenderer.cpp
diff --git a/src/plugins/qmlprofiler/timelineabstractrenderer.h b/src/libs/timeline/timelineabstractrenderer.h
similarity index 98%
rename from src/plugins/qmlprofiler/timelineabstractrenderer.h
rename to src/libs/timeline/timelineabstractrenderer.h
index ac446ad167e..d73782caee2 100644
--- a/src/plugins/qmlprofiler/timelineabstractrenderer.h
+++ b/src/libs/timeline/timelineabstractrenderer.h
@@ -31,21 +31,21 @@
#ifndef TIMELINEABSTRACTRENDERER_H
#define TIMELINEABSTRACTRENDERER_H
-#include
-
-#include
-#include
#include "timelinezoomcontrol.h"
#include "timelinemodel.h"
#include "timelinenotesmodel.h"
#include "timelinerenderpass.h"
+#include
+#include
+#include
+
namespace Timeline {
class TimelineRenderPass;
class TimelineRenderState;
-class TimelineAbstractRenderer : public QQuickItem
+class TIMELINE_EXPORT TimelineAbstractRenderer : public QQuickItem
{
Q_OBJECT
Q_PROPERTY(Timeline::TimelineModel *model READ model WRITE setModel NOTIFY modelChanged)
diff --git a/src/plugins/qmlprofiler/timelineabstractrenderer_p.h b/src/libs/timeline/timelineabstractrenderer_p.h
similarity index 100%
rename from src/plugins/qmlprofiler/timelineabstractrenderer_p.h
rename to src/libs/timeline/timelineabstractrenderer_p.h
diff --git a/src/plugins/qmlprofiler/timelineitemsrenderpass.cpp b/src/libs/timeline/timelineitemsrenderpass.cpp
similarity index 99%
rename from src/plugins/qmlprofiler/timelineitemsrenderpass.cpp
rename to src/libs/timeline/timelineitemsrenderpass.cpp
index adf4769e7a1..e83b425c9f1 100644
--- a/src/plugins/qmlprofiler/timelineitemsrenderpass.cpp
+++ b/src/libs/timeline/timelineitemsrenderpass.cpp
@@ -372,9 +372,8 @@ private:
TimelineItemsMaterialShader::TimelineItemsMaterialShader()
: QSGMaterialShader()
{
- setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qmlprofiler/timelineitems.vert"));
- setShaderSourceFile(QOpenGLShader::Fragment,
- QStringLiteral(":/qmlprofiler/timelineitems.frag"));
+ setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/timeline/timelineitems.vert"));
+ setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/timeline/timelineitems.frag"));
}
void TimelineItemsMaterialShader::updateState(const RenderState &state, QSGMaterial *newMaterial,
diff --git a/src/plugins/qmlprofiler/timelineitemsrenderpass.h b/src/libs/timeline/timelineitemsrenderpass.h
similarity index 96%
rename from src/plugins/qmlprofiler/timelineitemsrenderpass.h
rename to src/libs/timeline/timelineitemsrenderpass.h
index 06994333c08..9f7d4a2b8b9 100644
--- a/src/plugins/qmlprofiler/timelineitemsrenderpass.h
+++ b/src/libs/timeline/timelineitemsrenderpass.h
@@ -37,7 +37,7 @@
namespace Timeline {
-class TimelineItemsRenderPass : public TimelineRenderPass
+class TIMELINE_EXPORT TimelineItemsRenderPass : public TimelineRenderPass
{
public:
static const TimelineItemsRenderPass *instance();
diff --git a/src/plugins/qmlprofiler/timelinemodel.cpp b/src/libs/timeline/timelinemodel.cpp
similarity index 99%
rename from src/plugins/qmlprofiler/timelinemodel.cpp
rename to src/libs/timeline/timelinemodel.cpp
index 5f154fff265..5fb463a3ded 100644
--- a/src/plugins/qmlprofiler/timelinemodel.cpp
+++ b/src/libs/timeline/timelinemodel.cpp
@@ -40,7 +40,7 @@
namespace Timeline {
/*!
- \class QmlProfiler::TimelineModel
+ \class Timeline::TimelineModel
\brief The TimelineModel class provides a sorted model for timeline data.
The TimelineModel lets you keep range data sorted by both start and end times, so that
diff --git a/src/plugins/qmlprofiler/timelinemodel.h b/src/libs/timeline/timelinemodel.h
similarity index 97%
rename from src/plugins/qmlprofiler/timelinemodel.h
rename to src/libs/timeline/timelinemodel.h
index 76239010245..9731648e605 100644
--- a/src/plugins/qmlprofiler/timelinemodel.h
+++ b/src/libs/timeline/timelinemodel.h
@@ -31,17 +31,14 @@
#ifndef TIMELINEMODEL_H
#define TIMELINEMODEL_H
-
-#include "qmlprofiler_global.h"
-#include "qmlprofilermodelmanager.h"
-#include "qmlprofilerdatamodel.h"
+#include "timeline_global.h"
#include "timelinerenderpass.h"
#include
#include
namespace Timeline {
-class QMLPROFILER_EXPORT TimelineModel : public QObject
+class TIMELINE_EXPORT TimelineModel : public QObject
{
Q_OBJECT
Q_PROPERTY(int modelId READ modelId CONSTANT)
diff --git a/src/plugins/qmlprofiler/timelinemodel_p.h b/src/libs/timeline/timelinemodel_p.h
similarity index 98%
rename from src/plugins/qmlprofiler/timelinemodel_p.h
rename to src/libs/timeline/timelinemodel_p.h
index 3badb0a78bb..7f563edf165 100644
--- a/src/plugins/qmlprofiler/timelinemodel_p.h
+++ b/src/libs/timeline/timelinemodel_p.h
@@ -35,7 +35,7 @@
namespace Timeline {
-class QMLPROFILER_EXPORT TimelineModel::TimelineModelPrivate {
+class TIMELINE_EXPORT TimelineModel::TimelineModelPrivate {
public:
static const int DefaultRowHeight = 30;
diff --git a/src/plugins/qmlprofiler/timelinemodelaggregator.cpp b/src/libs/timeline/timelinemodelaggregator.cpp
similarity index 98%
rename from src/plugins/qmlprofiler/timelinemodelaggregator.cpp
rename to src/libs/timeline/timelinemodelaggregator.cpp
index 5a4285838e7..8b8a503683c 100644
--- a/src/plugins/qmlprofiler/timelinemodelaggregator.cpp
+++ b/src/libs/timeline/timelinemodelaggregator.cpp
@@ -30,10 +30,8 @@
#include "timelinemodelaggregator.h"
-#include "qmlprofilerrangemodel.h"
-#include "qmlprofileranimationsmodel.h"
-#include "qmlprofilerplugin.h"
-#include "qmlprofilernotesmodel.h"
+#include "timelinemodel.h"
+#include "timelinenotesmodel.h"
#include
#include
diff --git a/src/plugins/qmlprofiler/timelinemodelaggregator.h b/src/libs/timeline/timelinemodelaggregator.h
similarity index 94%
rename from src/plugins/qmlprofiler/timelinemodelaggregator.h
rename to src/libs/timeline/timelinemodelaggregator.h
index 87a432eaa12..c7cd12aedc2 100644
--- a/src/plugins/qmlprofiler/timelinemodelaggregator.h
+++ b/src/libs/timeline/timelinemodelaggregator.h
@@ -31,13 +31,12 @@
#ifndef TIMELINEMODELAGGREGATOR_H
#define TIMELINEMODELAGGREGATOR_H
-#include "qmlprofilertimelinemodel.h"
-#include "qmlprofilermodelmanager.h"
-#include "timelinerenderer.h"
+#include "timelinemodel.h"
+#include "timelinenotesmodel.h"
namespace Timeline {
-class TimelineModelAggregator : public QObject
+class TIMELINE_EXPORT TimelineModelAggregator : public QObject
{
Q_OBJECT
Q_PROPERTY(int height READ height NOTIFY heightChanged)
diff --git a/src/plugins/qmlprofiler/timelinenotesmodel.cpp b/src/libs/timeline/timelinenotesmodel.cpp
similarity index 100%
rename from src/plugins/qmlprofiler/timelinenotesmodel.cpp
rename to src/libs/timeline/timelinenotesmodel.cpp
diff --git a/src/plugins/qmlprofiler/timelinenotesmodel.h b/src/libs/timeline/timelinenotesmodel.h
similarity index 98%
rename from src/plugins/qmlprofiler/timelinenotesmodel.h
rename to src/libs/timeline/timelinenotesmodel.h
index 95f3254af1c..c270b084672 100644
--- a/src/plugins/qmlprofiler/timelinenotesmodel.h
+++ b/src/libs/timeline/timelinenotesmodel.h
@@ -35,7 +35,7 @@
namespace Timeline {
-class QMLPROFILER_EXPORT TimelineNotesModel : public QObject
+class TIMELINE_EXPORT TimelineNotesModel : public QObject
{
Q_OBJECT
Q_PROPERTY(int count READ count NOTIFY changed)
diff --git a/src/plugins/qmlprofiler/timelinenotesmodel_p.h b/src/libs/timeline/timelinenotesmodel_p.h
similarity index 100%
rename from src/plugins/qmlprofiler/timelinenotesmodel_p.h
rename to src/libs/timeline/timelinenotesmodel_p.h
diff --git a/src/plugins/qmlprofiler/timelinenotesrenderpass.cpp b/src/libs/timeline/timelinenotesrenderpass.cpp
similarity index 99%
rename from src/plugins/qmlprofiler/timelinenotesrenderpass.cpp
rename to src/libs/timeline/timelinenotesrenderpass.cpp
index 004b9eb2169..ec748923887 100644
--- a/src/plugins/qmlprofiler/timelinenotesrenderpass.cpp
+++ b/src/libs/timeline/timelinenotesrenderpass.cpp
@@ -30,7 +30,7 @@
#include "timelinenotesrenderpass.h"
#include "timelinerenderstate.h"
-#include "qmlprofilernotesmodel.h"
+#include "timelinenotesmodel.h"
namespace Timeline {
@@ -222,8 +222,8 @@ private:
NotesMaterialShader::NotesMaterialShader()
: QSGMaterialShader()
{
- setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qmlprofiler/notes.vert"));
- setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qmlprofiler/notes.frag"));
+ setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/timeline/notes.vert"));
+ setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/timeline/notes.frag"));
}
void NotesMaterialShader::updateState(const RenderState &state, QSGMaterial *, QSGMaterial *)
diff --git a/src/plugins/qmlprofiler/timelinenotesrenderpass.h b/src/libs/timeline/timelinenotesrenderpass.h
similarity index 96%
rename from src/plugins/qmlprofiler/timelinenotesrenderpass.h
rename to src/libs/timeline/timelinenotesrenderpass.h
index 0084d899d17..1ae6665ff20 100644
--- a/src/plugins/qmlprofiler/timelinenotesrenderpass.h
+++ b/src/libs/timeline/timelinenotesrenderpass.h
@@ -36,7 +36,7 @@
namespace Timeline {
-class TimelineNotesRenderPass : public TimelineRenderPass
+class TIMELINE_EXPORT TimelineNotesRenderPass : public TimelineRenderPass
{
public:
static const TimelineNotesRenderPass *instance();
diff --git a/src/plugins/qmlprofiler/timelineoverviewrenderer.cpp b/src/libs/timeline/timelineoverviewrenderer.cpp
similarity index 100%
rename from src/plugins/qmlprofiler/timelineoverviewrenderer.cpp
rename to src/libs/timeline/timelineoverviewrenderer.cpp
diff --git a/src/plugins/qmlprofiler/timelineoverviewrenderer.h b/src/libs/timeline/timelineoverviewrenderer.h
similarity index 96%
rename from src/plugins/qmlprofiler/timelineoverviewrenderer.h
rename to src/libs/timeline/timelineoverviewrenderer.h
index e22965c6ed8..1c4710734b6 100644
--- a/src/plugins/qmlprofiler/timelineoverviewrenderer.h
+++ b/src/libs/timeline/timelineoverviewrenderer.h
@@ -35,7 +35,7 @@
namespace Timeline {
-class TimelineOverviewRenderer : public TimelineAbstractRenderer
+class TIMELINE_EXPORT TimelineOverviewRenderer : public TimelineAbstractRenderer
{
public:
TimelineOverviewRenderer(QQuickItem *parent = 0);
diff --git a/src/plugins/qmlprofiler/timelineoverviewrenderer_p.h b/src/libs/timeline/timelineoverviewrenderer_p.h
similarity index 100%
rename from src/plugins/qmlprofiler/timelineoverviewrenderer_p.h
rename to src/libs/timeline/timelineoverviewrenderer_p.h
diff --git a/src/plugins/qmlprofiler/timelinerenderer.cpp b/src/libs/timeline/timelinerenderer.cpp
similarity index 98%
rename from src/plugins/qmlprofiler/timelinerenderer.cpp
rename to src/libs/timeline/timelinerenderer.cpp
index 69141399c5c..98fc95bc189 100644
--- a/src/plugins/qmlprofiler/timelinerenderer.cpp
+++ b/src/libs/timeline/timelinerenderer.cpp
@@ -30,9 +30,8 @@
#include "timelinerenderer_p.h"
#include "timelinerenderpass.h"
-#include "qmlprofilernotesmodel.h"
+#include "timelinenotesmodel.h"
#include "timelineitemsrenderpass.h"
-#include "qmlprofilerbindingloopsrenderpass.h"
#include "timelineselectionrenderpass.h"
#include "timelinenotesrenderpass.h"
@@ -41,7 +40,6 @@
#include
#include
#include
-#include
#include
#include
#include
diff --git a/src/plugins/qmlprofiler/timelinerenderer.h b/src/libs/timeline/timelinerenderer.h
similarity index 97%
rename from src/plugins/qmlprofiler/timelinerenderer.h
rename to src/libs/timeline/timelinerenderer.h
index f996c158d37..baed35f4774 100644
--- a/src/plugins/qmlprofiler/timelinerenderer.h
+++ b/src/libs/timeline/timelinerenderer.h
@@ -31,19 +31,20 @@
#ifndef TIMELINERENDERER_H
#define TIMELINERENDERER_H
-#include
-#include
#include "timelinezoomcontrol.h"
#include "timelinemodel.h"
#include "timelinenotesmodel.h"
#include "timelineabstractrenderer.h"
+#include
+#include
+
namespace Timeline {
class TimelineRenderPass;
class TimelineRenderState;
-class TimelineRenderer : public TimelineAbstractRenderer
+class TIMELINE_EXPORT TimelineRenderer : public TimelineAbstractRenderer
{
Q_OBJECT
diff --git a/src/plugins/qmlprofiler/timelinerenderer_p.h b/src/libs/timeline/timelinerenderer_p.h
similarity index 100%
rename from src/plugins/qmlprofiler/timelinerenderer_p.h
rename to src/libs/timeline/timelinerenderer_p.h
diff --git a/src/plugins/qmlprofiler/timelinerenderpass.cpp b/src/libs/timeline/timelinerenderpass.cpp
similarity index 100%
rename from src/plugins/qmlprofiler/timelinerenderpass.cpp
rename to src/libs/timeline/timelinerenderpass.cpp
diff --git a/src/plugins/qmlprofiler/timelinerenderpass.h b/src/libs/timeline/timelinerenderpass.h
similarity index 95%
rename from src/plugins/qmlprofiler/timelinerenderpass.h
rename to src/libs/timeline/timelinerenderpass.h
index 9068c2de85b..cb0d428db07 100644
--- a/src/plugins/qmlprofiler/timelinerenderpass.h
+++ b/src/libs/timeline/timelinerenderpass.h
@@ -31,6 +31,7 @@
#ifndef TIMELINERENDERPASS_H
#define TIMELINERENDERPASS_H
+#include "timeline_global.h"
#include
QT_FORWARD_DECLARE_CLASS(QSGNode)
@@ -39,9 +40,9 @@ namespace Timeline {
class TimelineAbstractRenderer;
class TimelineRenderState;
-class TimelineRenderPass {
+class TIMELINE_EXPORT TimelineRenderPass {
public:
- class State {
+ class TIMELINE_EXPORT State {
public:
virtual const QVector &expandedRows() const;
virtual const QVector &collapsedRows() const;
diff --git a/src/plugins/qmlprofiler/timelinerenderstate.cpp b/src/libs/timeline/timelinerenderstate.cpp
similarity index 100%
rename from src/plugins/qmlprofiler/timelinerenderstate.cpp
rename to src/libs/timeline/timelinerenderstate.cpp
diff --git a/src/plugins/qmlprofiler/timelinerenderstate.h b/src/libs/timeline/timelinerenderstate.h
similarity index 98%
rename from src/plugins/qmlprofiler/timelinerenderstate.h
rename to src/libs/timeline/timelinerenderstate.h
index 2333e836fb3..29b205cb997 100644
--- a/src/plugins/qmlprofiler/timelinerenderstate.h
+++ b/src/libs/timeline/timelinerenderstate.h
@@ -37,7 +37,7 @@
namespace Timeline {
-class TimelineRenderState {
+class TIMELINE_EXPORT TimelineRenderState {
public:
TimelineRenderState(qint64 start, qint64 end, qreal scale, int numPasses);
~TimelineRenderState();
diff --git a/src/plugins/qmlprofiler/timelinerenderstate_p.h b/src/libs/timeline/timelinerenderstate_p.h
similarity index 100%
rename from src/plugins/qmlprofiler/timelinerenderstate_p.h
rename to src/libs/timeline/timelinerenderstate_p.h
diff --git a/src/plugins/qmlprofiler/timelineselectionrenderpass.cpp b/src/libs/timeline/timelineselectionrenderpass.cpp
similarity index 100%
rename from src/plugins/qmlprofiler/timelineselectionrenderpass.cpp
rename to src/libs/timeline/timelineselectionrenderpass.cpp
diff --git a/src/plugins/qmlprofiler/timelineselectionrenderpass.h b/src/libs/timeline/timelineselectionrenderpass.h
similarity index 96%
rename from src/plugins/qmlprofiler/timelineselectionrenderpass.h
rename to src/libs/timeline/timelineselectionrenderpass.h
index f7445ac661d..fc6ee7dff6b 100644
--- a/src/plugins/qmlprofiler/timelineselectionrenderpass.h
+++ b/src/libs/timeline/timelineselectionrenderpass.h
@@ -37,7 +37,7 @@
namespace Timeline {
-class TimelineSelectionRenderPass : public TimelineRenderPass
+class TIMELINE_EXPORT TimelineSelectionRenderPass : public TimelineRenderPass
{
public:
static const TimelineSelectionRenderPass *instance();
diff --git a/src/plugins/qmlprofiler/timelinezoomcontrol.cpp b/src/libs/timeline/timelinezoomcontrol.cpp
similarity index 100%
rename from src/plugins/qmlprofiler/timelinezoomcontrol.cpp
rename to src/libs/timeline/timelinezoomcontrol.cpp
diff --git a/src/plugins/qmlprofiler/timelinezoomcontrol.h b/src/libs/timeline/timelinezoomcontrol.h
similarity index 97%
rename from src/plugins/qmlprofiler/timelinezoomcontrol.h
rename to src/libs/timeline/timelinezoomcontrol.h
index 611b92ac48d..6b7dcc144e0 100644
--- a/src/plugins/qmlprofiler/timelinezoomcontrol.h
+++ b/src/libs/timeline/timelinezoomcontrol.h
@@ -31,11 +31,12 @@
#ifndef TIMELINEZOOMCONTROL_H
#define TIMELINEZOOMCONTROL_H
+#include "timeline_global.h"
#include
namespace Timeline {
-class TimelineZoomControl : public QObject {
+class TIMELINE_EXPORT TimelineZoomControl : public QObject {
Q_OBJECT
Q_PROPERTY(qint64 traceStart READ traceStart WRITE setTraceStart NOTIFY traceChanged)
diff --git a/src/plugins/qmlprofiler/qml/qmlprofiler.qrc b/src/plugins/qmlprofiler/qml/qmlprofiler.qrc
index 63cd92822fe..9bf29785073 100644
--- a/src/plugins/qmlprofiler/qml/qmlprofiler.qrc
+++ b/src/plugins/qmlprofiler/qml/qmlprofiler.qrc
@@ -1,41 +1,9 @@
- Detail.qml
- CategoryLabel.qml
- MainView.qml
- RangeDetails.qml
- RangeMover.qml
- TimeDisplay.qml
clean_pane_small.png
recordOff.png
recordOn.png
- lock_closed.png
- lock_open.png
- ico_edit.png
- TimeMarks.qml
- Overview.qml
- SelectionRange.qml
- SelectionRangeDetails.qml
- arrow_down.png
- arrow_right.png
- dialog_shadow.png
- range_handle.png
- ico_selectionmode.png
- ico_zoom.png
- ico_prev.png
- ico_next.png
- ico_rangeselection.png
- ico_rangeselected.png
- ico_note.png
- ButtonsBar.qml
- ico_filter.png
- timelineitems.vert
- timelineitems.frag
bindingloops.vert
bindingloops.frag
- notes.vert
- notes.frag
- TimelineLabels.qml
- TimelineContent.qml
diff --git a/src/plugins/qmlprofiler/qmlprofiler.pro b/src/plugins/qmlprofiler/qmlprofiler.pro
index f8f8c9b915f..880b4bae476 100644
--- a/src/plugins/qmlprofiler/qmlprofiler.pro
+++ b/src/plugins/qmlprofiler/qmlprofiler.pro
@@ -9,6 +9,7 @@ SOURCES += \
qmlprofileranimationsmodel.cpp \
qmlprofilerattachdialog.cpp \
qmlprofilerbasemodel.cpp \
+ qmlprofilerbindingloopsrenderpass.cpp \
qmlprofilerclientmanager.cpp \
qmlprofilerdatamodel.cpp \
qmlprofilerdetailsrewriter.cpp \
@@ -30,20 +31,7 @@ SOURCES += \
qmlprofilertreeview.cpp \
qmlprofilerviewmanager.cpp \
qv8profilerdatamodel.cpp \
- qv8profilereventview.cpp \
- timelinemodel.cpp \
- timelinemodelaggregator.cpp \
- timelinerenderer.cpp \
- timelinezoomcontrol.cpp \
- timelineitemsrenderpass.cpp \
- qmlprofilerbindingloopsrenderpass.cpp \
- timelineselectionrenderpass.cpp \
- timelinenotesrenderpass.cpp \
- timelinerenderpass.cpp \
- timelinerenderstate.cpp \
- timelinenotesmodel.cpp \
- timelineabstractrenderer.cpp \
- timelineoverviewrenderer.cpp
+ qv8profilereventview.cpp
HEADERS += \
abstractqmlprofilerrunner.h \
@@ -53,6 +41,7 @@ HEADERS += \
qmlprofilerattachdialog.h \
qmlprofilerbasemodel.h \
qmlprofilerbasemodel_p.h \
+ qmlprofilerbindingloopsrenderpass.h \
qmlprofilerclientmanager.h \
qmlprofilerconstants.h \
qmlprofilerdatamodel.h \
@@ -75,47 +64,11 @@ HEADERS += \
qmlprofilertreeview.h \
qmlprofilerviewmanager.h \
qv8profilerdatamodel.h \
- qv8profilereventview.h \
- timelinemodel.h \
- timelinemodel_p.h \
- timelinemodelaggregator.h \
- timelinerenderer.h \
- timelinezoomcontrol.h \
- timelineitemsrenderpass.h \
- qmlprofilerbindingloopsrenderpass.h \
- timelineselectionrenderpass.h \
- timelinenotesrenderpass.h \
- timelinerenderpass.h \
- timelinerenderstate.h \
- timelinenotesmodel.h \
- timelinenotesmodel_p.h \
- timelinerenderer_p.h \
- timelinerenderstate_p.h \
- timelineabstractrenderer.h \
- timelineabstractrenderer_p.h \
- timelineoverviewrenderer_p.h \
- timelineoverviewrenderer.h
+ qv8profilereventview.h
RESOURCES += \
qml/qmlprofiler.qrc
DISTFILES += \
- qml/ButtonsBar.qml \
- qml/Detail.qml \
- qml/CategoryLabel.qml \
- qml/MainView.qml \
- qml/RangeDetails.qml \
- qml/RangeMover.qml \
- qml/TimeDisplay.qml \
- qml/TimelineContent.qml \
- qml/TimelineLabels.qml \
- qml/TimeMarks.qml \
- qml/SelectionRange.qml \
- qml/SelectionRangeDetails.qml \
- qml/Overview.qml \
- qml/timelineitems.frag \
- qml/timelineitems.vert \
qml/bindingloops.frag \
- qml/bindingloops.vert \
- qml/notes.frag \
- qml/notes.vert
+ qml/bindingloops.vert
diff --git a/src/plugins/qmlprofiler/qmlprofiler.qbs b/src/plugins/qmlprofiler/qmlprofiler.qbs
index d28ca70f91c..694d52e9f71 100644
--- a/src/plugins/qmlprofiler/qmlprofiler.qbs
+++ b/src/plugins/qmlprofiler/qmlprofiler.qbs
@@ -3,13 +3,13 @@ import qbs 1.0
QtcPlugin {
name: "QmlProfiler"
- Depends { name: "Qt"; submodules: ["widgets", "network"] }
- Depends { name: "Qt.quick"; condition: product.condition; }
+ Depends { name: "Qt"; submodules: ["widgets", "network", "quick"] }
Depends { name: "Aggregation" }
Depends { name: "QmlJS" }
Depends { name: "QmlDebug" }
Depends { name: "QtcSsh" }
Depends { name: "Utils" }
+ Depends { name: "Timeline" }
Depends { name: "Core" }
Depends { name: "AnalyzerBase" }
@@ -50,49 +50,12 @@ QtcPlugin {
"qmlprofilerviewmanager.cpp", "qmlprofilerviewmanager.h",
"qv8profilerdatamodel.cpp", "qv8profilerdatamodel.h",
"qv8profilereventview.h", "qv8profilereventview.cpp",
- "timelineabstractrenderer.cpp", "timelineabstractrenderer.h",
- "timelineabstractrenderer_p.h",
- "timelineitemsrenderpass.cpp", "timelineitemsrenderpass.h",
- "timelinemodel.cpp", "timelinemodel.h", "timelinemodel_p.h",
- "timelinemodelaggregator.cpp", "timelinemodelaggregator.h",
- "timelinenotesmodel.cpp", "timelinenotesmodel.h", "timelinenotesmodel_p.h",
- "timelinenotesrenderpass.cpp", "timelinenotesrenderpass.h",
- "timelineoverviewrenderer.cpp", "timelineoverviewrenderer.h",
- "timelineoverviewrenderer_p.h",
- "timelinerenderer.cpp", "timelinerenderer.h", "timelinerenderer_p.h",
- "timelinerenderpass.cpp", "timelinerenderpass.h",
- "timelinerenderstate.cpp", "timelinerenderstate.h", "timelinerenderstate_p.h",
- "timelineselectionrenderpass.cpp", "timelineselectionrenderpass.h",
- "timelinezoomcontrol.cpp", "timelinezoomcontrol.h"
]
}
Group {
name: "QML"
prefix: "qml/"
- files: [
- "ButtonsBar.qml",
- "Detail.qml",
- "CategoryLabel.qml",
- "MainView.qml",
- "Overview.qml",
- "RangeDetails.qml",
- "RangeMover.qml",
- "SelectionRange.qml",
- "SelectionRangeDetails.qml",
- "TimeDisplay.qml",
- "TimelineContent.qml",
- "TimelineLabels.qml",
- "TimeMarks.qml",
-
- "qmlprofiler.qrc",
-
- "bindingloops.frag",
- "bindingloops.vert",
- "notes.frag",
- "notes.vert",
- "timelineitems.frag",
- "timelineitems.vert"
- ]
+ files: ["qmlprofiler.qrc"]
}
}
diff --git a/src/plugins/qmlprofiler/qmlprofiler_dependencies.pri b/src/plugins/qmlprofiler/qmlprofiler_dependencies.pri
index f0e4624980d..114c006d9f5 100644
--- a/src/plugins/qmlprofiler/qmlprofiler_dependencies.pri
+++ b/src/plugins/qmlprofiler/qmlprofiler_dependencies.pri
@@ -5,6 +5,7 @@ QTC_LIB_DEPENDS += \
qmldebug \
qmljs \
ssh \
+ timeline \
utils
QTC_PLUGIN_DEPENDS += \
analyzerbase \
diff --git a/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.cpp b/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.cpp
index 1bf26446b44..94380d5b54f 100644
--- a/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.cpp
@@ -308,8 +308,7 @@ BindingLoopMaterialShader::BindingLoopMaterialShader()
: QSGMaterialShader()
{
setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qmlprofiler/bindingloops.vert"));
- setShaderSourceFile(QOpenGLShader::Fragment,
- QStringLiteral(":/qmlprofiler/bindingloops.frag"));
+ setShaderSourceFile(QOpenGLShader::Fragment, QStringLiteral(":/qmlprofiler/bindingloops.frag"));
}
void BindingLoopMaterialShader::updateState(const RenderState &state, QSGMaterial *, QSGMaterial *)
diff --git a/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.h b/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.h
index 3828a0f7323..712e1d705a1 100644
--- a/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.h
+++ b/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.h
@@ -31,9 +31,9 @@
#ifndef QMLPROFILERBINDINGLOOPSRENDERPASS_H
#define QMLPROFILERBINDINGLOOPSRENDERPASS_H
-#include "timelineabstractrenderer.h"
-#include "timelinerenderpass.h"
-#include "timelinerenderstate.h"
+#include "timeline/timelineabstractrenderer.h"
+#include "timeline/timelinerenderpass.h"
+#include "timeline/timelinerenderstate.h"
#include "qmlprofilerrangemodel.h"
#include
diff --git a/src/plugins/qmlprofiler/qmlprofilernotesmodel.cpp b/src/plugins/qmlprofiler/qmlprofilernotesmodel.cpp
index 069635c8584..a670771750f 100644
--- a/src/plugins/qmlprofiler/qmlprofilernotesmodel.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilernotesmodel.cpp
@@ -29,6 +29,7 @@
****************************************************************************/
#include "qmlprofilernotesmodel.h"
+#include "qmlprofilerdatamodel.h"
namespace QmlProfiler {
diff --git a/src/plugins/qmlprofiler/qmlprofilernotesmodel.h b/src/plugins/qmlprofiler/qmlprofilernotesmodel.h
index 74ce825a5bd..51de44ed7ec 100644
--- a/src/plugins/qmlprofiler/qmlprofilernotesmodel.h
+++ b/src/plugins/qmlprofiler/qmlprofilernotesmodel.h
@@ -32,7 +32,7 @@
#define QMLPROFILERNOTESMODEL_H
#include "qmlprofilermodelmanager.h"
-#include "timelinenotesmodel.h"
+#include "timeline/timelinenotesmodel.h"
#include
#include
diff --git a/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp b/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp
index 3f8e7794636..4957d384a69 100644
--- a/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerrangemodel.cpp
@@ -32,9 +32,9 @@
#include "qmlprofilermodelmanager.h"
#include "qmlprofilerdatamodel.h"
#include "qmlprofilerbindingloopsrenderpass.h"
-#include "timelinenotesrenderpass.h"
-#include "timelineitemsrenderpass.h"
-#include "timelineselectionrenderpass.h"
+#include "timeline/timelinenotesrenderpass.h"
+#include "timeline/timelineitemsrenderpass.h"
+#include "timeline/timelineselectionrenderpass.h"
#include
#include
diff --git a/src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp b/src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp
index 595886e999b..9c59645c5be 100644
--- a/src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerstatewidget.cpp
@@ -71,7 +71,7 @@ QmlProfilerStateWidget::QmlProfilerStateWidget(QmlProfilerStateManager *stateMan
QVBoxLayout *layout = new QVBoxLayout(this);
resize(200,70);
- d->shadowPic.load(QLatin1String(":/qmlprofiler/dialog_shadow.png"));
+ d->shadowPic.load(QLatin1String(":/timeline/dialog_shadow.png"));
d->text = new QLabel(this);
d->text->setAlignment(Qt::AlignCenter);
diff --git a/src/plugins/qmlprofiler/qmlprofilertimelinemodel.h b/src/plugins/qmlprofiler/qmlprofilertimelinemodel.h
index 260054dd102..5d5a4d3cfe0 100644
--- a/src/plugins/qmlprofiler/qmlprofilertimelinemodel.h
+++ b/src/plugins/qmlprofiler/qmlprofilertimelinemodel.h
@@ -31,7 +31,10 @@
#ifndef QMLPROFILERTIMELINEMODEL_H
#define QMLPROFILERTIMELINEMODEL_H
-#include "timelinemodel.h"
+#include "qmlprofiler_global.h"
+#include "qmlprofilermodelmanager.h"
+#include "qmlprofilerdatamodel.h"
+#include "timeline/timelinemodel.h"
namespace QmlProfiler {
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp
index 6f4bd27db77..6cbdf27fd1a 100644
--- a/src/plugins/qmlprofiler/qmlprofilertool.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp
@@ -37,7 +37,6 @@
#include "qmlprofilerclientmanager.h"
#include "qmlprofilermodelmanager.h"
#include "qmlprofilerdetailsrewriter.h"
-#include "timelinerenderer.h"
#include "qmlprofilernotesmodel.h"
#include
diff --git a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp
index 11d066c5e43..6d4bf9d7b6b 100644
--- a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp
@@ -32,19 +32,21 @@
#include "qmlprofilertool.h"
#include "qmlprofilerstatemanager.h"
#include "qmlprofilermodelmanager.h"
-#include "timelinemodelaggregator.h"
#include "qmlprofilernotesmodel.h"
#include "qmlprofileranimationsmodel.h"
#include "qmlprofilerrangemodel.h"
#include "qmlprofilerplugin.h"
-#include "timelineoverviewrenderer.h"
-
-// Needed for the load&save actions in the context menu
-#include
// Communication with the other views (limit events to range)
#include "qmlprofilerviewmanager.h"
-#include "timelinezoomcontrol.h"
+
+#include "timeline/timelinezoomcontrol.h"
+#include "timeline/timelinemodelaggregator.h"
+#include "timeline/timelinerenderer.h"
+#include "timeline/timelineoverviewrenderer.h"
+
+// Needed for the load&save actions in the context menu
+#include
#include
@@ -148,7 +150,7 @@ QmlProfilerTraceView::QmlProfilerTraceView(QWidget *parent, Analyzer::IAnalyzerT
d->m_modelProxy);
d->m_mainView->rootContext()->setContextProperty(QLatin1String("zoomControl"),
d->m_zoomControl);
- d->m_mainView->setSource(QUrl(QLatin1String("qrc:/qmlprofiler/MainView.qml")));
+ d->m_mainView->setSource(QUrl(QLatin1String("qrc:/timeline/MainView.qml")));
QQuickItem *rootObject = d->m_mainView->rootObject();
connect(rootObject, SIGNAL(updateCursorPosition()), this, SLOT(updateCursorPosition()));
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index aefb5d9f4a9..45c931870a1 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -20,5 +20,5 @@ SUBDIRS += \
valgrind
qtHaveModule(declarative) {
- SUBDIRS += qml qmlprofiler
+ SUBDIRS += qml timeline
}
diff --git a/tests/auto/auto.qbs b/tests/auto/auto.qbs
index b427ed710be..23a1e5e6e10 100644
--- a/tests/auto/auto.qbs
+++ b/tests/auto/auto.qbs
@@ -18,6 +18,7 @@ Project {
"profilewriter/profilewriter.qbs",
"qml/qml.qbs",
"qtcprocess/qtcprocess.qbs",
+ "timeline/timeline.qbs",
"treeviewfind/treeviewfind.qbs",
"utils/utils.qbs",
"utils_stringutils/utils_stringutils.qbs",
diff --git a/tests/auto/qmlprofiler/qmlprofiler.pro b/tests/auto/timeline/timeline.pro
similarity index 100%
rename from tests/auto/qmlprofiler/qmlprofiler.pro
rename to tests/auto/timeline/timeline.pro
diff --git a/tests/auto/timeline/timeline.qbs b/tests/auto/timeline/timeline.qbs
new file mode 100644
index 00000000000..205d53f1242
--- /dev/null
+++ b/tests/auto/timeline/timeline.qbs
@@ -0,0 +1,11 @@
+import qbs
+
+Project {
+ name: "Timeline autotests"
+
+ property path timelineDir: project.ide_source_tree
+ + "/src/libs/timeline"
+ references: [
+ "timelinemodel/timelinemodel.qbs"
+ ]
+}
diff --git a/tests/auto/qmlprofiler/timelinemodel/timelinemodel.pro b/tests/auto/timeline/timelinemodel/timelinemodel.pro
similarity index 66%
rename from tests/auto/qmlprofiler/timelinemodel/timelinemodel.pro
rename to tests/auto/timeline/timelinemodel/timelinemodel.pro
index c08a649f5e0..a0b56add42c 100644
--- a/tests/auto/qmlprofiler/timelinemodel/timelinemodel.pro
+++ b/tests/auto/timeline/timelinemodel/timelinemodel.pro
@@ -1,4 +1,4 @@
-QTC_PLUGIN_DEPENDS += qmlprofiler
+QTC_LIB_DEPENDS += timeline
include(../../qttest.pri)
SOURCES += \
diff --git a/tests/auto/timeline/timelinemodel/timelinemodel.qbs b/tests/auto/timeline/timelinemodel/timelinemodel.qbs
new file mode 100644
index 00000000000..f1faa56f2a2
--- /dev/null
+++ b/tests/auto/timeline/timelinemodel/timelinemodel.qbs
@@ -0,0 +1,14 @@
+import qbs
+
+QtcAutotest {
+ Depends { name: "Timeline" }
+ Depends { name: "Qt.gui" }
+
+ name: "Timeline Model autotest"
+ Group {
+ name: "Test sources"
+ files: [
+ "tst_timelinemodel.cpp"
+ ]
+ }
+}
diff --git a/tests/auto/qmlprofiler/timelinemodel/tst_timelinemodel.cpp b/tests/auto/timeline/timelinemodel/tst_timelinemodel.cpp
similarity index 98%
rename from tests/auto/qmlprofiler/timelinemodel/tst_timelinemodel.cpp
rename to tests/auto/timeline/timelinemodel/tst_timelinemodel.cpp
index f24218a7b9f..eb963e157d7 100644
--- a/tests/auto/qmlprofiler/timelinemodel/tst_timelinemodel.cpp
+++ b/tests/auto/timeline/timelinemodel/tst_timelinemodel.cpp
@@ -29,9 +29,8 @@
****************************************************************************/
#include
-#include
-
-using namespace Timeline;
+#include
+#include
static const int DefaultRowHeight = 30;
static const int NumItems = 10;
@@ -39,7 +38,7 @@ static const qint64 ItemDuration = 1 << 19;
static const qint64 ItemSpacing = 1 << 20;
class DummyModelPrivate;
-class DummyModel : public TimelineModel
+class DummyModel : public Timeline::TimelineModel
{
Q_OBJECT
friend class tst_TimelineModel;