Commit c40d9e9d authored by Ulf Hermann's avatar Ulf Hermann
Browse files

Timeline: Create new library from contents of QmlProfiler



Change-Id: I964b2f149e237eb25a08600e8dab8968e8bc0cb9
Reviewed-by: default avatarKai Koehne <kai.koehne@theqtcompany.com>
parent acc4d1a4
......@@ -12,7 +12,8 @@ SUBDIRS = \
qmldebug \
qmleditorwidgets \
glsl \
ssh
ssh \
timeline
for(l, SUBDIRS) {
QTC_LIB_DEPENDS =
......
......@@ -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",
......
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.
......@@ -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
......
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