def _setup_symbol_combo(self): self._symbols = list(POINT_ICONS.keys()) for idx, symbol in enumerate(self._symbols): icon = symbol_icon(symbol) self.ui.combo_symbol.addItem(icon, '', userData=symbol) self.ui.combo_symbol.setIconSize(QtCore.QSize(20, 20)) self.ui.combo_symbol.setMinimumSize(10, 32)
def _create_terminal(self): if self._terminal is not None: # already set up return if hasattr(self, '_terminal_exception'): # already failed to set up return self._terminal_button = QtGui.QToolButton(self._ui) self._terminal_button.setToolTip("Toggle IPython Prompt") i = get_icon('IPythonConsole') self._terminal_button.setIcon(i) self._terminal_button.setIconSize(QtCore.QSize(25, 25)) self._layer_widget.ui.button_row.addWidget(self._terminal_button) try: from glue.app.qt.terminal import glue_terminal widget = glue_terminal(data_collection=self._data, dc=self._data, hub=self._hub, session=self.session, application=self, **vars(env)) self._terminal_button.clicked.connect(self._toggle_terminal) except Exception as e: # pylint: disable=W0703 import traceback self._terminal_exception = traceback.format_exc() self._setup_terminal_error_dialog(e) return self._terminal = self.add_widget(widget, label='IPython') self._hide_terminal()
def __init__(self, canvas, frame, name=None): """ Create a new toolbar object Parameters ---------- canvas : Maptloblib canvas instance The drawing canvas to interact with frame : QWidget The QT frame that the canvas is embedded within. """ self.buttons = {} self.__active = None self.basedir = None NavigationToolbar2QT.__init__(self, canvas, frame) if name is not None: self.setWindowTitle(name) self.setIconSize(QtCore.QSize(25, 25)) self.layout().setSpacing(1) self.setFocusPolicy(Qt.StrongFocus) self._idKey = None # pyside is prone to segfaults if slots hold the only # reference to a signal, so we hold an extra reference # see https://bugreports.qt-project.org/browse/PYSIDE-88 self.__signals = []
def _update_icons(self): self.setIconSize(QtCore.QSize(self.width(), 15)) for index in range(self.count()): cmap = self.itemData(index) icon = QtGui.QIcon( cmap2pixmap(cmap, size=(self.width(), 15), steps=200)) self.setItemIcon(index, icon)
def make_toolbar(self): tb = QtGui.QToolBar(parent=self) tb.setIconSize(QtCore.QSize(25, 25)) tb.layout().setSpacing(1) tb.setFocusPolicy(Qt.StrongFocus) agroup = QtGui.QActionGroup(tb) agroup.setExclusive(True) for (mode_text, mode_icon, mode_cb) in self._mouse_modes(): # TODO: add icons similar to the Matplotlib toolbar action = tb.addAction(mode_icon, mode_text) action.setCheckable(True) action.toggled.connect(mode_cb) agroup.addAction(action) action = tb.addAction(get_icon('glue_move'), "Pan") self.mode_actns['pan'] = action action.setCheckable(True) action.toggled.connect(lambda tf: self.mode_cb('pan', tf)) agroup.addAction(action) icon = QtGui.QIcon(os.path.join(ginga_icon_dir, 'hand_48.png')) action = tb.addAction(icon, "Free Pan") self.mode_actns['freepan'] = action action.setCheckable(True) action.toggled.connect(lambda tf: self.mode_cb('freepan', tf)) agroup.addAction(action) icon = QtGui.QIcon(os.path.join(ginga_icon_dir, 'rotate_48.png')) action = tb.addAction(icon, "Rotate") self.mode_actns['rotate'] = action action.setCheckable(True) action.toggled.connect(lambda tf: self.mode_cb('rotate', tf)) agroup.addAction(action) action = tb.addAction(get_icon('glue_contrast'), "Contrast") self.mode_actns['contrast'] = action action.setCheckable(True) action.toggled.connect(lambda tf: self.mode_cb('contrast', tf)) agroup.addAction(action) icon = QtGui.QIcon(os.path.join(ginga_icon_dir, 'cuts_48.png')) action = tb.addAction(icon, "Cuts") self.mode_actns['cuts'] = action action.setCheckable(True) action.toggled.connect(lambda tf: self.mode_cb('cuts', tf)) agroup.addAction(action) cmap_w = _colormap_mode(self, self.client.set_cmap) tb.addWidget(cmap_w) return tb
def __init__(self, parent=None): super(LayerArtistView, self).__init__(parent) self.setDragEnabled(True) self.setAcceptDrops(True) self.setDragDropMode(QtGui.QAbstractItemView.InternalMove) self.setIconSize(QtCore.QSize(15, 15)) self.setSelectionMode(QtGui.QAbstractItemView.SingleSelection) self.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.setContextMenuPolicy(Qt.ActionsContextMenu) self.setEditTriggers(self.NoEditTriggers) self._set_palette() self._actions = {} self._create_actions() self._timer = QtCore.QTimer(self) self._timer.timeout.connect(nonpartial(self._update_viewport)) self._timer.start(1000)
def _setup_widgets(self): self.layout = QtGui.QFormLayout() self.size_widget = QtGui.QSpinBox() self.size_widget.setMinimum(1) self.size_widget.setMaximum(40) self.size_widget.setValue(self.layer.style.markersize) self.label_widget = QtGui.QLineEdit() self.label_widget.setText(self.layer.label) self.label_widget.selectAll() self.symbol_widget = QtGui.QComboBox() for idx, symbol in enumerate(self._symbols): icon = symbol_icon(symbol) self.symbol_widget.addItem(icon, '') if symbol is self.layer.style.marker: self.symbol_widget.setCurrentIndex(idx) self.symbol_widget.setIconSize(QtCore.QSize(20, 20)) self.symbol_widget.setMinimumSize(10, 32) self.color_widget = ColorWidget() self.color_widget.setStyleSheet('ColorWidget {border: 1px solid;}') color = self.layer.style.color color = mpl_to_qt4_color(color, alpha=self.layer.style.alpha) self.set_color(color) self.okcancel = QtGui.QDialogButtonBox(QtGui.QDialogButtonBox.Ok | QtGui.QDialogButtonBox.Cancel) if self._edit_label: self.layout.addRow("Label", self.label_widget) self.layout.addRow("Symbol", self.symbol_widget) self.layout.addRow("Color", self.color_widget) self.layout.addRow("Size", self.size_widget) self.layout.addWidget(self.okcancel) self.setLayout(self.layout) self.layout.setContentsMargins(6, 6, 6, 6)
def setupUi(self, ImageWidget): ImageWidget.setObjectName("ImageWidget") ImageWidget.resize(296, 217) ImageWidget.setBaseSize(QtCore.QSize(555, 500)) ImageWidget.setFocusPolicy(QtCore.Qt.StrongFocus) self.verticalLayout_2 = QtGui.QVBoxLayout(ImageWidget) self.verticalLayout_2.setContentsMargins(4, 4, 4, 4) self.verticalLayout_2.setObjectName("verticalLayout_2") self.option_dashboard = QtGui.QWidget(ImageWidget) self.option_dashboard.setObjectName("option_dashboard") self.verticalLayout = QtGui.QVBoxLayout(self.option_dashboard) self.verticalLayout.setContentsMargins(0, 0, 0, 10) self.verticalLayout.setObjectName("verticalLayout") self.horizontalLayout = QtGui.QHBoxLayout() self.horizontalLayout.setSpacing(2) self.horizontalLayout.setContentsMargins(0, 0, 0, 0) self.horizontalLayout.setObjectName("horizontalLayout") self.label = QtGui.QLabel(self.option_dashboard) self.label.setObjectName("label") self.horizontalLayout.addWidget(self.label) self.displayDataCombo = GlueComboBox(self.option_dashboard) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.displayDataCombo.sizePolicy().hasHeightForWidth()) self.displayDataCombo.setSizePolicy(sizePolicy) self.displayDataCombo.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToMinimumContentsLength) self.displayDataCombo.setObjectName("displayDataCombo") self.horizontalLayout.addWidget(self.displayDataCombo) self.verticalLayout.addLayout(self.horizontalLayout) self.horizontalLayout_2 = QtGui.QHBoxLayout() self.horizontalLayout_2.setSpacing(2) self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.label_2 = QtGui.QLabel(self.option_dashboard) self.label_2.setObjectName("label_2") self.horizontalLayout_2.addWidget(self.label_2) self.attributeComboBox = GlueComboBox(self.option_dashboard) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.attributeComboBox.sizePolicy().hasHeightForWidth()) self.attributeComboBox.setSizePolicy(sizePolicy) self.attributeComboBox.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToMinimumContentsLength) self.attributeComboBox.setObjectName("attributeComboBox") self.horizontalLayout_2.addWidget(self.attributeComboBox) self.verticalLayout.addLayout(self.horizontalLayout_2) self.horizontalLayout_3 = QtGui.QHBoxLayout() self.horizontalLayout_3.setSpacing(2) self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.orientationLabel = QtGui.QLabel(self.option_dashboard) self.orientationLabel.setEnabled(True) self.orientationLabel.setObjectName("orientationLabel") self.horizontalLayout_3.addWidget(self.orientationLabel) self.sliceComboBox = GlueComboBox(self.option_dashboard) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.sliceComboBox.sizePolicy().hasHeightForWidth()) self.sliceComboBox.setSizePolicy(sizePolicy) self.sliceComboBox.setObjectName("sliceComboBox") self.horizontalLayout_3.addWidget(self.sliceComboBox) self.verticalLayout.addLayout(self.horizontalLayout_3) self.imageSlider = QtGui.QSlider(self.option_dashboard) self.imageSlider.setEnabled(True) self.imageSlider.setOrientation(QtCore.Qt.Horizontal) self.imageSlider.setInvertedAppearance(False) self.imageSlider.setInvertedControls(True) self.imageSlider.setTickPosition(QtGui.QSlider.NoTicks) self.imageSlider.setTickInterval(0) self.imageSlider.setObjectName("imageSlider") self.verticalLayout.addWidget(self.imageSlider) spacerItem = QtGui.QSpacerItem(5, 59, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.verticalLayout.addItem(spacerItem) self.verticalLayout_2.addWidget(self.option_dashboard) self.verticalLayout_2.setStretch(0, 1) self.retranslateUi(ImageWidget) QtCore.QMetaObject.connectSlotsByName(ImageWidget)
def setupUi(self, LayerTree): font = QtGui.QFont() font.setPointSize(11) LayerTree.setObjectName("LayerTree") LayerTree.resize(241, 282) self.layout = QtGui.QVBoxLayout(LayerTree) self.layout.setSpacing(2) self.layout.setContentsMargins(5, 5, 5, 0) self.layout.setObjectName("layout") self.layerTree = DataCollectionView(LayerTree) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(10) sizePolicy.setHeightForWidth( self.layerTree.sizePolicy().hasHeightForWidth()) self.layerTree.setSizePolicy(sizePolicy) self.layerTree.setSelectionMode( QtGui.QAbstractItemView.ExtendedSelection) self.layerTree.setObjectName("layerTree") self.layout.addWidget(self.layerTree) self.button_row = QtGui.QHBoxLayout() self.button_row.setSpacing(3) self.button_row.setObjectName("button_row") self.layerAddButton = QtGui.QPushButton(LayerTree) self.layerAddButton.setFont(font) icon = get_icon('glue_open') self.layerAddButton.setIcon(icon) self.layerAddButton.setIconSize(QtCore.QSize(18, 18)) self.layerAddButton.setDefault(False) self.layerAddButton.setObjectName("layerAddButton") self.button_row.addWidget(self.layerAddButton) self.newSubsetButton = GlueActionButton(LayerTree) self.newSubsetButton.setIcon(get_icon('glue_subset')) self.newSubsetButton.setIconSize(QtCore.QSize(19, 19)) self.newSubsetButton.setObjectName("newSubsetButton") self.button_row.addWidget(self.newSubsetButton) self.newSubsetButton.setFont(font) self.layerRemoveButton = QtGui.QPushButton(LayerTree) self.layerRemoveButton.setEnabled(False) self.layerRemoveButton.setIcon(get_icon('glue_delete')) self.layerRemoveButton.setObjectName("layerRemoveButton") self.layerRemoveButton.setFont(font) self.button_row.addWidget(self.layerRemoveButton) self.linkButton = GlueActionButton(LayerTree) self.linkButton.setEnabled(True) self.linkButton.setIcon(get_icon('glue_link')) self.linkButton.setObjectName("linkButton") self.linkButton.setFont(font) self.button_row.addWidget(self.linkButton) spacerItem = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.button_row.addItem(spacerItem) self.layout.addLayout(self.button_row) self.retranslateUi(LayerTree) QtCore.QMetaObject.connectSlotsByName(LayerTree)
def __init__(self, vispy_widget=None, parent=None): super(VispyDataViewerToolbar, self).__init__(parent=parent) # Keep a reference to the Vispy Widget and the Vispy Data Viewer self._vispy_widget = vispy_widget self._vispy_data_viewer = parent self._data_collection = parent._data # Set visual preferences self.setIconSize(QtCore.QSize(25, 25)) # Initialize drawing visual self.line_pos = [] self.line = scene.visuals.Line(color=settings.FOREGROUND_COLOR, width=2, method='agg', parent=self._vispy_widget.canvas.scene) # Selection defaults self._scatter = None self.mode = None self.selection_origin = (0, 0) self.selected = [] # Add a timer to control the view rotate self.timer = app.Timer(connect=self.rotate) self.record_timer = app.Timer(connect=self.record) self.writer = None a = QtWidgets.QAction(get_icon('glue_filesave'), 'Save', parent) a.triggered.connect(nonpartial(self.save_figure)) a.setToolTip('Save the figure') a.setShortcut('Ctrl+Shift+S') parent.addAction(a) self.addAction(a) self.save_action = a if IMAGEIO_INSTALLED: a = QtWidgets.QAction(QtGui.QIcon(RECORD_START_ICON), 'Record', parent) a.triggered.connect(nonpartial(self.toggle_record)) a.setToolTip('Start/Stop the record') a.setCheckable(True) parent.addAction(a) self.addAction(a) self.record_action = a a = QtWidgets.QAction(QtGui.QIcon(ROTATE_ICON), 'Rotate View', parent) a.triggered.connect(nonpartial(self.toggle_rotate)) a.setCheckable(True) parent.addAction(a) self.addAction(a) self.rotate_action = a # Set up selection actions a = QtWidgets.QAction(get_icon('glue_lasso'), 'Lasso Selection', parent) a.triggered.connect(nonpartial(self.toggle_lasso)) a.setCheckable(True) parent.addAction(a) self.addAction(a) self.lasso_action = a a = QtWidgets.QAction(get_icon('glue_square'), 'Rectangle Selection', parent) a.triggered.connect(nonpartial(self.toggle_rectangle)) a.setCheckable(True) parent.addAction(a) self.addAction(a) self.rectangle_action = a a = QtWidgets.QAction(get_icon('glue_circle'), 'Ellipse Selection', parent) a.triggered.connect(nonpartial(self.toggle_ellipse)) a.setCheckable(True) parent.addAction(a) self.addAction(a) self.ellipse_action = a # TODO: change path to icon once it's in a released version of glue a = QtWidgets.QAction(QtGui.QIcon(POINT_ICON), 'Point Selection', parent) a.triggered.connect(nonpartial(self.toggle_point)) a.setCheckable(True) parent.addAction(a) self.addAction(a) self.point_action = a # Connect callback functions to VisPy Canvas self._vispy_widget.canvas.events.mouse_press.connect( self.on_mouse_press) self._vispy_widget.canvas.events.mouse_release.connect( self.on_mouse_release) self._vispy_widget.canvas.events.mouse_move.connect(self.on_mouse_move)
def setupUi(self, GlueApplication): GlueApplication.setObjectName("GlueApplication") GlueApplication.resize(1116, 749) self.centralwidget = QtGui.QWidget(GlueApplication) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.centralwidget.sizePolicy().hasHeightForWidth()) self.centralwidget.setSizePolicy(sizePolicy) self.centralwidget.setObjectName("centralwidget") self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget) self.verticalLayout.setContentsMargins(4, 4, 4, 4) self.verticalLayout.setObjectName("verticalLayout") self.main_splitter = QtGui.QSplitter(self.centralwidget) self.main_splitter.setOrientation(QtCore.Qt.Horizontal) self.main_splitter.setObjectName("main_splitter") self.data_plot_splitter = QtGui.QSplitter(self.main_splitter) self.data_plot_splitter.setOrientation(QtCore.Qt.Vertical) self.data_plot_splitter.setObjectName("data_plot_splitter") self.data_layers = QtGui.QGroupBox(self.data_plot_splitter) font = QtGui.QFont() font.setWeight(75) font.setBold(True) self.data_layers.setFont(font) self.data_layers.setLayoutDirection(QtCore.Qt.LeftToRight) self.data_layers.setFlat(False) self.data_layers.setObjectName("data_layers") self.plot_splitter = QtGui.QSplitter(self.data_plot_splitter) self.plot_splitter.setOrientation(QtCore.Qt.Vertical) self.plot_splitter.setObjectName("plot_splitter") self.plot_layers = QtGui.QGroupBox(self.plot_splitter) font = QtGui.QFont() font.setWeight(75) font.setBold(True) self.plot_layers.setFont(font) self.plot_layers.setFlat(False) self.plot_layers.setObjectName("plot_layers") self.plot_options = QtGui.QGroupBox(self.plot_splitter) font = QtGui.QFont() font.setWeight(75) font.setBold(True) self.plot_options.setFont(font) self.plot_options.setFlat(False) self.plot_options.setCheckable(False) self.plot_options.setObjectName("plot_options") self.tabWidget = QtGui.QTabWidget(self.main_splitter) self.tabWidget.setEnabled(True) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(1) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.tabWidget.sizePolicy().hasHeightForWidth()) self.tabWidget.setSizePolicy(sizePolicy) self.tabWidget.setMinimumSize(QtCore.QSize(400, 0)) self.tabWidget.setTabShape(QtGui.QTabWidget.Rounded) self.tabWidget.setElideMode(QtCore.Qt.ElideRight) self.tabWidget.setUsesScrollButtons(False) self.tabWidget.setDocumentMode(False) self.tabWidget.setTabsClosable(False) self.tabWidget.setMovable(True) self.tabWidget.setObjectName("tabWidget") self.verticalLayout.addWidget(self.main_splitter) GlueApplication.setCentralWidget(self.centralwidget) self.statusbar = QtGui.QStatusBar(GlueApplication) self.statusbar.setEnabled(True) self.statusbar.setObjectName("statusbar") GlueApplication.setStatusBar(self.statusbar) self.actionSave_session = QtGui.QAction(GlueApplication) self.actionSave_session.setObjectName("actionSave_session") self.actionNew_Session = QtGui.QAction(GlueApplication) self.actionNew_Session.setObjectName("actionNew_Session") self.actionQuit = QtGui.QAction(GlueApplication) self.actionQuit.setObjectName("actionQuit") self.actionLoad_data = QtGui.QAction(GlueApplication) self.actionLoad_data.setObjectName("actionLoad_data") self.actionNew_Subset = QtGui.QAction(GlueApplication) self.actionNew_Subset.setObjectName("actionNew_Subset") self.actionTransfer_Subset = QtGui.QAction(GlueApplication) self.actionTransfer_Subset.setObjectName("actionTransfer_Subset") self.actionSave_Subset = QtGui.QAction(GlueApplication) self.actionSave_Subset.setObjectName("actionSave_Subset") self.actionNew_Tab = QtGui.QAction(GlueApplication) self.actionNew_Tab.setObjectName("actionNew_Tab") self.actionNew_Tab_2 = QtGui.QAction(GlueApplication) self.actionNew_Tab_2.setObjectName("actionNew_Tab_2") self.action1x1 = QtGui.QAction(GlueApplication) self.action1x1.setObjectName("action1x1") self.action2x2 = QtGui.QAction(GlueApplication) self.action2x2.setObjectName("action2x2") self.action2x2_2 = QtGui.QAction(GlueApplication) self.action2x2_2.setObjectName("action2x2_2") self.retranslateUi(GlueApplication) self.tabWidget.setCurrentIndex(-1) QtCore.QMetaObject.connectSlotsByName(GlueApplication)
def setupUi(self, LinkEditor): LinkEditor.setObjectName("LinkEditor") LinkEditor.resize(854, 507) LinkEditor.setSizeGripEnabled(False) self.horizontalLayout_6 = QtGui.QHBoxLayout(LinkEditor) self.horizontalLayout_6.setObjectName("horizontalLayout_6") self.verticalLayout_3 = QtGui.QVBoxLayout() self.verticalLayout_3.setObjectName("verticalLayout_3") self.horizontalLayout_4 = QtGui.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.verticalLayout_2 = QtGui.QVBoxLayout() self.verticalLayout_2.setObjectName("verticalLayout_2") self.horizontalLayout_3 = QtGui.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.left_components = ComponentSelector(LinkEditor) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(1) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.left_components.sizePolicy().hasHeightForWidth()) self.left_components.setSizePolicy(sizePolicy) self.left_components.setMinimumSize(QtCore.QSize(200, 0)) self.left_components.setObjectName("left_components") self.horizontalLayout_3.addWidget(self.left_components) self.right_components = ComponentSelector(LinkEditor) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(1) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.right_components.sizePolicy().hasHeightForWidth()) self.right_components.setSizePolicy(sizePolicy) self.right_components.setMinimumSize(QtCore.QSize(200, 0)) self.right_components.setObjectName("right_components") self.horizontalLayout_3.addWidget(self.right_components) self.verticalLayout_2.addLayout(self.horizontalLayout_3) self.toggle_editor = QtGui.QToolButton(LinkEditor) self.toggle_editor.setAutoRaise(True) self.toggle_editor.setObjectName("toggle_editor") self.verticalLayout_2.addWidget(self.toggle_editor) self.horizontalLayout_4.addLayout(self.verticalLayout_2) self.verticalLayout = QtGui.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.label = QtGui.QLabel(LinkEditor) self.label.setAlignment(QtCore.Qt.AlignCenter) self.label.setObjectName("label") self.verticalLayout.addWidget(self.label) self.current_links = GlueListWidget(LinkEditor) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.current_links.sizePolicy().hasHeightForWidth()) self.current_links.setSizePolicy(sizePolicy) self.current_links.setMinimumSize(QtCore.QSize(400, 0)) self.current_links.setObjectName("current_links") self.verticalLayout.addWidget(self.current_links) self.horizontalLayout_2 = QtGui.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.add_link = QtGui.QPushButton(LinkEditor) self.add_link.setObjectName("add_link") self.horizontalLayout_2.addWidget(self.add_link) spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem) self.remove_link = QtGui.QPushButton(LinkEditor) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.remove_link.sizePolicy().hasHeightForWidth()) self.remove_link.setSizePolicy(sizePolicy) self.remove_link.setObjectName("remove_link") self.horizontalLayout_2.addWidget(self.remove_link) self.verticalLayout.addLayout(self.horizontalLayout_2) self.horizontalLayout = QtGui.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem1) self.buttonBox = QtGui.QDialogButtonBox(LinkEditor) self.buttonBox.setOrientation(QtCore.Qt.Horizontal) self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Ok) self.buttonBox.setCenterButtons(False) self.buttonBox.setObjectName("buttonBox") self.horizontalLayout.addWidget(self.buttonBox) self.verticalLayout.addLayout(self.horizontalLayout) self.horizontalLayout_4.addLayout(self.verticalLayout) self.horizontalLayout_4.setStretch(0, 1) self.horizontalLayout_4.setStretch(1, 2) self.verticalLayout_3.addLayout(self.horizontalLayout_4) self.horizontalLayout_5 = QtGui.QHBoxLayout() self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.signature_editor = LinkEquation(LinkEditor) self.signature_editor.setEnabled(True) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(100) sizePolicy.setVerticalStretch(100) sizePolicy.setHeightForWidth( self.signature_editor.sizePolicy().hasHeightForWidth()) self.signature_editor.setSizePolicy(sizePolicy) self.signature_editor.setAcceptDrops(True) self.signature_editor.setObjectName("signature_editor") self.horizontalLayout_5.addWidget(self.signature_editor) spacerItem2 = QtGui.QSpacerItem(400, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_5.addItem(spacerItem2) self.verticalLayout_3.addLayout(self.horizontalLayout_5) self.horizontalLayout_6.addLayout(self.verticalLayout_3) self.retranslateUi(LinkEditor) QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), LinkEditor.accept) QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), LinkEditor.reject) QtCore.QMetaObject.connectSlotsByName(LinkEditor)
def setupUi(self, LayerTree): LayerTree.setObjectName("LayerTree") LayerTree.resize(241, 282) self.verticalLayout_2 = QtGui.QVBoxLayout(LayerTree) self.verticalLayout_2.setSpacing(5) self.verticalLayout_2.setContentsMargins(5, 5, 5, 0) self.verticalLayout_2.setObjectName("verticalLayout_2") self.verticalLayout = QtGui.QVBoxLayout() self.verticalLayout.setSpacing(2) self.verticalLayout.setContentsMargins(-1, -1, -1, 0) self.verticalLayout.setObjectName("verticalLayout") self.layerTree = DataCollectionView(LayerTree) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(10) sizePolicy.setHeightForWidth( self.layerTree.sizePolicy().hasHeightForWidth()) self.layerTree.setSizePolicy(sizePolicy) self.layerTree.setMinimumSize(QtCore.QSize(0, 0)) self.layerTree.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.layerTree.setBaseSize(QtCore.QSize(0, 0)) self.layerTree.setSelectionMode( QtGui.QAbstractItemView.ExtendedSelection) self.layerTree.setObjectName("layerTree") self.verticalLayout.addWidget(self.layerTree) self.button_row = QtGui.QHBoxLayout() self.button_row.setSpacing(3) self.button_row.setObjectName("button_row") self.layerAddButton = QtGui.QPushButton(LayerTree) font = QtGui.QFont() font.setPointSize(11) self.layerAddButton.setFont(font) self.layerAddButton.setStatusTip("") self.layerAddButton.setWhatsThis("") self.layerAddButton.setText("") icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/icons/glue_open.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.layerAddButton.setIcon(icon) self.layerAddButton.setIconSize(QtCore.QSize(18, 18)) self.layerAddButton.setDefault(False) self.layerAddButton.setFlat(False) self.layerAddButton.setObjectName("layerAddButton") self.button_row.addWidget(self.layerAddButton) self.newSubsetButton = GlueActionButton(LayerTree) font = QtGui.QFont() font.setPointSize(11) self.newSubsetButton.setFont(font) self.newSubsetButton.setText("") icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(":/icons/glue_subset.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.newSubsetButton.setIcon(icon1) self.newSubsetButton.setIconSize(QtCore.QSize(19, 19)) self.newSubsetButton.setObjectName("newSubsetButton") self.button_row.addWidget(self.newSubsetButton) self.layerRemoveButton = QtGui.QPushButton(LayerTree) self.layerRemoveButton.setEnabled(False) font = QtGui.QFont() font.setPointSize(11) self.layerRemoveButton.setFont(font) self.layerRemoveButton.setText("") icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(":/icons/glue_delete.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.layerRemoveButton.setIcon(icon2) self.layerRemoveButton.setObjectName("layerRemoveButton") self.button_row.addWidget(self.layerRemoveButton) self.linkButton = GlueActionButton(LayerTree) self.linkButton.setEnabled(True) font = QtGui.QFont() font.setPointSize(11) self.linkButton.setFont(font) self.linkButton.setText("") icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap(":/icons/glue_link.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.linkButton.setIcon(icon3) self.linkButton.setObjectName("linkButton") self.button_row.addWidget(self.linkButton) spacerItem = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.button_row.addItem(spacerItem) self.verticalLayout.addLayout(self.button_row) self.verticalLayout_2.addLayout(self.verticalLayout) self.retranslateUi(LayerTree) QtCore.QMetaObject.connectSlotsByName(LayerTree)
def setupUi(self, ScatterWidget): ScatterWidget.setObjectName("ScatterWidget") ScatterWidget.resize(300, 349) ScatterWidget.setBaseSize(QtCore.QSize(555, 500)) ScatterWidget.setFocusPolicy(QtCore.Qt.StrongFocus) ScatterWidget.setStyleSheet("") self.horizontalLayout = QtGui.QHBoxLayout(ScatterWidget) self.horizontalLayout.setContentsMargins(3, 2, 2, 4) self.horizontalLayout.setObjectName("horizontalLayout") self.option_dashboard = QtGui.QWidget(ScatterWidget) self.option_dashboard.setObjectName("option_dashboard") self.verticalLayout = QtGui.QVBoxLayout(self.option_dashboard) self.verticalLayout.setSpacing(4) self.verticalLayout.setContentsMargins(0, 0, 0, 10) self.verticalLayout.setObjectName("verticalLayout") self.xAxisLayout = QtGui.QHBoxLayout() self.xAxisLayout.setSpacing(8) self.xAxisLayout.setContentsMargins(0, 0, 0, 0) self.xAxisLayout.setObjectName("xAxisLayout") self.xlabel = QtGui.QLabel(self.option_dashboard) self.xlabel.setObjectName("xlabel") self.xAxisLayout.addWidget(self.xlabel) self.xAxisComboBox = QtGui.QComboBox(self.option_dashboard) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.xAxisComboBox.sizePolicy().hasHeightForWidth()) self.xAxisComboBox.setSizePolicy(sizePolicy) self.xAxisComboBox.setSizeAdjustPolicy( QtGui.QComboBox.AdjustToMinimumContentsLength) self.xAxisComboBox.setObjectName("xAxisComboBox") self.xAxisLayout.addWidget(self.xAxisComboBox) self.xLogCheckBox = QtGui.QCheckBox(self.option_dashboard) self.xLogCheckBox.setObjectName("xLogCheckBox") self.xAxisLayout.addWidget(self.xLogCheckBox) self.xFlipCheckBox = QtGui.QCheckBox(self.option_dashboard) self.xFlipCheckBox.setObjectName("xFlipCheckBox") self.xAxisLayout.addWidget(self.xFlipCheckBox) self.xAxisLayout.setStretch(1, 4) self.verticalLayout.addLayout(self.xAxisLayout) self.yAxisLayout = QtGui.QHBoxLayout() self.yAxisLayout.setSpacing(8) self.yAxisLayout.setObjectName("yAxisLayout") self.ylabel = QtGui.QLabel(self.option_dashboard) self.ylabel.setObjectName("ylabel") self.yAxisLayout.addWidget(self.ylabel) self.yAxisComboBox = QtGui.QComboBox(self.option_dashboard) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.yAxisComboBox.sizePolicy().hasHeightForWidth()) self.yAxisComboBox.setSizePolicy(sizePolicy) self.yAxisComboBox.setSizeAdjustPolicy( QtGui.QComboBox.AdjustToMinimumContentsLength) self.yAxisComboBox.setObjectName("yAxisComboBox") self.yAxisLayout.addWidget(self.yAxisComboBox) self.yLogCheckBox = QtGui.QCheckBox(self.option_dashboard) self.yLogCheckBox.setObjectName("yLogCheckBox") self.yAxisLayout.addWidget(self.yLogCheckBox) self.yFlipCheckBox = QtGui.QCheckBox(self.option_dashboard) self.yFlipCheckBox.setObjectName("yFlipCheckBox") self.yAxisLayout.addWidget(self.yFlipCheckBox) self.yAxisLayout.setStretch(1, 4) self.verticalLayout.addLayout(self.yAxisLayout) self.horizontalLayout_3 = QtGui.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.snapLimits = QtGui.QPushButton(self.option_dashboard) self.snapLimits.setObjectName("snapLimits") self.horizontalLayout_3.addWidget(self.snapLimits) self.swapAxes = QtGui.QPushButton(self.option_dashboard) self.swapAxes.setObjectName("swapAxes") self.horizontalLayout_3.addWidget(self.swapAxes) self.verticalLayout.addLayout(self.horizontalLayout_3) self.hidden_attributes = QtGui.QCheckBox(self.option_dashboard) self.hidden_attributes.setObjectName("hidden_attributes") self.verticalLayout.addWidget(self.hidden_attributes) self.line = QtGui.QFrame(self.option_dashboard) self.line.setFrameShadow(QtGui.QFrame.Sunken) self.line.setLineWidth(2) self.line.setMidLineWidth(0) self.line.setFrameShape(QtGui.QFrame.HLine) self.line.setFrameShadow(QtGui.QFrame.Sunken) self.line.setObjectName("line") self.verticalLayout.addWidget(self.line) self.label = QtGui.QLabel(self.option_dashboard) self.label.setFrameShape(QtGui.QFrame.NoFrame) self.label.setFrameShadow(QtGui.QFrame.Sunken) self.label.setAlignment(QtCore.Qt.AlignCenter) self.label.setObjectName("label") self.verticalLayout.addWidget(self.label) self.horizontalLayout_4 = QtGui.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.xmin_label = QtGui.QLabel(self.option_dashboard) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.xmin_label.sizePolicy().hasHeightForWidth()) self.xmin_label.setSizePolicy(sizePolicy) self.xmin_label.setMinimumSize(QtCore.QSize(40, 0)) self.xmin_label.setObjectName("xmin_label") self.horizontalLayout_4.addWidget(self.xmin_label) self.xmin = QtGui.QLineEdit(self.option_dashboard) self.xmin.setObjectName("xmin") self.horizontalLayout_4.addWidget(self.xmin) self.xmax_label = QtGui.QLabel(self.option_dashboard) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.xmax_label.sizePolicy().hasHeightForWidth()) self.xmax_label.setSizePolicy(sizePolicy) self.xmax_label.setMinimumSize(QtCore.QSize(40, 0)) self.xmax_label.setObjectName("xmax_label") self.horizontalLayout_4.addWidget(self.xmax_label) self.xmax = QtGui.QLineEdit(self.option_dashboard) self.xmax.setObjectName("xmax") self.horizontalLayout_4.addWidget(self.xmax) self.verticalLayout.addLayout(self.horizontalLayout_4) self.horizontalLayout_5 = QtGui.QHBoxLayout() self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.ymin_label = QtGui.QLabel(self.option_dashboard) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.ymin_label.sizePolicy().hasHeightForWidth()) self.ymin_label.setSizePolicy(sizePolicy) self.ymin_label.setMinimumSize(QtCore.QSize(40, 0)) self.ymin_label.setObjectName("ymin_label") self.horizontalLayout_5.addWidget(self.ymin_label) self.ymin = QtGui.QLineEdit(self.option_dashboard) self.ymin.setObjectName("ymin") self.horizontalLayout_5.addWidget(self.ymin) self.ymax_label = QtGui.QLabel(self.option_dashboard) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.ymax_label.sizePolicy().hasHeightForWidth()) self.ymax_label.setSizePolicy(sizePolicy) self.ymax_label.setMinimumSize(QtCore.QSize(40, 0)) self.ymax_label.setObjectName("ymax_label") self.horizontalLayout_5.addWidget(self.ymax_label) self.ymax = QtGui.QLineEdit(self.option_dashboard) self.ymax.setObjectName("ymax") self.horizontalLayout_5.addWidget(self.ymax) self.verticalLayout.addLayout(self.horizontalLayout_5) spacerItem = QtGui.QSpacerItem(1, 1, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.verticalLayout.addItem(spacerItem) self.horizontalLayout.addWidget(self.option_dashboard) self.retranslateUi(ScatterWidget) QtCore.QMetaObject.connectSlotsByName(ScatterWidget)
def __init__(self, vispy_widget=None, parent=None): super(VispyDataViewerToolbar, self).__init__(parent=parent) # Keep a reference to the Vispy Widget and the Vispy Data Viewer self._vispy_widget = vispy_widget self._vispy_data_viewer = parent self._data_collection = parent._data # Set visual preferences self.setIconSize(QtCore.QSize(25, 25)) # Initialize drawing visual self.line_pos = [] self.line = scene.visuals.Line(color='white', method='gl', parent=self._vispy_widget.canvas.scene) # Selection defaults self._scatter = None self.mode = None self.selection_origin = (0, 0) self.selected = [] # Set up selection actions a = QtGui.QAction(get_icon('glue_lasso'), 'Lasso Selection', parent) a.triggered.connect(nonpartial(self.toggle_lasso)) a.setCheckable(True) parent.addAction(a) self.addAction(a) self.lasso_action = a a = QtGui.QAction(get_icon('glue_square'), 'Rectangle Selection', parent) a.triggered.connect(nonpartial(self.toggle_rectangle)) a.setCheckable(True) parent.addAction(a) self.addAction(a) self.rectangle_action = a a = QtGui.QAction(get_icon('glue_circle'), 'Ellipse Selection', parent) a.triggered.connect(nonpartial(self.toggle_ellipse)) a.setCheckable(True) parent.addAction(a) self.addAction(a) self.ellipse_action = a # TODO: change path to icon once it's in a released version of glue a = QtGui.QAction(QtGui.QIcon(POINT_ICON), 'Point Selection', parent) a.triggered.connect(nonpartial(self.toggle_point)) a.setCheckable(True) parent.addAction(a) self.addAction(a) self.point_action = a # Connect callback functions to VisPy Canvas self._vispy_widget.canvas.events.mouse_press.connect( self.on_mouse_press) self._vispy_widget.canvas.events.mouse_release.connect( self.on_mouse_release) self._vispy_widget.canvas.events.mouse_move.connect(self.on_mouse_move)
def setupUi(self, LinkEquation): LinkEquation.setObjectName("LinkEquation") LinkEquation.resize(466, 605) self.horizontalLayout_4 = QtGui.QHBoxLayout(LinkEquation) self.horizontalLayout_4.setContentsMargins(4, 4, 4, 4) self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.verticalLayout = QtGui.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.top_label = QtGui.QLabel(LinkEquation) font = QtGui.QFont() font.setPointSize(14) font.setWeight(50) font.setBold(False) self.top_label.setFont(font) self.top_label.setScaledContents(False) self.top_label.setAlignment(QtCore.Qt.AlignCenter) self.top_label.setObjectName("top_label") self.verticalLayout.addWidget(self.top_label) self.function = QtGui.QComboBox(LinkEquation) self.function.setObjectName("function") self.verticalLayout.addWidget(self.function) self.info = QtGui.QLabel(LinkEquation) font = QtGui.QFont() font.setPointSize(18) self.info.setFont(font) self.info.setAlignment(QtCore.Qt.AlignCenter) self.info.setObjectName("info") self.verticalLayout.addWidget(self.info) self.help_txt = QtGui.QLabel(LinkEquation) font = QtGui.QFont() font.setFamily("Helvetica") font.setPointSize(12) font.setItalic(True) self.help_txt.setFont(font) self.help_txt.setAlignment(QtCore.Qt.AlignCenter) self.help_txt.setMargin(0) self.help_txt.setObjectName("help_txt") self.verticalLayout.addWidget(self.help_txt) self.horizontalLayout = QtGui.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.input_label = QtGui.QLabel(LinkEquation) font = QtGui.QFont() font.setPointSize(14) font.setWeight(75) font.setBold(True) self.input_label.setFont(font) self.input_label.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop) self.input_label.setObjectName("input_label") self.horizontalLayout.addWidget(self.input_label) self.input_canvas = QtGui.QWidget(LinkEquation) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.input_canvas.sizePolicy().hasHeightForWidth()) self.input_canvas.setSizePolicy(sizePolicy) self.input_canvas.setMinimumSize(QtCore.QSize(0, 0)) self.input_canvas.setObjectName("input_canvas") self.horizontalLayout.addWidget(self.input_canvas) self.verticalLayout.addLayout(self.horizontalLayout) self.horizontalLayout_2 = QtGui.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.output_label = QtGui.QLabel(LinkEquation) font = QtGui.QFont() font.setPointSize(14) font.setWeight(75) font.setBold(True) self.output_label.setFont(font) self.output_label.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop) self.output_label.setObjectName("output_label") self.horizontalLayout_2.addWidget(self.output_label) self.output_canvas = QtGui.QWidget(LinkEquation) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.output_canvas.sizePolicy().hasHeightForWidth()) self.output_canvas.setSizePolicy(sizePolicy) self.output_canvas.setMinimumSize(QtCore.QSize(0, 0)) self.output_canvas.setObjectName("output_canvas") self.horizontalLayout_2.addWidget(self.output_canvas) self.verticalLayout.addLayout(self.horizontalLayout_2) self.horizontalLayout_3 = QtGui.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem) self.addButton = QtGui.QPushButton(LinkEquation) self.addButton.setObjectName("addButton") self.horizontalLayout_3.addWidget(self.addButton) self.verticalLayout.addLayout(self.horizontalLayout_3) self.verticalLayout.setStretch(4, 8) self.verticalLayout.setStretch(5, 8) self.horizontalLayout_4.addLayout(self.verticalLayout) self.retranslateUi(LinkEquation) QtCore.QMetaObject.connectSlotsByName(LinkEquation)