Automator.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:zorro 作者: C-CINA 项目源码 文件源码
def openPathDialog( self, pathname, openDialog ):
        # Comments on how to handle updates from a lineedit Qt object
        # http://stackoverflow.com/questions/12182133/pyqt4-combine-textchanged-and-editingfinished-for-qlineedit

        if bool(openDialog):
            pathDialog = QtGui.QFileDialog()
            pathDialog.setFileMode( QtGui.QFileDialog.Directory )
            pathDialog.setOption( QtGui.QFileDialog.ShowDirsOnly, True )
            newPath = str(pathDialog.getExistingDirectory(self.MainWindow,pathname, ""))
            print( "New path for "+ pathname + " : " + newPath )
        else:
            # Get directory from the lineedit object
            print( "TODO" )

        #self.FileLocDialog.raise_()
        self.FileLocDialog.activateWindow()


        if pathname == u'input_dir':
            self.skulk.paths[pathname] = newPath
            self.ui_FileLocDialog.leInputPath.setText( self.skulk.paths.get_real(pathname) )

        elif pathname == u'output_dir':
            self.skulk.paths[pathname] = newPath
            self.ui_FileLocDialog.leOutputPath.setText( self.skulk.paths.get_real(pathname) )

        elif pathname == u'raw_subdir': 
            self.skulk.paths[pathname] = newPath
            self.ui_FileLocDialog.leRawPath.setText( self.skulk.paths.get_real(pathname) )

        elif pathname == u'sum_subdir':
            self.skulk.paths[pathname] = newPath
            self.ui_FileLocDialog.leSumPath.setText( self.skulk.paths.get_real(pathname) )

        elif pathname == u'align_subdir':
            self.skulk.paths[pathname] = newPath
            self.ui_FileLocDialog.leAlignPath.setText( self.skulk.paths.get_real(pathname) )

        elif pathname == u'fig_subdir':
            self.skulk.paths[pathname] = newPath
            self.ui_FileLocDialog.leFiguresPath.setText( self.skulk.paths.get_real(pathname) )

        elif pathname == u'cachePath':
            print( "TODO: Automator.openPathDialog; manage cachePath" )
        pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号