class PassiveWindow

Constants

MARGIN

Public Class Methods

new(message) click to toggle source
Calls superclass method
# File examples/passivepopup/passivepopup.rb, line 8
def initialize(message)
    super(nil, Qt::X11BypassWindowManagerHint | Qt::WindowStaysOnTopHint |
               Qt::Tool | Qt::FramelessWindowHint)
    setFrameStyle(Qt::Frame::Box| Qt::Frame::Plain)
    setLineWidth(2)

    setMinimumWidth(100)
    layout = Qt::VBoxLayout.new(self) do |l|
        l.spacing = 11
        l.margin = 6
    end
    Qt::Label.new(message, self)

    quit=Qt::PushButton.new(tr("Close"), self)
    connect(quit, SIGNAL("clicked()"), SLOT("close()"))
    end

Public Instance Methods

show() click to toggle source
Calls superclass method
# File examples/passivepopup/passivepopup.rb, line 25
def show
    super
    move(Qt::Application.desktop().width() - width() - MARGIN,
        Qt::Application.desktop().height() - height() - MARGIN)
    end