Example #1
0
 def savefile(self):
     dlg = QtWidgets.QFileDialog(self, "Save File")
     dlg.setFileMode(QtWidgets.QFileDialog.AnyFile)
     fname, _ = dlg.getSaveFileName(self, "Save File", "", "Images (*.png)")
     fname = fname if ".png" in fname else fname + ".png"
     self.canvas.print_figure(fname,
                              dpi=2048,
                              facecolor='w',
                              edgecolor='w',
                              orientation='portrait',
                              papertype=None,
                              format="png",
                              transparent=False,
                              bbox_inches='tight',
                              pad_inches=0.05,
                              frameon=None)
Example #2
0
 def getDir(self):
     dlg = QtWidgets.QFileDialog(self, "Browse Directory")
     dlg.setFileMode(dlg.Directory)
     dlg.setOption(dlg.ShowDirsOnly)
     fname = str(dlg.getExistingDirectory())
     self.dataLine.setText(fname)
Example #3
0
 def getPopfile(self):
     dlg = QtWidgets.QFileDialog(self, "Open File")
     dlg.setFileMode(QtWidgets.QFileDialog.AnyFile)
     fname, _ = dlg.getOpenFileName()
     self.popLine.setText(fname)