コード例 #1
0
ファイル: isola_ISP_frame.py プロジェクト: ProjectISP/ISP
    def on_click_select_file(self, bind: BindPyqtObject):
        file_path = pw.QFileDialog.getOpenFileName(self, 'Select Directory',
                                                   bind.value)
        file_path = file_path[0]

        if file_path:
            bind.value = file_path
コード例 #2
0
 def on_click_select_directory(self, bind: BindPyqtObject):
     if "darwin" == platform:
         dir_path = pw.QFileDialog.getExistingDirectory(self, 'Select Directory', bind.value)
     else:
         dir_path = pw.QFileDialog.getExistingDirectory(self, 'Select Directory', bind.value,
                                                        pw.QFileDialog.DontUseNativeDialog)
     if dir_path:
         bind.value = dir_path
コード例 #3
0
 def on_click_select_file(self, bind: BindPyqtObject):
     selected = pw.QFileDialog.getOpenFileName(self, "Select metadata file")
     if isinstance(selected[0], str) and os.path.isfile(selected[0]):
         bind.value = selected[0]
コード例 #4
0
 def drop_event(event: pqg.QDropEvent, bind_object: BindPyqtObject):
     data = event.mimeData()
     url = data.urls()[0]
     bind_object.value = url.fileName()