summaryrefslogtreecommitdiffstats
path: root/korundum/rubylib/examples/uimodules
diff options
context:
space:
mode:
Diffstat (limited to 'korundum/rubylib/examples/uimodules')
-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
5 files changed, 154 insertions, 154 deletions
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()