Commits

Alain Leufroy committed 1bc7f53

add docstrings

Comments (0)

Files changed (2)

ui/gui/qt/item.py

 __all__ = ['Item']
 
 class Item(UiFromDesigner, QtGui.QWidget):
+    """A class representing an item of the sheet.
+
+    Signals
+    =======
+
+    :deleted: emitted when the item has been requested to be removed from the sheet.
+    """
+
     __ui__ = 'item'
 
     deleted = QtCore.pyqtSignal(QtGui.QWidget)
         self._ui.elements.addWidget(widget)
 
     def delete(self):
+        """ask for item deletion."""
         self.deleted.emit(self)
 
     def __getitem__(self, index):
         """Return the widget at ``index``."""
         return self._ui.elements.itemAt(index).widget()
 
-
     def __iter__(self):
+        """fonction generator over inner elements"""
         for element in self._elements:
             yield element
 

ui/gui/qt/sheet.py

     __ui__ = 'sheet'
 
     def append(self, widget):
-        """
-        Adds ``widget`` to the end of this box layout.
-        """
+        """Adds ``widget`` to the end of this box layout."""
         self._ui.items.addWidget(widget)
         widget.deleted.connect(self.remove)
 
         widget.deleted.connect(self.delete)
 
     def __getitem__(self, index):
-        """
-        Return the widget at ``index``.
-        """
+        """Return the widget at ``index``."""
         return self._ui.items.itemAt(index).widget()
 
     def remove(self, widget):
+        """Remove the widget from the sheet"""
         self._ui.items.removeWidget(widget) # juste set it out the layout
         widget.hide() # ensure the widget is no more visible
         widget.setParent(None) # remove parent relation