The ones we'll refactor into the timeline library should be called
timeline* and the others should be called qmlprofiler*.
Change-Id: I6ecccbe4ef523681ca0baeef140368e2c1839964
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Avoid keeping multiple, potentially diverging copies of the same time
information and make sure all the times are consistent with each other.
Stating the times as properties allows us to use bindings in more
places, too.
Change-Id: I9cdd4f561ac22ad795939594ba340b1fbc070e9a
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
It's rather unintuitive if it only centers horizontally.
Change-Id: I9245da0b26fccc14a100804715d09aaa82059413
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This is faster and more accurate than propagating by source location.
Change-Id: I6aed3b1591380b49dd7c56a66bdc35912570e347
Task-number: QTCREATORBUG-12932
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
It wasn't helpful that this method could either count all events or
only the events from a specific model.
Change-Id: I09dcb37edd3403a23f6ee9008fc71b6761aa9e26
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Like this we can easily refer to them from QML and it makes it simpler
to see if we mean the overall height or the height of a single category.
Change-Id: Ia2b79d99b5c46c3d9563cfc2ed0715bc352ce9b4
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
The convention is now that selections are the rows in the expanded
timeline, "types" are the types in the QmlProfilerDataModel, and
events are the single boxes in the timeline. Thus, the event view
shows only types and for consistency the V8 view does so, too.
Having eventId as synonym for "type index" and "event index" as
actual index into the list of events is confusing.
Change-Id: I6b7c4c3f1ab0a8b71c511de52ab296a2e91cf5f0
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This clarifies that the item height is not absolute but relative to the
row height, and it reduces the ambiguity of the various "height" methods.
Change-Id: I391441147c88b47a14e539fc3853702bb517d27b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
By listening only to the relevant expandedChanged and rowHeightChanged
signals we avoid accessing invalid data on clearing. When clearing the
models each one is collapsed. The collapsing in turn triggers
rebuilding of the labels. Unrelated labels could access already
cleared data like this.
Change-Id: I3fad45f5c6279019fbc27ec54e758f498a9d55f2
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
There is no use in creating multiple nested maps and lists and
selecting special translation contexts for that.
Change-Id: Ib83ab651adca8258a0e5b9ac99a657623a24145b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Also, all methods about events in models don't really need the "event"
prefix as that is what the models are about.
Change-Id: I7b995aa9c9dce7e01d4c862d094b1e73e6b6fb40
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Also, remove categoryTitles() which isn't used anywhere.
Change-Id: I919abf1221fb71d407eb04190d27180ed39b7b45
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
A numerical representation of "state" is not so useful after all.
Change-Id: I7fc3ae08a2fd44000b5543f4ba25730a8d79358d
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
It's unused and there is no point in having it as you can retrieve the
time span from zoomControl
Change-Id: I474ecf4ee6c183ac8b97bbac9c47618f52d956c0
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
If you resize the rows to at least double their default size and if the
model specifies a scale it will be drawn as additional horizontal lines
and numbers in the background.
Change-Id: I02844b4102e043031ee04daa45666dc3f8da1d2e
Task-number: QTCREATORBUG-12337
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Like that we can provide functionality to interactively resize rows in
the model so that one can zoom in to more interesting parts.
Change-Id: I31f14cd8aa37703240ebec744ca2e77188fb0f27
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Sending a signal for every model when clearing or loading data is not
very smart.
Change-Id: Ifc81d74f6b7f93bcd6748a919dfb553050b8d725
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Using strings to identify equal events is terribly inefficient. By
keeping a global list of event types we can assign each event a
numerical type index and use that to compare them.
We can also avoid excessive string copying and data duplication by
referring to the global type list where event type information is
needed.
Task-number: QTCREATORBUG-11823
Change-Id: I837bd5d0f5395b0003002ef8dd278fb27679c65d
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
With only one category per model we only have one eventType per model
and thus we don't need to differentiate per type anymore when
calculating the nesting.
Change-Id: Ic42a1c5c056f3480b7842a57fbff66a5e907abfb
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This simplifies the code a lot and allows for more flexibility
when interacting with the data.
Change-Id: I69630071eee66840e905fcd95ba8c708742d58b6
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This allows more precise specification of which event is supposed to be
selected.
Task-number: QTCREATORBUG-11945
Change-Id: Iff2e9bb8569711cc5df72a5ca55956e0091d6163
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
There is no reason to express colors as QVariantList.
Change-Id: I8c816e547b2f9be0f02a9d275791021ac06cff4f
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
There is no real reason for the existence of a QmlProfilerSimpleModel.
Change-Id: I6419973cfad5564913bf92f17fdcf7e529af4b01
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
We don't want to emit a signal for each event being added. That's
expensive and doesn't serve any purpose. We also don't have to save
the availability of data in QML as it isn't used anywhere.
Change-Id: I32db06a1955a7cfd6b569f50b81bf5278333b622
Reviewed-by: Kai Koehne <kai.koehne@digia.com>