def __init__(self, project, parent=None, flags=0):
        """Initialize a new dep creator dialog

        :param project: The project for the deps
        :type project: :class:`jukeboxcore.djadapter.models.Project`
        :param parent: the parent object
        :type parent: :class:`QtCore.QObject`
        :param flags: the window flags
        :type flags: :data:`QtCore.Qt.WindowFlags`
        :raises: None
        """
        super(DepAdderDialog, self).__init__(parent, flags)
        self._project = project
        self.deps = []
        self.setupUi(self)
        self.add_pb.clicked.connect(self.add_dep)

        rootdata = treemodel.ListItemData(["Name", "Description", "Ordervalue"])
        rootitem = treemodel.TreeItem(rootdata)
        deps = djadapter.departments.exclude(projects=project)
        for dep in deps:
            depdata = djitemdata.DepartmentItemData(dep)
            treemodel.TreeItem(depdata, rootitem)
        self.model = treemodel.TreeModel(rootitem)
        self.dep_tablev.setModel(self.model)
def __init__ ( self , project , parent = None , flags = 0 ) : super ( DepAdderDialog , self ) . __init__ ( parent , flags ) self . _project = project self . deps = [ ] self . setupUi ( self ) self . add_pb . clicked . connect ( self . add_dep ) rootdata = treemodel . ListItemData ( [ "Name" , "Description" , "Ordervalue" ] ) rootitem = treemodel . TreeItem ( rootdata ) deps = djadapter . departments . exclude ( projects = project ) for dep in deps : depdata = djitemdata . DepartmentItemData ( dep ) treemodel . TreeItem ( depdata , rootitem ) self . model = treemodel . TreeModel ( rootitem ) self . dep_tablev . setModel ( self . model )
Initialize a new dep creator dialog

        :param project: The project for the deps
        :type project: :class:`jukeboxcore.djadapter.models.Project`
        :param parent: the parent object
        :type parent: :class:`QtCore.QObject`
        :param flags: the window flags
        :type flags: :data:`QtCore.Qt.WindowFlags`
        :raises: None