Commit Graph

53 Commits

Author SHA1 Message Date
baldurk b311e65dbd Change margins to be a minimum instead of adding them
* The style itself may have added some margins and we don't want to add
  extra margins, just set a minimum.
2017-06-01 18:47:42 +01:00
baldurk 3076b4337b Move size delegate into item margins implemented by RDTreeView 2017-06-01 14:17:00 +01:00
baldurk 870f0cc166 Filename filters should be translated 2017-05-15 10:11:55 +01:00
baldurk bbff0fce1c Implement row colouring and tree colouring in event browser.
* Also do custom painting of branches to do proper full-row colouring
  instead of leaving an ugly gap around the tree controls.
2017-05-04 20:36:46 +01:00
baldurk ab432f24fc Implement the UI option for preferring monospaced font 2017-05-04 20:36:46 +01:00
baldurk 0ecc6ca877 Enable QT_NO_CAST_FROM_ASCII & QT_NO_CAST_TO_ASCII
* Added a couple of utility macros to help with the conversion. lit() is
  paired with tr() for untranslated text.
* QFormatStr is more explicitly for non-textual formatting strings.
* Both are just #define'd to QStringLiteral()
2017-05-02 22:58:12 +01:00
baldurk 4199a857f5 Add right-click context menu to event browser with expand/collapse all 2017-04-27 19:47:50 +01:00
baldurk c2690b8211 Remove some cases where resources were being loaded and parsed @ runtime 2017-04-27 19:47:49 +01:00
baldurk 605fd4dcc5 Use single QVariant tagging on RDTreeWidgetItem instead of setData
* It saves on allocating a vector of vectors and in most cases is all we
  need.
2017-04-21 18:45:12 +01:00
baldurk f65f5ea9da Use new RDTreeWidget everywhere in favour of QTreeWidget
* Since we're promoting everything, we reset the behaviour of
  RDTreeWidget so that it's not doing anything different by default.
* RDTreeWidget's interface is a bit different, exposing some useful
  things like a single selected item and so on.
* We also can't set columns in the Qt Creator UI anymore, so we set them
  from code.
2017-04-21 18:44:52 +01:00
baldurk 143d35ff31 Add export-to-text function for event browser 2017-04-20 13:04:28 +01:00
baldurk f88c4c4ba0 Disable event browser toolbar buttons while no log is open 2017-04-20 12:54:49 +01:00
baldurk 8ad0ea60e0 Use the configured time unit used for the event browser duration column 2017-04-20 12:46:30 +01:00
baldurk 494086f40d Rename RenderManager to ReplayManager 2017-04-18 14:57:48 +01:00
baldurk 6930841705 Rename ReplayRenderer to ReplayController
* It's not a renderer, it's an interface to controlling the replay and
  any 'renderer' type work actually happens in ReplayOutput.
2017-04-18 14:57:47 +01:00
baldurk f6c045f473 Refactor public interface to be less strict C and more python friendly
* Generally this means removing ref out parameters and instead returning
  values. In a couple of cases we will want to avoid copies in future
  either by returning const references (e.g. to the pipeline state which
  is immutable).
* At the same time, some pointless bool return values that were always
  true and didn't indicate errors have been removed. They can be added
  again if an error condition comes back.
* Some free functions still have out parameters as C linkage doesn't
  allow returning user types by value.
* The C# UI still invokes into C wrappers for all the C++ classes, which
  handle taking the return value and doing a copy into an out parameter
  still for compatibility.
2017-04-18 14:57:46 +01:00
baldurk 094c4164dc Refactor qrenderdoc to provide stable, clean and deliberate API
* Note, this API is still in-flux and beta, so there may still be some
  more changes before it's 'stable', and even then it will still be
  subject to some amount of change.
* This API is then exposed to python via SWIG bindings and hides
  internals that don't need to be visible, and means the actual API is
  easier to work with.
* We also use this API to reduce inter-dependencies between different
  windows that need to interact with each other at a high level.
* The naming is python/standard RenderDoc TitleCase method names, not
  Qt style camelCase methods.

# Conflicts:
#	qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.cpp
#	qrenderdoc/Windows/TextureViewer.cpp
2017-04-18 14:57:43 +01:00
baldurk 0ad5709df3 Remove poorly chosen 'Fetch' prefix from a few data structures.
* This goes all the way back to the first iterations where these were
  the only structures and 'Fetch' referred to them returning data from
  the core code to the UI.
2017-04-18 14:57:36 +01:00
baldurk d40fc8471d Change API enums to enum class, remove now redundant prefixing
* This gives a little nicer syntax, a bit better type safety, and also
  reflects better for SWIG bindings. Overall it's a minor change but
  better.
* We don't update the C# UI at all, since it's soon to be removed and
  not worth the effort/code churn.
* For now so we're ABI compatible with C#, all enums are uint32_t, but
  that is an obvious optimisation in future to reduce struct packing.
* We avoid 'None' as an enum value, because it's a reserved word in
  python so will cause problems generating bindings.
2017-04-18 14:57:33 +01:00
baldurk 206d9e0b34 Don't clear selection for eventbrowser when losing focus 2017-02-14 19:14:53 +00:00
baldurk ea7cee9d13 Make the find behaviour in event browser to be a bit more 'sticky'
* Clicking away from the find box doesn't lose your highlight/search,
  and if you open find again it has the previous search text there.
2017-02-13 19:20:23 +00:00
baldurk fa33d883ac Don't make a blocking call to the UI from render thread 2017-02-13 19:20:21 +00:00
baldurk 99fc18e162 Add "min-max" naming in EID column for marker regions 2017-02-13 19:20:21 +00:00
baldurk 1100f36d77 Add toolbar buttons for previous/next drawcall step 2017-02-13 19:20:20 +00:00
baldurk 0c79d778e9 Add shortcuts for functionality in event browser 2017-02-13 19:20:13 +00:00
baldurk 55e5bcca61 Implement bookmark handling in the event browser 2017-02-13 14:29:13 +00:00
baldurk 2285b209c3 Access CaptureContext & RenderManager by reference, not pointer
* Neither of these can or should be NULL so enforce it explicitly.
2017-02-09 19:28:24 +00:00
baldurk 9e47ed53b5 Move resources.qrc into Resources/ folder 2017-02-09 19:28:22 +00:00
baldurk 477df04072 Make sure we're on a consistent event before calling OnLogFileLoaded
* Certain panels like BufferViewer assume there is a current drawcall
  at startup and not an invalid event ID like 0. Normally the event
  browser is loaded first and sets the event ID, but if it's later in
  the list this will break.
2017-02-01 11:17:56 +00:00
Alex Smith 6e2fc42cbd qrenderdoc: Show currently selected event in the API inspector
Currently, selecting an event with children (e.g. vkCmdExecuteCommands)
in the event browser will cause the API inspector window to show the
final child event, rather than the event itself. This behaviour makes
sense everywhere else: selecting an event with children shows the state
after all children have completed.

However, for the API inspector, we want to be able see API calls for
the parent event when it is selected rather than those of its last
child, particularly in the case of vkCmdExecuteCommands which may have
other API calls leading up to it.

To allow this, distinguish between the "current event" and "selected
event". For an event with children, the former refers to the last
child, while the latter refers to the event itself. ILogViewerForm now
has two separate event callbacks for when either one changes.

The API inspector now makes use of the selected event, while everything
else continues to use the current event.
2017-01-14 20:23:51 +00:00
baldurk 030cbfde9a Batch update copyright years everywhere 2017-01-06 12:13:31 +00:00
baldurk 86c9742309 Let capture context manage singleton window panes 2016-11-14 15:20:51 +01:00
baldurk bb2f3a205c Move common Qt utility functions & JSON I/O together in a single place 2016-11-09 13:23:53 +01:00
baldurk b96d49190c Avoid naming manually connected slots on_x_y() 2016-10-07 15:58:45 +02:00
baldurk ccfa1ceaed Add some utility functions to rdctype::array/str
* Avoids the need to directly reference .elems to cast to const char*
  for strings, and has begin()/end() for C++11 foreach loops
2016-10-07 15:58:44 +02:00
baldurk 0b6b6b3e86 Add MIT License comment to the head of all source files 2016-10-04 19:54:31 +02:00
baldurk e91634004f Rename Core to CaptureContext 2016-10-04 19:54:31 +02:00
baldurk 7ec3049844 Rename LineEditFocusWidget to RDLineEdit
* It seems due to deficiencies in Qt's design, there will be a
  substantial need for these small custom subclasses just to add basic
  functionality that should have been present in the original. So we'll
  adopt a naming scheme of QFooBar -> RDFooBar for this 'almost the
  same widget' type subclassing, compared to more custom/changed ones.
2016-10-04 19:54:24 +02:00
baldurk 5135fd6a56 When selecting a marker, select the next 'real' draw instead 2016-10-04 19:54:21 +02:00
baldurk 158c67439b Set to last event on startup in EventBrowser 2016-09-30 14:22:23 +02:00
baldurk 5f28b745a2 Format code according to newly added clang-format
_  /)
                 mo / )
                 |/)\)
                  /\_
                  \__|=
                 (    )
                 __)(__
           _____/      \\_____
          |  _     ___   _   ||
          | | \     |   | \  ||
          | |  |    |   |  | ||
          | |_/     |   |_/  ||
          | | \     |   |    ||
          | |  \    |   |    ||
          | |   \. _|_. | .  ||
          |                  ||
          |repository history||
          |                  ||
  *       | *   **    * **   |**      **
   \))ejm97/.,(//,,..,,\||(,,.,\\,.((//
2016-05-22 19:41:53 +02:00
baldurk 70b99a4412 Remove antiquated 'multiple frames in one capture' support.
* Cleans up the code a bunch, this support is unlikely to ever return
  and if it does it will need a rethink anyway.
2016-04-13 00:28:09 +02:00
baldurk c746957fb2 linux compile fixes 2016-02-07 18:50:04 +01:00
baldurk 1f5c8a450a linux compile fixes 2015-07-10 18:08:24 +02:00
baldurk 0cacba09ee Make EID column a little narrower 2015-07-10 17:54:41 +02:00
baldurk c1344c2ff3 Implement jump and find functionality in event browser 2015-07-10 16:38:42 +02:00
baldurk 97920b7b31 re-indent Qt code to match rest of C++ code 2015-07-10 16:38:41 +02:00
baldurk 9276cb875f Hook up the jump/find bars 2015-07-10 16:38:41 +02:00
baldurk fa4e98d1f7 Add UI for find, jump to event and bookmark toolbars (not implemented) 2015-07-10 16:38:40 +02:00
baldurk 7eded723a9 Implement event browser time drawcalls button 2015-07-10 16:38:39 +02:00