Commit Graph

46 Commits

Author SHA1 Message Date
baldurk fcdea67879 Update copyright years to 2022 2022-02-17 17:38:32 +00:00
baldurk f06171f733 When copy-pasting from a treeview, trim each line individually
* This helps with views that have icon-only columns at the start or end, which
  would generate unnecessary whitespace when copying multiple lines.
2021-07-22 11:08:28 +01:00
baldurk 58b38337f1 Optimise tree view expand/collapse all to avoid slow Qt path 2021-07-01 15:15:02 +01:00
baldurk 5a65cbf62c Tweak default item sizing in RDTreeView to better handle font scales
* We're somewhat trying to match Qt's behaviour here, as we want to ensure that
  the items are always sized as if they have space for an icon when
  ignoreIconSize() is true. In this case there's a +2 added "to avoid icons
  overlapping" but only after the decorationsize is max'd with the font size. In
  cases where the font is bigger than the icon, this is important.
2021-07-01 15:15:01 +01:00
baldurk a1a0dee085 Handle richtext delegate in RDTreeView instead of widget 2021-07-01 15:15:01 +01:00
baldurk 94b1dd3923 Add ability to update a working expansion struct instead of resetting
* This is mostly useful when using a filtering model so we want to save the
  expansion state of nodes that are temporarily filtered out
2021-07-01 15:15:01 +01:00
baldurk 21598b5d0c Fix missing override on function 2021-06-01 21:35:10 +01:00
baldurk ea16d31aa3 Invalidate cached hover index in tree view when model changes 2021-06-01 18:17:55 +01:00
baldurk 9d3f7169ed Add thumbnails to texture tooltips in pipeline state view
* If there would be no tooltip otherwise, it just shows the thumbnail. Otherwise
  any tooltip text (like view parameters or image layout) is displayed below the
  thumbnail
2021-04-20 13:51:41 +01:00
baldurk 260583b805 Move tooltip handling from RDTreeWidget to RDTreeView 2021-04-20 13:51:41 +01:00
baldurk 270d4e5b07 Add resource usage entries into context menu in pipeline state viewer 2021-04-19 16:44:19 +01:00
baldurk 12d9b4f850 Add copy icon to treeview context menu 2021-04-19 15:30:19 +01:00
baldurk 34ea6529c9 Account for rootIsDecorated when painting tree lines in RDTreeView 2021-04-12 13:04:02 +01:00
baldurk 728fa34acc Move branch colouring to RDTreeView 2021-02-24 13:52:07 +00:00
baldurk 026da176bb Update copyright years to 2021 2021-01-13 13:56:10 +00:00
baldurk 441be22410 Override QTreeView::moveCursor to fix scrollbar behaviour. Closes #2144
* This prevents SH_ItemView_ArrowKeysNavigateIntoChildren from causing left-move
  from an expanded node to jump immediately to its parent instead of collapsing
  it when the scrollbar is not leftmost
2021-01-11 11:45:18 +00:00
baldurk df6fec13f9 Remove use of automodule in docs
* One automodule in a file for our modules is way too much, so we split it into
  files. Unfortunately this means that only one file can have those classes and
  functions be linkable from elsewhere.
* Instead we bite the bullet and manually curate the items into pages, and at
  the same time subdivide the 'enums and data' page more which is a general
  readability and usability win as well.
* We also add some previously not-included functions, and add a doc-build time
  check to ensure that functions and classes aren't omitted from the
  documentation in future
2020-12-07 17:44:50 +00:00
baldurk 7a821c20bd Add custom context menu for all tree views with expand/collapse and copy 2020-05-29 20:09:13 +01:00
baldurk 1c19deb825 Improve copy-paste behaviour for tree views 2020-05-29 20:07:48 +01:00
baldurk 15a2753d63 Fix stale index hanging around in RDTreeView after change 2020-03-18 12:01:37 +00:00
baldurk 2916c0f9f7 Update copyright years to 2020 2020-01-06 16:20:45 +00:00
baldurk 83c98f1ff7 Tweak rich resource text rendering to match non-rich text positioning 2019-10-11 13:07:36 +01:00
baldurk 039b65f89f Add a viewer of the diagnostic log in the UI itself 2019-06-27 10:22:13 +01:00
baldurk 775fa9b635 Disconnect item model before deleting RDTreeWidget/RDTreeView
* This avoids odd races where some events might be fired mid-destruction and
  encounter the item model in an undefined state.
2019-05-21 13:58:38 +01:00
baldurk 4311b35038 Tidy up RDTreeView expansion handling 2019-04-05 13:22:33 +01:00
baldurk 86ff87863e Update copyright years to 2019 2019-02-01 18:32:13 +00:00
baldurk ce88558a7c Refactor RDTreeWidgetDelegate into RichTextViewDelegate that is reusable
* This allows us to add rich text support much more easily into other itemviews
  like RDTableView.
* We set it up for debug messages so that resource links in debug messages can
  be linked.
2018-12-17 17:10:34 +00:00
baldurk 9e3147d021 Save treeview expansion state while browsing. Closes #678, Closes #1034
* This is supported currently in the API inspector, constant buffer previewer, and resource inspector.
* The saved expansions are only saved while the capture is open, and will be reset each time.
2018-08-06 16:23:03 +01:00
baldurk 74528c4d15 Allow saving state internally by key as well as externally 2018-08-06 16:23:03 +01:00
baldurk edc5815463 Move expansion saving to RDTreeView so it can be used in more places. 2018-08-06 16:23:02 +01: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 e305029ddd Update copyright years to 2018 2018-01-01 17:55:29 +00:00
baldurk 8931ed4086 Move leave and keyPress events from RDTreeWidget to RDTreeView 2017-11-29 19:01:23 +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 371c1f9f8c Update currently hovered item on scroll events too. 2017-07-25 09:23:09 +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 b59f03c198 Make sure to pass object parent along
* Missing parents will cause automatic slots not to be connected, which
  was breaking the remote host manager.
2017-06-13 14:56:40 +01:00
baldurk a292838f43 Add a custom tooltip to display elided data in RDTreeViews 2017-06-09 18:41:21 +01:00
baldurk 0c3dec3b67 Go back to manually drawing PE_PanelItemViewItem in drawBranches()
* There's a messy order-of-operations thing to deal with various
  different themes, as well as a couple of minor problems, but at least
  the highlight and selection bars draw fairly consistently and don't
  leave an ugly gap over the branches.
2017-06-02 17:30:41 +01:00
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 49243c0878 Use a style proxy setting SH_ItemView_ShowDecorationSelected to fill
* This still isn't perfect with some custom style stuff but it's next
  to impossible to get working right. In theory we should manually
  draw PE_PanelItemViewItem in the gap in drawRow() or so to make sure
  we also draw any on-hover highlight over objects, but that doesn't
  seem to work.
2017-06-01 18:28:13 +01:00
baldurk 5c877ae1ae Add default-enabled grid lines to RDTreeView (and so RDTreeWidget) 2017-06-01 14:17:36 +01:00
baldurk 3076b4337b Move size delegate into item margins implemented by RDTreeView 2017-06-01 14:17:00 +01:00
baldurk 4d8e799a0e Add pixel history window 2017-02-09 23:21:45 +00:00