diff options
Diffstat (limited to 'languages/ruby')
-rw-r--r-- | languages/ruby/app_templates/kapp/app.rb | 6 | ||||
-rw-r--r-- | languages/ruby/app_templates/kapp/appview.rb | 4 | ||||
-rw-r--r-- | languages/ruby/app_templates/kapp/pref.rb | 12 | ||||
-rwxr-xr-x | languages/ruby/app_templates/qtruby/app.rb | 4 | ||||
-rw-r--r-- | languages/ruby/app_templates/qtrubyapp/main.rb | 2 | ||||
-rw-r--r-- | languages/ruby/app_templates/qtrubyapp/qtrubyapp.rb | 86 | ||||
-rw-r--r-- | languages/ruby/debugger/dbgpsdlg.cpp | 2 | ||||
-rw-r--r-- | languages/ruby/debugger/dbgtoolbar.cpp | 6 | ||||
-rw-r--r-- | languages/ruby/debugger/debuggee.rb | 2 | ||||
-rw-r--r-- | languages/ruby/debugger/rdbbreakpointwidget.cpp | 2 |
10 files changed, 63 insertions, 63 deletions
diff --git a/languages/ruby/app_templates/kapp/app.rb b/languages/ruby/app_templates/kapp/app.rb index 37a00d8b..af807fe9 100644 --- a/languages/ruby/app_templates/kapp/app.rb +++ b/languages/ruby/app_templates/kapp/app.rb @@ -181,13 +181,13 @@ class %{APPNAMESC} < KDE::MainWindow if @printer.nil? then @printer = KDE::Printer.new end if @printer.setup(self) # setup the printer. with Qt, you always "print" to a - # Qt::Painter.. whether the output medium is a pixmap, a screen, + # TQt::Painter.. whether the output medium is a pixmap, a screen, # or paper - p = Qt::Painter.new + p = TQt::Painter.new p.begin(@printer) # we let our view do the actual printing - metrics = Qt::PaintDeviceMetrics.new(@printer) + metrics = TQt::PaintDeviceMetrics.new(@printer) @view.print(p, metrics.height(), metrics.width()) # and send the result to the printer diff --git a/languages/ruby/app_templates/kapp/appview.rb b/languages/ruby/app_templates/kapp/appview.rb index e75ca6bc..3fed1ce1 100644 --- a/languages/ruby/app_templates/kapp/appview.rb +++ b/languages/ruby/app_templates/kapp/appview.rb @@ -10,7 +10,7 @@ @author %{AUTHOR} <%{EMAIL}> @version %{VERSION} =end -class %{APPNAMESC}View < Qt::Widget +class %{APPNAMESC}View < TQt::Widget # # Use this signal to change the content of the statusbar @@ -32,7 +32,7 @@ class %{APPNAMESC}View < Qt::Widget @dcop = %{APPNAMESC}Iface.new(self) # setup our layout manager to automatically add our widgets - top_layout = Qt::HBoxLayout.new(self) + top_layout = TQt::HBoxLayout.new(self) top_layout.setAutoAdd(true) # we want to look for all components that satisfy our needs. the diff --git a/languages/ruby/app_templates/kapp/pref.rb b/languages/ruby/app_templates/kapp/pref.rb index 98669ad2..cf8339e9 100644 --- a/languages/ruby/app_templates/kapp/pref.rb +++ b/languages/ruby/app_templates/kapp/pref.rb @@ -15,24 +15,24 @@ class %{APPNAMESC}Preferences < KDE::DialogBase end end -class %{APPNAMESC}PrefPageOne < Qt::Frame +class %{APPNAMESC}PrefPageOne < TQt::Frame def initialize(parent) super(parent) - layout = Qt::HBoxLayout.new(self) + layout = TQt::HBoxLayout.new(self) layout.setAutoAdd(true) - Qt::Label.new(i18n("Add something here"), self) + TQt::Label.new(i18n("Add something here"), self) end end -class %{APPNAMESC}PrefPageTwo < Qt::Frame +class %{APPNAMESC}PrefPageTwo < TQt::Frame def initialize(parent) super(parent) - layout = Qt::HBoxLayout.new(self) + layout = TQt::HBoxLayout.new(self) layout.setAutoAdd(true) - Qt::Label.new(i18n("Add something here"), self) + TQt::Label.new(i18n("Add something here"), self) end end diff --git a/languages/ruby/app_templates/qtruby/app.rb b/languages/ruby/app_templates/qtruby/app.rb index da817328..68156edd 100755 --- a/languages/ruby/app_templates/qtruby/app.rb +++ b/languages/ruby/app_templates/qtruby/app.rb @@ -2,8 +2,8 @@ require 'Qt' -app = Qt::Application.new(ARGV) -widget = Qt::Widget.new +app = TQt::Application.new(ARGV) +widget = TQt::Widget.new widget.setGeometry(50, 500, 400, 400) widget.caption = "Hello World!" diff --git a/languages/ruby/app_templates/qtrubyapp/main.rb b/languages/ruby/app_templates/qtrubyapp/main.rb index 6f4bceae..431ea442 100644 --- a/languages/ruby/app_templates/qtrubyapp/main.rb +++ b/languages/ruby/app_templates/qtrubyapp/main.rb @@ -1,7 +1,7 @@ require 'Qt' require '%{APPNAMELC}.rb' -a = Qt::Application.new( ARGV ) +a = TQt::Application.new( ARGV ) mw = %{APPNAMESC}.new mw.caption = "%{APPNAMESC}" mw.show diff --git a/languages/ruby/app_templates/qtrubyapp/qtrubyapp.rb b/languages/ruby/app_templates/qtrubyapp/qtrubyapp.rb index 26b0b378..df98824d 100644 --- a/languages/ruby/app_templates/qtrubyapp/qtrubyapp.rb +++ b/languages/ruby/app_templates/qtrubyapp/qtrubyapp.rb @@ -1,4 +1,4 @@ -class %{APPNAMESC} < Qt::MainWindow +class %{APPNAMESC} < TQt::MainWindow Q_SLOTS 'newDoc()', 'choose()', @@ -11,61 +11,61 @@ class %{APPNAMESC} < Qt::MainWindow def initialize() super( nil, "%{APPNAMESC}", WDestructiveClose ) - @printer = Qt::Printer.new + @printer = TQt::Printer.new - fileTools = Qt::ToolBar.new( self, "file operations" ) + fileTools = TQt::ToolBar.new( self, "file operations" ) fileTools.setLabel( tr("File Operations") ) - openIcon = Qt::Pixmap.new( "fileopen.xpm" ) - fileOpen = Qt::ToolButton.new( Qt::IconSet.new(openIcon), tr("Open File"), nil, + openIcon = TQt::Pixmap.new( "fileopen.xpm" ) + fileOpen = TQt::ToolButton.new( TQt::IconSet.new(openIcon), tr("Open File"), nil, self, SLOT('choose()'), fileTools, "open file" ) - saveIcon = Qt::Pixmap.new( "filesave.xpm" ) - fileSave = Qt::ToolButton.new( Qt::IconSet.new(saveIcon), tr("Save File"), nil, + saveIcon = TQt::Pixmap.new( "filesave.xpm" ) + fileSave = TQt::ToolButton.new( TQt::IconSet.new(saveIcon), tr("Save File"), nil, self, SLOT('save()'), fileTools, "save file" ) - printIcon = Qt::Pixmap.new( "fileprint.xpm" ) - filePrint = Qt::ToolButton.new( Qt::IconSet.new(printIcon), tr("Print File"), nil, + printIcon = TQt::Pixmap.new( "fileprint.xpm" ) + filePrint = TQt::ToolButton.new( TQt::IconSet.new(printIcon), tr("Print File"), nil, self, SLOT('print()'), fileTools, "print file" ) - Qt::WhatsThis.whatsThisButton( fileTools ) + TQt::WhatsThis.whatsThisButton( fileTools ) fileOpenText = tr('<p><img source="fileopen"> ' + "Click this button to open a <em>new file</em>. <br>" + "You can also select the <b>Open</b> command " + "from the <b>File</b> menu.</p>") - Qt::WhatsThis.add( fileOpen, fileOpenText ) + TQt::WhatsThis.add( fileOpen, fileOpenText ) - Qt::MimeSourceFactory.defaultFactory().setPixmap( "fileopen", openIcon ) + TQt::MimeSourceFactory.defaultFactory().setPixmap( "fileopen", openIcon ) fileSaveText = tr("<p>Click this button to save the file you " + "are editing. You will be prompted for a file name.\n" + "You can also select the <b>Save</b> command " + "from the <b>File</b> menu.</p>") - Qt::WhatsThis.add( fileSave, fileSaveText ) + TQt::WhatsThis.add( fileSave, fileSaveText ) filePrintText = tr("Click this button to print the file you " + "are editing.\n You can also select the Print " + "command from the File menu.") - Qt::WhatsThis.add( filePrint, filePrintText ) + TQt::WhatsThis.add( filePrint, filePrintText ) - file = Qt::PopupMenu.new( self ) + file = TQt::PopupMenu.new( self ) menuBar().insertItem( tr("&File"), file ) - file.insertItem( tr("&New"), self, SLOT('newDoc()'), Qt::KeySequence.new(CTRL+Key_N) ) + file.insertItem( tr("&New"), self, SLOT('newDoc()'), TQt::KeySequence.new(CTRL+Key_N) ) - id = file.insertItem( Qt::IconSet.new(openIcon), tr("&Open..."), - self, SLOT('choose()'), Qt::KeySequence.new(CTRL+Key_O) ) + id = file.insertItem( TQt::IconSet.new(openIcon), tr("&Open..."), + self, SLOT('choose()'), TQt::KeySequence.new(CTRL+Key_O) ) file.setWhatsThis( id, fileOpenText ) - id = file.insertItem( Qt::IconSet.new(saveIcon), tr("&Save"), - self, SLOT('save()'), Qt::KeySequence.new(CTRL+Key_S) ) + id = file.insertItem( TQt::IconSet.new(saveIcon), tr("&Save"), + self, SLOT('save()'), TQt::KeySequence.new(CTRL+Key_S) ) file.setWhatsThis( id, fileSaveText ) id = file.insertItem( tr("Save &As..."), self, SLOT('saveAs()') ) @@ -73,27 +73,27 @@ class %{APPNAMESC} < Qt::MainWindow file.insertSeparator() - id = file.insertItem( Qt::IconSet.new(printIcon), tr("&Print..."), - self, SLOT('print()'), Qt::KeySequence.new(CTRL+Key_P) ) + id = file.insertItem( TQt::IconSet.new(printIcon), tr("&Print..."), + self, SLOT('print()'), TQt::KeySequence.new(CTRL+Key_P) ) file.setWhatsThis( id, filePrintText ) file.insertSeparator() - file.insertItem( tr("&Close"), self, SLOT('close()'), Qt::KeySequence.new(CTRL+Key_W) ) + file.insertItem( tr("&Close"), self, SLOT('close()'), TQt::KeySequence.new(CTRL+Key_W) ) - file.insertItem( tr("&Quit"), $tqApp, SLOT( 'closeAllWindows()' ), Qt::KeySequence.new(CTRL+Key_Q) ) + file.insertItem( tr("&Quit"), $tqApp, SLOT( 'closeAllWindows()' ), TQt::KeySequence.new(CTRL+Key_Q) ) menuBar().insertSeparator() - help = Qt::PopupMenu.new( self ) + help = TQt::PopupMenu.new( self ) menuBar().insertItem( tr("&Help"), help ) - help.insertItem( tr("&About"), self, SLOT('about()'), Qt::KeySequence.new(Key_F1) ) + help.insertItem( tr("&About"), self, SLOT('about()'), TQt::KeySequence.new(Key_F1) ) help.insertItem( tr("About &Qt"), self, SLOT('aboutQt()') ) help.insertSeparator() - help.insertItem( tr("What's &This"), self, SLOT('whatsThis()'), Qt::KeySequence.new(SHIFT+Key_F1) ) + help.insertItem( tr("What's &This"), self, SLOT('whatsThis()'), TQt::KeySequence.new(SHIFT+Key_F1) ) - @e = Qt::TextEdit.new( self, "editor" ) + @e = TQt::TextEdit.new( self, "editor" ) @e.setFocus() setCentralWidget( @e ) statusBar().message( tr("Ready"), 2000 ) @@ -110,7 +110,7 @@ class %{APPNAMESC} < Qt::MainWindow end def choose() - fn = Qt::FileDialog.getOpenFileName( nil, nil, + fn = TQt::FileDialog.getOpenFileName( nil, nil, self) if !fn.nil? load( fn ) @@ -121,12 +121,12 @@ class %{APPNAMESC} < Qt::MainWindow def load( filename ) - f = Qt::File.new( filename ) - if !f.open( Qt::IO_ReadOnly ) + f = TQt::File.new( filename ) + if !f.open( TQt::IO_ReadOnly ) return end - ts = Qt::TextStream.new( f ) + ts = TQt::TextStream.new( f ) @e.setText( ts.read() ) @e.setModified( false ) setCaption( filename ) @@ -141,14 +141,14 @@ class %{APPNAMESC} < Qt::MainWindow end text = @e.text() - f = Qt::File.new( @filename ) - if !f.open( Qt::IO_WriteOnly ) + f = TQt::File.new( @filename ) + if !f.open( TQt::IO_WriteOnly ) statusBar().message( tr("Could not write to %s" % @filename), 2000 ) return end - t = Qt::TextStream.new( f ) + t = TQt::TextStream.new( f ) t << text f.close() @@ -161,7 +161,7 @@ class %{APPNAMESC} < Qt::MainWindow def saveAs() - fn = Qt::FileDialog.getSaveFileName( nil, nil, + fn = TQt::FileDialog.getSaveFileName( nil, nil, self ) if !fn.nil? @filename = fn @@ -173,13 +173,13 @@ class %{APPNAMESC} < Qt::MainWindow def print() - # ###### Rewrite to use Qt::SimpleRichText to print here as well + # ###### Rewrite to use TQt::SimpleRichText to print here as well margin = 10 pageNo = 1 if @printer.setup(self) # @printer dialog statusBar().message( tr("Printing...") ) - p = Qt::Painter.new + p = TQt::Painter.new if !p.begin( @printer ) # paint on @printer return end @@ -187,7 +187,7 @@ class %{APPNAMESC} < Qt::MainWindow p.setFont( @e.font() ) yPos = 0 # y-position for each line fm = p.fontMetrics() - metrics = Qt::PaintDeviceMetrics.new( @printer ) # need width/height + metrics = TQt::PaintDeviceMetrics.new( @printer ) # need width/height # of @printer surface for i in 0...@e.lines() do if margin + yPos > metrics.height() - margin @@ -220,7 +220,7 @@ class %{APPNAMESC} < Qt::MainWindow return end - case Qt::MessageBox.information( self, tr("Qt Application Example"), + case TQt::MessageBox.information( self, tr("Qt Application Example"), tr("Do you want to save the changes" + " to the document?"), tr("Yes"), tr("No"), tr("Cancel"), @@ -240,14 +240,14 @@ class %{APPNAMESC} < Qt::MainWindow private def about() - Qt::MessageBox.about( self, tr("Qt Application Example"), + TQt::MessageBox.about( self, tr("Qt Application Example"), tr("This example demonstrates simple use of " + - "Qt::MainWindow,\nQt::MenuBar and Qt::ToolBar.")) + "TQt::MainWindow,\nTQt::MenuBar and TQt::ToolBar.")) end def aboutQt() - Qt::MessageBox.aboutQt( self, tr("Qt Application Example") ) + TQt::MessageBox.aboutQt( self, tr("Qt Application Example") ) end end diff --git a/languages/ruby/debugger/dbgpsdlg.cpp b/languages/ruby/debugger/dbgpsdlg.cpp index 2aa67f51..b012f0be 100644 --- a/languages/ruby/debugger/dbgpsdlg.cpp +++ b/languages/ruby/debugger/dbgpsdlg.cpp @@ -71,7 +71,7 @@ Dbg_PS_Dialog::Dbg_PS_Dialog(TQWidget *parent, const char *name) topLayout->addWidget(pids_, 5); pids_->setFont(TDEGlobalSettings::fixedFont()); - KButtonBox *buttonbox = new KButtonBox(this, Qt::Horizontal, 5); + KButtonBox *buttonbox = new KButtonBox(this, TQt::Horizontal, 5); TQPushButton *ok = buttonbox->addButton(KStdGuiItem::ok()); buttonbox->addStretch(); TQPushButton *cancel = buttonbox->addButton(KStdGuiItem::cancel()); diff --git a/languages/ruby/debugger/dbgtoolbar.cpp b/languages/ruby/debugger/dbgtoolbar.cpp index 670ee9b4..07c0b415 100644 --- a/languages/ruby/debugger/dbgtoolbar.cpp +++ b/languages/ruby/debugger/dbgtoolbar.cpp @@ -113,7 +113,7 @@ void DbgMoveHandle::mousePressEvent(TQMouseEvent *e) if (moving_) return; - if (e->button() == Qt::RightButton) { + if (e->button() == TQt::RightButton) { TDEPopupMenu *menu = new TDEPopupMenu(this); menu->insertTitle(i18n("Debug Toolbar")); menu->insertItem(i18n("Dock to Panel"), @@ -232,13 +232,13 @@ void DbgDocker::mousePressEvent(TQMouseEvent *e) return; switch (e->button()) { - case Qt::LeftButton: + case TQt::LeftButton: { // Not really a click, but it'll hold for the time being !!! emit clicked(); break; } - case Qt::RightButton: + case TQt::RightButton: { TDEPopupMenu* menu = new TDEPopupMenu(this); menu->insertTitle(i18n("Debug Toolbar")); diff --git a/languages/ruby/debugger/debuggee.rb b/languages/ruby/debugger/debuggee.rb index 38e2dea7..75491f7d 100644 --- a/languages/ruby/debugger/debuggee.rb +++ b/languages/ruby/debugger/debuggee.rb @@ -269,7 +269,7 @@ class Context for c in ary str = debug_inspect(obj.module_eval(c)) if c.to_s != str && - str !~ /^Qt::|^KDE::/ && c.to_s !~ /@@classes$|@@cpp_names$|@@idclass$|@@debug_level$/ && + str !~ /^TQt::|^KDE::/ && c.to_s !~ /@@classes$|@@cpp_names$|@@idclass$|@@debug_level$/ && c.to_s !~ /^DCOPMeta$|^Meta$|SCRIPT_LINES__|TRUE|FALSE|NIL|MatchingData/ && c.to_s !~ /^PLATFORM$|^RELEASE_DATE$|^VERSION$|SilentClient|SilentObject/ && c.to_s !~ /^Client$|^Context$|^DEBUG_LAST_CMD$|^MUTEX$|^Mutex$|^SimpleDelegater$|^Delegater$/ && diff --git a/languages/ruby/debugger/rdbbreakpointwidget.cpp b/languages/ruby/debugger/rdbbreakpointwidget.cpp index f8e86ad7..0c1fea0b 100644 --- a/languages/ruby/debugger/rdbbreakpointwidget.cpp +++ b/languages/ruby/debugger/rdbbreakpointwidget.cpp @@ -634,7 +634,7 @@ void RDBBreakpointWidget::slotRemoveAllBreakpoints() void RDBBreakpointWidget::slotRowDoubleClicked(int row, int col, int btn, const TQPoint &) { - if ( btn == Qt::LeftButton ) + if ( btn == TQt::LeftButton ) { // kdDebug(9012) << "in slotRowSelected row=" << row << endl; BreakpointTableRow* btr = (BreakpointTableRow *) m_table->item(row, Control); |