summaryrefslogtreecommitdiffstats
path: root/qtruby/rubylib/examples/passivepopup
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-05 15:55:57 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-05 15:55:57 -0600
commit9ba04742771370f59740e32e11c5f3a1e6a1b70a (patch)
treec81c34dae2b3b1ea73801bf18a960265dc4207f7 /qtruby/rubylib/examples/passivepopup
parent1a96c45b22d01378202d9dc7ed9c47acd30f966e (diff)
downloadtdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.tar.gz
tdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.zip
Initial TQt conversion
Diffstat (limited to 'qtruby/rubylib/examples/passivepopup')
-rw-r--r--qtruby/rubylib/examples/passivepopup/passivepopup.rb22
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