Пример #1
0
    def __init__(self, original=False):
        super(ComboEditor, self).__init__()
        self.__original = original
        self._symbols_index = []
        vbox = QVBoxLayout(self)
        vbox.setContentsMargins(0, 0, 0, 0)
        vbox.setSpacing(0)

        self.bar = ActionBar()
        vbox.addWidget(self.bar)

        self.stacked = QStackedLayout()
        vbox.addLayout(self.stacked)

        self._main_container = IDE.get_service('main_container')

        self.connect(self.bar, SIGNAL("changeCurrent(PyQt_PyObject)"),
            self.set_current)
        self.connect(self.bar, SIGNAL("runFile(QString)"),
            self._run_file)
        self.connect(self.bar, SIGNAL("addToProject(QString)"),
            self._add_to_project)
        self.connect(self.bar, SIGNAL("goToSymbol(int)"),
            self._go_to_symbol)
        self.connect(self.bar, SIGNAL("reopenTab(QString)"),
            lambda path: self._main_container.open_file(path))
        self.connect(self.bar, SIGNAL("recentTabsModified()"),
            lambda: self._main_container.recent_files_changed())
        self.connect(self.bar.code_navigator.btnPrevious, SIGNAL("clicked()"),
            lambda: self._navigate_code(False))
        self.connect(self.bar.code_navigator.btnNext, SIGNAL("clicked()"),
            lambda: self._navigate_code(True))
Пример #2
0
    def __init__(self, parent=None):
        super(_MainContainer, self).__init__(parent)
        self._parent = parent
        self.stack = QStackedLayout(self)
        self.stack.setStackingMode(QStackedLayout.StackAll)

        self.splitter = dynamic_splitter.DynamicSplitter()
        self.setAcceptDrops(True)
        self.files_handler = files_handler.FilesHandler(self)

        #documentation browser
        self.docPage = None
        #Code Navigation
        self._locator = locator.GoToDefinition()
        self.__codeBack = []
        self.__codeForward = []
        self.__bookmarksFile = ''
        self.__bookmarksPos = -1
        self.__breakpointsFile = ''
        self.__breakpointsPos = -1
        self.__operations = {
            0: self._navigate_code_jumps,
            1: self._navigate_bookmarks,
            2: self._navigate_breakpoints}

        self.connect(self, SIGNAL("locateFunction(QString, QString, bool)"),
                     self.locate_function)

        IDE.register_service('main_container', self)

        #Register signals connections
        connections = (
            {'target': 'menu_file',
             'signal_name': 'openFile(QString)',
             'slot': self.open_file},
            {'target': 'explorer_container',
             'signal_name': 'goToDefinition(int)',
             'slot': self.editor_go_to_line},
            {'target': 'explorer_container',
             'signal_name': 'pep8Activated(bool)',
             'slot': self.reset_pep8_warnings},
            {'target': 'explorer_container',
             'signal_name': 'lintActivated(bool)',
             'slot': self.reset_lint_warnings},
            )

        IDE.register_signals('main_container', connections)

        self.selector = main_selector.MainSelector(self)
        self.add_widget(self.selector)

        if settings.SHOW_START_PAGE:
            self.show_start_page()

        self.connect(self.selector, SIGNAL("changeCurrent(int)"),
                     self._change_current_stack)
        self.connect(self.selector, SIGNAL("ready()"),
                     self._selector_ready)
Пример #3
0
    def __init__(self):
        super(ComboTabs, self).__init__()
        vbox = QVBoxLayout(self)
        vbox.setContentsMargins(0, 0, 0, 0)

        self.bar = ActionBar()
        vbox.addWidget(self.bar)

        self.stacked = QStackedLayout()
        self.editable = neditable.NEditable('')
        self.editor_widget = editor.create_editor(self.editable)
        self.stacked.addWidget(self.editor_widget)
        vbox.addLayout(self.stacked)
Пример #4
0
    def __init__(self, editor):
        super(CodeCompletionWidget,
              self).__init__(None, Qt.FramelessWindowHint | Qt.ToolTip)
        self._editor = editor
        self._revision = 0
        self._block = 0
        self.stack_layout = QStackedLayout(self)
        self.stack_layout.setContentsMargins(0, 0, 0, 0)
        self.stack_layout.setSpacing(0)
        self.completion_list = QListWidget()
        self.completion_list.setMinimumHeight(200)
        self.completion_list.setAlternatingRowColors(True)
        self._list_index = self.stack_layout.addWidget(self.completion_list)

        self._icons = {
            'a': resources.IMAGES['attribute'],
            'f': resources.IMAGES['function'],
            'c': resources.IMAGES['class'],
            'm': resources.IMAGES['module']
        }

        self.cc = code_completion.CodeCompletion()
        self._completion_results = {}
        self._prefix = ''
        self.setVisible(False)
        self.source = ''
        self._key_operations = {
            Qt.Key_Up: self._select_previous_row,
            Qt.Key_Down: self._select_next_row,
            Qt.Key_PageUp: (lambda: self._select_previous_row(6)),
            Qt.Key_PageDown: (lambda: self._select_next_row(6)),
            Qt.Key_Right: lambda: None,
            Qt.Key_Left: lambda: None,
            Qt.Key_Enter: self.pre_key_insert_completion,
            Qt.Key_Return: self.pre_key_insert_completion,
            Qt.Key_Tab: self.pre_key_insert_completion,
            Qt.Key_Space: self.hide_completer,
            Qt.Key_Escape: self.hide_completer,
            Qt.Key_Backtab: self.hide_completer,
            Qt.NoModifier: self.hide_completer,
            Qt.ShiftModifier: self.hide_completer,
        }

        self.desktop = QApplication.instance().desktop()

        self.connect(self.completion_list,
                     SIGNAL("itemClicked(QListWidgetItem*)"),
                     self.pre_key_insert_completion)
        self.connect(self._editor.document(),
                     SIGNAL("cursorPositionChanged(QTextCursor)"),
                     self.update_metadata)
Пример #5
0
 def __init__(self, parent=None):
     super(CenterView, self).__init__(parent)
     layout = QVBoxLayout()
     self.setLayout(layout)
     self.center = QStackedLayout()
     self.camview = widgets.CamView((640, 480), self, draw_logo=True)
     self.label_up = QLabel()
     self.label_down = QLabel()
     self.center.addWidget(self.camview)
     layout.addLayout(self.center)
     layout.addWidget(self.label_up)
     layout.addWidget(self.label_down)
     self.adjustSize()
     self.setFixedSize(self.sizeHint())
Пример #6
0
    def __init__(self, original=False):
        super(ComboEditor, self).__init__(None, Qt.WindowStaysOnTopHint)
        self.__original = original
        self.__undocked = []
        self._symbols_index = []
        vbox = QVBoxLayout(self)
        vbox.setContentsMargins(0, 0, 0, 0)
        vbox.setSpacing(0)

        self.bar = ActionBar(main_combo=original)
        vbox.addWidget(self.bar)

        self.stacked = QStackedLayout()
        vbox.addLayout(self.stacked)

        self._main_container = IDE.get_service('main_container')

        if not self.__original:
            self.connect(self._main_container, SIGNAL("fileOpened(QString)"),
                self._file_opened_by_main)

        self.connect(self.bar.combo, SIGNAL("showComboSelector()"),
            lambda: self.emit(SIGNAL("showComboSelector()")))
        self.connect(self.bar, SIGNAL("changeCurrent(PyQt_PyObject, int)"),
            self._set_current)
        self.connect(self.bar, SIGNAL("splitEditor(bool)"), self.split_editor)
        self.connect(self.bar, SIGNAL("runFile(QString)"),
            self._run_file)
        self.connect(self.bar, SIGNAL("closeSplit()"),
            lambda: self.emit(SIGNAL("closeSplit(PyQt_PyObject)"), self))
        self.connect(self.bar, SIGNAL("addToProject(QString)"),
            self._add_to_project)
        self.connect(self.bar, SIGNAL("showFileInExplorer(QString)"),
            self._show_file_in_explorer)
        self.connect(self.bar, SIGNAL("goToSymbol(int)"),
            self._go_to_symbol)
        self.connect(self.bar, SIGNAL("undockEditor()"),
            self.undock_editor)
        self.connect(self.bar, SIGNAL("reopenTab(QString)"),
            lambda path: self._main_container.open_file(path))
        self.connect(self.bar, SIGNAL("recentTabsModified()"),
            lambda: self._main_container.recent_files_changed())
        self.connect(self.bar.code_navigator.btnPrevious, SIGNAL("clicked()"),
            lambda: self._navigate_code(False))
        self.connect(self.bar.code_navigator.btnNext, SIGNAL("clicked()"),
            lambda: self._navigate_code(True))
Пример #7
0
    def __init__(self, parent=None):
        super(Preferences, self).__init__(parent, Qt.Dialog)
        self.setWindowTitle(translations.TR_PREFERENCES_TITLE)
        self.setMinimumSize(QSize(800, 600))
        self.setMaximumSize(QSize(0, 0))
        vbox = QVBoxLayout(self)
        hbox = QHBoxLayout()
        vbox.setContentsMargins(0, 0, 5, 5)
        hbox.setContentsMargins(0, 0, 0, 0)

        self.tree = QTreeWidget()
        self.tree.header().setHidden(True)
        self.tree.setSelectionMode(QTreeWidget.SingleSelection)
        self.tree.setAnimated(True)
        self.tree.header().setHorizontalScrollMode(
            QAbstractItemView.ScrollPerPixel)
        self.tree.header().setResizeMode(0, QHeaderView.ResizeToContents)
        self.tree.header().setStretchLastSection(False)
        self.tree.setFixedWidth(200)
        self.stacked = QStackedLayout()
        hbox.addWidget(self.tree)
        hbox.addLayout(self.stacked)
        vbox.addLayout(hbox)

        hbox_footer = QHBoxLayout()
        self._btnSave = QPushButton(translations.TR_SAVE)
        self._btnCancel = QPushButton(translations.TR_CANCEL)
        hbox_footer.addSpacerItem(QSpacerItem(1, 0, QSizePolicy.Expanding))
        hbox_footer.addWidget(self._btnCancel)
        hbox_footer.addWidget(self._btnSave)
        vbox.addLayout(hbox_footer)

        self.connect(self.tree, SIGNAL("itemSelectionChanged()"),
                     self._change_current)
        self.connect(self._btnCancel, SIGNAL("clicked()"), self.close)
        self.connect(self._btnSave, SIGNAL("clicked()"),
                     self._save_preferences)

        self.load_ui()
        self.tree.setCurrentItem(self.tree.topLevelItem(0))
Пример #8
0
    def __init__(self, parent=None):
        super(ProjectTreeColumn, self).__init__(parent,
                                                Qt.WindowStaysOnTopHint)
        vbox = QVBoxLayout(self)
        vbox.setSizeConstraint(QVBoxLayout.SetDefaultConstraint)
        vbox.setContentsMargins(0, 0, 0, 0)
        self._buttons = []

        self._combo_project = QComboBox()
        self._combo_project.setMinimumHeight(30)
        self._combo_project.setContextMenuPolicy(Qt.CustomContextMenu)
        vbox.addWidget(self._combo_project)

        self._projects_area = QStackedLayout()
        logger.debug("This is the projects area")
        logger.debug(self._projects_area)
        vbox.addLayout(self._projects_area)

        self.projects = []

        self.connect(self._combo_project, SIGNAL("currentIndexChanged(int)"),
                     self._change_current_project)
        self.connect(self._combo_project,
                     SIGNAL("customContextMenuRequested(const QPoint &)"),
                     self.context_menu_for_root)
        connections = (
            {
                'target': 'main_container',
                'signal_name': 'addToProject(QString)',
                'slot': self._add_file_to_project
            },
            {
                'target': 'main_container',
                'signal_name': 'showFileInExplorer(QString)',
                'slot': self._show_file_in_explorer
            },
        )
        IDE.register_service('projects_explorer', self)
        IDE.register_signals('projects_explorer', connections)
        ExplorerContainer.register_tab(translations.TR_TAB_PROJECTS, self)
Пример #9
0
    def __init__(self, parent=None, **kwargs):
        super(CSVImportDialog, self).__init__(parent, **kwargs)
        self.setLayout(QVBoxLayout())

        self._options = None
        self._path = None
        self.__update_pending = False

        self._optionswidget = CSVOptionsWidget()
        self._optionswidget.format_changed.connect(self._invalidate_preview)

        self._stack = QStackedLayout()
        self._stack.setContentsMargins(0, 0, 0, 0)
        prev_box = QGroupBox("Preview")
        prev_box.setLayout(self._stack)
        self._preview = QTableView(tabKeyNavigation=False)
        self._preview_error = QLabel()
        self._stack.addWidget(self._preview)
        self._stack.addWidget(self._preview_error)

        buttons = QDialogButtonBox(
            orientation=Qt.Horizontal,
            standardButtons=(QDialogButtonBox.Ok | QDialogButtonBox.Cancel
                             | QDialogButtonBox.Reset))
        buttons.accepted.connect(self.accept)
        buttons.rejected.connect(self.reject)

        def on_clicked(button):
            if buttons.buttonRole(button) == QDialogButtonBox.ResetRole:
                self.reset()

        buttons.clicked.connect(on_clicked)

        self.layout().addWidget(self._optionswidget)
        self.layout().addWidget(prev_box)
        self.layout().addWidget(buttons)
Пример #10
0
    def __init__(self, parent=None):
        super(MusicPreviewWidget, self).__init__(parent)
        self._lastbuildtime = 10.0
        self._running = None
        self._current = None

        self._chooserLabel = QLabel()
        self._chooser = QComboBox(self, activated=self.selectDocument)
        self._log = log.Log()
        self._view = popplerview.View()
        self._progress = widgets.progressbar.TimedProgressBar()

        self._stack = QStackedLayout()
        self._top = QWidget()

        layout = QVBoxLayout()
        self.setLayout(layout)

        layout.addWidget(self._top)
        layout.addLayout(self._stack)
        layout.addWidget(self._progress)

        top = QHBoxLayout()
        top.setContentsMargins(0, 0, 0, 0)
        top.setSpacing(2)
        self._top.setLayout(top)
        top.addWidget(self._chooserLabel)
        top.addWidget(self._chooser)
        top.addStretch(1)

        self._stack.addWidget(self._log)
        self._stack.addWidget(self._view)

        self._top.hide()
        app.aboutToQuit.connect(self.cleanup)
        app.translateUI(self)
Пример #11
0
    def __init__(self, parent=None):
        super().__init__(parent)
        self.modified = False

        box = group_box(self.tr("Default method"),
                        layout=layout(Qt.Vertical))
        self.controlArea.layout().addWidget(box)

        bgroup = QButtonGroup()

        for i, m in enumerate(self.METHODS[1:-1], 1):
            b = radio_button(m.name, checked=i == self.default_method,
                             group=bgroup, group_id=i)
            box.layout().addWidget(b)

        self.defbggroup = bgroup

        bgroup.buttonClicked[int].connect(self.set_default_method)
        box = group_box(self.tr("Individual attribute settings"),
                        layout=layout(Qt.Horizontal))
        self.controlArea.layout().addWidget(box)

        self.varview = QtGui.QListView(
            selectionMode=QtGui.QListView.ExtendedSelection
        )
        self.varview.setItemDelegate(DisplayFormatDelegate())
        self.varmodel = itemmodels.VariableListModel()
        self.varview.setModel(self.varmodel)
        self.varview.selectionModel().selectionChanged.connect(
            self._on_var_selection_changed
        )
        self.selection = self.varview.selectionModel()

        box.layout().addWidget(self.varview)

        method_layout = layout(Qt.Vertical, margins=0)
        box.layout().addLayout(method_layout)

        methodbox = group_box(layout=layout(Qt.Vertical))

        bgroup = QButtonGroup()
        for i, m in enumerate(self.METHODS):
            b = radio_button(m.name, group=bgroup, group_id=i)
            methodbox.layout().addWidget(b)

        assert self.METHODS[-1].short == "value"

        self.value_stack = value_stack = QStackedLayout()
        self.value_combo = QComboBox(activated=self._on_value_changed)
        self.value_line = QLineEdit(editingFinished=self._on_value_changed)
        self.value_line.setValidator(QDoubleValidator())
        value_stack.addWidget(self.value_combo)
        value_stack.addWidget(self.value_line)
        methodbox.layout().addLayout(value_stack)

        bgroup.buttonClicked[int].connect(
            self.set_method_for_current_selection
        )
        reset_button = push_button("Restore all to default",
                                   clicked=self.reset_var_methods,
                                   default=False, autoDefault=False)

        method_layout.addWidget(methodbox)
        method_layout.addStretch(2)
        method_layout.addWidget(reset_button)
        self.varmethodbox = methodbox
        self.varbgroup = bgroup

        commitbox = group_box("Commit", layout=layout(margins=0))

        cwidget = commit_widget(
            button_text="Commit",
            button_default=True,
            check_text="Commit on any change",
            checked=self.autocommit,
            clicked=self.commit
        )

        def toggle_auto_commit(b):
            self.autocommit = b
            if self.modified:
                self.commit()

        cwidget.auto_commit_check.toggled[bool].connect(toggle_auto_commit)
        commitbox.layout().addWidget(cwidget)

        self.addAction(cwidget.commit_action)
        self.controlArea.layout().addWidget(commitbox)

        self.data = None
        self.fitter = None
Пример #12
0
    def __init__(self, parent=None):
        super(_MainContainer, self).__init__(parent)
        self._parent = parent
        self.stack = QStackedLayout(self)

        #Create scrollbar for follow mode
        self.scrollBar = QScrollBar(Qt.Vertical, self)
        self.scrollBar.setFixedWidth(20)
        self.scrollBar.setToolTip(
            self.tr('Follow Mode: Scroll the Editors together'))
        self.scrollBar.hide()
        #hbox.addWidget(self.scrollBar)

        self.splitter = dynamic_splitter.DynamicSplitter()
        self.tabs = tab_widget.TabWidget(self)
        self.setAcceptDrops(True)
        self.splitter.addWidget(self.tabs)
        self.stack.addWidget(self.splitter)

        self.current_split = None
        #documentation browser
        self.docPage = None
        #Code Navigation
        self._locator = locator.Locator()
        self.__codeBack = []
        self.__codeForward = []
        self.__bookmarksFile = ''
        self.__bookmarksPos = -1
        self.__breakpointsFile = ''
        self.__breakpointsPos = -1
        self.__operations = {
            0: self._navigate_code_jumps,
            1: self._navigate_bookmarks,
            2: self._navigate_breakpoints}

        self.connect(self, SIGNAL("locateFunction(QString, QString, bool)"),
            self.locate_function)
        self.connect(self.tabs, SIGNAL("currentChanged(int)"),
            self._current_tab_changed)
        self.connect(self.tabs, SIGNAL("splitTab(QTabWidget, int, bool)"),
            self._split_this_tab)
        self.connect(self.tabs, SIGNAL("reopenTab(QString)"),
            self.open_file)
        self.connect(self.tabs, SIGNAL("syntaxChanged(QWidget, QString)"),
            self._specify_syntax)
        self.connect(self.tabs, SIGNAL("allTabsClosed()"),
            self._main_without_tabs)
        #reload file
        self.connect(self.tabs, SIGNAL("reloadFile(QWidget)"),
            self.reload_file)
        #for Save on Close operation
        self.connect(self.tabs, SIGNAL("saveActualEditor()"),
            self.save_file)
        #Navigate Code
        self.connect(self.tabs, SIGNAL("navigateCode(bool, int)"),
            self.navigate_code_history)
        # Refresh recent tabs
        self.connect(self.tabs, SIGNAL("recentTabsModified(QStringList)"),
            self._recent_files_changed)

        IDE.register_service('main_container', self)

        #Register signals connections
        connections = (
            {'target': 'menu_file',
            'signal_name': 'openFile(QString)',
            'slot': self.open_file},
            {'target': 'explorer_container',
            'signal_name': 'goToDefinition(int)',
            'slot': self.editor_go_to_line},
            {'target': 'explorer_container',
            'signal_name': 'projectClosed(QString)',
            'slot': self.close_files_from_project},
            {'target': 'explorer_container',
            'signal_name': 'pep8Activated(bool)',
            'slot': self.reset_pep8_warnings},
            {'target': 'explorer_container',
            'signal_name': 'lintActivated(bool)',
            'slot': self.reset_lint_warnings},
            )

        IDE.register_signals('main_container', connections)

        if settings.SHOW_START_PAGE:
            self.show_start_page()
Пример #13
0
    def __init__(self):
        super().__init__()
        self.modified = False

        box = group_box(self.tr("Default method"),
                        layout=layout(Qt.Vertical))
        self.controlArea.layout().addWidget(box)

        bgroup = QButtonGroup()

        for i, m in enumerate(self.METHODS[1:-1], 1):
            b = radio_button(m.name, checked=i == self.default_method,
                             group=bgroup, group_id=i)
            box.layout().addWidget(b)

        self.defbggroup = bgroup

        bgroup.buttonClicked[int].connect(self.set_default_method)
        box = group_box(self.tr("Individual attribute settings"),
                        layout=layout(Qt.Horizontal))
        self.controlArea.layout().addWidget(box)

        self.varview = QtGui.QListView(
            selectionMode=QtGui.QListView.ExtendedSelection
        )
        self.varview.setItemDelegate(DisplayFormatDelegate())
        self.varmodel = itemmodels.VariableListModel()
        self.varview.setModel(self.varmodel)
        self.varview.selectionModel().selectionChanged.connect(
            self._on_var_selection_changed
        )
        self.selection = self.varview.selectionModel()

        box.layout().addWidget(self.varview)

        method_layout = layout(Qt.Vertical, margins=0)
        box.layout().addLayout(method_layout)

        methodbox = group_box(layout=layout(Qt.Vertical))

        bgroup = QButtonGroup()
        for i, m in enumerate(self.METHODS):
            b = radio_button(m.name, group=bgroup, group_id=i)
            methodbox.layout().addWidget(b)

        assert self.METHODS[-1].short == "value"

        self.value_stack = value_stack = QStackedLayout()
        self.value_combo = QComboBox(
            minimumContentsLength=8,
            sizeAdjustPolicy=QComboBox.AdjustToMinimumContentsLength,
            activated=self._on_value_changed)
        self.value_line = QLineEdit(editingFinished=self._on_value_changed)
        self.value_line.setValidator(QDoubleValidator())
        value_stack.addWidget(self.value_combo)
        value_stack.addWidget(self.value_line)
        methodbox.layout().addLayout(value_stack)

        bgroup.buttonClicked[int].connect(
            self.set_method_for_current_selection
        )
        reset_button = push_button("Restore all to default",
                                   clicked=self.reset_var_methods,
                                   default=False, autoDefault=False)

        method_layout.addWidget(methodbox)
        method_layout.addStretch(2)
        method_layout.addWidget(reset_button)
        self.varmethodbox = methodbox
        self.varbgroup = bgroup

        box = gui.auto_commit(
            self.controlArea, self, "autocommit", "Commit",
            orientation=Qt.Horizontal, checkbox_label="Commit on any change")
        box.layout().insertSpacing(0, 80)
        box.layout().insertWidget(0, self.report_button)
        self.data = None
        self.learner = None
Пример #14
0
    def __init__(self, parent=None):
        super().__init__(parent)

        self.selectedDatabase = 0
        self.uniqueRows = True

        gui.button(gui.widgetBox(self.controlArea, "Cache", addSpace=True),
                   self, "Clear cache",
                   tooltip="Clear saved query results",
                   callback=self.clearCache)

        self.martsCombo = gui.comboBox(
            self.controlArea, self, "selectedDatabase", "Database",
            callback=self.setSelectedMart,
            addSpace=True)
        self.martsCombo.setMaximumWidth(250)

        self.datasetsCombo = gui.comboBox(
            self.controlArea, self, "selectedDataset", "Dataset",
            callback=self.setSelectedDataset,
            addSpace=True)

        self.datasetsCombo.setMaximumWidth(250)

        gui.rubber(self.controlArea)

        box = gui.widgetBox(self.controlArea, "Results")
        gui.checkBox(
            box, self, "uniqueRows", "Unique results only",
            tooltip="Return unique results only.",)

        self.commitButton = gui.button(
            box, self, "Get Results", callback=self.commit,
            tooltip="Query the BioMart server and output the results",
            autoDefault=True)

        self.commitButton.setEnabled(False)

        self.mainWidget = gui.widgetBox(
            self.mainArea, orientation=QStackedLayout())

        self.mainTab = QTabWidget()

        self.mainWidget.layout().addWidget(self.mainTab)

        self.attributesConfigurationBox = gui.createTabPage(self.mainTab, "Attributes")

        if self.SHOW_FILTERS:  # ??
            self.filtersConfigurationBox = gui.createTabPage(self.mainTab, "Filters")

        self.error(0)
        self.setEnabled(False)
        self._executor = concurrent.ThreadExecutor(
            threadPool=QThreadPool(maxThreadCount=2)
        )
        self._task = task = concurrent.Task(function=self._get_registry)
        task.resultReady.connect(self.setBioMartRegistry)
        task.exceptionReady.connect(self._handleException)
        self._executor.submit(task)

        self._afterInitQueue = []

        try:
            from Bio import SeqIO
            self.hasBiopython = True
        except ImportError:
            self.warning(100, "Biopython package not found.\nTo retrieve FASTA sequence data from BioMart install Biopython.")
            self.hasBiopython = False