def view_prj(self, prj):
        """View the given project on the project page

        :param prj: the project to view
        :type prj: :class:`jukeboxcore.djadapter.models.Project`
        :returns: None
        :rtype: None
        :raises: None
        """
        log.debug('Viewing project %s', prj.name)
        self.cur_prj = None
        self.pages_tabw.setCurrentIndex(1)
        self.prj_name_le.setText(prj.name)
        self.prj_short_le.setText(prj.short)
        self.prj_path_le.setText(prj.path)
        self.prj_desc_pte.setPlainText(prj.description)
        self.prj_created_dte.setDateTime(dt_to_qdatetime(prj.date_created))
        self.prj_semester_le.setText(prj.semester)
        self.prj_fps_dsb.setValue(prj.framerate)
        self.prj_res_x_sb.setValue(prj.resx)
        self.prj_res_y_sb.setValue(prj.resy)
        scalemap = {"m": 2, "meter": 2, "mm": 0, "millimeter": 0, "cm": 1, "centimeter": 1,
                    "km": 3, "kilometer": 3, "inch": 4, "foot": 5, "yard": 6, "mile": 7}
        scaleindex = scalemap.get(prj.scale, -1)
        log.debug("Setting index of project scale combobox to %s. Scale is %s", scaleindex, prj.scale)
        self.prj_scale_cb.setCurrentIndex(scaleindex)

        seqrootdata = treemodel.ListItemData(['Name', "Description"])
        seqrootitem = treemodel.TreeItem(seqrootdata)
        for seq in prj.sequence_set.all():
            seqdata = djitemdata.SequenceItemData(seq)
            treemodel.TreeItem(seqdata, seqrootitem)
        self.prj_seq_model = treemodel.TreeModel(seqrootitem)
        self.prj_seq_tablev.setModel(self.prj_seq_model)

        atyperootdata = treemodel.ListItemData(['Name', "Description"])
        atyperootitem = treemodel.TreeItem(atyperootdata)
        for atype in prj.atype_set.all():
            atypedata = djitemdata.AtypeItemData(atype)
            treemodel.TreeItem(atypedata, atyperootitem)
        self.prj_atype_model = treemodel.TreeModel(atyperootitem)
        self.prj_atype_tablev.setModel(self.prj_atype_model)

        deprootdata = treemodel.ListItemData(['Name', "Description", "Ordervalue"])
        deprootitem = treemodel.TreeItem(deprootdata)
        for dep in prj.department_set.all():
            depdata = djitemdata.DepartmentItemData(dep)
            treemodel.TreeItem(depdata, deprootitem)
        self.prj_dep_model = treemodel.TreeModel(deprootitem)
        self.prj_dep_tablev.setModel(self.prj_dep_model)

        userrootdata = treemodel.ListItemData(['Username', 'First', 'Last', 'Email'])
        userrootitem = treemodel.TreeItem(userrootdata)
        for user in prj.users.all():
            userdata = djitemdata.UserItemData(user)
            treemodel.TreeItem(userdata, userrootitem)
        self.prj_user_model = treemodel.TreeModel(userrootitem)
        self.prj_user_tablev.setModel(self.prj_user_model)
        self.cur_prj = prj
def view_prj ( self , prj ) : log . debug ( 'Viewing project %s' , prj . name ) self . cur_prj = None self . pages_tabw . setCurrentIndex ( 1 ) self . prj_name_le . setText ( prj . name ) self . prj_short_le . setText ( prj . short ) self . prj_path_le . setText ( prj . path ) self . prj_desc_pte . setPlainText ( prj . description ) self . prj_created_dte . setDateTime ( dt_to_qdatetime ( prj . date_created ) ) self . prj_semester_le . setText ( prj . semester ) self . prj_fps_dsb . setValue ( prj . framerate ) self . prj_res_x_sb . setValue ( prj . resx ) self . prj_res_y_sb . setValue ( prj . resy ) scalemap = { "m" : 2 , "meter" : 2 , "mm" : 0 , "millimeter" : 0 , "cm" : 1 , "centimeter" : 1 , "km" : 3 , "kilometer" : 3 , "inch" : 4 , "foot" : 5 , "yard" : 6 , "mile" : 7 } scaleindex = scalemap . get ( prj . scale , - 1 ) log . debug ( "Setting index of project scale combobox to %s. Scale is %s" , scaleindex , prj . scale ) self . prj_scale_cb . setCurrentIndex ( scaleindex ) seqrootdata = treemodel . ListItemData ( [ 'Name' , "Description" ] ) seqrootitem = treemodel . TreeItem ( seqrootdata ) for seq in prj . sequence_set . all ( ) : seqdata = djitemdata . SequenceItemData ( seq ) treemodel . TreeItem ( seqdata , seqrootitem ) self . prj_seq_model = treemodel . TreeModel ( seqrootitem ) self . prj_seq_tablev . setModel ( self . prj_seq_model ) atyperootdata = treemodel . ListItemData ( [ 'Name' , "Description" ] ) atyperootitem = treemodel . TreeItem ( atyperootdata ) for atype in prj . atype_set . all ( ) : atypedata = djitemdata . AtypeItemData ( atype ) treemodel . TreeItem ( atypedata , atyperootitem ) self . prj_atype_model = treemodel . TreeModel ( atyperootitem ) self . prj_atype_tablev . setModel ( self . prj_atype_model ) deprootdata = treemodel . ListItemData ( [ 'Name' , "Description" , "Ordervalue" ] ) deprootitem = treemodel . TreeItem ( deprootdata ) for dep in prj . department_set . all ( ) : depdata = djitemdata . DepartmentItemData ( dep ) treemodel . TreeItem ( depdata , deprootitem ) self . prj_dep_model = treemodel . TreeModel ( deprootitem ) self . prj_dep_tablev . setModel ( self . prj_dep_model ) userrootdata = treemodel . ListItemData ( [ 'Username' , 'First' , 'Last' , 'Email' ] ) userrootitem = treemodel . TreeItem ( userrootdata ) for user in prj . users . all ( ) : userdata = djitemdata . UserItemData ( user ) treemodel . TreeItem ( userdata , userrootitem ) self . prj_user_model = treemodel . TreeModel ( userrootitem ) self . prj_user_tablev . setModel ( self . prj_user_model ) self . cur_prj = prj
View the given project on the project page

        :param prj: the project to view
        :type prj: :class:`jukeboxcore.djadapter.models.Project`
        :returns: None
        :rtype: None
        :raises: None