Commit Graph

145 Commits

Author SHA1 Message Date
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
baldurk a6f0d07e09 Remove most stylesheet use as this messes with a custom style
* Use palettes where a certain colour is needed.
* Still need some solution for table borders in grid layouts
2017-07-28 19:06:44 +01:00
baldurk 247382af51 Fix a few widgets to properly respond to and use style changes 2017-07-28 19:06:41 +01:00
baldurk 3a4327b664 Tweak RangeHistogram painting to better adjust to palettes 2017-07-28 19:06:40 +01:00
baldurk b6a73a4bb0 Draw custom coloured tree widget lines over the top of built-in style 2017-07-28 19:06:40 +01:00
baldurk 371c1f9f8c Update currently hovered item on scroll events too. 2017-07-25 09:23:09 +01:00
baldurk e005522152 Give better default sizing on startup to VTX/IDX columns 2017-07-25 09:22:51 +01:00
baldurk df9f72b857 Add option to ignore icon size when sizing rows in a RDTreeView 2017-07-13 13:57:33 +01:00
baldurk 5f94f4a71b Add <QDebug> include file 2017-07-12 23:36:46 +01:00
baldurk 24e1a8fc42 Add a new 'stretchy size hint' mode for RDHeaderView
* The basic idea here is to have a reasonable middleground between
  ResizeToContents and Stretch. We want to show at *least* enough for
  the contents, but the remaining space should be shared between the
  columns according to some proportions.
* That way you don't end up with one huge column and several tiny ones
  that are just big enough but no more, but all data is still visible.
2017-07-12 19:50:29 +01:00
baldurk b96242b635 Return a minimum size hint for pipeline flowcharts 2017-07-12 18:26:20 +01:00
baldurk 79979b60c7 Remove contents margins from sizehint when preserving aspect ratio
* This prevents a feedback loop where the label resizes wider to make
  room for the margins, then the margins get bigger to keep the image
  centred/scaled properly, etc.
2017-07-12 18:26:05 +01:00
baldurk c211df25be Add custom painting and section handling to RDTableView & RDHeaderView
* This is used primarily for the buffer/mesh viewer to be able to pin
  the index/element column to the left side, group columns together with
  a noticeable separator, and other minor tweaks.
* Unfortunately due to tight private coupling and lack of virtual
  functions in the QTableView and QHeaderView, a few unrelated functions
  have to be re-implemented to point to our own header.
2017-06-23 21:44:21 +01:00