def get_emf_dir(self): """ This function pompts a folder select dialogue to allow the user to select the folder for the exported EMF files. This function then sets the text of the EMF QLineEdit object. If the folder is found, the text would be set to the path of the folder. If the folder is not found, the text would be set to empty string. Parameter ---------- self Return ------- None Example -------- .. code:: python self.btn_browse_emf.clicked.connect(self.get_emf_dir) """ # prompt folder select dialogue str_temp = gsyIO.get_dir(str_title='Select the folder to export EMF files') # set text to line edit self.ledt_emf_dir.setText(str_temp)
def get_svg_dir(self): """ This method pompts a folder select dialogue to allow the user to select the folder that contains the SVG files to be converted. This method then sets the text of the SVG QLineEdit object. If the folder is found, the text would be set to the path of the folder. If the folder is not found, the text would be set to empty string. Parameter ---------- self Return ------- None Example -------- .. code:: python self.btn_browse_svg.clicked.connect(self.get_svg_dir) """ # prompt folder select dialogue str_temp = gsyIO.get_dir(str_title='Select the folder for SVG files') # set text to line edit self.ledt_svg_dir.setText(str_temp)
def get_inkscape_dir(self): """ This function pompts a folder select dialogue to allow the user to select the Inkscape installation folder. This function then sets the text of the Inkscape QLineEdit object. If the folder is found, the text would be set to the path of the folder. If the folder is not found, the text would be set to empty string. Parameter ---------- self Return ------- None Example -------- .. code:: python self.btn_browse_inkscape.clicked.connect(self.get_inkscape_dir) """ # prompt folder select dialogue str_temp = gsyIO.get_dir(str_title='Select the Inkscape installation folder') # see if the Inkscape binary is in the selected folder bool_temp = self.check_inkscape_bin(str_temp) # if exists, set path to line edit if bool_temp == True: self.ledt_inkscape_dir.setText(str_temp) # if not exists, prompt error message else: gsyIO.prompt_msg(str_title='Inkscape binary not found', str_msg='Inkscape binary not found', str_type='err') self.ledt_inkscape_dir.setText('')