code: def serialize(self):
          
          ids = []
          for child in self.children:
              device = child.getDevice()
              if device:
                  ids.append(device._id) # e.g. DataModel.RTSPCameraDevice._id
              else:
                  ids.append(None)
  
          # gather all information to re-construct this RootVideoContainer
          dic = {  # these are used when re-instantiating the view
              "classname": self.__class__.__name__,
              "kwargs": { # parameters that we're used to instantiate this class
                  "title"                 : self.title,
                  "n_xscreen"             : self.n_xscreen,
                  "child_class"           : self.child_class,
                  "child_class_pars"      : self.get_child_class_pars() # serialize only relevant child class pars
                  },  
              # these parameters are used by deserialize
              "x": self.window.x(),
              "y": self.window.y(),
              "width": self.window.width(),
              "height": self.window.height(),
              "ids": ids
          }
  
          return dic
docs: Serialize information about the widget: coordinates, size, which cameras are selected.