summaryrefslogtreecommitdiffstats
path: root/korundum/rubylib/examples
diff options
context:
space:
mode:
Diffstat (limited to 'korundum/rubylib/examples')
-rwxr-xr-xkorundum/rubylib/examples/RubberDoc.rb190
-rwxr-xr-xkorundum/rubylib/examples/dcop/dcopcall.rb4
-rwxr-xr-xkorundum/rubylib/examples/dcop/dcoppredicate.rb2
-rwxr-xr-xkorundum/rubylib/examples/dcop/dcopsend.rb6
-rwxr-xr-xkorundum/rubylib/examples/dcop/dcopsignal.rb6
-rwxr-xr-xkorundum/rubylib/examples/dcop/dcopslot.rb18
-rwxr-xr-xkorundum/rubylib/examples/dcop/dcoptest.rb4
-rwxr-xr-xkorundum/rubylib/examples/dcop/petshop.rb6
-rw-r--r--korundum/rubylib/examples/kludgeror.rb34
-rw-r--r--korundum/rubylib/examples/kurldemo.rb2
-rw-r--r--korundum/rubylib/examples/menudemo.rb12
-rw-r--r--korundum/rubylib/examples/mimetype.rb90
-rw-r--r--korundum/rubylib/examples/rbKHTMLPart.rb2
-rw-r--r--korundum/rubylib/examples/rbtestimage.pngbin36928 -> 36930 bytes
-rw-r--r--korundum/rubylib/examples/systray.rb2
-rw-r--r--korundum/rubylib/examples/uikmdi.rb12
-rw-r--r--korundum/rubylib/examples/uimodules/uidialogs.rb62
-rw-r--r--korundum/rubylib/examples/uimodules/uimenus.rb6
-rw-r--r--korundum/rubylib/examples/uimodules/uimisc.rb72
-rw-r--r--korundum/rubylib/examples/uimodules/uiwidgets.rb164
-rw-r--r--korundum/rubylib/examples/uimodules/uixml.rb4
-rw-r--r--korundum/rubylib/examples/uisampler.rb50
-rwxr-xr-xkorundum/rubylib/examples/xmlgui.rb6
-rw-r--r--korundum/rubylib/examples/xmlmenudemo.rb10
24 files changed, 382 insertions, 382 deletions
diff --git a/korundum/rubylib/examples/RubberDoc.rb b/korundum/rubylib/examples/RubberDoc.rb
index 604a9492..50bdc653 100755
--- a/korundum/rubylib/examples/RubberDoc.rb
+++ b/korundum/rubylib/examples/RubberDoc.rb
@@ -1,13 +1,13 @@
#!/usr/bin/env ruby
-require 'Korundum'
+retquire 'Korundum'
about = KDE::AboutData.new("one", "two", "three")
KDE::CmdLineArgs.init(ARGV, about)
app = KDE::Application.new()
-# Qt.debug_level = Qt::DebugLevel::High
-# Qt.debug_level = Qt::DebugLevel::Extensive
+# Qt.debug_level = TQt::DebugLevel::High
+# Qt.debug_level = TQt::DebugLevel::Extensive
# TODO
# improve appearence of sidebar massively
@@ -145,8 +145,8 @@ end
module LoggedDebug
def init_logger parent
- @logger = Qt::TextEdit.new parent
- @logger.setTextFormat Qt::LogText
+ @logger = TQt::TextEdit.new parent
+ @logger.setTextFormat TQt::LogText
end
def log s
@@ -164,32 +164,32 @@ end
module MyGui
def init_gui
- buttons = Qt::HBox.new self
- @panes = Qt::Splitter.new self
- @panes.setOrientation Qt::Splitter::Horizontal
+ buttons = TQt::HBox.new self
+ @panes = TQt::Splitter.new self
+ @panes.setOrientation TQt::Splitter::Horizontal
setStretchFactor @panes, 10
- @results_pane = Qt::VBox.new @panes
+ @results_pane = TQt::VBox.new @panes
- @rightpane = Qt::Splitter.new @panes
- @rightpane.setOrientation Qt::Splitter::Vertical
+ @rightpane = TQt::Splitter.new @panes
+ @rightpane.setOrientation TQt::Splitter::Vertical
@viewed = KDE::HTMLPart.new @rightpane
init_logger @rightpane
- @listbox = Qt::ListBox.new @results_pane
+ @listbox = TQt::ListBox.new @results_pane
- @label = Qt::Label.new self
+ @label = TQt::Label.new self
- Qt::Object.connect @listbox, SIGNAL("clicked(QListBoxItem*)"),
- self, SLOT("clicked_result(QListBoxItem*)")
- Qt::Object.connect @viewed, SIGNAL("completed()"),
+ TQt::Object.connect @listbox, SIGNAL("clicked(TQListBoxItem*)"),
+ self, SLOT("clicked_result(TQListBoxItem*)")
+ TQt::Object.connect @viewed, SIGNAL("completed()"),
self, SLOT("khtml_part_init_complete()")
- Qt::Object::connect @viewed, SIGNAL("setWindowCaption(const QString&)"),
+ TQt::Object::connect @viewed, SIGNAL("setWindowCaption(const TQString&)"),
@viewed.widget.topLevelWidget,
- SLOT("setCaption(const QString&)")
+ SLOT("setCaption(const TQString&)")
- Qt::Object::connect @viewed.browserExtension,
+ TQt::Object::connect @viewed.browserExtension,
SIGNAL("openURLRequest(const KURL&, const KParts::URLArgs&)"),
self, SLOT("open_url(const KURL&)")
@@ -198,23 +198,23 @@ module MyGui
KDE::Action.new "&Index-All", KDE::Shortcut.new(),
self, SLOT("index_all()"), @main.actionCollection, "index_all"
@back = \
- KDE::Action.new "&Back", "back", KDE::Shortcut.new(Qt::ALT + Qt::Key_Left),
+ KDE::Action.new "&Back", "back", KDE::Shortcut.new(TQt::ALT + TQt::Key_Left),
self, SLOT("go_back()"), @main.actionCollection, "back"
@forward = \
- KDE::Action.new "&Forward", "forward", KDE::Shortcut.new(Qt::ALT + Qt::Key_Right),
+ KDE::Action.new "&Forward", "forward", KDE::Shortcut.new(TQt::ALT + TQt::Key_Right),
self, SLOT("go_forward()"), @main.actionCollection, "forward"
- KDE::Action.new "&Home", "gohome", KDE::Shortcut.new(Qt::Key_Home),
+ KDE::Action.new "&Home", "gohome", KDE::Shortcut.new(TQt::Key_Home),
self, SLOT("go_home()"), @main.actionCollection, "home"
- KDE::Action.new "&Prev Match", "previous",KDE::Shortcut.new(Qt::CTRL + Qt::Key_P),
+ KDE::Action.new "&Prev Match", "previous",KDE::Shortcut.new(TQt::CTRL + TQt::Key_P),
self, SLOT("goto_prev_match()"), @main.actionCollection, "prev_match"
- KDE::Action.new "&Next Match", "next", KDE::Shortcut.new(Qt::CTRL + Qt::Key_N),
+ KDE::Action.new "&Next Match", "next", KDE::Shortcut.new(TQt::CTRL + TQt::Key_N),
self, SLOT("goto_next_match()"), @main.actionCollection, "next_match"
- KDE::Action.new "&Follow Match","down", KDE::Shortcut.new(Qt::Key_Return),
+ KDE::Action.new "&Follow Match","down", KDE::Shortcut.new(TQt::Key_Return),
self, SLOT("goto_current_match_link()"), @main.actionCollection, "open_match"
- KDE::Action.new "Search", "find", KDE::Shortcut.new(Qt::Key_F6),
+ KDE::Action.new "Search", "find", KDE::Shortcut.new(TQt::Key_F6),
self, SLOT("focus_search()"), @main.actionCollection, "focus_search"
- KDE::Action.new "New Search", "find", KDE::Shortcut.new(Qt::CTRL + Qt::Key_Slash),
+ KDE::Action.new "New Search", "find", KDE::Shortcut.new(TQt::CTRL + TQt::Key_Slash),
self, SLOT("focus_and_clear_search()"), @main.actionCollection, "focus_and_clear_search"
KDE::Action.new "&Create", "new", KDE::Shortcut.new(),
@@ -226,22 +226,22 @@ module MyGui
self, SLOT("clear_location()"), @main.actionCollection, "clear_location"
clearLocation.setWhatsThis "Clear Location bar<p>Clears the content of the location bar."
- @searchlabel = Qt::Label.new @main
+ @searchlabel = TQt::Label.new @main
@searchlabel.setText "Search: "
@searchcombo = KDE::HistoryCombo.new @main
focus_search
- Qt::Object.connect @searchcombo, SIGNAL("returnPressed()"),
+ TQt::Object.connect @searchcombo, SIGNAL("returnPressed()"),
self, SLOT("goto_search()")
- Qt::Object.connect @searchcombo, SIGNAL("textChanged(const QString&)"),
- self, SLOT("search(const QString&)")
+ TQt::Object.connect @searchcombo, SIGNAL("textChanged(const TQString&)"),
+ self, SLOT("search(const TQString&)")
- KDE::WidgetAction.new @searchlabel, "Search: ", KDE::Shortcut.new(Qt::Key_F6), nil, nil, @main.actionCollection, "location_label"
+ KDE::WidgetAction.new @searchlabel, "Search: ", KDE::Shortcut.new(TQt::Key_F6), nil, nil, @main.actionCollection, "location_label"
@searchlabel.setBuddy @searchcombo
ca = KDE::WidgetAction.new @searchcombo, "Search", KDE::Shortcut.new, nil, nil, @main.actionCollection, "toolbar_url_combo"
ca.setAutoSized true
- Qt::WhatsThis::add @searchcombo, "Search<p>Enter a search term."
+ TQt::WhatsThis::add @searchcombo, "Search<p>Enter a search term."
end
def focus_search
@@ -270,7 +270,7 @@ module MyGui
def gui_init_proportions
# todo - save these settings
- desktop = Qt::Application::desktop
+ desktop = TQt::Application::desktop
sx = (desktop.width * (2.0/3.0)).to_i
sy = (desktop.height * (2.0/3.0)).to_i
@@ -282,10 +282,10 @@ module MyGui
@rightpane.setSizes [sy-logsize, logsize]
@panes.setSizes [resultssize, sx-resultssize]
- @rightpane.setResizeMode @logger, Qt::Splitter::KeepSize
+ @rightpane.setResizeMode @logger, TQt::Splitter::KeepSize
- @panes.setResizeMode @results_pane, Qt::Splitter::KeepSize
- @panes.setResizeMode @rightpane, Qt::Splitter::KeepSize
+ @panes.setResizeMode @results_pane, TQt::Splitter::KeepSize
+ @panes.setResizeMode @rightpane, TQt::Splitter::KeepSize
end
end
@@ -314,7 +314,7 @@ module IndexStorage
def load_indexes
return false unless File.exists? index_fname
- Qt::Application::setOverrideCursor(Qt::Cursor.new Qt::WaitCursor)
+ TQt::Application::setOverrideCursor(TQt::Cursor.new TQt::WaitCursor)
File.open(index_fname, "r") {
|file|
w = Marshal.load file rescue nil
@@ -328,7 +328,7 @@ module IndexStorage
@indexed_more = false
true
}
- Qt::Application::restoreOverrideCursor
+ TQt::Application::restoreOverrideCursor
end
def save_indexes
@@ -413,7 +413,7 @@ module HTMLIndexer
|node|
text << node.nodeValue.string if node.nodeType == DOM::Node::TEXT_NODE
}
- link = Qt::Internal::cast_object_to f, DOM::HTMLLinkElement
+ link = TQt::Internal::cast_object_to f, DOM::HTMLLinkElement
if should_follow? link.href.string
title_map[link.href.string] = text
urlonly, = uri_anchor_split link.href.string
@@ -463,7 +463,7 @@ module HTMLIndexer
def index_current_document
return if @id2depth[@shown_doc_id] >= IndexDepths::Partial
- Qt::Application::setOverrideCursor(Qt::Cursor.new Qt::WaitCursor)
+ TQt::Application::setOverrideCursor(TQt::Cursor.new TQt::WaitCursor)
@indexed_more = true
@label.setText "Scanning : #{@url.prettyURL}"
log "indexing url #{@viewed.htmlDocument.URL.string.sub(@pref,"")}"
@@ -474,12 +474,12 @@ module HTMLIndexer
}
@id2depth[@shown_doc_id] = IndexDepths::Partial
@label.setText "Ready"
- Qt::Application::restoreOverrideCursor
+ TQt::Application::restoreOverrideCursor
end
def preload_text
return if @id2depth[@shown_doc_id] >= IndexDepths::Node
- Qt::Application::setOverrideCursor(Qt::Cursor.new Qt::WaitCursor)
+ TQt::Application::setOverrideCursor(TQt::Cursor.new TQt::WaitCursor)
@indexed_more = true
index_current_document
log "deep indexing url #{@viewed.htmlDocument.URL.string.sub(@pref,"")}"
@@ -496,7 +496,7 @@ module HTMLIndexer
}
@id2depth[@shown_doc_id] = IndexDepths::Node
@label.setText "Ready"
- Qt::Application::restoreOverrideCursor
+ TQt::Application::restoreOverrideCursor
end
end
@@ -544,7 +544,7 @@ module TermHighlighter
@last_highlighted_doc_id = @shown_doc_id
@to_undo = []
return if highlighted_nodes.empty?
- Qt::Application::setOverrideCursor(Qt::Cursor.new Qt::WaitCursor)
+ TQt::Application::setOverrideCursor(TQt::Cursor.new TQt::WaitCursor)
cursor_override = true
@current_matching_node_index = 0 if @current_matching_node_index.nil?
@current_matching_node_index = @current_matching_node_index.modulo highlighted_nodes.length
@@ -569,7 +569,7 @@ module TermHighlighter
|n|
next unless n.elementId == IDS::A
# link = DOM::HTMLLinkElement.new n # WTF? why doesn't this work???
- link = Qt::Internal::cast_object_to n, "DOM::HTMLLinkElement"
+ link = TQt::Internal::cast_object_to n, "DOM::HTMLLinkElement"
@current_matched_href = link.href.string
}
end
@@ -591,10 +591,10 @@ module TermHighlighter
rate = (count > 50) ? 50 : 10
allow_user_input = ((count+=1) % rate == 0)
if allow_user_input
- Qt::Application::restoreOverrideCursor if cursor_override
+ TQt::Application::restoreOverrideCursor if cursor_override
cursor_override = false
@in_node_highlight = true
- Qt::Application::eventLoop.processEvents Qt::EventLoop::AllEvents, 10
+ TQt::Application::eventLoop.processEvents TQt::EventLoop::AllEvents, 10
@in_node_highlight = false
if @skipped_highlight_requests
@timer.start 50, true
@@ -606,7 +606,7 @@ module TermHighlighter
if @skipped_highlight_requests
@timer.start 50, true
end
- Qt::Application::restoreOverrideCursor if cursor_override
+ TQt::Application::restoreOverrideCursor if cursor_override
end
def undo_highlight to_undo
@@ -638,7 +638,7 @@ class SmallIconSet
end
end
-class ProjectEditDialog < Qt::Object
+class ProjectEditDialog < TQt::Object
slots "select_file()", "slot_ok()"
@@ -650,24 +650,24 @@ class ProjectEditDialog < Qt::Object
@dialog = KDE::DialogBase.new(parent,name, true, caption,
KDE::DialogBase::Ok|KDE::DialogBase::Cancel, KDE::DialogBase::Ok, false)
- vbox = Qt::VBox.new @dialog
+ vbox = TQt::VBox.new @dialog
- grid = Qt::Grid.new 2, Qt::Horizontal, vbox
+ grid = TQt::Grid.new 2, TQt::Horizontal, vbox
- titlelabel = Qt::Label.new "Name:", grid
+ titlelabel = TQt::Label.new "Name:", grid
@title = KDE::LineEdit.new grid
titlelabel.setBuddy @title
- urllabel = Qt::Label.new "Location:", grid
- lochbox = Qt::HBox.new grid
+ urllabel = TQt::Label.new "Location:", grid
+ lochbox = TQt::HBox.new grid
@url = KDE::LineEdit.new lochbox
urllabel.setBuddy @url
- locselc = Qt::PushButton.new lochbox
+ locselc = TQt::PushButton.new lochbox
locselc.setIconSet SmallIconSet["up"]
- blub = Qt::HBox.new vbox
- Qt::Label.new "Is main one?:", blub
- @cb = Qt::CheckBox.new blub
+ blub = TQt::HBox.new vbox
+ TQt::Label.new "Is main one?:", blub
+ @cb = TQt::CheckBox.new blub
enabled = @parent.projects_data.project_list.empty?
@@ -680,10 +680,10 @@ class ProjectEditDialog < Qt::Object
@cb.setChecked true if enabled
- Qt::Object.connect @dialog, SIGNAL("okClicked()"),
+ TQt::Object.connect @dialog, SIGNAL("okClicked()"),
self, SLOT("slot_ok()")
- Qt::Object.connect locselc, SIGNAL("clicked()"),
+ TQt::Object.connect locselc, SIGNAL("clicked()"),
self, SLOT("select_file()")
@title.setFocus
@@ -694,7 +694,7 @@ class ProjectEditDialog < Qt::Object
end
def select_file
- s = Qt::FileDialog::getOpenFileName ENV["HOME"], "HTML Files (*.html)",
+ s = TQt::FileDialog::getOpenFileName ENV["HOME"], "HTML Files (*.html)",
@parent, "open file dialog", "Choose a file"
@url.setText s unless s.nil?
end
@@ -724,7 +724,7 @@ class ProjectEditDialog < Qt::Object
end
-class ProjectSelectDialog < Qt::Object
+class ProjectSelectDialog < TQt::Object
slots "edit_selected_project()", "delete_selected_project()", "project_create_button()", "project_selected()"
@@ -735,27 +735,27 @@ class ProjectSelectDialog < Qt::Object
@dialog = KDE::DialogBase.new parent,name, true, caption,
KDE::DialogBase::Ok|KDE::DialogBase::Cancel, KDE::DialogBase::Ok, false
- vbox = Qt::VBox.new @dialog
+ vbox = TQt::VBox.new @dialog
- @listbox = Qt::ListBox.new vbox
+ @listbox = TQt::ListBox.new vbox
fill_listbox
- hbox = Qt::HBox.new vbox
- button_new = Qt::PushButton.new "New...", hbox
- button_del = Qt::PushButton.new "Delete", hbox
- button_edit = Qt::PushButton.new "Edit...", hbox
+ hbox = TQt::HBox.new vbox
+ button_new = TQt::PushButton.new "New...", hbox
+ button_del = TQt::PushButton.new "Delete", hbox
+ button_edit = TQt::PushButton.new "Edit...", hbox
- Qt::Object.connect button_new, SIGNAL("clicked()"),
+ TQt::Object.connect button_new, SIGNAL("clicked()"),
self, SLOT("project_create_button()")
- Qt::Object.connect button_del, SIGNAL("clicked()"),
+ TQt::Object.connect button_del, SIGNAL("clicked()"),
self, SLOT("delete_selected_project()")
- Qt::Object.connect button_edit, SIGNAL("clicked()"),
+ TQt::Object.connect button_edit, SIGNAL("clicked()"),
self, SLOT("edit_selected_project()")
- Qt::Object.connect @listbox, SIGNAL("doubleClicked(QListBoxItem *)"),
+ TQt::Object.connect @listbox, SIGNAL("doubleClicked(TQListBoxItem *)"),
self, SLOT("project_selected()")
@dialog.setMainWidget vbox
@@ -774,8 +774,8 @@ class ProjectSelectDialog < Qt::Object
|name|
enabled = (name == @parent.projects_data.enabled_name)
icon = enabled ? "forward" : "down"
- pm = SmallIconSet[icon].pixmap(Qt::IconSet::Automatic, Qt::IconSet::Normal)
- it = Qt::ListBoxPixmap.new pm, name
+ pm = SmallIconSet[icon].pixmap(TQt::IconSet::Automatic, TQt::IconSet::Normal)
+ it = TQt::ListBoxPixmap.new pm, name
@listbox.insertItem it
}
end
@@ -827,7 +827,7 @@ module ProjectManager
end
end
- require 'yaml'
+ retquire 'yaml'
def yamlfname
ENV["HOME"] + "/.rubberdocs/projects.yaml"
@@ -863,12 +863,12 @@ module ProjectManager
end
-class RubberDoc < Qt::VBox
+class RubberDoc < TQt::VBox
slots "khtml_part_init_complete()",
"go_back()", "go_forward()", "go_home()", "goto_url()",
- "goto_search()", "clicked_result(QListBoxItem*)",
- "search(const QString&)", "update_highlight()",
+ "goto_search()", "clicked_result(TQListBoxItem*)",
+ "search(const TQString&)", "update_highlight()",
"quit()", "open_url(const KURL&)", "index_all()",
"goto_prev_match()", "goto_next_match()", "clear_location()", "activated()",
"goto_current_match_link()", "focus_search()", "focus_and_clear_search()",
@@ -914,8 +914,8 @@ class RubberDoc < Qt::VBox
init_gui
gui_init_proportions
- @timer = Qt::Timer.new self
- Qt::Object.connect @timer, SIGNAL("timeout()"),
+ @timer = TQt::Timer.new self
+ TQt::Object.connect @timer, SIGNAL("timeout()"),
self, SLOT("update_highlight()")
@viewed.openURL KDE::URL.new("about:blank")
@@ -934,7 +934,7 @@ class RubberDoc < Qt::VBox
end
def khtml_part_init_complete
- Qt::Object.disconnect @viewed, SIGNAL("completed()"),
+ TQt::Object.disconnect @viewed, SIGNAL("completed()"),
self, SLOT("khtml_part_init_complete()") if @init_connected
@pref = File.dirname first_url.url.gsub("file:","")
@@ -973,7 +973,7 @@ class RubberDoc < Qt::VBox
@viewed.document.load DOM::DOMString.new @url.url
@viewed.setUserStyleSheet "span.searchword { background-color: yellow }
span.foundword { background-color: green }"
- Qt::Application::eventLoop.processEvents Qt::EventLoop::ExcludeUserInput
+ TQt::Application::eventLoop.processEvents TQt::EventLoop::ExcludeUserInput
end
attr_accessor :current_project_name
@@ -1021,25 +1021,25 @@ class RubberDoc < Qt::VBox
}
end
- class ResultItem < Qt::ListBoxItem
+ class ResultItem < TQt::ListBoxItem
def initialize header, text
super()
@text, @header = text, header
- @font = Qt::Font.new("Helvetica", 8)
- @flags = Qt::AlignLeft | Qt::WordBreak
+ @font = TQt::Font.new("Helvetica", 8)
+ @flags = TQt::AlignLeft | TQt::WordBreak
end
def paint painter
w, h = width(listBox), height(listBox)
header_height = (text_height @font, @header) + 5
painter.setFont @font
- painter.fillRect 5, 5, w - 10, header_height, Qt::Brush.new(Qt::Color.new 150,100,150)
+ painter.fillRect 5, 5, w - 10, header_height, TQt::Brush.new(TQt::Color.new 150,100,150)
painter.drawText 5, 5, w - 10, header_height, @flags, @header
- painter.fillRect 5, header_height, w - 10, h - 10, Qt::Brush.new(Qt::Color.new 100,150,150)
+ painter.fillRect 5, header_height, w - 10, h - 10, TQt::Brush.new(TQt::Color.new 100,150,150)
painter.setFont @font
painter.drawText 5, header_height + 2, w - 10, h - 10, @flags, @text
end
def text_height font, text
- fm = Qt::FontMetrics.new font
+ fm = TQt::FontMetrics.new font
br = fm.boundingRect 0, 0, width(listBox) - 20, 8192, @flags, text
br.height
end
@@ -1226,11 +1226,11 @@ w.begin
=> crashes badly
(RECHECK)
-./kde.rb:29:in `method_missing': Cannot handle 'const QIconSet&' as argument to QTabWidget::changeTab (ArgumentError)
+./kde.rb:29:in `method_missing': Cannot handle 'const TQIconSet&' as argument to TQTabWidget::changeTab (ArgumentError)
from ./kde.rb:29:in `initialize'
from ./kde.rb:92:in `new'
from ./kde.rb:92
-for param nil given to param const QIconSet &
+for param nil given to param const TQIconSet &
occurs frequently
dum di dum
@@ -1238,10 +1238,10 @@ dum di dum
can't get tabwidget working. umm... wonder what i'm messing up... (RECHECK)
tabwidget = KDE::TabWidget.new browser
- tabwidget.setTabPosition Qt::TabWidget::Top
+ tabwidget.setTabPosition TQt::TabWidget::Top
@viewed = KDE::HTMLPart.new tabwidget
w2 = KDE::HTMLPart.new tabwidget
- tabwidget.changeTab @viewed, Qt::IconSet.new, "blah blah"
+ tabwidget.changeTab @viewed, TQt::IconSet.new, "blah blah"
tabwidget.showPage @viewed
tabwidget.show
@viewed.show
@@ -1249,7 +1249,7 @@ can't get tabwidget working. umm... wonder what i'm messing up... (RECHECK)
# possible BUG DOM::Text.new(node).data.string # strange that this one doesn't work... (RECHECK)
wierd khtml bug
- @rightpane.setResizeMode @viewed, Qt::Splitter::KeepSize
+ @rightpane.setResizeMode @viewed, TQt::Splitter::KeepSize
in order to use KURL's as constants one must place this KApplication init
at the top of the file otherwise KInstance isn't init'ed before KURL usage
@@ -1262,4 +1262,4 @@ class ProjectSelectDialog < KDE::DialogBase
end
end
-# painter.fillRect 5, 5, width(listBox) - 10, height(listBox) - 10, Qt::Color.new(255,0,0)
+# painter.fillRect 5, 5, width(listBox) - 10, height(listBox) - 10, TQt::Color.new(255,0,0)
diff --git a/korundum/rubylib/examples/dcop/dcopcall.rb b/korundum/rubylib/examples/dcop/dcopcall.rb
index f3b532ef..3676525c 100755
--- a/korundum/rubylib/examples/dcop/dcopcall.rb
+++ b/korundum/rubylib/examples/dcop/dcopcall.rb
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
-require 'Korundum'
+retquire 'Korundum'
include KDE
class SenderWidget < PushButton
@@ -15,7 +15,7 @@ class SenderWidget < PushButton
dcopRef = DCOPRef.new("dcopslot", "MyWidget")
#
# Note that there are three different ways to make a DCOP call():
- # 1) result = dcopRef.call("getPoint(QString)", "Hello from dcopcall")
+ # 1) result = dcopRef.call("getPoint(TQString)", "Hello from dcopcall")
# 2) result = dcopRef.call("getPoint", "Hello from dcopcall")
# 3) result = dcopRef.getPoint("Hello from dcopcall")
#
diff --git a/korundum/rubylib/examples/dcop/dcoppredicate.rb b/korundum/rubylib/examples/dcop/dcoppredicate.rb
index 82a9c8b4..6117643f 100755
--- a/korundum/rubylib/examples/dcop/dcoppredicate.rb
+++ b/korundum/rubylib/examples/dcop/dcoppredicate.rb
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
-require 'Korundum'
+retquire 'Korundum'
include KDE
class SenderWidget < PushButton
diff --git a/korundum/rubylib/examples/dcop/dcopsend.rb b/korundum/rubylib/examples/dcop/dcopsend.rb
index 9365473b..6511e246 100755
--- a/korundum/rubylib/examples/dcop/dcopsend.rb
+++ b/korundum/rubylib/examples/dcop/dcopsend.rb
@@ -1,11 +1,11 @@
#!/usr/bin/env ruby
-require 'Korundum'
+retquire 'Korundum'
class SenderWidget < KDE::PushButton
def initialize(parent, name)
super
- Qt::Object::connect(self, SIGNAL('clicked()'), self, SLOT('doit()'))
+ TQt::Object::connect(self, SIGNAL('clicked()'), self, SLOT('doit()'))
end
slots 'doit()'
@@ -13,7 +13,7 @@ class SenderWidget < KDE::PushButton
def doit()
#
# Note that there are three different ways to make a DCOP send():
- # 1) dcopRef.send("mySlot(QString)", "Hello from dcopsend")
+ # 1) dcopRef.send("mySlot(TQString)", "Hello from dcopsend")
# 2) dcopRef.send("mySlot", "Hello from dcopsend")
#
dcopRef = KDE::DCOPRef.new("dcopslot", "MyWidget")
diff --git a/korundum/rubylib/examples/dcop/dcopsignal.rb b/korundum/rubylib/examples/dcop/dcopsignal.rb
index 07a6dfee..f123a62d 100755
--- a/korundum/rubylib/examples/dcop/dcopsignal.rb
+++ b/korundum/rubylib/examples/dcop/dcopsignal.rb
@@ -1,13 +1,13 @@
#!/usr/bin/env ruby
-require 'Korundum'
+retquire 'Korundum'
class SenderWidget < KDE::PushButton
- k_dcop_signals 'void testEmitSignal(QString)'
+ k_dcop_signals 'void testEmitSignal(TQString)'
def initialize(parent, name)
super
- Qt::Object::connect(self, SIGNAL('clicked()'), self, SLOT('doit()'))
+ TQt::Object::connect(self, SIGNAL('clicked()'), self, SLOT('doit()'))
end
slots 'doit()'
diff --git a/korundum/rubylib/examples/dcop/dcopslot.rb b/korundum/rubylib/examples/dcop/dcopslot.rb
index e600dfdb..99fd6fef 100755
--- a/korundum/rubylib/examples/dcop/dcopslot.rb
+++ b/korundum/rubylib/examples/dcop/dcopslot.rb
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
-require 'Korundum'
+retquire 'Korundum'
# This is an example of a KDE class that has 'k_dcop' slots declarations, but
# isn't a subclass of DCOPObject. The following four methods are added to your
@@ -21,11 +21,11 @@ require 'Korundum'
#
class MyWidget < KDE::PushButton
- k_dcop 'void mySlot(QString)',
- 'QPoint getPoint(QString)',
- 'QMap<QCString,DCOPRef> actionMap()',
- 'QValueList<DCOPRef> windowList()',
- 'QValueList<QCString> propertyNames(bool)',
+ k_dcop 'void mySlot(TQString)',
+ 'TQPoint getPoint(TQString)',
+ 'TQMap<TQCString,DCOPRef> actionMap()',
+ 'TQValueList<DCOPRef> windowList()',
+ 'TQValueList<TQCString> propertyNames(bool)',
'KURL::List urlList()',
'bool isFoo()',
'bool hasBar()'
@@ -40,7 +40,7 @@ class MyWidget < KDE::PushButton
def getPoint(msg)
puts "message: #{msg}"
- return Qt::Point.new(50, 100)
+ return TQt::Point.new(50, 100)
end
def actionMap()
@@ -80,9 +80,9 @@ a = KDE::UniqueApplication.new()
slottest = MyWidget.new(nil, "mywidget") { setText "DCOP Slot Test" }
a.mainWidget = slottest
slottest.caption = a.makeStdCaption("DCOP Slot Test")
-result = slottest.connectDCOPSignal("dcopsignal", "SenderWidget", "testEmitSignal(QString)", "mySlot(QString)", true)
+result = slottest.connectDCOPSignal("dcopsignal", "SenderWidget", "testEmitSignal(TQString)", "mySlot(TQString)", true)
puts "result: #{result}"
slottest.show()
-# Qt::Internal::setDebug Qt::QtDebugChannel::QTDB_ALL
+# TQt::Internal::setDebug TQt::QtDebugChannel::TQTDB_ALL
a.exec()
diff --git a/korundum/rubylib/examples/dcop/dcoptest.rb b/korundum/rubylib/examples/dcop/dcoptest.rb
index 1a3a37e7..c0654fd8 100755
--- a/korundum/rubylib/examples/dcop/dcoptest.rb
+++ b/korundum/rubylib/examples/dcop/dcoptest.rb
@@ -33,7 +33,7 @@ copyright holder.
=end
-require 'Korundum'
+retquire 'Korundum'
module DCOPTest
@@ -100,7 +100,7 @@ puts "Start a kwrite instance"
error = ""
dcopService = ""
-pid = Qt::Integer.new
+pid = TQt::Integer.new
errcode = KDE::Application.startServiceByDesktopName("kwrite", "", error, dcopService, pid)
dcopService = "kwrite-" + pid.to_s
diff --git a/korundum/rubylib/examples/dcop/petshop.rb b/korundum/rubylib/examples/dcop/petshop.rb
index a3f960c1..5847c1f7 100755
--- a/korundum/rubylib/examples/dcop/petshop.rb
+++ b/korundum/rubylib/examples/dcop/petshop.rb
@@ -5,15 +5,15 @@
# derived from server.py example in tdebindings written by Torben Weis
# and Julian Rockey
-require 'Korundum'
+retquire 'Korundum'
# An object with DCOP slots needn't be a subclass of DCOPObject, but
# this DeadParrotObject is one
class DeadParrotObject < KDE::DCOPObject
- k_dcop 'QString getParrotType()', 'void setParrotType(QString)',
- 'QString squawk()', 'QStringList adjectives()',
+ k_dcop 'TQString getParrotType()', 'void setParrotType(TQString)',
+ 'TQString squawk()', 'TQStringList adjectives()',
'int age()', 'void setAge(int)'
def initialize(id = 'dead parrot')
diff --git a/korundum/rubylib/examples/kludgeror.rb b/korundum/rubylib/examples/kludgeror.rb
index 535936b2..ca805306 100644
--- a/korundum/rubylib/examples/kludgeror.rb
+++ b/korundum/rubylib/examples/kludgeror.rb
@@ -1,10 +1,10 @@
#!/usr/bin/env ruby
-# A quick and dirty web browser demonstrating the direct instantiation
+# A tquick and dirty web browser demonstrating the direct instantiation
# of a KHTML part. Needless to say: this is NOT a programming paragon :)
# -- gg.
# AK - ported to ruby
-require 'Korundum'
+retquire 'Korundum'
opt = [ [ "+[url]", "An URL to open at startup.", "" ],
[ "z", "A dummy binary option.", "" ],
@@ -12,8 +12,8 @@ opt = [ [ "+[url]", "An URL to open at startup.", ""
[ "boz <file>", "Same as above with default value", "default.txt" ],
]
-#Qt::Internal::setDebug Qt::QtDebugChannel::QTDB_ALL
-# Qt.debug_level = Qt::DebugLevel::High
+#TQt::Internal::setDebug TQt::QtDebugChannel::TQTDB_ALL
+# Qt.debug_level = TQt::DebugLevel::High
about = KDE::AboutData.new("kludgeror", "Kludgeror", "0.1", "A basic web browser")
KDE::CmdLineArgs::init(ARGV, about)
@@ -22,9 +22,9 @@ args = KDE::CmdLineArgs::parsedArgs
a = KDE::Application.new # BUG, application shouldn't be needed at the top, lets fix this...
-class PartHolder < Qt::Object
- signals "setLocBarText(const QString&)"
- slots "reload()", "goToURL(const QString&)", "back()", "openURL(const KURL&)" # BUG - the slots should be normalize wrt spaces by the lib
+class PartHolder < TQt::Object
+ signals "setLocBarText(const TQString&)"
+ slots "reload()", "goToURL(const TQString&)", "back()", "openURL(const KURL&)" # BUG - the slots should be normalize wrt spaces by the lib
attr_accessor :part, :history
@@ -73,7 +73,7 @@ doc = KDE::HTMLPart.new toplevel, nil, toplevel, nil, 1
# doc = KDE::HTMLPart.new toplevel, nil, toplevel, nil, 1 # KDE::HTMLPart::BrowserViewGUI
ph = PartHolder.new doc
-Qt::Object::connect doc.browserExtension, SIGNAL("openURLRequest(const KURL&, const KParts::URLArgs&)"),
+TQt::Object::connect doc.browserExtension, SIGNAL("openURLRequest(const KURL&, const KParts::URLArgs&)"),
ph, SLOT("openURL(const KURL&)") # BUG this slot must be screwing up wrt marshalling?
ph.openURL url
@@ -103,7 +103,7 @@ begin
d.documentElement.appendChild locBar
end
-a1 = KDE::Action.new( "Reload", "reload", KDE::Shortcut.new(Qt::Key_F5), ph, SLOT("reload()"), doc.actionCollection, "reload" )
+a1 = KDE::Action.new( "Reload", "reload", KDE::Shortcut.new(TQt::Key_F5), ph, SLOT("reload()"), doc.actionCollection, "reload" )
a2 = KDE::Action.new( "Exit", "exit", KDE::Shortcut.new(0), a, SLOT("quit()"), doc.actionCollection, "exit" )
toplevel.guiFactory.addClient doc
@@ -111,7 +111,7 @@ toplevel.guiFactory.addClient doc
locBar = toplevel.toolBar("locationBar");
locBar.insertButton "back", BACK_B, SIGNAL("clicked()"),
ph, SLOT("back()"), true, "Go back"
-locBar.insertLined url.url, LOC_ED, SIGNAL("returnPressed(const QString&)"), ph, SLOT("goToURL(const QString&)"), true, "Location"
+locBar.insertLined url.url, LOC_ED, SIGNAL("returnPressed(const TQString&)"), ph, SLOT("goToURL(const TQString&)"), true, "Location"
locBar.insertButton "locationbar_erase", ERASE_B, SIGNAL("clicked()"),
locBar.getLined(LOC_ED), SLOT("clear()"), true, "Erase the location bar's content", 2
locBar.setItemAutoSized LOC_ED, true
@@ -119,20 +119,20 @@ locBar.getLined(LOC_ED).createPopupMenu
comp = locBar.getLined(LOC_ED).completionObject
comp.setCompletionMode KDE::GlobalSettings::CompletionPopupAuto
-Qt::Object::connect(locBar.getLined(LOC_ED), SIGNAL("returnPressed(const QString&)"),
- comp, SLOT("addItem(const QString&)"))
-Qt::Object::connect(ph, SIGNAL("setLocBarText(const QString&)"), # BUG - once again...
- locBar.getLined(LOC_ED), SLOT("setText(const QString&)"))
+TQt::Object::connect(locBar.getLined(LOC_ED), SIGNAL("returnPressed(const TQString&)"),
+ comp, SLOT("addItem(const TQString&)"))
+TQt::Object::connect(ph, SIGNAL("setLocBarText(const TQString&)"), # BUG - once again...
+ locBar.getLined(LOC_ED), SLOT("setText(const TQString&)"))
doc.setJScriptEnabled true
doc.setJavaEnabled true
doc.setPluginsEnabled true
-doc.setURLCursor Qt::Cursor.new(Qt::PointingHandCursor)
+doc.setURLCursor TQt::Cursor.new(TQt::PointingHandCursor)
a.setTopWidget doc.widget
-Qt::Object::connect doc, SIGNAL("setWindowCaption(const QString&)"),
- doc.widget.topLevelWidget, SLOT("setCaption(const QString&)")
+TQt::Object::connect doc, SIGNAL("setWindowCaption(const TQString&)"),
+ doc.widget.topLevelWidget, SLOT("setCaption(const TQString&)")
toplevel.show
a.exec
diff --git a/korundum/rubylib/examples/kurldemo.rb b/korundum/rubylib/examples/kurldemo.rb
index 1cd41879..b3d13407 100644
--- a/korundum/rubylib/examples/kurldemo.rb
+++ b/korundum/rubylib/examples/kurldemo.rb
@@ -31,7 +31,7 @@ dealings in this Software without prior written authorization from the
copyright holder.
=end
-require 'Korundum'
+retquire 'Korundum'
class MainWin < KDE::MainWindow
def initialize(*args)
diff --git a/korundum/rubylib/examples/menudemo.rb b/korundum/rubylib/examples/menudemo.rb
index d966c40c..a6ecada5 100644
--- a/korundum/rubylib/examples/menudemo.rb
+++ b/korundum/rubylib/examples/menudemo.rb
@@ -38,7 +38,7 @@ dealings in this Software without prior written authorization from the
copyright holder.
=end
-require 'Korundum'
+retquire 'Korundum'
include KDE
class MainWin < MainWindow
@@ -98,7 +98,7 @@ class MainWin < MainWindow
# Need to assign an icon to actionMenu below
icons = IconLoader.new()
- iconSet = Qt::IconSet.new(icons.loadIcon("viewmag", Icon::Toolbar))
+ iconSet = TQt::IconSet.new(icons.loadIcon("viewmag", Icon::Toolbar))
# Nested menus using KActions (also nested on toolbar)
@actionMenu = ActionMenu.new("Action Menu")
@@ -116,7 +116,7 @@ class MainWin < MainWindow
end
def initMenus()
- fileMenu = Qt::PopupMenu.new(self)
+ fileMenu = TQt::PopupMenu.new(self)
@newAction.plug(fileMenu)
@openAction.plug(fileMenu)
fileMenu.insertSeparator()
@@ -128,7 +128,7 @@ class MainWin < MainWindow
@quitAction.plug(fileMenu)
menuBar().insertItem(i18n("&File"), fileMenu)
- editMenu = Qt::PopupMenu.new(self)
+ editMenu = TQt::PopupMenu.new(self)
@undoAction.plug(editMenu)
@redoAction.plug(editMenu)
editMenu.insertSeparator()
@@ -143,7 +143,7 @@ class MainWin < MainWindow
@specialAction.plug(editMenu)
menuBar().insertItem(i18n("&Edit"), editMenu)
- demoMenu = Qt::PopupMenu.new(self)
+ demoMenu = TQt::PopupMenu.new(self)
@toggle1Action.plug(demoMenu)
@toggle2Action.plug(demoMenu)
@separateAction.plug(demoMenu)
@@ -196,7 +196,7 @@ class MainWin < MainWindow
# to the full width of the toolbar when the window is
# maximized (comment out the next two lines to see
# what happens)
- stretchlbl = Qt::Label.new("", toolBar())
+ stretchlbl = TQt::Label.new("", toolBar())
toolBar().setStretchableWidget(stretchlbl)
# toolBar().setHorizontalStretchable(false)
diff --git a/korundum/rubylib/examples/mimetype.rb b/korundum/rubylib/examples/mimetype.rb
index 24c2d11f..492bd886 100644
--- a/korundum/rubylib/examples/mimetype.rb
+++ b/korundum/rubylib/examples/mimetype.rb
@@ -41,7 +41,7 @@ dealings in this Software without prior written authorization from the
copyright holder.
=end
-require 'Korundum'
+retquire 'Korundum'
include KDE
class MainWin < MainWindow
@@ -63,15 +63,15 @@ class MainWin < MainWindow
end
-class OfferListTab < Qt::Widget
+class OfferListTab < TQt::Widget
def initialize(parent, name = "")
super(parent, name)
setGeometry(0, 0, 500, 370)
- lvLbl = Qt::Label.new("Offers - text/html", self)
+ lvLbl = TQt::Label.new("Offers - text/html", self)
lvLbl.setGeometry(10, 10, 150, 20)
- lv = Qt::ListView.new(self)
+ lv = TQt::ListView.new(self)
lv.setSorting(-1)
lv.addColumn("type", 75)
lv.addColumn("name", 100)
@@ -83,30 +83,30 @@ class OfferListTab < Qt::Widget
# insert list items in reverse order
pref = KDE::ServiceTypeProfile.preferredService("Application", "image/jpeg")
- Qt::ListViewItem.new(lv, pref.type(), pref.name(), pref.exec(), pref.library())
- Qt::ListViewItem.new(lv, "Preferred", "--------", "", "")
- Qt::ListViewItem.new(lv, "", "", "", "")
+ TQt::ListViewItem.new(lv, pref.type(), pref.name(), pref.exec(), pref.library())
+ TQt::ListViewItem.new(lv, "Preferred", "--------", "", "")
+ TQt::ListViewItem.new(lv, "", "", "", "")
trader = KDE::Trader.self()
slist = trader.query("image/jpeg", "Type == 'Application'")
# print "KTrader returned:" + slist
slist.each do |s|
- lvi = Qt::ListViewItem.new(lv, s.type(), s.name(), s.exec(), s.library())
+ lvi = TQt::ListViewItem.new(lv, s.type(), s.name(), s.exec(), s.library())
end
lv.show()
end
end
-class KServiceTypeTab < Qt::Widget
+class KServiceTypeTab < TQt::Widget
def initialize(parent, name = "")
super(parent, name)
setGeometry(0, 0, 500, 370)
- lvLbl = Qt::Label.new("All Service Types", self)
+ lvLbl = TQt::Label.new("All Service Types", self)
lvLbl.setGeometry(10, 10, 250, 20)
- lv = Qt::ListView.new(self)
+ lv = TQt::ListView.new(self)
lv.addColumn("name", 150)
lv.addColumn("desktopEntryPath", 300)
lv.setGeometry(10, 30, 500, 300)
@@ -115,14 +115,14 @@ class KServiceTypeTab < Qt::Widget
slist = KDE::ServiceType.allServiceTypes()
slist.each do |s|
- lvi = Qt::ListViewItem.new(lv, s.name(), s.desktopEntryPath())
+ lvi = TQt::ListViewItem.new(lv, s.name(), s.desktopEntryPath())
end
lv.show()
end
end
-class KSycocaEntryTab < Qt::Widget
+class KSycocaEntryTab < TQt::Widget
def initialize(parent, name = "")
super(parent, name)
@@ -131,10 +131,10 @@ class KSycocaEntryTab < Qt::Widget
return
end
setGeometry(0, 0, 500, 370)
- lvLbl = Qt::Label.new("Entries - 'screensavers': " + grp.name(), self)
+ lvLbl = TQt::Label.new("Entries - 'screensavers': " + grp.name(), self)
lvLbl.setGeometry(10, 10, 250, 20)
- lv = Qt::ListView.new(self)
+ lv = TQt::ListView.new(self)
lv.addColumn("name", 150)
lv.addColumn("entryPath", 300)
lv.setGeometry(10, 30, 500, 300)
@@ -143,22 +143,22 @@ class KSycocaEntryTab < Qt::Widget
slist = grp.entries(false, false)
slist.each do |s|
- lvi = Qt::ListViewItem.new(lv, s.name(), s.entryPath())
+ lvi = TQt::ListViewItem.new(lv, s.name(), s.entryPath())
end
lv.show()
end
end
-class KServiceTab < Qt::Widget
+class KServiceTab < TQt::Widget
def initialize(parent, name = "")
super(parent, name)
setGeometry(0, 0, 500, 370)
- lvLbl = Qt::Label.new("All Services", self)
+ lvLbl = TQt::Label.new("All Services", self)
lvLbl.setGeometry(10, 10, 150, 20)
- lv = Qt::ListView.new(self)
+ lv = TQt::ListView.new(self)
lv.addColumn("type", 75)
lv.addColumn("name", 100)
lv.addColumn("exec", 200)
@@ -168,7 +168,7 @@ class KServiceTab < Qt::Widget
slist = KDE::Service.allServices()
slist.each do |s|
- lvi = Qt::ListViewItem.new(lv, s.type(), s.name(), s.exec(), s.library())
+ lvi = TQt::ListViewItem.new(lv, s.type(), s.name(), s.exec(), s.library())
end
lv.show()
@@ -183,12 +183,12 @@ end
# print svc.library ()
-class KMimeTypeTab < Qt::Widget
+class KMimeTypeTab < TQt::Widget
def initialize(parent, name = "")
super(parent, name)
setGeometry(0, 0, 500, 370)
- lbLbl = Qt::Label.new("All Mimetypes", self)
+ lbLbl = TQt::Label.new("All Mimetypes", self)
lbLbl.setGeometry(10, 10, 150, 20)
lb = KDE::ListBox.new(self)
lb.setGeometry(10, 30, 200, 300)
@@ -207,62 +207,62 @@ class KMimeTypeTab < Qt::Widget
y = 10
mt = KDE::MimeType.mimeType("text/plain")
- mtlbl = Qt::Label.new("KMimeType.mimeType('text/plain')", self)
+ mtlbl = TQt::Label.new("KMimeType.mimeType('text/plain')", self)
mtlbl.setGeometry(x, y, 250, 20)
- mtnamelbl = Qt::Label.new("name", self)
+ mtnamelbl = TQt::Label.new("name", self)
mtnamelbl.setGeometry(x + 15, y + 20, 100, 20)
- mtname = Qt::Label.new(mt.name(), self)
+ mtname = TQt::Label.new(mt.name(), self)
mtname.setGeometry(x + 120, y + 20, 100, 20)
- mtdesklbl = Qt::Label.new("desktopEntryPath", self)
+ mtdesklbl = TQt::Label.new("desktopEntryPath", self)
mtdesklbl.setGeometry(x + 15, y + 40, 100, 20)
- mtdesk = Qt::Label.new(mt.desktopEntryPath(), self)
+ mtdesk = TQt::Label.new(mt.desktopEntryPath(), self)
mtdesk.setGeometry(x + 120, y + 40, 150, 20)
y = y + 80
fp = KDE::MimeType.findByPath("mimetype.rb")
- fplbl = Qt::Label.new("KDE::MimeType.findByPath('mimetype.rb')", self)
+ fplbl = TQt::Label.new("KDE::MimeType.findByPath('mimetype.rb')", self)
fplbl.setGeometry(x, y, 250, 20)
- fpnamelbl = Qt::Label.new("name", self)
+ fpnamelbl = TQt::Label.new("name", self)
fpnamelbl.setGeometry(x + 15, y + 20, 100, 20)
- fpname = Qt::Label.new(fp.name(), self)
+ fpname = TQt::Label.new(fp.name(), self)
fpname.setGeometry(x + 120, y + 20, 100, 20)
- fpdesklbl = Qt::Label.new("desktopEntryPath", self)
+ fpdesklbl = TQt::Label.new("desktopEntryPath", self)
fpdesklbl.setGeometry(x + 15, y + 40, 100, 20)
- fpdesk = Qt::Label.new(fp.desktopEntryPath(), self)
+ fpdesk = TQt::Label.new(fp.desktopEntryPath(), self)
fpdesk.setGeometry(x + 120, y + 40, 150, 20)
y = y + 80
fu = KDE::MimeType.findByURL(KDE::URL.new("file://mimetype.rb"))
- fulbl = Qt::Label.new("KDE::MimeType.findByURL('file://mimetype.rb')", self)
+ fulbl = TQt::Label.new("KDE::MimeType.findByURL('file://mimetype.rb')", self)
fulbl.setGeometry(x, y, 250, 20)
- funamelbl = Qt::Label.new("name", self)
+ funamelbl = TQt::Label.new("name", self)
funamelbl.setGeometry(x + 15, y + 20, 100, 20)
- funame = Qt::Label.new(fu.name(), self)
+ funame = TQt::Label.new(fu.name(), self)
funame.setGeometry(x + 120, y + 20, 100, 20)
- fudesklbl = Qt::Label.new("desktopEntryPath", self)
+ fudesklbl = TQt::Label.new("desktopEntryPath", self)
fudesklbl.setGeometry(x + 15, y + 40, 100, 20)
- fudesk = Qt::Label.new(fu.desktopEntryPath(), self)
+ fudesk = TQt::Label.new(fu.desktopEntryPath(), self)
fudesk.setGeometry(x + 120, y + 40, 150, 20)
y = y + 80
- acc = Qt::Integer.new(0) # Create a mutable integer value to pass as an 'int*' arg
+ acc = TQt::Integer.new(0) # Create a mutable integer value to pass as an 'int*' arg
fc = KDE::MimeType.findByFileContent("mimetype.rb", acc)
- fclbl = Qt::Label.new("KDE::MimeType.findByFileContent('mimetype.rb')", self)
+ fclbl = TQt::Label.new("KDE::MimeType.findByFileContent('mimetype.rb')", self)
fclbl.setGeometry(x, y, 250, 20)
- fcnamelbl = Qt::Label.new("name", self)
+ fcnamelbl = TQt::Label.new("name", self)
fcnamelbl.setGeometry(x + 15, y + 20, 100, 20)
- fcname = Qt::Label.new(fc.name(), self)
+ fcname = TQt::Label.new(fc.name(), self)
fcname.setGeometry(x + 120, y + 20, 100, 20)
- fcdesklbl = Qt::Label.new("desktopEntryPath", self)
+ fcdesklbl = TQt::Label.new("desktopEntryPath", self)
fcdesklbl.setGeometry(x + 15, y + 40, 100, 20)
- fcdesk = Qt::Label.new(fc.desktopEntryPath(), self)
+ fcdesk = TQt::Label.new(fc.desktopEntryPath(), self)
fcdesk.setGeometry(x + 120, y + 40, 100, 20)
- fcacclbl = Qt::Label.new("accuracy", self)
+ fcacclbl = TQt::Label.new("accuracy", self)
fcacclbl.setGeometry(x + 15, y + 60, 100, 20)
- fcacc = Qt::Label.new(acc.to_s, self)
+ fcacc = TQt::Label.new(acc.to_s, self)
fcacc.setGeometry(x + 120, y + 60, 150, 20)
end
end
diff --git a/korundum/rubylib/examples/rbKHTMLPart.rb b/korundum/rubylib/examples/rbKHTMLPart.rb
index 8d28e303..8fff04c5 100644
--- a/korundum/rubylib/examples/rbKHTMLPart.rb
+++ b/korundum/rubylib/examples/rbKHTMLPart.rb
@@ -42,7 +42,7 @@ lifted from the KDE classref.
=end
-require 'Korundum'
+retquire 'Korundum'
# Note that we use KParts.MainWindow, not KMainWindow as the superclass
# (KParts.MainWindow subclasses KMainWindow). Also, be sure the 'apply'
diff --git a/korundum/rubylib/examples/rbtestimage.png b/korundum/rubylib/examples/rbtestimage.png
index 550371b1..8ca4166e 100644
--- a/korundum/rubylib/examples/rbtestimage.png
+++ b/korundum/rubylib/examples/rbtestimage.png
Binary files differ
diff --git a/korundum/rubylib/examples/systray.rb b/korundum/rubylib/examples/systray.rb
index b09f0408..04d1aa08 100644
--- a/korundum/rubylib/examples/systray.rb
+++ b/korundum/rubylib/examples/systray.rb
@@ -31,7 +31,7 @@ dealings in this Software without prior written authorization from the
copyright holder.
=end
-require 'Korundum'
+retquire 'Korundum'
class MainWin < KDE::MainWindow
def initialize(*args)
diff --git a/korundum/rubylib/examples/uikmdi.rb b/korundum/rubylib/examples/uikmdi.rb
index df7d0e1d..0846388c 100644
--- a/korundum/rubylib/examples/uikmdi.rb
+++ b/korundum/rubylib/examples/uikmdi.rb
@@ -32,14 +32,14 @@ All is not rosy, however:
=end
-require 'Korundum'
+retquire 'Korundum'
include KDE
class KmdiExample < KDE::MdiMainFrm
slots 'closeChild(KMdiChildView*)',
'syncFromChildView(KMdiChildView*)',
- 'syncFromMainTool(QListBoxItem*)',
+ 'syncFromMainTool(TQListBoxItem*)',
'activatedMessage(KMdiChildView*)',
'newView()', 'close()', 'closeActiveChild()'
@@ -84,7 +84,7 @@ class KmdiExample < KDE::MdiMainFrm
connect(self, SIGNAL('viewActivated(KMdiChildView*)'), self, SLOT('activatedMessage(KMdiChildView*)'))
connect(self, SIGNAL('viewActivated(KMdiChildView*)'), self, SLOT('syncFromChildView(KMdiChildView*)'))
- connect(@maintool, SIGNAL('selectionChanged(QListBoxItem*)'), self, SLOT('syncFromMainTool(QListBoxItem*)'))
+ connect(@maintool, SIGNAL('selectionChanged(TQListBoxItem*)'), self, SLOT('syncFromMainTool(TQListBoxItem*)'))
syncFromChildView(activeWindow())
end
@@ -120,11 +120,11 @@ class KmdiExample < KDE::MdiMainFrm
view = MdiChildView.new(label, self)
@childs[label] = view
view.setIcon(getIcon(icon))
- layout = Qt::VBoxLayout.new(view)
+ layout = TQt::VBoxLayout.new(view)
layout.setAutoAdd(true)
- lbl = Qt::Label.new(i18n("Label for a view with an icon named #{text}"), view)
- pxm = Qt::Label.new('', view)
+ lbl = TQt::Label.new(i18n("Label for a view with an icon named #{text}"), view)
+ pxm = TQt::Label.new('', view)
pxm.setPixmap(getIcon(icon, Icon::NoGroup, KDE::Icon::SizeLarge))
addWindow(view)
@mainToolWidget.insertItem(label)
diff --git a/korundum/rubylib/examples/uimodules/uidialogs.rb b/korundum/rubylib/examples/uimodules/uidialogs.rb
index 524cc73a..72f1ca80 100644
--- a/korundum/rubylib/examples/uimodules/uidialogs.rb
+++ b/korundum/rubylib/examples/uimodules/uidialogs.rb
@@ -2,7 +2,7 @@
This is a ruby version of Jim Bublitz's pytde program, translated by Richard Dale
=end
-require 'Korundum'
+retquire 'Korundum'
module UIDialogs
@@ -16,15 +16,15 @@ class CustomDlg < KDE::Dialog
x = 20
y = 10
- rLbl = Qt::Label.new("r", self)
- gLbl = Qt::Label.new("g", self)
- bLbl = Qt::Label.new("b", self)
- @rEd = Qt::LineEdit.new("64", self)
- @gEd = Qt::LineEdit.new("64", self)
- @bEd = Qt::LineEdit.new("64", self)
- dlgBtn = Qt::PushButton.new("Set/Get Color", self)
- okBtn = Qt::PushButton.new("OK", self)
- canBtn = Qt::PushButton.new("Cancel", self)
+ rLbl = TQt::Label.new("r", self)
+ gLbl = TQt::Label.new("g", self)
+ bLbl = TQt::Label.new("b", self)
+ @rEd = TQt::LineEdit.new("64", self)
+ @gEd = TQt::LineEdit.new("64", self)
+ @bEd = TQt::LineEdit.new("64", self)
+ dlgBtn = TQt::PushButton.new("Set/Get Color", self)
+ okBtn = TQt::PushButton.new("OK", self)
+ canBtn = TQt::PushButton.new("Cancel", self)
rLbl.setGeometry(x, y, 25, 20)
gLbl.setGeometry(x + 30, y, 25, 20)
@@ -50,8 +50,8 @@ class CustomDlg < KDE::Dialog
green = @gEd.text().to_i
blue = @bEd.text().to_I
- # convert the numbers to a Qt::Color
- color = Qt::Color.new(red, green, blue)
+ # convert the numbers to a TQt::Color
+ color = TQt::Color.new(red, green, blue)
# invoke the dialog(getColor is a 'static' call)
# initialize with the colors from above(in color)
@@ -62,7 +62,7 @@ class CustomDlg < KDE::Dialog
# get the numerical color values back
# red, green, blue = color.rgb()
- # update the Qt::LineEdits in the original dialog
+ # update the TQt::LineEdits in the original dialog
@rEd.setText(red.to_s)
@gEd.setText(green.to_s)
@bEd.setText(blue.to_s)
@@ -89,15 +89,15 @@ class MessageDlg < KDE::Dialog
n = buttons.length
- grp = Qt::ButtonGroup.new(n, Qt::Vertical, "MessageBoxes", self, "button grp")
+ grp = TQt::ButtonGroup.new(n, TQt::Vertical, "MessageBoxes", self, "button grp")
grp.setGeometry(10, 10, 200, 30*n)
- (0...n).each { |i| Qt::RadioButton.new(buttons[i], grp) }
+ (0...n).each { |i| TQt::RadioButton.new(buttons[i], grp) }
connect(grp, SIGNAL("clicked(int)"), SLOT('launch(int)'))
end
def launch(which)
- which += 1 # Qt::ButtonGroup id's start at 0, but the KDE::MessageBox enum starts at 1
+ which += 1 # TQt::ButtonGroup id's start at 0, but the KDE::MessageBox enum starts at 1
if which == KDE::MessageBox::QuestionYesNo
KDE::MessageBox.questionYesNo(self, "This is a questionYesNo message box\nThere is also a list version of this dialog",\
@@ -133,7 +133,7 @@ end
def UIDialogs.dlgKAboutDialog(parent)
dlg = KDE::AboutDialog.new(parent, 'about dialog', false)
- dlg.setLogo(Qt::Pixmap.new("rbtestimage.png"))
+ dlg.setLogo(TQt::Pixmap.new("rbtestimage.png"))
dlg.setTitle("UISampler for Korundum")
dlg.setAuthor("Jim Bublitz", "jbublitz@nwinternet.com", "http://www.riverbankcomputing.co.uk",
"\n\nPyKDE -- Python bindings\n\tfor KDE")
@@ -175,17 +175,17 @@ def UIDialogs.dlgKDialogBase(parent)
# making 'page' the parent inserts the widgets in
# the VBox created above
- label = Qt::Label.new( caption, page, "caption" );
+ label = TQt::Label.new( caption, page, "caption" );
- lineedit = Qt::LineEdit.new(text_, page, "lineedit" );
+ lineedit = TQt::LineEdit.new(text_, page, "lineedit" );
lineedit.setMinimumWidth(dlg.fontMetrics().maxWidth()*20);
- label0 = Qt::Label.new("Border widths", page)
+ label0 = TQt::Label.new("Border widths", page)
# widths = dlg.getBorderWidths()
-# labelA = Qt::Label.new("Upper Left X: " + widths[0].to_s, page)
-# labelB = Qt::Label.new("Upper Left Y: " + widths[0].to_s, page)
-# labelC = Qt::Label.new("Lower Right X: " + str(c), page)
-# labelD = Qt::Label.new("Lower Right Y: " + str(d), page)
+# labelA = TQt::Label.new("Upper Left X: " + widths[0].to_s, page)
+# labelB = TQt::Label.new("Upper Left Y: " + widths[0].to_s, page)
+# labelC = TQt::Label.new("Lower Right X: " + str(c), page)
+# labelD = TQt::Label.new("Lower Right Y: " + str(d), page)
dlg.show()
end
@@ -204,7 +204,7 @@ def UIDialogs.dlgKKeyDialog(parent)
end
def UIDialogs.dlgKInputDialog(parent)
- ok = Qt::Boolean.new
+ ok = TQt::Boolean.new
result = KDE::InputDialog.getText("Enter text", "", "<Your input here>", ok)
# puts "result: %s" % result
# puts "ok: %s" % ok
@@ -231,14 +231,14 @@ end
def UIDialogs.dlgKWizard(parent)
wiz = KDE::Wizard.new(parent)
- page1 = Qt::Widget.new(wiz)
- p1Lbl = Qt::Label.new("This is page 1", page1)
+ page1 = TQt::Widget.new(wiz)
+ p1Lbl = TQt::Label.new("This is page 1", page1)
p1Lbl.setGeometry(20, 20, 100, 20)
- page2 = Qt::Widget.new(wiz)
- p2Lbl = Qt::Label.new("This is page 2", page2)
+ page2 = TQt::Widget.new(wiz)
+ p2Lbl = TQt::Label.new("This is page 2", page2)
p2Lbl.setGeometry(50, 20, 100, 20)
- page3 = Qt::Widget.new(wiz)
- p3Lbl = Qt::Label.new("This is page 3", page3)
+ page3 = TQt::Widget.new(wiz)
+ p3Lbl = TQt::Label.new("This is page 3", page3)
p3Lbl.setGeometry(80, 20, 100, 20)
wiz.addPage(page1, "Page 1")
diff --git a/korundum/rubylib/examples/uimodules/uimenus.rb b/korundum/rubylib/examples/uimodules/uimenus.rb
index 8bd1b83b..b213d7e8 100644
--- a/korundum/rubylib/examples/uimodules/uimenus.rb
+++ b/korundum/rubylib/examples/uimodules/uimenus.rb
@@ -2,7 +2,7 @@
This is a ruby version of Jim Bublitz's pytde program, translated by Richard Dale
=end
-require 'Korundum'
+retquire 'Korundum'
module UIMenus
@@ -13,7 +13,7 @@ class PageLaunch
x = 10
y = 10
- launchLbl = Qt::Label.new("Launching application ... please wait\n\nClose launched application to continue", page)
+ launchLbl = TQt::Label.new("Launching application ... please wait\n\nClose launched application to continue", page)
launchLbl.setGeometry(x, y, 300, 80)
launchLbl.show()
@@ -31,7 +31,7 @@ class PageNotImpl
x = 10
y = 10
- niLbl = Qt::Label.new("Nothing is currently implemented for this widget", page)
+ niLbl = TQt::Label.new("Nothing is currently implemented for this widget", page)
niLbl.setGeometry(x, y, 300, 20)
niLbl.show()
end
diff --git a/korundum/rubylib/examples/uimodules/uimisc.rb b/korundum/rubylib/examples/uimodules/uimisc.rb
index b5d10fc1..dad78f5d 100644
--- a/korundum/rubylib/examples/uimodules/uimisc.rb
+++ b/korundum/rubylib/examples/uimodules/uimisc.rb
@@ -2,11 +2,11 @@
This is a ruby version of Jim Bublitz's pytde program, translated by Richard Dale
=end
-require 'Korundum'
+retquire 'Korundum'
module UIMisc
-class Page3 < Qt::Object
+class Page3 < TQt::Object
slots 'ivChanged()', 'fvChanged()', 'dvChanged()'
def initialize(parent)
@@ -15,33 +15,33 @@ class Page3 < Qt::Object
x = 10
y = 15
- green = Qt::Color.new(0, 255, 0)
- yellow = Qt::Color.new(255, 255, 0)
- red = Qt::Color.new(255, 0, 0)
+ green = TQt::Color.new(0, 255, 0)
+ yellow = TQt::Color.new(255, 255, 0)
+ red = TQt::Color.new(255, 0, 0)
- ivLbl = Qt::Label.new("KIntValidator", page)
+ ivLbl = TQt::Label.new("KIntValidator", page)
ivLbl.setGeometry(x, y, 100, 20)
ivLbl.show()
@iv = KDE::LineEdit.new(page)
@iv.setGeometry(x, y + 20, 100, 20)
@iv.show()
- connect(@iv, SIGNAL("textChanged(const QString&)"), SLOT('ivChanged()'))
+ connect(@iv, SIGNAL("textChanged(const TQString&)"), SLOT('ivChanged()'))
@ivVal = KDE::IntValidator.new(page)
@ivVal.setRange(20, 50)
- ivRngLbl = Qt::Label.new("Range is 20 - 50", page)
+ ivRngLbl = TQt::Label.new("Range is 20 - 50", page)
ivRngLbl.setGeometry(x, y + 45, 100, 20)
ivRngLbl.show()
- ivAccLbl = Qt::Label.new("Acceptable", page)
+ ivAccLbl = TQt::Label.new("Acceptable", page)
ivAccLbl.setGeometry(x + 125, y + 45, 85, 20)
ivAccLbl.show()
- ivInterLbl = Qt::Label.new("Intermediate", page)
+ ivInterLbl = TQt::Label.new("Intermediate", page)
ivInterLbl.setGeometry(x + 125, y + 20, 85, 20)
ivInterLbl.show()
- ivInvalLbl = Qt::Label.new("Invalid", page)
+ ivInvalLbl = TQt::Label.new("Invalid", page)
ivInvalLbl.setGeometry(x + 125, y - 5, 85, 20)
ivInvalLbl.show()
@ivInvalLed = KDE::Led.new(red, KDE::Led::Off, KDE::Led::Sunken, KDE::Led::Circular,page)
@@ -56,29 +56,29 @@ class Page3 < Qt::Object
y = y + 100
- fvLbl = Qt::Label.new("KDoubleValidator", page)
+ fvLbl = TQt::Label.new("KDoubleValidator", page)
fvLbl.setGeometry(x, y, 100, 20)
fvLbl.show()
@fv = KDE::LineEdit.new(page)
@fv.setGeometry(x, y + 20, 100, 20)
@fv.show()
- connect(@fv, SIGNAL("textChanged(const QString&)"), SLOT('fvChanged()'))
+ connect(@fv, SIGNAL("textChanged(const TQString&)"), SLOT('fvChanged()'))
@fvVal = KDE::DoubleValidator.new(page)
@fvVal.setRange(10.0, 40.0)
- fvRngLbl = Qt::Label.new("Range is 10.0 - 40.0", page)
+ fvRngLbl = TQt::Label.new("Range is 10.0 - 40.0", page)
fvRngLbl.setGeometry(x, y + 45, 100, 20)
fvRngLbl.show()
- fvAccLbl = Qt::Label.new("Acceptable", page)
+ fvAccLbl = TQt::Label.new("Acceptable", page)
fvAccLbl.setGeometry(x + 125, y + 45, 85, 20)
fvAccLbl.show()
- fvInterLbl = Qt::Label.new("Intermediate", page)
+ fvInterLbl = TQt::Label.new("Intermediate", page)
fvInterLbl.setGeometry(x + 125, y + 20, 95, 20)
fvInterLbl.show()
- fvInvalLbl = Qt::Label.new("Invalid", page)
+ fvInvalLbl = TQt::Label.new("Invalid", page)
fvInvalLbl.setGeometry(x + 125, y - 5, 85, 20)
fvInvalLbl.show()
@fvInvalLed = KDE::Led.new(red, KDE::Led::Off, KDE::Led::Sunken, KDE::Led::Circular,page)
@@ -93,38 +93,38 @@ class Page3 < Qt::Object
y = y + 100
- dvLbl = Qt::Label.new("KDateValidator", page)
+ dvLbl = TQt::Label.new("KDateValidator", page)
dvLbl.setGeometry(x, y, 100, 20)
dvLbl.show()
@dv = KDE::LineEdit.new(page)
@dv.setGeometry(x, y + 20, 100, 20)
@dv.show()
-# connect(dv, SIGNAL("textChanged(const QString&)"), SLOT('dvChanged()'))
+# connect(dv, SIGNAL("textChanged(const TQString&)"), SLOT('dvChanged()'))
@dvVal = KDE::DateValidator.new(page)
# dvVal.setRange(10.0, 40.0)
-# dvRngLbl = Qt::Label.new("Range is 10.0 - 40.0", page)
+# dvRngLbl = TQt::Label.new("Range is 10.0 - 40.0", page)
# dvRngLbl.setGeometry(x, y + 45, 100, 20)
# dvRngLbl.show()
- dvBtn = Qt::PushButton.new("Validate", page)
+ dvBtn = TQt::PushButton.new("Validate", page)
dvBtn.setGeometry(x, y + 45, 60, 22)
dvBtn.show()
connect(dvBtn, SIGNAL("clicked()"), SLOT('dvChanged()'))
- dvNoteLbl = Qt::Label.new("Format is locale dependent\nShort date only\nTry DD-MM-YY", page)
+ dvNoteLbl = TQt::Label.new("Format is locale dependent\nShort date only\nTry DD-MM-YY", page)
dvNoteLbl.setGeometry(x, y + 70, 150, 60)
dvNoteLbl.show()
- dvAccLbl = Qt::Label.new("Acceptable", page)
+ dvAccLbl = TQt::Label.new("Acceptable", page)
dvAccLbl.setGeometry(x + 125, y + 45, 85, 20)
dvAccLbl.show()
- dvInterLbl = Qt::Label.new("Intermediate", page)
+ dvInterLbl = TQt::Label.new("Intermediate", page)
dvInterLbl.setGeometry(x + 125, y + 20, 85, 20)
dvInterLbl.show()
- dvInvalLbl = Qt::Label.new("Invalid", page)
+ dvInvalLbl = TQt::Label.new("Invalid", page)
dvInvalLbl.setGeometry(x + 125, y - 5, 85, 20)
dvInvalLbl.show()
@dvInvalLed = KDE::Led.new(red, KDE::Led::Off, KDE::Led::Sunken, KDE::Led::Circular,page)
@@ -143,12 +143,12 @@ class Page3 < Qt::Object
@ivInterLed.off()
@ivAccLed.off()
- i = Qt::Integer.new(0)
+ i = TQt::Integer.new(0)
state = @ivVal.validate(@iv.text(), i)
- if state == Qt::Validator::Acceptable
+ if state == TQt::Validator::Acceptable
@ivAccLed.on()
- elsif state == Qt::Validator::Intermediate
+ elsif state == TQt::Validator::Intermediate
@ivInterLed.on()
else
@ivInvalLed.on()
@@ -160,12 +160,12 @@ class Page3 < Qt::Object
@fvInterLed.off()
@fvAccLed.off()
- i = Qt::Integer.new(0)
+ i = TQt::Integer.new(0)
state = @fvVal.validate(@fv.text(), i)
- if state == Qt::Validator::Acceptable
+ if state == TQt::Validator::Acceptable
@fvAccLed.on()
- elsif state == Qt::Validator::Intermediate
+ elsif state == TQt::Validator::Intermediate
@fvInterLed.on()
else
@fvInvalLed.on()
@@ -177,12 +177,12 @@ class Page3 < Qt::Object
@dvInterLed.off()
@dvAccLed.off()
- i = Qt::Integer.new(0)
+ i = TQt::Integer.new(0)
state = @dvVal.validate(@dv.text(), i)
- if state == Qt::Validator::Acceptable
+ if state == TQt::Validator::Acceptable
@dvAccLed.on()
- elsif state == Qt::Validator::Intermediate
+ elsif state == TQt::Validator::Intermediate
@dvInterLed.on()
else
@dvInvalLed.on()
@@ -197,7 +197,7 @@ class PageNotImpl
x = 10
y = 10
- niLbl = Qt::Label.new("Nothing is currently implemented for this widget", page)
+ niLbl = TQt::Label.new("Nothing is currently implemented for this widget", page)
niLbl.setGeometry(x, y, 300, 20)
niLbl.show()
end
@@ -259,7 +259,7 @@ def UIMisc.miscKThemeBase(parent)
parent.currentPageObj = PageNotImpl.new(parent)
end
-def UIMisc.miscQXEmbed(parent)
+def UIMisc.miscTQXEmbed(parent)
parent.currentPageObj = PageNotImpl.new(parent)
end
diff --git a/korundum/rubylib/examples/uimodules/uiwidgets.rb b/korundum/rubylib/examples/uimodules/uiwidgets.rb
index 47e9599b..cc2d9a98 100644
--- a/korundum/rubylib/examples/uimodules/uiwidgets.rb
+++ b/korundum/rubylib/examples/uimodules/uiwidgets.rb
@@ -2,11 +2,11 @@
This is a ruby version of Jim Bublitz's pytde program, translated by Richard Dale
=end
-require 'Korundum'
+retquire 'Korundum'
module UIWidgets
-class Page1 < Qt::Object
+class Page1 < TQt::Object
slots 'restrict(int)'
def initialize(parent)
@@ -16,7 +16,7 @@ class Page1 < Qt::Object
x = 10
y = 10
- editLbl = Qt::Label.new("KTextEdit", page)
+ editLbl = TQt::Label.new("KTextEdit", page)
editLbl.setGeometry(x, y, 50, 20)
editLbl.show()
@@ -33,9 +33,9 @@ class Page1 < Qt::Object
parent.edit.show()
y = y + 125
- searchBtn = Qt::PushButton.new("Search", page)
- replaceBtn = Qt::PushButton.new("Replace", page)
- gotoBtn = Qt::PushButton.new("GoTo Line", page)
+ searchBtn = TQt::PushButton.new("Search", page)
+ replaceBtn = TQt::PushButton.new("Replace", page)
+ gotoBtn = TQt::PushButton.new("GoTo Line", page)
searchBtn.setGeometry(x, y, 60, 22)
replaceBtn.setGeometry(x + 90, y, 60, 22)
@@ -51,7 +51,7 @@ class Page1 < Qt::Object
y = y + 35
- lineeditLbl = Qt::Label.new("KLineEdit", page)
+ lineeditLbl = TQt::Label.new("KLineEdit", page)
lineeditLbl.setGeometry(x, y, 70, 20)
lineeditLbl.show()
@@ -59,7 +59,7 @@ class Page1 < Qt::Object
lineedit.setGeometry(x, y + 20, 100, 20)
lineedit.show()
- intLbl = Qt::Label.new("KIntNumInput", page)
+ intLbl = TQt::Label.new("KIntNumInput", page)
intLbl.setGeometry(x + 195, y + 35, 95, 20)
intLbl.show()
@@ -73,7 +73,7 @@ class Page1 < Qt::Object
y = y + 50
- dblLbl = Qt::Label.new("KDoubleNumInput", page)
+ dblLbl = TQt::Label.new("KDoubleNumInput", page)
dblLbl.setGeometry(x + 195, y + 80, 115, 20)
dblLbl.show()
@@ -84,7 +84,7 @@ class Page1 < Qt::Object
dblNum.setRange(0.0, 10.0, 0.5, true)
dblNum.show()
- restricteditLbl = Qt::Label.new("KRestrictedLine", page)
+ restricteditLbl = TQt::Label.new("KRestrictedLine", page)
restricteditLbl.setGeometry(x, y, 95, 20)
restricteditLbl.show()
@@ -96,14 +96,14 @@ class Page1 < Qt::Object
n = buttons.length
- @validLbl = Qt::Label.new("", page)
+ @validLbl = TQt::Label.new("", page)
@validLbl.setGeometry(x, y + 50, 250, 20)
@validLbl.show()
- grp = Qt::ButtonGroup.new(n, Qt::Vertical, "Select valid chars", page, "button grp")
+ grp = TQt::ButtonGroup.new(n, TQt::Vertical, "Select valid chars", page, "button grp")
grp.setGeometry(x, y + 75, 150, 5+30*n)
- (0...n).each { |i| Qt::RadioButton.new(buttons[i], grp) }
+ (0...n).each { |i| TQt::RadioButton.new(buttons[i], grp) }
connect(grp, SIGNAL("clicked(int)"), SLOT('restrict(int)'))
@@ -116,22 +116,22 @@ class Page1 < Qt::Object
$kapp.processEvents()
y = y + 195
- sqzLbl = Qt::Label.new("This text is too long to fit in the label below", page)
+ sqzLbl = TQt::Label.new("This text is too long to fit in the label below", page)
sqzLbl.setGeometry(x, y, 350, 20)
sqzLbl.show()
- sqzLbl1 = Qt::Label.new("KSqueezedTxtLabel:", page)
+ sqzLbl1 = TQt::Label.new("KSqueezedTxtLabel:", page)
sqzLbl1.setGeometry(x, y + 20, 120, 20)
sqzLbl1.show()
squeeze = KDE::SqueezedTextLabel.new("This text is too long to fit in the label below", page)
squeeze.setGeometry(x + 125, y + 20, 125, 20)
- squeeze.setBackgroundMode(Qt::Widget::PaletteBase)
+ squeeze.setBackgroundMode(TQt::Widget::PaletteBase)
squeeze.show()
end
def restrict(which)
- r = {0 => "0123456789", 1 => "ABCDEFGHIJKLMNOPQRSTUVWXYZ", 2 => "abcdefghijklmnopqrstuvwxyz"}
+ r = {0 => "0123456789", 1 => "ABCDEFGHIJKLMNOPTQRSTUVWXYZ", 2 => "abcdefghijklmnopqrstuvwxyz"}
@restrictlineedit.setValidChars(r[which])
@validLbl.setText("Valid: " + @restrictlineedit.validChars())
end
@@ -146,7 +146,7 @@ class Page2
x2 = 240
y2 = 100
- cbLbl = Qt::Label.new("KComboBox", page)
+ cbLbl = TQt::Label.new("KComboBox", page)
cbLbl.setGeometry(x1, y1, 75, 20)
cbLbl.show()
@@ -155,7 +155,7 @@ class Page2
combo.setGeometry(x1, y1 + 20, 100, 25)
combo.show()
- ccbLbl = Qt::Label.new("KColorCombo", page)
+ ccbLbl = TQt::Label.new("KColorCombo", page)
ccbLbl.setGeometry(x2, y1, 100, 20)
ccbLbl.show()
@@ -168,7 +168,7 @@ class Page2
editListBox.insertStringList(["One", "Two", "Three"])
editListBox.show()
- lbLbl = Qt::Label.new("KListBox", page)
+ lbLbl = TQt::Label.new("KListBox", page)
lbLbl.setGeometry(x2, y2, 100, 20)
lbLbl.show()
@@ -186,7 +186,7 @@ class Page3
x = 10
y = 10
- fontLbl = Qt::Label.new("KFontChooser", page)
+ fontLbl = TQt::Label.new("KFontChooser", page)
fontLbl.setGeometry(x, y, 95, 20)
fontLbl.show()
@@ -205,16 +205,16 @@ class Page4
x = 10
y = 10
- cbLbl = Qt::Label.new("KColorButton", page)
+ cbLbl = TQt::Label.new("KColorButton", page)
cbLbl.setGeometry(x, y, 75, 20)
cbLbl.show()
cb = KDE::ColorButton.new(page)
- cb.setColor(Qt::Color.new(255, 0, 0))
+ cb.setColor(TQt::Color.new(255, 0, 0))
cb.setGeometry(x, y + 20, 30, 30)
cb.show()
- ccbLbl = Qt::Label.new("KColorCombo", page)
+ ccbLbl = TQt::Label.new("KColorCombo", page)
ccbLbl.setGeometry(x + 150, y, 100, 20)
ccbLbl.show()
@@ -224,53 +224,53 @@ class Page4
y = y + 60
- cpLbl = Qt::Label.new("KColorPatch", page)
+ cpLbl = TQt::Label.new("KColorPatch", page)
cpLbl.setGeometry(x, y, 75, 20)
cpLbl.show()
cp = KDE::ColorPatch.new(page)
- cp.setColor(Qt::Color.new(255, 0, 0))
+ cp.setColor(TQt::Color.new(255, 0, 0))
cp.setGeometry(x, y + 20, 20, 20)
cp.show()
x = x + 150
- ccLbl = Qt::Label.new("KColorCells", page)
+ ccLbl = TQt::Label.new("KColorCells", page)
ccLbl.setGeometry(x, y, 75, 20)
ccLbl.show()
cc = KDE::ColorCells.new(page, 1, 5)
- cc.setColor(0, Qt::Color.new(0, 0, 0))
- cc.setColor(1, Qt::Color.new(255, 0, 0))
- cc.setColor(2, Qt::Color.new(0, 255, 0))
- cc.setColor(3, Qt::Color.new(0, 0, 255))
- cc.setColor(4, Qt::Color.new(255, 255, 255))
+ cc.setColor(0, TQt::Color.new(0, 0, 0))
+ cc.setColor(1, TQt::Color.new(255, 0, 0))
+ cc.setColor(2, TQt::Color.new(0, 255, 0))
+ cc.setColor(3, TQt::Color.new(0, 0, 255))
+ cc.setColor(4, TQt::Color.new(255, 255, 255))
cc.setGeometry(x, y + 20, 100, 20)
cc.show()
x = 10
y = y + 50
- dcLbl = Qt::Label.new("KDualColorButton", page)
+ dcLbl = TQt::Label.new("KDualColorButton", page)
dcLbl.setGeometry(x, y, 105, 20)
dcLbl.show()
- dc = KDE::DualColorButton.new(Qt::Color.new(255, 0, 0), Qt::Color.new(0, 0, 0), page)
+ dc = KDE::DualColorButton.new(TQt::Color.new(255, 0, 0), TQt::Color.new(0, 0, 0), page)
dc.setGeometry(x, y + 20, 40, 40)
dc.show()
- gsLbl = Qt::Label.new("KGradientSelector", page)
+ gsLbl = TQt::Label.new("KGradientSelector", page)
gsLbl.setGeometry(x + 80, y + 30, 110, 20)
gsLbl.show()
gs = KDE::GradientSelector.new(page)
gs.setGeometry(x + 80, y + 50, 250, 20)
- gs.setColors(Qt::Color.new(255, 0, 0), Qt::Color.new(255, 255, 0))
+ gs.setColors(TQt::Color.new(255, 0, 0), TQt::Color.new(255, 255, 0))
gs.show()
y = y + 80
- hsLbl = Qt::Label.new("KHSSelector", page)
+ hsLbl = TQt::Label.new("KHSSelector", page)
hsLbl.setGeometry(x, y, 95, 20)
hsLbl.show()
@@ -280,7 +280,7 @@ class Page4
y = y + 110
- ptLbl = Qt::Label.new("KPaletteTable", page)
+ ptLbl = TQt::Label.new("KPaletteTable", page)
ptLbl.setGeometry(x, y, 95, 20)
ptLbl.show()
@@ -298,7 +298,7 @@ class Page5
x = 10
y = 10
- rpLbl = Qt::Label.new("KRootPermsIcon", page)
+ rpLbl = TQt::Label.new("KRootPermsIcon", page)
rpLbl.setGeometry(x, y, 95, 20)
rpLbl.show()
@@ -306,7 +306,7 @@ class Page5
rp.setGeometry(x, y + 20, 32, 32)
rp.show()
- wpLbl = Qt::Label.new("KWritePermsIcon", page)
+ wpLbl = TQt::Label.new("KWritePermsIcon", page)
wpLbl.setGeometry(x + 125, y, 95, 20)
wpLbl.show()
@@ -316,7 +316,7 @@ class Page5
y = y + 75
- pw1Lbl = Qt::Label.new("KPasswordEdit - echo *", page)
+ pw1Lbl = TQt::Label.new("KPasswordEdit - echo *", page)
pw1Lbl.setGeometry(x, y, 150, 20)
pw1Lbl.show()
@@ -326,7 +326,7 @@ class Page5
y = y + 50
- pw2Lbl = Qt::Label.new("KPasswordEdit - echo ***", page)
+ pw2Lbl = TQt::Label.new("KPasswordEdit - echo ***", page)
pw2Lbl.setGeometry(x, y, 150, 20)
pw2Lbl.show()
@@ -336,7 +336,7 @@ class Page5
y = y + 50
- pw3Lbl = Qt::Label.new("KPasswordEdit - no echo", page)
+ pw3Lbl = TQt::Label.new("KPasswordEdit - no echo", page)
pw3Lbl.setGeometry(x, y, 150, 20)
pw3Lbl.show()
@@ -346,7 +346,7 @@ class Page5
y = y + 50
- urlLbl = Qt::Label.new("KURLLabel", page)
+ urlLbl = TQt::Label.new("KURLLabel", page)
urlLbl.setGeometry(x, y, 100, 20)
urlLbl.show()
@@ -359,11 +359,11 @@ class Page5
x = 70
y = y + 50
- bbLbl = Qt::Label.new("KButtonBox", page)
+ bbLbl = TQt::Label.new("KButtonBox", page)
bbLbl.setGeometry(x, y, 75, 20)
bbLbl.show()
- bbox = KDE::ButtonBox.new(page, Qt::Horizontal)
+ bbox = KDE::ButtonBox.new(page, TQt::Horizontal)
bbox.setGeometry(x, y + 20, 300, 22)
bbox.addButton("Button 1")
bbox.addButton("Button 2")
@@ -372,14 +372,14 @@ class Page5
y = y + 50
-# dbLbl = Qt::Label.new("KDirectionButton", page)
+# dbLbl = TQt::Label.new("KDirectionButton", page)
# dbLbl.setGeometry(x, y, 95, 20)
# dbLbl.show()
-# dbUp = KDE::DirectionButton.new(Qt::t::UpArrow, page)
-# dbDown = KDE::DirectionButton.new(Qt::t::DownArrow, page)
-# dbRight = KDE::DirectionButton.new(Qt::t::RightArrow, page)
-# dbLeft = KDE::DirectionButton.new(Qt::t::LeftArrow, page)
+# dbUp = KDE::DirectionButton.new(TQt::t::UpArrow, page)
+# dbDown = KDE::DirectionButton.new(TQt::t::DownArrow, page)
+# dbRight = KDE::DirectionButton.new(TQt::t::RightArrow, page)
+# dbLeft = KDE::DirectionButton.new(TQt::t::LeftArrow, page)
# dbUp.setGeometry(x, y + 20, 22, 22)
# dbDown.setGeometry(x + 30, y + 20, 22, 22)
@@ -393,7 +393,7 @@ class Page5
x = x + 150
-# kbLbl = Qt::Label.new("KKeyButton", page)
+# kbLbl = TQt::Label.new("KKeyButton", page)
# kbLbl.setGeometry(x, y, 95, 20)
# kbLbl.show()
@@ -405,14 +405,14 @@ class Page5
x = 70
y = y + 50
-# tbLbl = Qt::Label.new("KTabButton", page)
+# tbLbl = TQt::Label.new("KTabButton", page)
# tbLbl.setGeometry(x, y, 95, 20)
# tbLbl.show()
-# tbUp = KDE::TabButton.new(Qt::t::UpArrow, page)
-# tbDown = KDE::TabButton.new(Qt::t::DownArrow, page)
-# tbRight = KDE::TabButton.new(Qt::t::RightArrow, page)
-# tbLeft = KDE::TabButton.new(Qt::t::LeftArrow, page)
+# tbUp = KDE::TabButton.new(TQt::t::UpArrow, page)
+# tbDown = KDE::TabButton.new(TQt::t::DownArrow, page)
+# tbRight = KDE::TabButton.new(TQt::t::RightArrow, page)
+# tbLeft = KDE::TabButton.new(TQt::t::LeftArrow, page)
# tbUp.setGeometry(x, y + 20, 22, 25)
# tbDown.setGeometry(x + 30, y + 20, 22, 25)
@@ -426,7 +426,7 @@ class Page5
end
end
-class Page6 < Qt::Object
+class Page6 < TQt::Object
slots 'toggleClicked()'
def initialize(parent)
@@ -436,10 +436,10 @@ class Page6 < Qt::Object
x = 20
y = 10
- red = Qt::Color.new(255, 0, 0)
- green = Qt::Color.new(0, 255, 0)
- yellow = Qt::Color.new(255, 255, 0)
- blue = Qt::Color.new(0, 0, 255)
+ red = TQt::Color.new(255, 0, 0)
+ green = TQt::Color.new(0, 255, 0)
+ yellow = TQt::Color.new(255, 255, 0)
+ blue = TQt::Color.new(0, 0, 255)
ledcolor = [red, green, yellow, blue]
ledshape = [KDE::Led::Rectangular, KDE::Led::Circular]
@@ -465,7 +465,7 @@ class Page6 < Qt::Object
y = y + 10
end
- toggle = Qt::PushButton.new("Toggle", page)
+ toggle = TQt::PushButton.new("Toggle", page)
toggle.setGeometry(150, 400, 60, 22)
toggle.show()
@@ -479,7 +479,7 @@ class Page6 < Qt::Object
end
end
-class Page7 < Qt::Object
+class Page7 < TQt::Object
slots 'add1()'
def initialize(parent)
@@ -489,21 +489,21 @@ class Page7 < Qt::Object
x = 10
y = 10
- tabLbl = Qt::Label.new("KTabCtl", page)
+ tabLbl = TQt::Label.new("KTabCtl", page)
tabLbl.setGeometry(x, y, 95, 20)
tabLbl.show()
tab = KDE::TabCtl.new(page)
tab.setGeometry(x, y + 20, 300, 100)
- page1 = Qt::Widget.new(tab)
- p1Lbl = Qt::Label.new("This is page 1", page1)
+ page1 = TQt::Widget.new(tab)
+ p1Lbl = TQt::Label.new("This is page 1", page1)
p1Lbl.setGeometry(20, 20, 100, 20)
- page2 = Qt::Widget.new(tab)
- p2Lbl = Qt::Label.new("This is page 2", page2)
+ page2 = TQt::Widget.new(tab)
+ p2Lbl = TQt::Label.new("This is page 2", page2)
p2Lbl.setGeometry(50, 20, 100, 20)
- page3 = Qt::Widget.new(tab)
- p3Lbl = Qt::Label.new("This is page 3", page3)
+ page3 = TQt::Widget.new(tab)
+ p3Lbl = TQt::Label.new("This is page 3", page3)
p3Lbl.setGeometry(20, 50, 100, 20)
tab.addTab(page1, "Tab 1")
@@ -514,7 +514,7 @@ class Page7 < Qt::Object
x = 10
y = 150
- progLbl = Qt::Label.new("KProgress", page)
+ progLbl = TQt::Label.new("KProgress", page)
progLbl.setGeometry(x, y + 50, 95, 20)
progLbl.show()
@@ -534,17 +534,17 @@ class Page7 < Qt::Object
@total = 0
y = y + 150
- sepLbl = Qt::Label.new("KSeparator", page)
+ sepLbl = TQt::Label.new("KSeparator", page)
sepLbl.setGeometry(x, y, 95, 20)
sepLbl.show()
- sep = KDE::Separator.new(Qt::Frame::HLine, page)
+ sep = KDE::Separator.new(TQt::Frame::HLine, page)
sep.setGeometry(x, y + 20, 75, 10)
sep.show()
page.show()
- @timer = Qt::Timer.new(page)
+ @timer = TQt::Timer.new(page)
connect(@timer, SIGNAL('timeout()'), SLOT('add1()'))
@timer.start(100)
@@ -569,7 +569,7 @@ class Page8
x = 40
y = 10
- dpLbl = Qt::Label.new("KDatePicker", page)
+ dpLbl = TQt::Label.new("KDatePicker", page)
dpLbl.setGeometry(x, y, 95, 20)
dpLbl.show()
@@ -579,7 +579,7 @@ class Page8
y = y + 210
- dtLbl = Qt::Label.new("KDateTable", page)
+ dtLbl = TQt::Label.new("KDateTable", page)
dtLbl.setGeometry(x, y, 95, 20)
dtLbl.show()
@@ -596,7 +596,7 @@ class PageThisApp
x = 10
y = 10
- taLbl = Qt::Label.new("This application uses KMainWindow as its top level widget\n and KListView in the"\
+ taLbl = TQt::Label.new("This application uses KMainWindow as its top level widget\n and KListView in the"\
" left-hand panel", page)
taLbl.setGeometry(x, y, 300, 60)
taLbl.show()
@@ -610,7 +610,7 @@ class PageNotImpl
x = 10
y = 10
- niLbl = Qt::Label.new("Nothing is currently implemented for this widget", page)
+ niLbl = TQt::Label.new("Nothing is currently implemented for this widget", page)
niLbl.setGeometry(x, y, 300, 20)
niLbl.show()
end
@@ -626,14 +626,14 @@ class CSDlg < KDE::Dialog
x = 10
y = 10
- csLbl = Qt::Label.new("KCharSelect", self)
+ csLbl = TQt::Label.new("KCharSelect", self)
csLbl.setGeometry(x, y, 95, 20)
csLbl.show()
- cs = KDE::CharSelect.new(self, "chselect", nil, Qt::Char.new(0), 0)
+ cs = KDE::CharSelect.new(self, "chselect", nil, TQt::Char.new(0), 0)
cs.setGeometry(x, y + 20, 680, 250)
cs.show()
- closeBtn = Qt::PushButton.new("Close", self)
+ closeBtn = TQt::PushButton.new("Close", self)
closeBtn.setGeometry( 610, 280, 60, 22)
closeBtn.show()
diff --git a/korundum/rubylib/examples/uimodules/uixml.rb b/korundum/rubylib/examples/uimodules/uixml.rb
index cda08d9a..5763faf3 100644
--- a/korundum/rubylib/examples/uimodules/uixml.rb
+++ b/korundum/rubylib/examples/uimodules/uixml.rb
@@ -2,7 +2,7 @@
This is a ruby version of Jim Bublitz's pytde program, translated by Richard Dale
=end
-require 'Korundum'
+retquire 'Korundum'
module UIXML
@@ -13,7 +13,7 @@ class PageLaunch
x = 10
y = 10
- launchLbl = Qt::Label.new("Launching application ... please wait\n\nClose launched application to continue", page)
+ launchLbl = TQt::Label.new("Launching application ... please wait\n\nClose launched application to continue", page)
launchLbl.setGeometry(x, y, 300, 80)
launchLbl.show()
diff --git a/korundum/rubylib/examples/uisampler.rb b/korundum/rubylib/examples/uisampler.rb
index 24df8e3e..d1b619b9 100644
--- a/korundum/rubylib/examples/uisampler.rb
+++ b/korundum/rubylib/examples/uisampler.rb
@@ -2,13 +2,13 @@
This is a ruby version of Jim Bublitz's pytde program, translated by Richard Dale
=end
-require 'Korundum'
+retquire 'Korundum'
-require 'uimodules/uiwidgets.rb'
-require 'uimodules/uidialogs.rb'
-require 'uimodules/uimenus.rb'
-require 'uimodules/uimisc.rb'
-require 'uimodules/uixml.rb'
+retquire 'uimodules/uiwidgets.rb'
+retquire 'uimodules/uidialogs.rb'
+retquire 'uimodules/uimenus.rb'
+retquire 'uimodules/uimisc.rb'
+retquire 'uimodules/uixml.rb'
$listItems = {"Dialogs" =>
{"KDE::AboutDialog" => ["KDE::AboutApplication", "KDE::AboutContainer", "KDE::ImageTrackLabel",
@@ -112,7 +112,7 @@ $listItems = {"Dialogs" =>
"KDE::SharedPixmap" => [],
"KDE::SystemTray" => [],
"KDE::ThemeBase" => ["KDE::ThemeCache", "KDE::ThemePixmap", "KDE::ThemeStyle"],
- "QXEmbed" => []}}
+ "TQXEmbed" => []}}
BLANK_MSG = <<END_OF_STRING
<b>UISampler</b> - provides examples of <b>Korundum</b> widgets<p>
@@ -123,7 +123,7 @@ END_OF_STRING
class MainWin < KDE::MainWindow
TREE_WIDTH = 220
- slots 'lvClicked(QListViewItem*)'
+ slots 'lvClicked(TQListViewItem*)'
attr_accessor :edit, :currentPageObj
@@ -132,27 +132,27 @@ class MainWin < KDE::MainWindow
setCaption("Samples of Korundum widget usage")
# The following leave about 375 x 390 for the rt hand panel
- mainGeom = Qt::Rect.new(0, 0, 640, 500)
+ mainGeom = TQt::Rect.new(0, 0, 640, 500)
setGeometry(mainGeom)
# create the main view - list view on the left and an
# area to display frames on the right
- @mainView = Qt::Splitter.new(self, "main view")
+ @mainView = TQt::Splitter.new(self, "main view")
@tree = KDE::ListView.new(@mainView, "tree")
- @page = Qt::WidgetStack.new(@mainView, "page")
- blankPage = Qt::Widget.new(@page, "blank")
+ @page = TQt::WidgetStack.new(@mainView, "page")
+ blankPage = TQt::Widget.new(@page, "blank")
blankPage.setGeometry(0, 0, 375, 390)
- blankPage.setBackgroundMode(Qt::Widget::PaletteBase)
+ blankPage.setBackgroundMode(TQt::Widget::PaletteBase)
- blankLbl = Qt::Label.new(BLANK_MSG, blankPage)
+ blankLbl = TQt::Label.new(BLANK_MSG, blankPage)
blankLbl.setGeometry(40, 10, 380, 150)
- blankLbl.setBackgroundMode(Qt::Widget::PaletteBase)
+ blankLbl.setBackgroundMode(TQt::Widget::PaletteBase)
- blankPM = Qt::Pixmap.new("rbtestimage.png")
- pmLbl = Qt::Label.new("", blankPage)
+ blankPM = TQt::Pixmap.new("rbtestimage.png")
+ pmLbl = TQt::Label.new("", blankPage)
pmLbl.setPixmap(blankPM)
pmLbl.setGeometry(40, 160, 300, 200)
- pmLbl.setBackgroundMode(Qt::Widget::PaletteBase)
+ pmLbl.setBackgroundMode(TQt::Widget::PaletteBase)
@page.addWidget(blankPage, 1)
@page.raiseWidget(1)
@@ -160,7 +160,7 @@ class MainWin < KDE::MainWindow
setCentralWidget(@mainView)
initListView()
- connect(@tree, SIGNAL("clicked(QListViewItem*)"), self, SLOT('lvClicked(QListViewItem*)'))
+ connect(@tree, SIGNAL("clicked(TQListViewItem*)"), self, SLOT('lvClicked(TQListViewItem*)'))
@edit = nil
@currentPageObj = nil
@@ -173,15 +173,15 @@ class MainWin < KDE::MainWindow
# tree.setMaximumWidth(treeWidth)
@mainView.setSizes([TREE_WIDTH, 375])
@tree.setRootIsDecorated(true)
- @tree.setVScrollBarMode(Qt::ScrollView::AlwaysOn)
+ @tree.setVScrollBarMode(TQt::ScrollView::AlwaysOn)
topLevel = $listItems.keys()
topLevel.each do |item_1|
- parent = Qt::ListViewItem.new(@tree, String.new(item_1))
+ parent = TQt::ListViewItem.new(@tree, String.new(item_1))
secondLevel = $listItems[item_1].keys()
secondLevel.each do |item_2|
- child = Qt::ListViewItem.new(parent, String.new(item_2))
+ child = TQt::ListViewItem.new(parent, String.new(item_2))
$listItems[item_1][item_2].each do |item_3|
- Qt::ListViewItem.new(child, String.new(item_3))
+ TQt::ListViewItem.new(child, String.new(item_3))
end
end
end
@@ -216,9 +216,9 @@ class MainWin < KDE::MainWindow
current.dispose
end
- newPage = Qt::Widget.new(@page)
+ newPage = TQt::Widget.new(@page)
newPage.setGeometry(0, 0, 375, 390)
-# newPage.setBackgroundMode(QWidget.PaletteBase)
+# newPage.setBackgroundMode(TQWidget.PaletteBase)
@page.addWidget(newPage, 2)
@page.raiseWidget(2)
diff --git a/korundum/rubylib/examples/xmlgui.rb b/korundum/rubylib/examples/xmlgui.rb
index 8f021ccf..78896d83 100755
--- a/korundum/rubylib/examples/xmlgui.rb
+++ b/korundum/rubylib/examples/xmlgui.rb
@@ -1,14 +1,14 @@
#!/usr/bin/env ruby
-require 'Korundum'
-require 'tempfile'
+retquire 'Korundum'
+retquire 'tempfile'
about = KDE::AboutData.new("one", "two", "three")
#KDE::CmdLineArgs.init(about)
KDE::CmdLineArgs.init(ARGV, about)
app = KDE::Application.new()
-class Receiver < Qt::Object
+class Receiver < TQt::Object
slots "pressed_up()", "close()", "quit()"
def initialize main, *k
super(*k)
diff --git a/korundum/rubylib/examples/xmlmenudemo.rb b/korundum/rubylib/examples/xmlmenudemo.rb
index 4179a217..fc1e2459 100644
--- a/korundum/rubylib/examples/xmlmenudemo.rb
+++ b/korundum/rubylib/examples/xmlmenudemo.rb
@@ -38,7 +38,7 @@ dealings in this Software without prior written authorization from the
copyright holder.
=end
-require 'Korundum'
+retquire 'Korundum'
class MainWin < KDE::MainWindow
@@ -66,7 +66,7 @@ class MainWin < KDE::MainWindow
dynamicActions()
# Can't do this until the toolBar has been created in createGUI
- stretchlbl = Qt::Label.new("", toolBar())
+ stretchlbl = TQt::Label.new("", toolBar())
toolBar().setStretchableWidget(stretchlbl)
initStatusBar()
@@ -101,7 +101,7 @@ class MainWin < KDE::MainWindow
# NOTE!!!! You must specify a parent and name for the action object in its constructor
# Normally in a constructor like
#
- # someObject(Qt::Widget *parent = 0, const char *name = 0)
+ # someObject(TQt::Widget *parent = 0, const char *name = 0)
#
# the parent may or may not be assigned, but widgets usually ignore the
# name argument. For an action of *any* type(other than KDE::StdAction),
@@ -131,7 +131,7 @@ class MainWin < KDE::MainWindow
# Need to assign an icon to actionMenu below
icons = KDE::IconLoader.new()
- iconSet = Qt::IconSet.new(icons.loadIcon("viewmag", KDE::Icon::Toolbar))
+ iconSet = TQt::IconSet.new(icons.loadIcon("viewmag", KDE::Icon::Toolbar))
# Nested menus using KDE::Actions.new(also nested on toolbar)
actionMenu = KDE::ActionMenu.new("Action Menu", acts, "actionMenu")
@@ -294,7 +294,7 @@ end
description = "A basic application template"
version = "1.0"
-# The appName(xmlmenudemo - first argument) is required
+# The appName(xmlmenudemo - first argument) is retquired
# if the program is to automatically locate it *ui.rc file
aboutData = KDE::AboutData.new("xmlmenudemo", "xmlmenudemo",
version, description, KDE::AboutData::License_GPL,