Ejemplo n.º 1
0
    def on_load_model(self):
        dialog = QFileDialog(caption="选择编码网络", directory="../models/")
        if dialog.exec_():
            fileName = dialog.selectedFiles()
            self.encode_path = fileName[0]
            self.ui.TextEdit.appendPlainText("编码网络模型:" + fileName[0])

        dialog = QFileDialog(caption="选择关系网络", directory="../models/")
        if dialog.exec_():
            fileName = dialog.selectedFiles()
            self.relation_path = fileName[0]
            self.ui.TextEdit.appendPlainText("关系网络模型:" + fileName[0])

        self.ui.TextEdit.appendPlainText("--加载网络模型--")

        self.feature_encoder.cuda(GPU)
        self.relation_network.cuda(GPU)

        if os.path.exists(self.encode_path):
            self.feature_encoder.load_state_dict(torch.load(self.encode_path))
            self.ui.TextEdit.appendPlainText("--成功加载编码模型--")

        if os.path.exists(self.relation_path):
            self.relation_network.load_state_dict(
                torch.load(self.relation_path))
            self.ui.TextEdit.appendPlainText("--成功加载关系模型--")
Ejemplo n.º 2
0
    def open_dir(self):
        """ show open dir dialog and open repo """
        last_dir = self.settings.value('last_fileopen_dir', '')

        fd = QFileDialog(self, 'Open .git', last_dir)
        fd.setFileMode(QFileDialog.DirectoryOnly)
        fd.setFilter(
            QDir.Filters(QDir.Dirs | QDir.Hidden | QDir.NoDot | QDir.NoDotDot))

        while True:
            if not fd.exec():
                return
            self.dir_name = fd.selectedFiles()[0]
            parent = os.path.dirname(self.dir_name)
            self.settings.setValue('last_fileopen_dir', parent)
            self.settings.setValue('last_opened_repo', self.dir_name)

            try:
                pygit2.Repository(self.dir_name)
                break
            except pygit2.GitError:
                QMessageBox(self,
                            text='Cannot open repo: ' + self.dir_name).exec()

        self.open_repo()
    def browseForInterpreterLocation(self) -> None:
        """
		Opens a file dialog when the user clicks on the "..." button to choose a target application.

		The dialog that pops up doesn't restrict what file the user selects, but before creating the
		project, the file will be checked for correct bitness, and to make sure that it's an executable file.
		The path to the file will be placed into the read-only text editor to the left.
		
		The default location is the default python location on user's end.

		:return: None
		:rtype: NoneType
		"""

        if getPythonBitness() == 32:
            openDir = "C:/Program Files (x86)"
        else:
            openDir = "C:/Program Files"
        openDir = os.path.abspath(openDir)

        fileDialog = QFileDialog()
        fileDialog.setFileMode(QFileDialog.ExistingFile)
        fileDialog.setDirectory(openDir)
        fileDialog.fileSelected.connect(
            lambda url: self.ui.interpreterLocation.setText(url))
        fileDialog.exec_()
Ejemplo n.º 4
0
def calibrate_and_search(out_put_file_name, jobs):

    import csv

    ref_dict, cal_file_path = get_reference_dict()

    if ref_dict:

        file_dialog = QFileDialog()
        file_dialog.setWindowFlags(Qt.WindowStaysOnTopHint)

        if file_dialog:

            file_locations = file_dialog.getOpenFileNames(
                None, "Standard Compounds Files", filter="*.cdf")
            file_dialog.close()

            # run in multiprocessing mode
            pool = Pool(jobs)
            args = [(file_path, ref_dict, cal_file_path)
                    for file_path in file_locations[0]]
            gcmss = pool.map(run, args)
            pool.close()
            pool.join()
            for gcms in gcmss:

                #gcms.to_csv(out_put_file_name, highest_score=False)
                #gcms.to_excel(out_put_file_name, highest_score=False)
                #gcms.to_pandas(out_put_file_name)
                gcms.to_hdf(highest_score=False)
Ejemplo n.º 5
0
    def importDialog(self):
        func = None
        file_settings = QFileDialog().getOpenFileName(
            self,
            'Importar Arquivo',
            filter=
            "Todos os arquivos (*);; Arquivo de Texto (*.txt);; Arquivo CSV (*.csv);; "
            "Planilha Excel (*.xlsx)")
        if ".txt" in file_settings[0]:
            func = Data.readTXT
        if ".csv" in file_settings[0]:
            func = Data.readCSV
        if ".xlsx" in file_settings[0]:
            func = Data.readExcel

        self.status_bar.showMessage('Importando arquivo. Aguarde.')
        io_operations_handler = HandlerThread()
        io_operations_handler.messageSent.connect(self.status_bar.showMessage)
        io_operations_handler.daemon = True
        io_operations_handler.hasFinished.connect(
            lambda: self.loadSheet(io_operations_handler.results))
        io_operations_handler.loadParameters(f=func,
                                             _args=[
                                                 file_settings[0],
                                             ])
        io_operations_handler.start()
Ejemplo n.º 6
0
 def select_folder(self):
     dialog = QFileDialog(self)
     dialog.setFileMode(QFileDialog.Directory)
     if dialog.exec_():
         selected_dir = dialog.selectedFiles()[0]
         self.folder_address_input.setText(selected_dir)
         self.update_model(selected_dir)
Ejemplo n.º 7
0
	def OnLoadScript(self, event):
		dlg = QFileDialog()

		if dlg.exec_():
			self.filename = dlg.selectedFiles()[0]
			self.ui.label_ExpScriptFile.setText(os.path.split(self.filename)[-1])
			
Ejemplo n.º 8
0
 def on_click_menu_button_open(self):
     """Open database file"""
     w = QFileDialog(self,
                     directory=str(Path.home().absolute()),
                     caption="Selectionnez la base de donné",
                     filter="Base de donnée SQLite (*.sqlite)")
     w.open()
Ejemplo n.º 9
0
    def question_directory(self):
        start_dir = pathlib.Path.home()
        other = start_dir.joinpath(START_DIR)
        if other.is_dir():
            start_dir = other
        dialog = QFileDialog(self,
                             caption="Open Questions Directory",
                             directory=start_dir.as_posix())
        dialog.setFileMode(QFileDialog.Directory)
        dialog.setViewMode(QFileDialog.Detail)

        if dialog.exec_():
            dir_names = dialog.selectedFiles()
            dir_path = pathlib.Path(dir_names[0])
            files = []
            if len(self.q_types) < 1 or '*' in self.q_types:
                files = dir_path.iterdir()
            else:
                for ext in self.q_types:
                    files.extend(dir_path.glob(ext))
            for question in files:
                last = self.find_last_row('question')
                if last == -1:
                    self.add_item(question=str(question))
                else:
                    self.edit_item(index=last, question=str(question))
Ejemplo n.º 10
0
    def __init__(self, parent, groups: list):
        """
        Displays a Dialog with a file chooser for the .csv to import and a group selection combo.

        :param parent: MainApplication
        """
        QDialog.__init__(self, parent)

        self.setWindowTitle(tr("grp_action_import_csv"))

        # Widgets
        self.fileDialog = QFileDialog(self)
        self.fileDialog.setOption(QFileDialog.DontUseNativeDialog)
        self.fileDialog.setWindowFlags(Qt.Widget)
        self.fileDialog.setNameFilter("Fichiers excel (*.csv)")
        self.fileDialog.finished.connect(self.done)

        self.lab_sep = QLabel()  # Separator
        self.lab_sep.setFixedHeight(3)
        self.lab_sep.setStyleSheet(get_stylesheet("separator"))

        self.lab_group = QLabel(tr("add_to_group"))

        self.combo_group = QComboBox()
        self.combo_group.addItems(groups)
        self.combo_group.setFixedWidth(200)

        # Layout
        self.__set_layout()
Ejemplo n.º 11
0
    def loadfile(self):
        f_dialog = QFileDialog(self)
        f_dialog.setFileMode(QFileDialog.ExistingFile)
        f_dialog.setNameFilter(self.tr("Dicom File (*.dcm)"))
        f_dialog.setViewMode(QFileDialog.Detail)

        if f_dialog.exec_():
            self.file_path = f_dialog.selectedFiles()[0]
            self.ui.val_file_path.setPlainText(str(self.file_path))
            self.file_name = os.path.basename(self.file_path)

        if self.file_path is None:
            self.log("[LOAD::FAIL]")
            return None

        self.dataset = pydicom.dcmread(self.file_path)

        self.reslope = int(self.dataset.RescaleSlope)
        self.reinter = int(self.dataset.RescaleIntercept)

        self.hu_data = self.reslope * self.dataset.pixel_array + self.reinter

        self.log("[LOAD::PASS]  " + self.file_name)
        self.file_load_flag = True

        self.view()
Ejemplo n.º 12
0
 def f():
     from bLUeTop.QtGui1 import window
     lastDir = str(window.settings.value('paths/dlgdir', '.'))
     filter = "Images ( *" + " *".join(IMAGE_FILE_EXTENSIONS) + ")"
     dlg = QFileDialog(window, "select", lastDir, filter)
     if dlg.exec_():
         filenames = dlg.selectedFiles()
         newDir = dlg.directory().absolutePath()
         window.settings.setValue('paths/dlgdir', newDir)
         self.sourceImage = QImage(filenames[0])
         self.updateSource()
         """
         # scale img while keeping its aspect ratio
         # into a QPixmap having the same size than self.layer
         sourcePixmap = QPixmap.fromImage(self.sourceImage).scaled(self.layer.size(), Qt.KeepAspectRatio)
         self.sourceSize = sourcePixmap.size()
         self.sourcePixmap = QPixmap(self.layer.size())
         self.sourcePixmap.fill(Qt.black)
         qp = QPainter(self.sourcePixmap)
         qp.drawPixmap(QPointF(), sourcePixmap)  # (QRect(0, 0, sourcePixmap.width(), sourcePixmap.height()), sourcePixmap)
         qp.end()
         self.sourcePixmapThumb = self.sourcePixmap.scaled(self.pwSize, self.pwSize, aspectMode=Qt.KeepAspectRatio)
         self.widgetImg.setPixmap(self.sourcePixmapThumb)
         self.widgetImg.setFixedSize(self.sourcePixmapThumb.size())
         self.layer.sourceFromFile = True
         """
     self.widgetImg.show()
Ejemplo n.º 13
0
def get_dirnames(app=None):

    from PySide2.QtCore import Qt, QCoreApplication
    from PySide2.QtWidgets import QApplication, QFileDialog, QTreeView, QListView, QAbstractItemView
    from pathlib import Path

    if not app:
        app = QApplication(sys.argv)
    # file_dialog = QFileDialog()
    # file_dialog.setWindowFlags(Qt.WindowStaysOnTopHint)
    # file_location = file_dialog.getOpenFileNames()

    file_dialog = QFileDialog()
    file_dialog.setFileMode(QFileDialog.DirectoryOnly)
    file_dialog.setOption(QFileDialog.DontUseNativeDialog, True)
    file_view = file_dialog.findChild(QListView, 'listView')

    # to make it possible to select multiple directories:
    if file_view:
        file_view.setSelectionMode(QAbstractItemView.MultiSelection)
    f_tree_view = file_dialog.findChild(QTreeView)
    if f_tree_view:
        f_tree_view.setSelectionMode(QAbstractItemView.MultiSelection)

    if file_dialog.exec():
        paths = file_dialog.selectedFiles()

        QCoreApplication.processEvents()
        for path in paths:
            yield Path(path)
Ejemplo n.º 14
0
def openDlg(mainWidget, ask=True):
    """
    Returns a file name or None.
    @param mainWidget:
    @type mainWidget:
    @param ask:
    @type ask:
    @return:
    @rtype:
    """
    if ask and mainWidget.label.img.isModified:
        ret = saveChangeDialog(mainWidget.label.img)
        if ret == QMessageBox.Yes:
            try:
                saveDlg(mainWidget.label.img, mainWidget)
            except (ValueError, IOError) as e:
                dlgWarn(str(e))
                return
        elif ret == QMessageBox.Cancel:
            return
    # don't ask again for saving
    mainWidget.label.img.isModified = False
    lastDir = str(mainWidget.settings.value('paths/dlgdir', '.'))
    dlg = QFileDialog(
        mainWidget, "select", lastDir,
        " *".join(IMAGE_FILE_EXTENSIONS) + " *".join(RAW_FILE_EXTENSIONS))
    if dlg.exec_():
        filenames = dlg.selectedFiles()
        newDir = dlg.directory().absolutePath()
        mainWidget.settings.setValue('paths/dlgdir', newDir)
        return filenames[0]
 def get_model_path(self):
     FileDialog = QFileDialog(self.ui.browse_btn)  # 实例化
     FileDialog.setFileMode(QFileDialog.AnyFile)  # 可以打开任何文件
     model_file, _ = FileDialog.getOpenFileName(self.ui.browse_btn, 'open file', 'model/',
                                                'model files (*.pth *.pt)')
     # 改变Text里面的文字
     self.ui.model_path_text.setPlainText(model_file)
Ejemplo n.º 16
0
 def txtfileHandle(self):  # 对txt文件进行操作,将其内容添加到文本框中
     # 以下代码可以打开文本对话框并获取文件的绝对路径
     selectwindow = QMainWindow()  # 建立一个新的窗口
     Filewindow = QFileDialog(selectwindow)  # 设置成打开文件的窗口
     FileDialog = Filewindow.getOpenFileName(selectwindow, "选择文件")  # 设置窗口名称
     selectwindow.show()  # 显示该文本框
     # 以上代码可以打开文本对话框并获取文件的绝对路径
     filePath = FileDialog[0]  # 获取文本文件的绝对位置
     if filePath == "":  # 防止未选择文件时出现闪退现象
         return
     textfile = open(filePath, "r")
     xdisplay = ''
     ydisplay = ''
     lines = textfile.readline()
     while lines:  # 读取文本文件的内容
         if lines[len(lines) - 1] == '\n':
             lines = lines[:-1]  # 去掉换行符
         line = lines.split(" ")
         xdisplay = xdisplay + line[0] + ' '
         ydisplay = ydisplay + line[1] + ' '
         lines = textfile.readline()
     xdisplay = xdisplay[:-1]
     ydisplay = ydisplay[:-1]
     self.xinput.setText(xdisplay)
     self.yinput.setText(ydisplay)
Ejemplo n.º 17
0
    def __init__(self, parent = None):
        super(MainWindow, self).__init__(parent)
        self.mainWindow = getUiFromFile(os.path.join(ROOT_DIR,"UI/mainwindow.ui"))
        self.setCentralWidget(self.mainWindow)


        # Visualization Part
        # accessing Motivo

        self.fileDialog = QFileDialog()

        self.userPreferencesDialog = UserPreferencesDialog()
        self.svgCache = ImageProvider(100)

        self.errorMessage = QMessageBox()

        self.csvFilePath = None

        self.writeToPDFThread = QThread(self)
        self.writeToPDF = ResultsExporter(self.svgCache)
        self.writeToPDF.moveToThread(self.writeToPDFThread)
        # TO DO: Creating a queue for motivo sessions

        # hide Layout

        self.mainWindow.writeToPdfProgressBar.hide()
        self.mainWindow.cancelWritingToPDFButton.hide()
        self.mainWindow.writeToPdfLabel.hide()

        # Creating the dialogs for menu bar actions

        self.basicDialog = BasicDialog()
        self.advancedDialog = AdvancedDialog()

        # Creating connections between menu bar actions and dialogs

        # File

        self.mainWindow.actionExit.triggered.connect(self.exit)

        # Motivo

        self.mainWindow.actionBasic.triggered.connect(self.openBasicDialog)
        self.mainWindow.actionAdvanced.triggered.connect(self.openAdvancedDialog)
        self.mainWindow.actionSaveAsPDF.triggered.connect(self.startWriteToPDFThread)
        self.mainWindow.actionOpenCSV.triggered.connect(self.openSelectCsv)

        self.writeToPDFSignal.connect(self.writeToPDF.setData)

        # Options
        self.mainWindow.actionUserPreferences.triggered.connect(self.openUserPreferencesDialog)

        # visualization

        self.basicDialog.outputReady.connect(self.visualizeFromBasicDialog)
        self.advancedDialog.outputReady.connect(self.visualizeFromAdvancedDialog)

        self.writeToPDF.progress.connect(self.updateWriteToPDFProgress)
        self.writeToPDF.finished.connect(self.writeToPdfComplete)
        self.mainWindow.cancelWritingToPDFButton.clicked.connect(self.cancelWritingToPDF)
Ejemplo n.º 18
0
 def selectImagePath(self):
     dialog = QFileDialog(self)
     dialog.setFileMode(QFileDialog.DirectoryOnly)
     dialog.selectFile(self.ui.lineEdit_2.text())
     dialog.setWindowTitle('Select Directory Where Images Are Stored')
     if dialog.exec_():
         self.ui.lineEdit_2.setText(dialog.selectedFiles()[0])
Ejemplo n.º 19
0
def askSaveFileName(parent=None, title=bdstr.fn2Use, filter="", dir=""):
    """Uses `QFileDialog` to ask the names of a single file
    where something will be saved (the file may not exist)

    Parameters (all optional):
        parent (default None): the parent of the window
        title: the window title
        filter: the filter to be used when displaying files
        dir: the initial directory

    Output:
        return the filename
        or an empty string depending if the user selected "Ok" or "Cancel"
    """
    dialog = QFileDialog(parent, title, dir, filter)
    dialog.setFileMode(QFileDialog.AnyFile)
    dialog.setOption(QFileDialog.DontConfirmOverwrite, True)
    if dialog.exec_():
        fileNames = dialog.selectedFiles()
        try:
            return fileNames[0]
        except IndexError:
            return ""
    else:
        return ""
Ejemplo n.º 20
0
    def save_generic_to_folder(
        self,
        parent=None,
        caption="Save to folder...",
        filter=None,
        callback: Callable[[Controller, Path, Tuple], None] = None,
        args=()
    ) -> Tuple[bool, str]:
        if filter is None:
            filter = "Any folder"

        dialog = QFileDialog(
            parent=parent,
            caption=caption,
            directory=str(
                self.genericPath.parent if self.genericPath else Path.home()),
            filter=filter)

        dialog.setAcceptMode(QFileDialog.AcceptOpen)
        dialog.setFileMode(QFileDialog.DirectoryOnly)

        if dialog.exec_() != QFileDialog.Accepted:
            return False

        self.genericPath = Path(dialog.selectedFiles()[0])

        if callback:
            callback(self, self.genericPath, *args)

            return True
        else:
            return True
Ejemplo n.º 21
0
    def onSaveMask(self):
        diag = QFileDialog()
        file = diag.getSaveFileName()[0]
        final_img = cv2.resize(self.__mask, (self.double_spin_width.value(), self.double_spin_height.value()))

        if file != "":
            cv2.imwrite(file, final_img)
Ejemplo n.º 22
0
    def load_idd(self):
        """Create and open file dialog
        """

        directory = os.path.expanduser('~')
        formats = "EnergyPlus IDD Files (*.idd)"
        dialog_name = 'Select EnergyPlus IDD File (Version: {})'.format(self.version)
        file_dialog = QFileDialog()
        dir_name, filt = file_dialog.getOpenFileName(self, dialog_name,
                                                     directory, formats)

        if not dir_name:
            self.complete = False
            return

        # Show progress bar and parse IDD file
        self.progress_bar.show()
        log.debug("Processing IDD file")
        idd_parser = parser.IDDParser()
        for progress in idd_parser.parse_idd(dir_name):
            self.progress_bar.setValue(progress)

        # Upon completion set complete status to true and inform object
        self.complete = True
        self.completeChanged.emit()
Ejemplo n.º 23
0
 def _on_import_button_click(self):
     import_dialog = QFileDialog(self, 'Import icon')
     import_dialog.setFileMode(QFileDialog.ExistingFile)
     import_dialog.setNameFilter('Images (*.png *.jpg)')
     if import_dialog.exec():
         if len(import_dialog.selectedFiles()) == 0:
             self._import_file_name = import_dialog.selectedFiles()[0]
Ejemplo n.º 24
0
 def _getfile(self, message, button_name):
     dialog = QFileDialog()
     self.basefoldername = dialog.getExistingDirectory()
     button_name.setText(message + self.basefoldername)
     common_prefix = self.basefoldername
     self._view.texture_location_button.setDisabled(False)
     self._model._setmdlpath(self.basefoldername)
Ejemplo n.º 25
0
 def run_select_input_segmentation(self):
     filedialog = QFileDialog()
     self.input_annotation_filepath = filedialog.getOpenFileName(
         self, 'Select input segmentation file', '~',
         "Image files (*.nii *.nii.gz)")[0]
     self.input_segmentation_lineedit.setText(
         self.input_annotation_filepath)
Ejemplo n.º 26
0
    def select_folder(self):
        dialog = QFileDialog()
        dialog.setFileMode(QFileDialog.Directory)
        dialog.setOption(QFileDialog.ShowDirsOnly)

        self.directoryUrl = dialog.getExistingDirectoryUrl()

        self.selected_folder = self.directoryUrl.toDisplayString()[7:]
        self.nameFileArray = [
            f for f in os.listdir(self.selected_folder)
            if os.path.isfile(os.path.join(self.selected_folder, f))
        ]

        # item = QStandardItem("All")
        # item.setCheckState(Qt.Checked)
        # item.setCheckable(True)
        #self.file_model.appendRow(item)

        #self.file_model, self.file_option_listview = self.create_checkBoxes(self.nameFileArray, self.file_model, self.file_option_listview)

        self.file_model = self.create_checkBoxes(self.nameFileArray,
                                                 self.file_model,
                                                 self.file_list_view)
        for name in self.nameFileArray:
            self.file_model.appendRow(
                self.append_checkbox(name, self.file_model, Qt.Checked))
        self.file_list_view.setModel(self.file_model)
Ejemplo n.º 27
0
def get_reference_dict(calibration_file_path=False):

    if not calibration_file_path:
        app = QApplication(sys.argv)
        file_dialog = QFileDialog()
        file_dialog.setWindowFlags(Qt.WindowStaysOnTopHint)
        file_path = file_dialog.getOpenFileName(None,
                                                "FAMES REF FILE",
                                                filter="*.cdf")[0]
        file_dialog.close()
        app.exit()
    else:
        file_path = calibration_file_path

    if not file_path: return None

    else:

        gcms_ref_obj = get_gcms(file_path)
        sql_obj = start_sql_from_file()
        rt_ri_pairs = get_rt_ri_pairs(gcms_ref_obj, sql_obj=sql_obj)
        # !!!!!! READ !!!!! use the previous two lines if db/pnnl_lowres_gcms_compounds.sqlite does not exist
        # and comment the next line
        #rt_ri_pairs = get_rt_ri_pairs(gcms_ref_obj)

        return rt_ri_pairs, file_path
Ejemplo n.º 28
0
 def click_add_files(self):
     files_dialog = QFileDialog()
     files_dialog.setNameFilter("Images (*.jpg *.jpeg *.bmp *.png *.tiff)")
     files_dialog.setFileMode(QFileDialog.ExistingFiles)
     if files_dialog.exec_():
         files = files_dialog.selectedFiles()
         self.add_items(files)
    def browseForAPILocation(self) -> None:
        """
		Opens a file dialog when the user clicks on the "..." button to choose a project directory.

		The user will only be able to select folders, and when a folder is selected, the value will
		be placed into the read-only text editor to the left.
		
		The default location is the current project location.

		:return: None
		:rtype: NoneType
		"""

        if getPythonBitness() == 32:
            openDir = "C:/Program Files (x86)"
        else:
            openDir = "C:/Program Files"
        openDir = os.path.abspath(openDir)

        fileDialog = QFileDialog()
        fileDialog.setFileMode(QFileDialog.Directory)
        fileDialog.setDirectory(openDir)
        fileDialog.fileSelected.connect(
            lambda url: self.ui.apiLocation.setText(url))
        fileDialog.exec_()
        def __init__(self, parent=None):
            super().__init__(parent=parent)

            layout = QFormLayout()
            self.setLayout(layout)

            self.vector = QLineEdit()
            self.vector.setPlaceholderText("Fp1=1;Cz=-1;...")
            self.vector.editingFinished.connect(self.updateModel)

            self.vector_path = PathEdit()
            dialog = QFileDialog(self, "Open")
            dialog.setFileMode(dialog.AnyFile)
            self.vector_path.setDialog(dialog)
            self.vector_path.pathChanged.connect(self.updateModel)

            # Vector data can be contained in a file or inputted directly from a file
            self.vector_radio_button = QRadioButton("Filter vector")
            self.vector_radio_button.toggled.connect(self.vector.setEnabled)
            self.vector_radio_button.clicked.connect(self.updateModel)
            self.vector_path_radio_button = QRadioButton("Filter vector file")
            self.vector_path_radio_button.toggled.connect(self.vector_path.setEnabled)
            self.vector_path_radio_button.clicked.connect(self.updateModel)

            layout.addRow(self.vector_radio_button, self.vector)
            layout.addRow(self.vector_path_radio_button, self.vector_path)

            self.vector_radio_button.setChecked(True)
            self.vector_path.setEnabled(False)