docstr: Widget for holding all the parameter options in neat lists.
  Based on methods from ../gloo/primitive_mesh_viewer_qt.
docstr_tok: ["Widget","for","holding","all","the","parameter","options","in","neat","lists",".","Based","on","methods","from","..","\/gloo\/primitive_mesh_viewer_qt","."]
code: def __init__(self, parent=None):
      """Widget for holding all the parameter options in neat lists.
      Based on methods from ../gloo/primitive_mesh_viewer_qt.
      """
      super(SetupWidget, self).__init__(parent)
  
      # Create the parameter list from the default parameters given here
      self.param = Paramlist(PARAMETERS)
  
      # Checkbox for whether or not the pivot point is visible
      self.pivot_chk = QtWidgets.QCheckBox("Show pivot point")
      self.pivot_chk.setChecked(self.param.props["pivot"])
      self.pivot_chk.toggled.connect(self.update_parameters)
  
      # A drop-down menu for selecting which method to use for updating
      self.method_list = ["Euler", "Runge-Kutta"]
      self.method_options = QtWidgets.QComboBox()
      self.method_options.addItems(self.method_list)
      self.method_options.setCurrentIndex(
          self.method_list.index((self.param.props["method"]))
      )
      self.method_options.currentIndexChanged.connect(
          self.update_parameters
      )
  
      # Separate the different parameters into groupboxes,
      # so there's a clean visual appearance
      self.parameter_groupbox = QtWidgets.QGroupBox("System Parameters")
      self.conditions_groupbox = QtWidgets.QGroupBox(
          "Initial Conditions"
      )
      self.display_groupbox = QtWidgets.QGroupBox("Display Parameters")
  
      self.groupbox_list = [
          self.parameter_groupbox,
          self.conditions_groupbox,
          self.display_groupbox,
      ]
  
      self.splitter = QtWidgets.QSplitter(QtCore.Qt.Vertical)
  
      # Get ready to create all the spinboxes with appropriate labels
      plist = []
      self.psets = []
      # important_positions is used to separate the
      # parameters into their appropriate groupboxes
      important_positions = [
          0,
      ]
      param_boxes_layout = [
          QtWidgets.QGridLayout(),
          QtWidgets.QGridLayout(),
          QtWidgets.QGridLayout(),
      ]
      for nameV, minV, maxV, typeV, iniV in self.param.parameters:
          # Create Labels for each element
          plist.append(QtWidgets.QLabel(nameV))
  
          if nameV == "x" or nameV == "scale":
              # 'x' is the start of the 'Initial Conditions' groupbox,
              # 'scale' is the start of the 'Display Parameters' groupbox
              important_positions.append(len(plist) - 1)
  
          # Create Spinboxes based on type - doubles get a DoubleSpinBox,
          # ints get regular SpinBox.
          # Step sizes are the same for every parameter except font size.
          if typeV == "double":
              self.psets.append(QtWidgets.QDoubleSpinBox())
              self.psets[-1].setDecimals(3)
              if nameV == "font size":
                  self.psets[-1].setSingleStep(1.0)
              else:
                  self.psets[-1].setSingleStep(0.01)
          elif typeV == "int":
              self.psets.append(QtWidgets.QSpinBox())
  
          # Set min, max, and initial values
          self.psets[-1].setMaximum(maxV)
          self.psets[-1].setMinimum(minV)
          self.psets[-1].setValue(iniV)
  
      pidx = -1
      for pos in range(len(plist)):
          if pos in important_positions:
              pidx += 1
          param_boxes_layout[pidx].addWidget(plist[pos], pos + pidx, 0)
          param_boxes_layout[pidx].addWidget(
              self.psets[pos], pos + pidx, 1
          )
          self.psets[pos].valueChanged.connect(self.update_parameters)
  
      param_boxes_layout[0].addWidget(
          QtWidgets.QLabel("Method: "), 8, 0
      )
      param_boxes_layout[0].addWidget(self.method_options, 8, 1)
      param_boxes_layout[-1].addWidget(self.pivot_chk, 2, 0, 3, 0)
  
      for groupbox, layout in zip(
          self.groupbox_list, param_boxes_layout
      ):
          groupbox.setLayout(layout)
  
      for groupbox in self.groupbox_list:
          self.splitter.addWidget(groupbox)
  
      vbox = QtWidgets.QVBoxLayout()
      hbox = QtWidgets.QHBoxLayout()
      hbox.addWidget(self.splitter)
      hbox.addStretch(5)
      vbox.addLayout(hbox)
      vbox.addStretch(1)
  
      self.setLayout(vbox)
  
imports: from __future__ import division, print_function, absolute_import
  from vispy import app, visuals
  from vispy.visuals import transforms
  from vispy.io import load_data_file
  import sys
  import numpy
  import string
  import logging
  import traceback
  from PyQt5 import QtCore, QtGui, QtWidgets
label_desc: Use image node_id 1 to create a new SetupWidget object from inherited base classes: QtWidgets with example: obj = SetupWidget(parent)