diff options
Diffstat (limited to 'korundum/rubylib/examples')
-rwxr-xr-x | korundum/rubylib/examples/RubberDoc.rb | 82 | ||||
-rwxr-xr-x | korundum/rubylib/examples/dcop/dcopcall.rb | 2 | ||||
-rwxr-xr-x | korundum/rubylib/examples/dcop/dcoppredicate.rb | 2 | ||||
-rwxr-xr-x | korundum/rubylib/examples/dcop/dcopsend.rb | 2 | ||||
-rwxr-xr-x | korundum/rubylib/examples/dcop/dcopsignal.rb | 2 | ||||
-rw-r--r-- | korundum/rubylib/examples/kludgeror.rb | 30 | ||||
-rw-r--r-- | korundum/rubylib/examples/menudemo.rb | 36 | ||||
-rw-r--r-- | korundum/rubylib/examples/rbTDEHTMLPart.rb | 10 | ||||
-rw-r--r-- | korundum/rubylib/examples/uimodules/uidialogs.rb | 8 | ||||
-rw-r--r-- | korundum/rubylib/examples/uimodules/uimisc.rb | 8 | ||||
-rw-r--r-- | korundum/rubylib/examples/uimodules/uiwidgets.rb | 14 | ||||
-rw-r--r-- | korundum/rubylib/examples/uisampler.rb | 2 | ||||
-rw-r--r-- | korundum/rubylib/examples/uitdemdi.rb | 14 | ||||
-rwxr-xr-x | korundum/rubylib/examples/xmlgui.rb | 2 | ||||
-rw-r--r-- | korundum/rubylib/examples/xmlmenudemo.rb | 44 |
15 files changed, 129 insertions, 129 deletions
diff --git a/korundum/rubylib/examples/RubberDoc.rb b/korundum/rubylib/examples/RubberDoc.rb index 0c50320b..6adf0272 100755 --- a/korundum/rubylib/examples/RubberDoc.rb +++ b/korundum/rubylib/examples/RubberDoc.rb @@ -180,50 +180,50 @@ module MyGui @label = TQt::Label.new self - TQt::Object.connect @listbox, SIGNAL("clicked(TQListBoxItem*)"), - self, SLOT("clicked_result(TQListBoxItem*)") - TQt::Object.connect @viewed, SIGNAL("completed()"), - self, SLOT("tdehtml_part_init_complete()") + TQt::Object.connect @listbox, TQ_SIGNAL("clicked(TQListBoxItem*)"), + self, TQ_SLOT("clicked_result(TQListBoxItem*)") + TQt::Object.connect @viewed, TQ_SIGNAL("completed()"), + self, TQ_SLOT("tdehtml_part_init_complete()") - TQt::Object::connect @viewed, SIGNAL("setWindowCaption(const TQString&)"), + TQt::Object::connect @viewed, TQ_SIGNAL("setWindowCaption(const TQString&)"), @viewed.widget.topLevelWidget, - SLOT("setCaption(const TQString&)") + TQ_SLOT("setCaption(const TQString&)") TQt::Object::connect @viewed.browserExtension, - SIGNAL("openURLRequest(const KURL&, const KParts::URLArgs&)"), - self, SLOT("open_url(const KURL&)") + TQ_SIGNAL("openURLRequest(const KURL&, const KParts::URLArgs&)"), + self, TQ_SLOT("open_url(const KURL&)") KDE::Action.new "&Quit", "quit", KDE::Shortcut.new(), - self, SLOT("quit()"), @main.actionCollection, "file_quit" + self, TQ_SLOT("quit()"), @main.actionCollection, "file_quit" KDE::Action.new "&Index-All", KDE::Shortcut.new(), - self, SLOT("index_all()"), @main.actionCollection, "index_all" + self, TQ_SLOT("index_all()"), @main.actionCollection, "index_all" @back = \ KDE::Action.new "&Back", "back", KDE::Shortcut.new(TQt::ALT + TQt::Key_Left), - self, SLOT("go_back()"), @main.actionCollection, "back" + self, TQ_SLOT("go_back()"), @main.actionCollection, "back" @forward = \ KDE::Action.new "&Forward", "forward", KDE::Shortcut.new(TQt::ALT + TQt::Key_Right), - self, SLOT("go_forward()"), @main.actionCollection, "forward" + self, TQ_SLOT("go_forward()"), @main.actionCollection, "forward" KDE::Action.new "&Home", "gohome", KDE::Shortcut.new(TQt::Key_Home), - self, SLOT("go_home()"), @main.actionCollection, "home" + self, TQ_SLOT("go_home()"), @main.actionCollection, "home" KDE::Action.new "&Prev Match", "go-previous",KDE::Shortcut.new(TQt::CTRL + TQt::Key_P), - self, SLOT("goto_prev_match()"), @main.actionCollection, "prev_match" + self, TQ_SLOT("goto_prev_match()"), @main.actionCollection, "prev_match" KDE::Action.new "&Next Match", "go-next", KDE::Shortcut.new(TQt::CTRL + TQt::Key_N), - self, SLOT("goto_next_match()"), @main.actionCollection, "next_match" + self, TQ_SLOT("goto_next_match()"), @main.actionCollection, "next_match" KDE::Action.new "&Follow Match","go-down", KDE::Shortcut.new(TQt::Key_Return), - self, SLOT("goto_current_match_link()"), @main.actionCollection, "open_match" + self, TQ_SLOT("goto_current_match_link()"), @main.actionCollection, "open_match" KDE::Action.new "Search", "edit-find", KDE::Shortcut.new(TQt::Key_F6), - self, SLOT("focus_search()"), @main.actionCollection, "focus_search" + self, TQ_SLOT("focus_search()"), @main.actionCollection, "focus_search" KDE::Action.new "New Search", "edit-find", KDE::Shortcut.new(TQt::CTRL + TQt::Key_Slash), - self, SLOT("focus_and_clear_search()"), @main.actionCollection, "focus_and_clear_search" + self, TQ_SLOT("focus_and_clear_search()"), @main.actionCollection, "focus_and_clear_search" KDE::Action.new "&Create", "new", KDE::Shortcut.new(), - self, SLOT("project_create()"), @main.actionCollection, "project_create" + self, TQ_SLOT("project_create()"), @main.actionCollection, "project_create" KDE::Action.new "&Choose...", "select", KDE::Shortcut.new(), - self, SLOT("project_goto()"), @main.actionCollection, "project_goto" + self, TQ_SLOT("project_goto()"), @main.actionCollection, "project_goto" clearLocation = KDE::Action.new "Clear Location Bar", "locationbar_erase", KDE::Shortcut.new(), - self, SLOT("clear_location()"), @main.actionCollection, "clear_location" + self, TQ_SLOT("clear_location()"), @main.actionCollection, "clear_location" clearLocation.setWhatsThis "Clear Location bar<p>Clears the content of the location bar." @searchlabel = TQt::Label.new @main @@ -231,10 +231,10 @@ module MyGui @searchcombo = KDE::HistoryCombo.new @main focus_search - TQt::Object.connect @searchcombo, SIGNAL("returnPressed()"), - self, SLOT("goto_search()") - TQt::Object.connect @searchcombo, SIGNAL("textChanged(const TQString&)"), - self, SLOT("search(const TQString&)") + TQt::Object.connect @searchcombo, TQ_SIGNAL("returnPressed()"), + self, TQ_SLOT("goto_search()") + TQt::Object.connect @searchcombo, TQ_SIGNAL("textChanged(const TQString&)"), + self, TQ_SLOT("search(const TQString&)") KDE::WidgetAction.new @searchlabel, "Search: ", KDE::Shortcut.new(TQt::Key_F6), nil, nil, @main.actionCollection, "location_label" @searchlabel.setBuddy @searchcombo @@ -680,11 +680,11 @@ class ProjectEditDialog < TQt::Object @cb.setChecked true if enabled - TQt::Object.connect @dialog, SIGNAL("okClicked()"), - self, SLOT("slot_ok()") + TQt::Object.connect @dialog, TQ_SIGNAL("okClicked()"), + self, TQ_SLOT("slot_ok()") - TQt::Object.connect locselc, SIGNAL("clicked()"), - self, SLOT("select_file()") + TQt::Object.connect locselc, TQ_SIGNAL("clicked()"), + self, TQ_SLOT("select_file()") @title.setFocus @@ -746,17 +746,17 @@ class ProjectSelectDialog < TQt::Object button_del = TQt::PushButton.new "Delete", hbox button_edit = TQt::PushButton.new "Edit...", hbox - TQt::Object.connect button_new, SIGNAL("clicked()"), - self, SLOT("project_create_button()") + TQt::Object.connect button_new, TQ_SIGNAL("clicked()"), + self, TQ_SLOT("project_create_button()") - TQt::Object.connect button_del, SIGNAL("clicked()"), - self, SLOT("delete_selected_project()") + TQt::Object.connect button_del, TQ_SIGNAL("clicked()"), + self, TQ_SLOT("delete_selected_project()") - TQt::Object.connect button_edit, SIGNAL("clicked()"), - self, SLOT("edit_selected_project()") + TQt::Object.connect button_edit, TQ_SIGNAL("clicked()"), + self, TQ_SLOT("edit_selected_project()") - TQt::Object.connect @listbox, SIGNAL("doubleClicked(TQListBoxItem *)"), - self, SLOT("project_selected()") + TQt::Object.connect @listbox, TQ_SIGNAL("doubleClicked(TQListBoxItem *)"), + self, TQ_SLOT("project_selected()") @dialog.setMainWidget vbox end @@ -915,8 +915,8 @@ class RubberDoc < TQt::VBox gui_init_proportions @timer = TQt::Timer.new self - TQt::Object.connect @timer, SIGNAL("timeout()"), - self, SLOT("update_highlight()") + TQt::Object.connect @timer, TQ_SIGNAL("timeout()"), + self, TQ_SLOT("update_highlight()") @viewed.openURL KDE::URL.new("about:blank") @@ -934,8 +934,8 @@ class RubberDoc < TQt::VBox end def tdehtml_part_init_complete - TQt::Object.disconnect @viewed, SIGNAL("completed()"), - self, SLOT("tdehtml_part_init_complete()") if @init_connected + TQt::Object.disconnect @viewed, TQ_SIGNAL("completed()"), + self, TQ_SLOT("tdehtml_part_init_complete()") if @init_connected @pref = File.dirname first_url.url.gsub("file:","") diff --git a/korundum/rubylib/examples/dcop/dcopcall.rb b/korundum/rubylib/examples/dcop/dcopcall.rb index cba7ff09..58add5ae 100755 --- a/korundum/rubylib/examples/dcop/dcopcall.rb +++ b/korundum/rubylib/examples/dcop/dcopcall.rb @@ -6,7 +6,7 @@ include KDE class SenderWidget < PushButton def initialize(parent, name) super - connect(self, SIGNAL('clicked()'), self, SLOT('doit()')) + connect(self, TQ_SIGNAL('clicked()'), self, TQ_SLOT('doit()')) end slots 'doit()' diff --git a/korundum/rubylib/examples/dcop/dcoppredicate.rb b/korundum/rubylib/examples/dcop/dcoppredicate.rb index 82a9c8b4..c4cb2c41 100755 --- a/korundum/rubylib/examples/dcop/dcoppredicate.rb +++ b/korundum/rubylib/examples/dcop/dcoppredicate.rb @@ -6,7 +6,7 @@ include KDE class SenderWidget < PushButton def initialize(parent, name) super - connect(self, SIGNAL('clicked()'), self, SLOT('doit()')) + connect(self, TQ_SIGNAL('clicked()'), self, TQ_SLOT('doit()')) end slots 'doit()' diff --git a/korundum/rubylib/examples/dcop/dcopsend.rb b/korundum/rubylib/examples/dcop/dcopsend.rb index e8a69e00..66530797 100755 --- a/korundum/rubylib/examples/dcop/dcopsend.rb +++ b/korundum/rubylib/examples/dcop/dcopsend.rb @@ -5,7 +5,7 @@ require 'Korundum' class SenderWidget < KDE::PushButton def initialize(parent, name) super - TQt::Object::connect(self, SIGNAL('clicked()'), self, SLOT('doit()')) + TQt::Object::connect(self, TQ_SIGNAL('clicked()'), self, TQ_SLOT('doit()')) end slots 'doit()' diff --git a/korundum/rubylib/examples/dcop/dcopsignal.rb b/korundum/rubylib/examples/dcop/dcopsignal.rb index 4e83d7f4..4d61e917 100755 --- a/korundum/rubylib/examples/dcop/dcopsignal.rb +++ b/korundum/rubylib/examples/dcop/dcopsignal.rb @@ -7,7 +7,7 @@ class SenderWidget < KDE::PushButton def initialize(parent, name) super - TQt::Object::connect(self, SIGNAL('clicked()'), self, SLOT('doit()')) + TQt::Object::connect(self, TQ_SIGNAL('clicked()'), self, TQ_SLOT('doit()')) end slots 'doit()' diff --git a/korundum/rubylib/examples/kludgeror.rb b/korundum/rubylib/examples/kludgeror.rb index 156b2c53..f44d6c3c 100644 --- a/korundum/rubylib/examples/kludgeror.rb +++ b/korundum/rubylib/examples/kludgeror.rb @@ -73,8 +73,8 @@ 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 -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? +TQt::Object::connect doc.browserExtension, TQ_SIGNAL("openURLRequest(const KURL&, const KParts::URLArgs&)"), + ph, TQ_SLOT("openURL(const KURL&)") # BUG this slot must be screwing up wrt marshalling? ph.openURL url toplevel.setCentralWidget doc.widget @@ -103,26 +103,26 @@ begin d.documentElement.appendChild locBar end -a1 = KDE::Action.new( "Reload", "reload", KDE::Shortcut.new(TQt::Key_F5), ph, SLOT("reload()"), doc.actionCollection, "reload" ) -a2 = KDE::Action.new( "Exit", "system-log-out", KDE::Shortcut.new(0), a, SLOT("quit()"), doc.actionCollection, "exit" ) +a1 = KDE::Action.new( "Reload", "reload", KDE::Shortcut.new(TQt::Key_F5), ph, TQ_SLOT("reload()"), doc.actionCollection, "reload" ) +a2 = KDE::Action.new( "Exit", "system-log-out", KDE::Shortcut.new(0), a, TQ_SLOT("quit()"), doc.actionCollection, "exit" ) 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 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.insertButton "back", BACK_B, TQ_SIGNAL("clicked()"), + ph, TQ_SLOT("back()"), true, "Go back" +locBar.insertLined url.url, LOC_ED, TQ_SIGNAL("returnPressed(const TQString&)"), ph, TQ_SLOT("goToURL(const TQString&)"), true, "Location" +locBar.insertButton "locationbar_erase", ERASE_B, TQ_SIGNAL("clicked()"), + locBar.getLined(LOC_ED), TQ_SLOT("clear()"), true, "Erase the location bar's content", 2 locBar.setItemAutoSized LOC_ED, true locBar.getLined(LOC_ED).createPopupMenu comp = locBar.getLined(LOC_ED).completionObject comp.setCompletionMode KDE::GlobalSettings::CompletionPopupAuto -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&)")) +TQt::Object::connect(locBar.getLined(LOC_ED), TQ_SIGNAL("returnPressed(const TQString&)"), + comp, TQ_SLOT("addItem(const TQString&)")) +TQt::Object::connect(ph, TQ_SIGNAL("setLocBarText(const TQString&)"), # BUG - once again... + locBar.getLined(LOC_ED), TQ_SLOT("setText(const TQString&)")) doc.setJScriptEnabled true doc.setJavaEnabled true @@ -131,8 +131,8 @@ doc.setURLCursor TQt::Cursor.new(TQt::PointingHandCursor) a.setTopWidget doc.widget -TQt::Object::connect doc, SIGNAL("setWindowCaption(const TQString&)"), - doc.widget.topLevelWidget, SLOT("setCaption(const TQString&)") +TQt::Object::connect doc, TQ_SIGNAL("setWindowCaption(const TQString&)"), + doc.widget.topLevelWidget, TQ_SLOT("setCaption(const TQString&)") toplevel.show a.exec diff --git a/korundum/rubylib/examples/menudemo.rb b/korundum/rubylib/examples/menudemo.rb index 0ff27ac8..5fe405d3 100644 --- a/korundum/rubylib/examples/menudemo.rb +++ b/korundum/rubylib/examples/menudemo.rb @@ -65,29 +65,29 @@ class MainWin < MainWindow def initActions() # "File" menu items - @newAction = StdAction.openNew(self, SLOT('slotNew()'), actionCollection()) - @openAction = StdAction.open(self, SLOT('slotOpen()'), actionCollection()) - @saveAction = StdAction.save(self, SLOT('slotSave()'), actionCollection()) - @saveAsAction = StdAction.saveAs(self, SLOT('slotSaveAs()'), actionCollection()) - @printAction = StdAction.print(self, SLOT('slotPrint()'), actionCollection()) - @quitAction = StdAction.quit(self, SLOT('slotQuit()'), actionCollection()) + @newAction = StdAction.openNew(self, TQ_SLOT('slotNew()'), actionCollection()) + @openAction = StdAction.open(self, TQ_SLOT('slotOpen()'), actionCollection()) + @saveAction = StdAction.save(self, TQ_SLOT('slotSave()'), actionCollection()) + @saveAsAction = StdAction.saveAs(self, TQ_SLOT('slotSaveAs()'), actionCollection()) + @printAction = StdAction.print(self, TQ_SLOT('slotPrint()'), actionCollection()) + @quitAction = StdAction.quit(self, TQ_SLOT('slotQuit()'), actionCollection()) # "Edit" menu items - @undoAction = StdAction.undo(self, SLOT('slotUndo()'), actionCollection()) - @redoAction = StdAction.redo(self, SLOT('slotRedo()'), actionCollection()) - @cutAction = StdAction.cut(self, SLOT('slotCut()'), actionCollection()) - @copyAction = StdAction.copy(self, SLOT('slotCopy()'), actionCollection()) - @pasteAction = StdAction.paste(self, SLOT('slotPaste()'), actionCollection()) - @findAction = StdAction.find(self, SLOT('slotFind()'), actionCollection()) - @findNextAction = StdAction.findNext(self, SLOT('slotFindNext()'), actionCollection()) - @replaceAction = StdAction.replace(self, SLOT('slotReplace()'), actionCollection()) - @specialAction = Action.new(i18n("Special"), Shortcut.new(), self, SLOT('slotSpecial()'), actionCollection(), "special") + @undoAction = StdAction.undo(self, TQ_SLOT('slotUndo()'), actionCollection()) + @redoAction = StdAction.redo(self, TQ_SLOT('slotRedo()'), actionCollection()) + @cutAction = StdAction.cut(self, TQ_SLOT('slotCut()'), actionCollection()) + @copyAction = StdAction.copy(self, TQ_SLOT('slotCopy()'), actionCollection()) + @pasteAction = StdAction.paste(self, TQ_SLOT('slotPaste()'), actionCollection()) + @findAction = StdAction.find(self, TQ_SLOT('slotFind()'), actionCollection()) + @findNextAction = StdAction.findNext(self, TQ_SLOT('slotFindNext()'), actionCollection()) + @replaceAction = StdAction.replace(self, TQ_SLOT('slotReplace()'), actionCollection()) + @specialAction = Action.new(i18n("Special"), Shortcut.new(), self, TQ_SLOT('slotSpecial()'), actionCollection(), "special") # Demo menu items # TDEToggleAction has an isChecked member and emits the "toggle" signal @toggle1Action = ToggleAction.new("Toggle 1") - @toggle2Action = ToggleAction.new("Toggle 2", Shortcut.new(), self, SLOT('slotToggle2()'), nil) + @toggle2Action = ToggleAction.new("Toggle 2", Shortcut.new(), self, TQ_SLOT('slotToggle2()'), nil) # A separator - create once/use everywhere @separateAction = ActionSeparator.new() @@ -103,8 +103,8 @@ class MainWin < MainWindow # Nested menus using TDEActions (also nested on toolbar) @actionMenu = ActionMenu.new("Action Menu") @actionMenu.setIconSet(iconSet) - @actionMenu.insert(StdAction.zoomIn(self, SLOT('slotZoomIn()'), actionCollection())) - @actionMenu.insert(StdAction.zoomOut(self, SLOT('slotZoomOut()'), actionCollection())) + @actionMenu.insert(StdAction.zoomIn(self, TQ_SLOT('slotZoomIn()'), actionCollection())) + @actionMenu.insert(StdAction.zoomOut(self, TQ_SLOT('slotZoomOut()'), actionCollection())) # Doesn't work in KDE 2.1.1 # radio1Action = TDERadioAction ("Radio 1") diff --git a/korundum/rubylib/examples/rbTDEHTMLPart.rb b/korundum/rubylib/examples/rbTDEHTMLPart.rb index 27eb4a70..aafc160e 100644 --- a/korundum/rubylib/examples/rbTDEHTMLPart.rb +++ b/korundum/rubylib/examples/rbTDEHTMLPart.rb @@ -67,14 +67,14 @@ class RbPartsMW < KParts::MainWindow # some of this and later stuff (like self.actionCollection () ) # comes from - quitAction = KDE::StdAction.quit(self, SLOT('close()'), actionCollection()) + quitAction = KDE::StdAction.quit(self, TQ_SLOT('close()'), actionCollection()) createStandardStatusBarAction() -# @m_toolbarAction = KDE::StdAction.showToolbar(self, SLOT('optionsShowToolbar()'), actionCollection()) - @m_statusbarAction = KDE::StdAction.showStatusbar(self, SLOT('optionsShowStatusbar()'), actionCollection()) +# @m_toolbarAction = KDE::StdAction.showToolbar(self, TQ_SLOT('optionsShowToolbar()'), actionCollection()) + @m_statusbarAction = KDE::StdAction.showStatusbar(self, TQ_SLOT('optionsShowStatusbar()'), actionCollection()) - KDE::StdAction.keyBindings(self, SLOT('optionsConfigureKeys()'), actionCollection()) - KDE::StdAction.configureToolbars(self, SLOT('optionsConfigureToolbars()'), actionCollection()) + KDE::StdAction.keyBindings(self, TQ_SLOT('optionsConfigureKeys()'), actionCollection()) + KDE::StdAction.configureToolbars(self, TQ_SLOT('optionsConfigureToolbars()'), actionCollection()) path = Dir.getwd() + '/' setGeometry(0, 0, 600, 500) diff --git a/korundum/rubylib/examples/uimodules/uidialogs.rb b/korundum/rubylib/examples/uimodules/uidialogs.rb index 8efed493..f4a9f353 100644 --- a/korundum/rubylib/examples/uimodules/uidialogs.rb +++ b/korundum/rubylib/examples/uimodules/uidialogs.rb @@ -39,9 +39,9 @@ class CustomDlg < KDE::Dialog okBtn.setGeometry(x, y, 40, 22) canBtn.setGeometry(x + 50, y, 40, 22) - connect(dlgBtn, SIGNAL("clicked()"), SLOT('dlgClicked()')) - connect(okBtn, SIGNAL("clicked()"), SLOT('okClicked()')) - connect(canBtn, SIGNAL("clicked()"), SLOT('cancelClicked()')) + connect(dlgBtn, TQ_SIGNAL("clicked()"), TQ_SLOT('dlgClicked()')) + connect(okBtn, TQ_SIGNAL("clicked()"), TQ_SLOT('okClicked()')) + connect(canBtn, TQ_SIGNAL("clicked()"), TQ_SLOT('cancelClicked()')) end def dlgClicked() @@ -93,7 +93,7 @@ class MessageDlg < KDE::Dialog grp.setGeometry(10, 10, 200, 30*n) (0...n).each { |i| TQt::RadioButton.new(buttons[i], grp) } - connect(grp, SIGNAL("clicked(int)"), SLOT('launch(int)')) + connect(grp, TQ_SIGNAL("clicked(int)"), TQ_SLOT('launch(int)')) end def launch(which) diff --git a/korundum/rubylib/examples/uimodules/uimisc.rb b/korundum/rubylib/examples/uimodules/uimisc.rb index be186409..51b85bd4 100644 --- a/korundum/rubylib/examples/uimodules/uimisc.rb +++ b/korundum/rubylib/examples/uimodules/uimisc.rb @@ -26,7 +26,7 @@ class Page3 < TQt::Object @iv = KDE::LineEdit.new(page) @iv.setGeometry(x, y + 20, 100, 20) @iv.show() - connect(@iv, SIGNAL("textChanged(const TQString&)"), SLOT('ivChanged()')) + connect(@iv, TQ_SIGNAL("textChanged(const TQString&)"), TQ_SLOT('ivChanged()')) @ivVal = KDE::IntValidator.new(page) @ivVal.setRange(20, 50) @@ -63,7 +63,7 @@ class Page3 < TQt::Object @fv = KDE::LineEdit.new(page) @fv.setGeometry(x, y + 20, 100, 20) @fv.show() - connect(@fv, SIGNAL("textChanged(const TQString&)"), SLOT('fvChanged()')) + connect(@fv, TQ_SIGNAL("textChanged(const TQString&)"), TQ_SLOT('fvChanged()')) @fvVal = KDE::DoubleValidator.new(page) @fvVal.setRange(10.0, 40.0) @@ -100,7 +100,7 @@ class Page3 < TQt::Object @dv = KDE::LineEdit.new(page) @dv.setGeometry(x, y + 20, 100, 20) @dv.show() -# connect(dv, SIGNAL("textChanged(const TQString&)"), SLOT('dvChanged()')) +# connect(dv, TQ_SIGNAL("textChanged(const TQString&)"), TQ_SLOT('dvChanged()')) @dvVal = KDE::DateValidator.new(page) # dvVal.setRange(10.0, 40.0) @@ -112,7 +112,7 @@ class Page3 < TQt::Object dvBtn = TQt::PushButton.new("Validate", page) dvBtn.setGeometry(x, y + 45, 60, 22) dvBtn.show() - connect(dvBtn, SIGNAL("clicked()"), SLOT('dvChanged()')) + connect(dvBtn, TQ_SIGNAL("clicked()"), TQ_SLOT('dvChanged()')) dvNoteLbl = TQt::Label.new("Format is locale dependent\nShort date only\nTry DD-MM-YY", page) dvNoteLbl.setGeometry(x, y + 70, 150, 60) diff --git a/korundum/rubylib/examples/uimodules/uiwidgets.rb b/korundum/rubylib/examples/uimodules/uiwidgets.rb index 71a865a5..4e0bcdb3 100644 --- a/korundum/rubylib/examples/uimodules/uiwidgets.rb +++ b/korundum/rubylib/examples/uimodules/uiwidgets.rb @@ -41,9 +41,9 @@ class Page1 < TQt::Object replaceBtn.setGeometry(x + 90, y, 60, 22) gotoBtn.setGeometry(x + 180, y, 60, 22) -# page.connect(searchBtn, SIGNAL("clicked()"), parent.edit, SLOT('search()')) -# page.connect(replaceBtn, SIGNAL("clicked()"), parent.edit, SLOT('replace()')) -# page.connect(gotoBtn, SIGNAL("clicked()"), parent.edit, SLOT('doGotoLine()')) +# page.connect(searchBtn, TQ_SIGNAL("clicked()"), parent.edit, TQ_SLOT('search()')) +# page.connect(replaceBtn, TQ_SIGNAL("clicked()"), parent.edit, TQ_SLOT('replace()')) +# page.connect(gotoBtn, TQ_SIGNAL("clicked()"), parent.edit, TQ_SLOT('doGotoLine()')) searchBtn.show() replaceBtn.show() @@ -105,7 +105,7 @@ class Page1 < TQt::Object (0...n).each { |i| TQt::RadioButton.new(buttons[i], grp) } - connect(grp, SIGNAL("clicked(int)"), SLOT('restrict(int)')) + connect(grp, TQ_SIGNAL("clicked(int)"), TQ_SLOT('restrict(int)')) grp.find(0).setChecked(true) restrict(0) @@ -469,7 +469,7 @@ class Page6 < TQt::Object toggle.setGeometry(150, 400, 60, 22) toggle.show() - connect(toggle, SIGNAL("clicked()"), SLOT('toggleClicked()')) + connect(toggle, TQ_SIGNAL("clicked()"), TQ_SLOT('toggleClicked()')) page.show() end @@ -545,7 +545,7 @@ class Page7 < TQt::Object page.show() @timer = TQt::Timer.new(page) - connect(@timer, SIGNAL('timeout()'), SLOT('add1()')) + connect(@timer, TQ_SIGNAL('timeout()'), TQ_SLOT('add1()')) @timer.start(100) add1() @@ -637,7 +637,7 @@ class CSDlg < KDE::Dialog closeBtn.setGeometry( 610, 280, 60, 22) closeBtn.show() - connect(closeBtn, SIGNAL("clicked()"), SLOT('closeClicked()')) + connect(closeBtn, TQ_SIGNAL("clicked()"), TQ_SLOT('closeClicked()')) end def closeClicked() diff --git a/korundum/rubylib/examples/uisampler.rb b/korundum/rubylib/examples/uisampler.rb index b24b59aa..bed43c44 100644 --- a/korundum/rubylib/examples/uisampler.rb +++ b/korundum/rubylib/examples/uisampler.rb @@ -160,7 +160,7 @@ class MainWin < KDE::MainWindow setCentralWidget(@mainView) initListView() - connect(@tree, SIGNAL("clicked(TQListViewItem*)"), self, SLOT('lvClicked(TQListViewItem*)')) + connect(@tree, TQ_SIGNAL("clicked(TQListViewItem*)"), self, TQ_SLOT('lvClicked(TQListViewItem*)')) @edit = nil @currentPageObj = nil diff --git a/korundum/rubylib/examples/uitdemdi.rb b/korundum/rubylib/examples/uitdemdi.rb index 3b67b9e1..fe5655c6 100644 --- a/korundum/rubylib/examples/uitdemdi.rb +++ b/korundum/rubylib/examples/uitdemdi.rb @@ -54,9 +54,9 @@ class KmdiExample < KDE::MdiMainFrm @viewIcons = ['network', 'email', 'stop', 'back', 'forward'] @toolIcons = ['view_icon', 'configure'] - openNewAction = StdAction.openNew(self, SLOT('newView()'), actionCollection()) - quitAction = StdAction.quit(self, SLOT('close()'), actionCollection()) - closeAction = StdAction.close(self, SLOT('closeActiveChild()'), actionCollection()) + openNewAction = StdAction.openNew(self, TQ_SLOT('newView()'), actionCollection()) + quitAction = StdAction.quit(self, TQ_SLOT('close()'), actionCollection()) + closeAction = StdAction.close(self, TQ_SLOT('closeActiveChild()'), actionCollection()) uifilebase = Dir.getwd + '/uitdemdi.rc' createGUI(uifilebase) @@ -82,9 +82,9 @@ class KmdiExample < KDE::MdiMainFrm makeView("View #{idx.to_s}", ico, ico) end - connect(self, SIGNAL('viewActivated(KMdiChildView*)'), self, SLOT('activatedMessage(KMdiChildView*)')) - connect(self, SIGNAL('viewActivated(KMdiChildView*)'), self, SLOT('syncFromChildView(KMdiChildView*)')) - connect(@maintool, SIGNAL('selectionChanged(TQListBoxItem*)'), self, SLOT('syncFromMainTool(TQListBoxItem*)')) + connect(self, TQ_SIGNAL('viewActivated(KMdiChildView*)'), self, TQ_SLOT('activatedMessage(KMdiChildView*)')) + connect(self, TQ_SIGNAL('viewActivated(KMdiChildView*)'), self, TQ_SLOT('syncFromChildView(KMdiChildView*)')) + connect(@maintool, TQ_SIGNAL('selectionChanged(TQListBoxItem*)'), self, TQ_SLOT('syncFromMainTool(TQListBoxItem*)')) syncFromChildView(activeWindow()) end @@ -128,7 +128,7 @@ class KmdiExample < KDE::MdiMainFrm pxm.setPixmap(getIcon(icon, Icon::NoGroup, KDE::Icon::SizeLarge)) addWindow(view) @mainToolWidget.insertItem(label) - connect(view, SIGNAL('childWindowCloseRequest(KMdiChildView*)'), self, SLOT('closeChild(KMdiChildView*)')) + connect(view, TQ_SIGNAL('childWindowCloseRequest(KMdiChildView*)'), self, TQ_SLOT('closeChild(KMdiChildView*)')) end def removeMainToolItem(view) diff --git a/korundum/rubylib/examples/xmlgui.rb b/korundum/rubylib/examples/xmlgui.rb index 84acbdde..ce5ca418 100755 --- a/korundum/rubylib/examples/xmlgui.rb +++ b/korundum/rubylib/examples/xmlgui.rb @@ -34,7 +34,7 @@ begin m = KDE::MainWindow.new @r = Receiver.new m mActionCollection = m.actionCollection - action = std_actions[:quit].create @r, SLOT("quit()"), mActionCollection + action = std_actions[:quit].create @r, TQ_SLOT("quit()"), mActionCollection m.createGUI Dir.pwd + "/xmlgui.rc" app.setMainWidget(m) m.show diff --git a/korundum/rubylib/examples/xmlmenudemo.rb b/korundum/rubylib/examples/xmlmenudemo.rb index 8d9d5c94..e619a1c6 100644 --- a/korundum/rubylib/examples/xmlmenudemo.rb +++ b/korundum/rubylib/examples/xmlmenudemo.rb @@ -81,22 +81,22 @@ class MainWin < KDE::MainWindow acts = actionCollection() # "File" menu items - newAction = KDE::StdAction.openNew(self, SLOT('slotNew()'), acts) - openAction = KDE::StdAction.open(self, SLOT('slotOpen()'), acts) - @saveAction = KDE::StdAction.save(self, SLOT('slotSave()'), acts) - @saveAsAction = KDE::StdAction.saveAs(self, SLOT('slotSaveAs()'), acts) - printAction = KDE::StdAction.print(self, SLOT('slotPrint()'), acts) - quitAction = KDE::StdAction.quit(self, SLOT('slotQuit()'), acts) + newAction = KDE::StdAction.openNew(self, TQ_SLOT('slotNew()'), acts) + openAction = KDE::StdAction.open(self, TQ_SLOT('slotOpen()'), acts) + @saveAction = KDE::StdAction.save(self, TQ_SLOT('slotSave()'), acts) + @saveAsAction = KDE::StdAction.saveAs(self, TQ_SLOT('slotSaveAs()'), acts) + printAction = KDE::StdAction.print(self, TQ_SLOT('slotPrint()'), acts) + quitAction = KDE::StdAction.quit(self, TQ_SLOT('slotQuit()'), acts) # "Edit" menu items - undoAction = KDE::StdAction.undo(self, SLOT('slotUndo()'), acts) - redoAction = KDE::StdAction.redo(self, SLOT('slotRedo()'), acts) - cutAction = KDE::StdAction.cut(self, SLOT('slotCut()'), acts) - copyAction = KDE::StdAction.copy(self, SLOT('slotCopy()'), acts) - pasteAction = KDE::StdAction.paste(self, SLOT('slotPaste()'), acts) - findAction = KDE::StdAction.find(self, SLOT('slotFind()'), acts) - findNextAction = KDE::StdAction.findNext(self, SLOT('slotFindNext()'), acts) - replaceAction = KDE::StdAction.replace(self, SLOT('slotReplace()'), acts) + undoAction = KDE::StdAction.undo(self, TQ_SLOT('slotUndo()'), acts) + redoAction = KDE::StdAction.redo(self, TQ_SLOT('slotRedo()'), acts) + cutAction = KDE::StdAction.cut(self, TQ_SLOT('slotCut()'), acts) + copyAction = KDE::StdAction.copy(self, TQ_SLOT('slotCopy()'), acts) + pasteAction = KDE::StdAction.paste(self, TQ_SLOT('slotPaste()'), acts) + findAction = KDE::StdAction.find(self, TQ_SLOT('slotFind()'), acts) + findNextAction = KDE::StdAction.findNext(self, TQ_SLOT('slotFindNext()'), acts) + replaceAction = KDE::StdAction.replace(self, TQ_SLOT('slotReplace()'), acts) # NOTE!!!! You must specify a parent and name for the action object in its constructor # Normally in a constructor like @@ -111,13 +111,13 @@ class MainWin < KDE::MainWindow # object names - the variable the object is assigned to('specialAction') # has no meaning in XNLGUI terms except through the objects 'name' member value - specialAction = KDE::Action.new(i18n("Special"), KDE::Shortcut.new(0), self, SLOT('slotSpecial()'), acts, "specialActionName") + specialAction = KDE::Action.new(i18n("Special"), KDE::Shortcut.new(0), self, TQ_SLOT('slotSpecial()'), acts, "specialActionName") # Demo menu items # KDE::ToggleAction has an isChecked member and emits the "toggle" signal toggle1Action = KDE::ToggleAction.new("Toggle 1", KDE::Shortcut.new(0), acts, "toggle1Action") - toggle2Action = KDE::ToggleAction.new("Toggle 2", KDE::Shortcut.new(0), self, SLOT('slotToggle2()'), acts, "toggle2Action") + toggle2Action = KDE::ToggleAction.new("Toggle 2", KDE::Shortcut.new(0), self, TQ_SLOT('slotToggle2()'), acts, "toggle2Action") # A separator - create once/use everywhere separateAction = KDE::ActionSeparator.new(acts, "separateAction") @@ -146,15 +146,15 @@ class MainWin < KDE::MainWindow # separators). Creating the KDE::StdActions alone is sufficient - you # could delete their references from the *ui.rc file and the menu # items would still be created via ui_standards.rc - actionMenu.insert(KDE::StdAction.zoomIn(self, SLOT('slotZoomIn()'), acts)) - actionMenu.insert(KDE::StdAction.zoomOut(self, SLOT('slotZoomOut()'), acts)) + actionMenu.insert(KDE::StdAction.zoomIn(self, TQ_SLOT('slotZoomIn()'), acts)) + actionMenu.insert(KDE::StdAction.zoomOut(self, TQ_SLOT('slotZoomOut()'), acts)) - radio1Action = KDE::RadioAction.new("Radio 1", KDE::Shortcut.new(0), self, SLOT('slotRadio()'), acts, "radio1") + radio1Action = KDE::RadioAction.new("Radio 1", KDE::Shortcut.new(0), self, TQ_SLOT('slotRadio()'), acts, "radio1") radio1Action.setExclusiveGroup("Radio") radio1Action.setChecked(true) - radio2Action = KDE::RadioAction.new("Radio 2", KDE::Shortcut.new(0), self, SLOT('slotRadio()'), acts, "radio2") + radio2Action = KDE::RadioAction.new("Radio 2", KDE::Shortcut.new(0), self, TQ_SLOT('slotRadio()'), acts, "radio2") radio2Action.setExclusiveGroup("Radio") - radio3Action = KDE::RadioAction.new("Radio 3", KDE::Shortcut.new(0), self, SLOT('slotRadio()'), acts, "radio3") + radio3Action = KDE::RadioAction.new("Radio 3", KDE::Shortcut.new(0), self, TQ_SLOT('slotRadio()'), acts, "radio3") radio3Action.setExclusiveGroup("Radio") end @@ -184,7 +184,7 @@ class MainWin < KDE::MainWindow # in this case only (0...fakeFiles.length).each do |i| act = KDE::Action.new(i18n(" &#{i.to_s} #{fakeFiles[i]}"), KDE::Shortcut.new(0), - self, SLOT('slotFake()'), nil, fakeFiles[i].sub(/.sip$/,'') + "open") + self, TQ_SLOT('slotFake()'), nil, fakeFiles[i].sub(/.sip$/,'') + "open") dynamicActionsList << act end |