* 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.
* 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.
* 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
* 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.
* 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.
* 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).
* 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.
* 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.
* 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.