Changing qtGroupItem

Current Implementation

The current implementation used a QGroupBox as the main widget. Though this made the UI design simple to implement based on the following:

  • Automatically provided the main Frame
  • Automatically provide checkbox capability for Optional GroupItems
  • Provide a grouping look and feel by having a border and “sunken” look around the box’s contents

It also had some drawbacks:

  • In the case of an optional GroupItem, the border would still be present making things look a bit odd
  • The text for the GroupItem label was smaller than the rest of the text
  • There was no way of displaying status, etc… in the QGroupBox title (it was strictly text only).

New Design

The new design is more custom and uses a combination of Frames and Layouts:

  • Main Frame - holds everything (main widget)
    • Title Frame
      • Optional Checkbox (for optional GroupItems)
      • Title Label
      • Alert Label - indicating a GroupItem’s conditional requirements have not be met
    • Contents Frame - holds contents of the GroupItem
      • ButtonsFrame - for extensible GroupItems
      • ChildrensFrame - for the GroupItem’s subgroups and children items

Here is an example of the new UI:
Screen Shot 2021-03-31 at 6.54.25 PM

Notice that Heat Transfer is a group that contains Enclosure Radiation, and Induction Heating (indicated by being slightly indented)

Possible ItemView Options

Indentation Control

Example of 0 indent:

Frame Control

Here is a case with the contents frame with a sunken shadow:
Screen Shot 2021-03-31 at 7.04.46 PM

Or using the Look and Feel of the current Windowing system but with a plain shadow.

Screen Shot 2021-03-31 at 7.21.19 PM
Comments?

@Aaron @chart3388 @amuhsin @johnt @aron.helser @dcthomp FYI

I am all for improving the look & feel of group boxes.

  • I strongly prefer we keep the indentation as the default.
  • I also prefer we keep the sunken frame by default but will concede if the crowd prefers otherwise.
  • I presume these changes only apply to non-extensible groups? (my recollection being that extensible groups use QTableWiget).
  • In terms of a group-validity icon: Though I doubt smtk can easily support it, I think I prefer that the group-validity icon not be displayed because one or more children items are invalid, and instead only be displayed when the combination is invalid. Might change my mind after seeing examples.

John - that group validity Icon, which I think is shown in a different discourse page, is only displayed when the group fails to meet its conditional requirement.

I really like how the new UI looks without any borders or shadows set on the frame. If we’re going that directions for the group item should we do the same thing for children of discrete items?

Also, one thing that I noticed in the current optional Group item widget is that it still creates a child box (child-frame?) when it is activated but all of its children are hidden because of the current category selections. It would be nice if a group item becomes indistinguishable from a void item if all of its children are hidden for some reason.