Press a button having a given tooltip.
496533
def see_tooltip(step, tooltip):
    
    elem = world.browser.find_elements_by_xpath(str(
        '//*[@title="%(tooltip)s" or @data-original-title="%(tooltip)s"]' %
        dict(tooltip=tooltip)))
    elem = [e for e in elem if e.is_displayed()]
    assert_true(step, elem)
294870
def create_toolbutton(parent, text=None, shortcut=None, icon=None, tip=None,
                      toggled=None, triggered=None,
                      autoraise=True, text_beside_icon=False):
    """"""
    button = QToolButton(parent)
    if text is not None:
        button.setText(text)
    if icon is not None:
        if is_text_string(icon):
            icon = get_icon(icon)
        button.setIcon(icon)
    if text is not None or tip is not None:
        button.setToolTip(text if tip is None else tip)
    if text_beside_icon:
        button.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
    button.setAutoRaise(autoraise)
    if triggered is not None:
        button.clicked.connect(triggered)
    if toggled is not None:
        button.toggled.connect(toggled)
        button.setCheckable(True)
    if shortcut is not None:
        button.setShortcut(shortcut)
    return button
821790
def btn_press_event(self, widget, event):
        
        if event.type == Gdk.EventType.BUTTON_PRESS:
            if event.button.button == 1:
                widget.popup(None, None, None, None,
                             event.button.button, event.time)
            return True
        return False
303787
def mousePressEvent(self, event):
        """"""
        if self._mouse_over_line is not None:
            block = self.editor.document().findBlockByNumber(
                self._mouse_over_line)
            self.toggle_fold_trigger(block)
979209
def mouse_release_event(self, x, y, button):
        """"""
        if button == 1:
            print("Left mouse button released @", x, y)
        if button == 2:
            print("Right mouse button released @", x, y)
1155642
def keyPressEvent(self, event):
        """"""
        ctrl = event.modifiers() & Qt.ControlModifier
        key = event.key()
        handled = False
        if ctrl and self.count() > 0:
            index = self.currentIndex()
            if key == Qt.Key_PageUp:
                if index > 0:
                    self.setCurrentIndex(index - 1)
                else:
                    self.setCurrentIndex(self.count() - 1)
                handled = True
            elif key == Qt.Key_PageDown:
                if index < self.count() - 1:
                    self.setCurrentIndex(index + 1)
                else:
                    self.setCurrentIndex(0)
                handled = True
        if not handled:
            QTabWidget.keyPressEvent(self, event)
169352
def mousePressEvent(self, event):
        """"""
        if event.button() == Qt.MidButton:
            index = self.tabBar().tabAt(event.pos())
            if index >= 0:
                self.sig_close_tab.emit(index)
                event.accept()
                return
        QTabWidget.mousePressEvent(self, event)
763533
def press_button(self, value):
    
    button = find_button(world.browser, value)
    if not button:
        raise AssertionError(
            "Cannot find a button named '{}'.".format(value))
    button.click()
1312280
function showTooltipBind() {
              if(hasEnableExp && !scope.$eval(attrs[prefix+'Enable'])) {
                return;
              }

              prepareTooltip();

              if ( ttScope.popupDelay ) {
                // Do nothing if the tooltip was already scheduled to pop-up.
                // This happens if show is triggered multiple times before any hide is triggered.
                if (!popupTimeout) {
                  popupTimeout = $timeout( show, ttScope.popupDelay, false );
                  popupTimeout.then(function(reposition){reposition();});
                }
              } else {
                show()();
              }
            }
969552
def on_release(self, event):
        ''
        if self.press is None:
            return
        # print(self.press)
        x0, y0, btn = self.press
        if btn == 1:
            color = 'r'
        elif btn == 2:
            color = 'b'  # noqa

        # plt.axes(self.ax)
        # plt.plot(x0, y0)
        # button Mapping
        btn = self.button_map[btn]

        self.set_seeds(y0, x0, self.actual_slice, btn)
        # self.fig.canvas.draw()
        # pdb.set_trace();
        self.press = None
        self.update_slice()
50883
def on_mouse_press(self, x: int, y: int, button, mods):
        
        if button in [1, 4]:
            self.example.mouse_press_event(
                x, self.buffer_height - y,
                1 if button == 1 else 2,
            )
1370746
def mousePressEvent(self, event):
        """"""
        index = self.indexAt(event.pos())
        if index.isValid():
            if index.column() == 0:
                self.edit(index, QtGui.QAbstractItemView.DoubleClicked, event)
            else:
                super(ProtocolView, self).mousePressEvent(event)
309491
def mousePressEvent(self, event):
        
        self._region.setX(event.pos().x())
        self._region.setY(event.pos().y())
        super(XSnapshotWidget, self).mousePressEvent(event)
695980
def _on_click(self):
        """"""
        if callable(self.__callback):
            self.__callback((self.bold, self.italic, self.underline, self.overstrike))
260221
def startActionToolTip( self, action ):
        
        self._toolTipTimer.stop()
        QToolTip.hideText()
        
        if not action.toolTip():
            return
        
        self._toolTipAction = action
        self._toolTipTimer.start()
442753
public void activateTooltip(boolean show)
    {
        if (show)
        {
            ToolTipManager.sharedInstance().registerComponent(this);
        }
        else
        {
            ToolTipManager.sharedInstance().unregisterComponent(this);
        }
        ToolTipManager.sharedInstance().setEnabled(show);
    }
1064249
def _onLeftButtonDClick(self, evt):
        """"""
        x = evt.GetX()
        y = self.figure.bbox.height - evt.GetY()
        evt.Skip()
        self.CaptureMouse()
        FigureCanvasBase.button_press_event(self, x, y, 1, dblclick=True, guiEvent=evt)