Commit Graph

162 Commits

Author SHA1 Message Date
baldurk d9bab79dbc Allow clicking on labels of collapse group boxes to toggle 2018-06-13 09:17:03 +01:00
baldurk 082ab4d75d GUIInvoke takes a QObject* to avoid callbacks after object lifetime
* The GUIInvoke object takes a QObject, and uses QPointer to check that
  it hasn't been deleted when the callback fires. This prevents delayed
  callbacks from executing after the object has been deleted and
  crashing.
* In most cases the pointer is just 'this'.
2018-05-08 11:54:34 +01:00
Jake Turner cae6b44a97 Fix xcode9.3 -Wunused-lambda-capture errors
Disable the warning on 3rdparty files
${glslang_dir}/hlsl/hlslParseHelper.cpp

Disable the warning on files where fixing it would cause a non-OSX compile error
os/os_specific.cpp
2018-04-30 10:53:42 +01:00
baldurk 4a986f44d3 Add a custom collapsing group box control 2018-04-26 13:34:09 +01:00
Baldur Karlsson 1a268ace8b Add async tags for display widget painting
* This prevents widget painting from getting out of control and queuing
  up many redundant paints which slows down processing of the command
  queue.
* Also remove a spammy command to disable pixel context that only ever
  got called when pixel context was already disabled (right after a
  reset - at all other times it stays active).
2018-03-12 15:46:44 +00:00
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