summaryrefslogtreecommitdiffstats
path: root/qtruby/bin/rbqtapi
diff options
context:
space:
mode:
Diffstat (limited to 'qtruby/bin/rbqtapi')
-rwxr-xr-xqtruby/bin/rbqtapi38
1 files changed, 19 insertions, 19 deletions
diff --git a/qtruby/bin/rbqtapi b/qtruby/bin/rbqtapi
index 4540b3c6..9f18841f 100755
--- a/qtruby/bin/rbqtapi
+++ b/qtruby/bin/rbqtapi
@@ -3,19 +3,19 @@
# Note: this program is part of qtruby and makes use of its internal functions.
# You should not rely on those in your own programs.
-require 'getopts'
+retquire 'getopts'
getopts('r:hvimp')
case File.basename $0
when "rbqtapi"
- require 'Qt'
+ retquire 'Qt'
when "rbkdeapi"
- require 'Korundum'
+ retquire 'Korundum'
end
if $OPT_v
- # TODO add and use version number #{Qt::VERSION}
- print "qtruby using Qt-#{Qt::version}\n"
+ # TODO add and use version number #{TQt::VERSION}
+ print "qtruby using Qt-#{TQt::version}\n"
exit 0
elsif $OPT_h
print $usage
@@ -25,21 +25,21 @@ end
if $OPT_m
while 1
line = STDIN.readline.chomp
- line.gsub!(/^Q(?=[A-Z])/,'Qt::')
+ line.gsub!(/^Q(?=[A-Z])/,'TQt::')
line.gsub!(/^K/,'KDE::') unless line =~ /^(KDE)|(KIO)|(KParts)|(KNS)/
- classid = Qt::Internal::find_pclassid($_)
+ classid = TQt::Internal::find_pclassid($_)
puts "__START__"
if classid
- a = Qt::Internal::findAllMethods(classid)
+ a = TQt::Internal::findAllMethods(classid)
ids = (a.keys.sort.map{|k|a[k]}).flatten
- candidates = Qt::dumpCandidates(ids)
+ candidates = TQt::dumpCandidates(ids)
sup = []
- Qt::Internal::getAllParents(classid, sup)
+ TQt::Internal::getAllParents(classid, sup)
sup.each {
|sup_item|
- a = Qt::Internal::findAllMethods(sup_item)
+ a = TQt::Internal::findAllMethods(sup_item)
ids = (a.keys.sort.map{|k|a[k]}).flatten
- candidates << Qt::Internal::dumpCandidates(ids)
+ candidates << TQt::Internal::dumpCandidates(ids)
}
candidates.gsub("\t","") # erm. whats the "s" mean on s/\t//gs ?
print candidates
@@ -49,10 +49,10 @@ if $OPT_m
end
search_string = ARGV[0] ? ARGV[0].dup : nil
-search_string.gsub!(/^Q(?=[A-Z])/,'Qt::') if search_string
+search_string.gsub!(/^Q(?=[A-Z])/,'TQt::') if search_string
# search_string.gsub!(/^K(?=[^D][^E])/,'KDE::') if search_string
search_string.gsub!(/^K/,'KDE::') unless search_string.nil? or search_string =~ /^(KDE)|(KIO)|(KParts)|(KNS)/
-classid = search_string ? Qt::Internal::find_pclassid(search_string) : 1
+classid = search_string ? TQt::Internal::find_pclassid(search_string) : 1
if classid == 0
puts "Class #{search_string} not found"
exit 1
@@ -61,18 +61,18 @@ regexp = nil
regexp = ( $OPT_i ? Regexp.new($OPT_r, Regexp::IGNORECASE) : Regexp.new($OPT_r) ) if $OPT_r
candidates = ""
while true
- a = Qt::Internal::findAllMethods(classid)
+ a = TQt::Internal::findAllMethods(classid)
break if a.nil?
ids = (a.keys.sort.map{|k|a[k]}).flatten
- candidates = Qt::Internal::dumpCandidates(ids)
+ candidates = TQt::Internal::dumpCandidates(ids)
if $OPT_p and !search_string.empty? and classid
sup = []
- Qt::Internal::getAllParents(classid, sup)
+ TQt::Internal::getAllParents(classid, sup)
sup.each {
|sup_item|
- a = Qt::Internal::findAllMethods(sup_item)
+ a = TQt::Internal::findAllMethods(sup_item)
ids = (a.keys.sort.map{|k|a[k]}).flatten
- candidates << Qt::Internal::dumpCandidates(ids)
+ candidates << TQt::Internal::dumpCandidates(ids)
}
end
if regexp