Ejemplo n.º 1
0
 def showFileManageDlg(self,*args):
     if os.path.exists(self.path):
         import launch.selectworkfile as selectworkfile
         reload(selectworkfile)
         import common.xmlcommon as xml
         reload(xml)
         x = xml.readXmlForFile(self.path)
         self.Widget = selectworkfile.Widget(str(self.userID),str(x['project_id']),str(x['entity_id']),
                                             str(x['entity_type']),str(x['task_id']),self.useName)
         self.Widget.show() 
     else:
         import launch.selecttask as selecttask
         reload(selecttask)
         self.Widget = selecttask.Widget(self.pid,self.userID,self.useName)
         self.Widget.show()  
Ejemplo n.º 2
0
    def __init__(self,uid,parent=None):
        super(Widget,self).__init__(parent)
        self.uid = str(uid)
        #初始化ui
        self.setupUi(self) 
        
        #初始化缩略图窗口
        self.__ImageBox()
    
        
        if os.path.exists(confPath.xmlForFile):
            self.x = xml.readXmlForFile(confPath.xmlForFile)
        else:
            self.x = ''
        
        #绑定项目下拉列表
        self.comboBoxForProject()
        
        #获取项目名
        projectName = self.projectComboBox.currentText()

    
        #绑定类型下拉列表
        self.comboBoxForType(projectName)
    
        
        
        #获取项目id和所属类型(shot or asset)
        self.pid = self.__getSelectedId(self.projectComboBox,self.projectList)
        ptype = self.typeComboBox.currentText()
        
        
        #绑定资产或者镜头下拉列表
        self.comboBoxForSA(self.pid,ptype)
        
        #获取资产号或者镜头号
        sid = self.__getSelectedId(self.SAComboBox,self.SAList)
        
        #绑定任务下拉列表
        self.comboBoxForTask(self.pid,ptype,sid)
        #设置文件名输入框最小宽度
        self.FileTxt.setMinimumWidth(450)
        #初始化提示框
        self.warning = UI().initMessageBox()
        
        
        #根据项目名联动类型、资产或镜头、任务三个下拉列表
        self.projectComboBox.currentIndexChanged.connect(self.ActivatedType)
        self.projectComboBox.currentIndexChanged.connect(self.ActivatedSA)
        self.projectComboBox.currentIndexChanged.connect(self.ActivatedTask)
        
        #根据类型名联动资产或镜头、任务两个下拉列表
        self.typeComboBox.currentIndexChanged.connect(self.ActivatedSA)
        self.typeComboBox.currentIndexChanged.connect(self.ActivatedTask)
        
        #根据镜头或者资产联动任务下拉列表
        self.SAComboBox.currentIndexChanged.connect(self.ActivatedTask)
        
        #绑定文件后缀类型下拉列表
        self.comboBoxForFileType()
        
        
        #绑定发布按钮事件
        self.publishBtn.clicked.connect(self.publish)
        #绑定取消按钮事件
        self.cancelBtn.clicked.connect(self.cancelBtnClicked)