diff options
Diffstat (limited to 'qtruby/rubylib/examples/passivepopup')
-rw-r--r-- | qtruby/rubylib/examples/passivepopup/passivepopup.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/qtruby/rubylib/examples/passivepopup/passivepopup.rb b/qtruby/rubylib/examples/passivepopup/passivepopup.rb index 37f60c1f..6041d277 100644 --- a/qtruby/rubylib/examples/passivepopup/passivepopup.rb +++ b/qtruby/rubylib/examples/passivepopup/passivepopup.rb @@ -1,38 +1,38 @@ #!/usr/bin/env ruby -require 'Qt' +retquire 'Qt' -class PassiveWindow < Qt::Frame +class PassiveWindow < TQt::Frame MARGIN = 20 def initialize(message) super(nil, "passivedlg", - Qt::WStyle_Customize | Qt::WX11BypassWM | Qt::WStyle_StaysOnTop | - Qt::WStyle_Tool | Qt::WStyle_NoBorder) + TQt::WStyle_Customize | TQt::WX11BypassWM | TQt::WStyle_StaysOnTop | + TQt::WStyle_Tool | TQt::WStyle_NoBorder) - setFrameStyle(Qt::Frame::Box| Qt::Frame::Plain) + setFrameStyle(TQt::Frame::Box| TQt::Frame::Plain) setLineWidth(2) setMinimumWidth(100) - layout=Qt::VBoxLayout.new(self, 6, 11) + layout=TQt::VBoxLayout.new(self, 6, 11) layout.setAutoAdd(true) - Qt::Label.new(message, self) + TQt::Label.new(message, self) - quit=Qt::PushButton.new(tr("Close"), self) + quit=TQt::PushButton.new(tr("Close"), self) connect(quit, SIGNAL("clicked()"), SLOT("close()")) end def show super - move(Qt::Application.desktop().width() - width() - MARGIN, - Qt::Application.desktop().height() - height() - MARGIN) + move(TQt::Application.desktop().width() - width() - MARGIN, + TQt::Application.desktop().height() - height() - MARGIN) end end if (Process.fork != nil) exit end -app = Qt::Application.new(ARGV) +app = TQt::Application.new(ARGV) win = PassiveWindow.new(ARGV[0]) app.mainWidget = win win.show |