Commit Graph

107 Commits

Author SHA1 Message Date
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
baldurk b87cf00c86 Fix range histogram painting to be device pixel ratio aware. 2017-06-19 16:17:20 +01:00
baldurk 2831c4dfdd Set a proper sizeHint for the pipeline flowchart 2017-06-19 16:17:19 +01:00
baldurk f81876335f Emit click events after processing parent widget
* This means that e.g. right clicking on an item in a list/tree widget
  will make sure it's selected before trying to display a context menu
  or anything.
2017-06-13 18:13:11 +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 472bb820b7 Remove unused events in RangeHistogram 2017-06-12 10:34:17 +01:00
baldurk a292838f43 Add a custom tooltip to display elided data in RDTreeViews 2017-06-09 18:41:21 +01:00
Peter Gal 4263b55ffa Fix enum flag usages in the qrenderdoc
There are a few places where the logical 'and' operator
was used to check if a given flag is enabled however
that is not the correct operator.

The binary 'and' operator should be used where
the enum acts as a flag.
2017-06-08 08:34:54 -07:00
baldurk 231c07d390 Make sure to initialise update queueing variable to false 2017-06-03 00:49:16 +01:00
baldurk 3b6f63be0d Make event browser columns properly resizable and re-orderable
* Annoyingly although Qt has an internal bool allowUserMoveOfSection0
  which does exactly what we want allowing the tree column to be
  movable, we can't enable it because it's private. So instead we have
  to re-implement section moving ourselves.
* Minor tweak - also made RDTreeWidgets non-movable by default since
  usually we don't want to allow it.
2017-06-03 00:38:02 +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 bf791b7854 Use 20% highlight colour instead of window for hovering on tree widgets 2017-06-01 18:48:05 +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 a30c704e46 Inherit RDTreeWIdget from RDTreeView instead of QTreeView 2017-06-01 14:15:17 +01:00
baldurk 26862d92b2 Add a toggle to RDLabel to preserve the aspect ratio of its pixmap 2017-05-30 17:08:37 +01:00
baldurk c95f7c4cea Add default copy-paste handlers for RDListWidget and RDTreeWidget 2017-05-30 16:13:41 +01:00
baldurk 641eaf4665 Add option to instantly show tooltips over RDTreeWidget items 2017-05-30 14:08:44 +01:00
baldurk 886ec3190c Use WindowText color for custom painting on RDSplitterHandle 2017-05-29 17:52:01 +01:00
baldurk 09c9ae94d2 Change the vulkan layer warning to be theme-friendly
* The hardcoded background color didn't work on light-on-dark themes,
  so instead just use the tooltip base color, and darken on hover.
2017-05-29 16:51:57 +01:00
baldurk da6560f9aa Use anti-aliasing when rendering histogram bar 2017-05-29 16:07:56 +01:00
baldurk 5dc10bcc3d Make sure to call parent event handlers when we override to emit signals 2017-05-17 16:42:37 +01:00
baldurk 5b5e30cf54 Add HTML pipeline export for qrenderdoc 2017-05-15 10:11:56 +01:00
baldurk f9908927ad Add RDTreeWidgetItem overload that constructs from QVariantList 2017-05-15 10:11:55 +01:00
baldurk 441d136177 Add extended RDToolButton 2017-05-10 17:20:39 +01:00
baldurk 7c7cd32c17 Populate the buffer format specifier with the initial format 2017-05-10 17:20:38 +01:00
baldurk 1ca55a8237 Add an optional 'rgb' specifier to colour buffer cells backgrounds
* When opening a texture as a buffer we can make use of this.
2017-05-10 17:20:37 +01:00
baldurk 4fb8b22b2d QBrush() is not a 'use default' return value from a model, QVariant() is 2017-05-09 18:49:44 +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 04bfcdff71 Fix linux build with problems overriding functions 2017-04-22 02:25:03 +01:00
baldurk d699e89fd2 Switch RDTreeWidget to inherit from QTreeView instead of QTreeWidget
* We add our own custom item model to handle the cases we need. We can
  also make a few assumptions and optimisations around things we can
  safely assume like e.g. nodel columns won't really change after init.
* This lets us have full control over batching updates, which was the
  main motivation, but it makes it easier to extend in future (e.g.
  adding single per-item tags instead of the heavyweight Qt::UserRole
  data elements).
2017-04-21 18:44:51 +01:00
baldurk a740696dbe Add an extended RDTextEdit control subclassed from QTextEdit 2017-04-18 14:57:49 +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