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

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

        rootdata = treemodel.ListItemData(["Name", "Description"])
        rootitem = treemodel.TreeItem(rootdata)
        if project:
            users = djadapter.users.exclude(project = project)
        else:
            users = djadapter.users.exclude(task = task)
        for user in users:
            userdata = djitemdata.UserItemData(user)
            treemodel.TreeItem(userdata, rootitem)
        self.model = treemodel.TreeModel(rootitem)
        self.user_tablev.setModel(self.model)
def __init__ ( self , project = None , task = None , parent = None , flags = 0 ) : super ( UserAdderDialog , self ) . __init__ ( parent , flags ) self . _project = project self . _task = task self . users = [ ] self . setupUi ( self ) self . add_pb . clicked . connect ( self . add_user ) rootdata = treemodel . ListItemData ( [ "Name" , "Description" ] ) rootitem = treemodel . TreeItem ( rootdata ) if project : users = djadapter . users . exclude ( project = project ) else : users = djadapter . users . exclude ( task = task ) for user in users : userdata = djitemdata . UserItemData ( user ) treemodel . TreeItem ( userdata , rootitem ) self . model = treemodel . TreeModel ( rootitem ) self . user_tablev . setModel ( self . model )
Initialize a new user creator dialog

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