157 Commits

Author SHA1 Message Date
baldurk 138d3bd040 Fix painter clipping when resizing tree-branch column quite small 2018-02-19 19:37:28 +00:00
baldurk cea77ebd39 Manually propagate clicks on custom tooltip to underlying widget
* Qt::WA_TransparentForMouseEvents is supposed to do this but clearly
  doesn't work as it's supposed to.
2018-02-19 19:37:26 +00:00
baldurk 8691972212 Fix some minor rendering glitches (off by one errors) 2018-02-19 00:52:14 +00:00
baldurk cafa6901bb Implement copy-paste handler for RDTableView 2018-02-19 00:52:13 +00:00
baldurk 96faed6961 Call QHeaderView::initializeSections() to initialise QHeaderView
* Because many of QHeaderView's functions are annoyingly not virtual,
  we need some stub data available in QHeaderView even if it won't be
  used for anything much, like the number of sections.
2018-02-19 00:52:13 +00:00
baldurk cad5520238 Tweak the event browser to support richtext in drawcall names
* This lets Resource ID text become links to the resource inspector even
  in drawcall names (like glBlitFramebuffer(src, dst)).
2018-02-13 21:10:06 +00:00
baldurk 2f41469228 clang compile fix - missing override specifier 2018-02-13 10:08:58 +00:00
baldurk 48fd9bf1ed Fix sizing of stretch columns when one column is hidden 2018-02-12 20:48:06 +00:00
baldurk f2ece44e49 Implement sorting for RDTreeWidget 2018-02-12 20:48:05 +00:00
baldurk 2354a0e71d Change OrderedListEditor to be a widget, not a dialog 2018-01-17 21:07:04 +00:00
baldurk e305029ddd Update copyright years to 2018 2018-01-01 17:55:29 +00:00
baldurk bca1dbef87 Don't insert literal tab if accepting tabs, emit keypress event
* This lets the user decide if they want to do something special with
  tab or just insert the character
2017-12-25 12:53:42 +00:00
baldurk 95bebdbbe1 [Coverity] Remove unused call without side-effects 2017-12-21 12:19:02 +00:00
baldurk 80cb5b093a Ensure RDHeaderView remains valid when deferring work 2017-12-07 15:09:51 +00:00
baldurk dff6ce1245 Fix missing #include 2017-11-29 20:10:18 +00:00
baldurk 8931ed4086 Move leave and keyPress events from RDTreeWidget to RDTreeView 2017-11-29 19:01:23 +00:00
baldurk af7373fb54 Handle root index changing in RDHeaderView - refresh section sizes 2017-11-29 19:01:23 +00:00
baldurk 286e117d56 Add headers needed for compilation without PCH
* Removing includes of Code/CaptureContext.h removed some dependencies.
2017-11-23 00:20:01 +00:00
baldurk cadc0f3855 Fix issue chaining RDTreeWidgetDelegate onto RDTreeViewDelegate
* We need to inherit to chain these two, as otherwise when the tree view
  delegate calls sizeHint() it passes to the tree widget delegate, but
  then has no way to return back to the tree view for the overridden
  initStyleOption.
* If there was a built-in way to chain delegates like styles (which
  solve this problem by calling back to baseStyle when going from one
  function to another), or better yet a way to avoid the base
  QStyledItemDelegate initStyleOption from completely trampling all over
  the option passed in to any function, this wouldn't be necessary.
2017-11-22 19:11:24 +00:00
baldurk 43d561a4c0 Fix NULL checking and NULL dereferencing issues
* Reported by Coverity Scan - most of these are not an issue and a
  couple of them are coverity getting really confused (like seeing a
  pointer being assigned to NULL and a count to 0, then a few lines
  later declaring that a loop 0..count will dereference the pointer).
* However it's harmless in all cases to add a bit of robustness to keep
  the analysis happy.
2017-11-22 19:11:21 +00:00
baldurk e75a468d3c Remove direct include of Code/CaptureContext.h in almost all files
* This is a leftover from before the interface was hoisted out, and most
  windows were still calling directly to CaptureContext instead of via
  the public ICaptureContext interface
2017-11-22 19:11:20 +00:00
baldurk 2514ad4126 Remove some dead code that's no longer needed
* Reported by Coverity Scan
2017-11-22 19:11:18 +00:00
baldurk 25ea14c965 Fix possible division by zero in edge cases
* Reported by Coverity Scan
2017-11-22 12:05:59 +00:00
baldurk c860d8baa3 Fix uninitialized variable warnings from static analysis
* Reported by Coverity Scan
2017-11-22 11:31:07 +00:00
baldurk a738c7726a Compile fixes on linux 2017-11-21 22:32:39 +00:00
baldurk 1f9a2e340c Add an extra minimum size hint, since Qt behaviour is broken by design
* The Qt behaviour is that if you call setMinimumSize on a widget, then
  the minimumSizeHint is IGNORED. So it is impossible to say "use this
  minimum size, unless the widget wants a higher minimum size".
* So instead we do this ourselves in RDLabel. Sigh.
2017-11-21 19:10:33 +00:00
baldurk f65d93cd68 Add support for RichResourceText in RDLabel 2017-11-21 19:10:31 +00:00
baldurk 32a74e20e1 Extract out most code for text-with-ResourceId-links from RDTreeWidget
* The RDTreeWidget items still use this code, but it can now be reused
  on other widgets like RDLabel.
2017-11-21 14:45:22 +00:00
baldurk ec8a4e82fb Add includes needed for RDLineEdit on linux 2017-11-21 09:56:14 +00:00
baldurk 657c343ac8 Support multi-line input in the python shell 2017-11-20 20:01:02 +00:00
baldurk 31b7662db1 Fix adding empty tree widget items in performance counter selection 2017-11-20 20:01:01 +00:00
Cory Bloor 58b628ee8b Fix unused variables
In almost all cases these can be removed. The only exception is in
ShaderViewer.cpp, where regIdx should have been used.
2017-11-18 00:17:06 +01:00
baldurk e790555914 Fix another case with not enough column data and protect against crashes 2017-11-17 17:06:51 +00:00
baldurk d206a012f3 Fix incorrect data-to-column count when adding data to treewidget
* We also add an error in case it happens again.
2017-11-17 16:33:00 +00:00
baldurk 33ff48811b Normalise terminology in UI code - don't call captures 'logs'
* Log is an overloaded term since it can also mean the debug log. We now
  consistently refer to capture files as capture files or just captures
  for short. The log is just for log messages and diagnostics.
* The user-facing UI was mostly already consistent, but many of the
  public interfaces exposed to python needed to be renamed, and it made
  more sense just to make everything consistent.
2017-11-17 16:30:57 +00:00
baldurk 200f0799a4 Generate clickable links to resource inspector in RDTreeWidget 2017-11-17 16:30:56 +00:00
baldurk fb6211a3db Return user data from RDTreeWidget for UserRole variants 2017-11-17 16:30:47 +00:00
baldurk 79b51591c2 Add ForwardingDelegate for use in RD extended widgets.
* This item delegate will forward on either to a specified other
  delegate or to the base implementation. This allows chaining delegates
  (i.e. having one built-in to the widget, which forwards to a user-set
  delegate).
2017-11-17 16:30:47 +00:00
baldurk 62260a6404 Add column alignment function to RDTreeWidget 2017-10-27 12:26:01 +01:00
baldurk 01b1260734 Make sure to refresh model if only children were added 2017-08-31 18:34:16 +01:00
baldurk d68f00ca72 Reset hover index when widget is cleared, don't leave it to be stale 2017-08-28 18:50:18 +01:00
baldurk f295df15f4 Add missing override specifier 2017-08-24 22:38:16 +01:00
baldurk 2a0fac1ad6 Compile fixes on linux 2017-08-24 19:15:28 +01:00
baldurk 5619ed66b4 Fix RDTreeWidget to allow for checkable items 2017-08-24 16:33:39 +01:00
baldurk 81ec99b58a Don't crash in data() if no data has ever been set. Allow adding columns 2017-08-24 16:04:26 +01:00
baldurk c0b123c575 Add itemChanged signal for RDTreeWidget 2017-08-24 16:03:49 +01:00
baldurk 1f13a1466e Add RDTreeWidgetItemIterator for depth-first forward-only iteration 2017-08-24 16:03:01 +01:00
baldurk 15ecaf167c Select rows at once in perf viewer, and add copy-paste handler 2017-08-24 15:00:05 +01:00
baldurk 1b88a39339 Optimise tree widget clearing and child adding by batching updates
* This takes a nice chunk of time off the pipeline state view in
  particular when changing between events.
2017-08-21 17:14:21 +01:00
baldurk ef84f494a2 Add a macro that enables qt-compatibility in the renderdoc replay API
* This will be used to remove the ToQStr everywhere (where it's not
  used for actual stringification of enums/structs)
2017-08-16 18:28:11 +01:00