Ejemplo n.º 1
0
    def display_unit(block: PyJavaCodeBlock, parent: QWidget, pos_x, pos_y):
        popup = Overlay(parent, OverlayUnit(None, block))
        popup.setGeometry(pos_x, pos_y,
                          popup.size().width(),
                          popup.size().height())
        popup.show()
        popup.widget.setFocus()

        return popup
Ejemplo n.º 2
0
    def display_default(block: PyJavaCodeBlock, parent: QWidget, pos_x, pos_y):
        popup = Overlay(
            parent,
            OverlayTip(None, lambda: TipCommand.on_tip_unit(block),
                       lambda: TipCommand.on_tip_bb(block),
                       lambda: TipCommand.on_tip_int(block),
                       lambda: TipCommand.on_tip_float(block),
                       lambda: TipCommand.on_tip_if(block),
                       lambda: TipCommand.on_tip_for(block)))
        popup.setGeometry(pos_x, pos_y,
                          popup.size().width(),
                          popup.size().height())
        popup.show()
        popup.widget.setFocus()

        return popup