Ejemplo n.º 1
0
 def scan_file(self):
     file_path = self.lineEdit.text()
     if file_path == '':
         self.showMessageBox()
     else:
         btn = button_self()
         btn.scan_pic(file_path)  #
 def mark_file(self):  #
     file_path = self.lineEdit.text()
     if file_path == '':
         self.showMessageBox()
     else:
         btn = button_self()
         btn.mark_pic(file_path)  #
 def manify_file(self):
     file_path = self.lineEdit.text()
     if file_path == '':
         self.showMessageBox()
     else:
         btn = button_self()
         btn.zoomout_pic(file_path)
 def next_file(self):
     file_path = self.lineEdit.text()
     if file_path == '':
         self.showMessageBox()
     else:
         btn = button_self()
         next_path = btn.next_file(file_path)  #
         self.lineEdit.setText('')
         self.lineEdit.setText(next_path)
         self.label_pic.setPixmap(QPixmap(next_path))
 def save_file(self):
     # 获取文件路径
     file_path = self.lineEdit.text()
     if file_path == '':
         self.showMessageBox()
     else:
         # 用全局变量保存所有需要保存的变量在内存中的值。
         file_name = QFileDialog.getSaveFileName(self, "文件保存", "imagetest/save", "All Files (*);;Text Files (*.png)")
         print(file_name[0])
         btn = button_self()
         btn.file_save(file_path, file_name[0])