qtruby -> tqtruby renaming. This relates to bug 266.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/1/head
Michele Calgaro 7 years ago
parent edb9650a0d
commit b0768b8783
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -1,6 +1,6 @@
2004-06-27 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-06-27 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* The qtruby and korundum ruby bindings are built by default * The tqtruby and korundum ruby bindings are built by default
* Both Qt only and Qt/KDE versions of the Smoke library are built * Both Qt only and Qt/KDE versions of the Smoke library are built
2002-11-05 Marcus Urban <murban@mylinuxisp.com> 2002-11-05 Marcus Urban <murban@mylinuxisp.com>

@ -5,9 +5,9 @@ COMPILE_BEFORE_tdejava = qtjava
COMPILE_BEFORE_kdec = qtc COMPILE_BEFORE_kdec = qtc
COMPILE_BEFORE_xparts = dcopc COMPILE_BEFORE_xparts = dcopc
# below if for proper korundum / qtruby build order # below if for proper korundum / tqtruby build order
COMPILE_BEFORE_qtruby = smoke COMPILE_BEFORE_tqtruby = smoke
COMPILE_BEFORE_korundum = qtruby COMPILE_BEFORE_korundum = tqtruby
# the below is for proper referencing of dcopperl into SUBDIRS # the below is for proper referencing of dcopperl into SUBDIRS
COMPILE_BEFORE_dcopc = dcopperl COMPILE_BEFORE_dcopc = dcopperl

@ -19,8 +19,8 @@ This package contains:
* korundum: TDE bindings for ruby * korundum: TDE bindings for ruby
* python: a copy of SIP/pyQt/pyTDE bindings from riverbankcomputing.co.uk * python: a copy of SIP/pyQt/pyTDE bindings from riverbankcomputing.co.uk
* qtjava: Qt bindings for Java JNI to use Qt/TDE classes with Java * qtjava: Qt bindings for Java JNI to use Qt/TDE classes with Java
* qtruby: Qt bindings for Ruby * tqtruby: TQt bindings for Ruby
* smoke: Language independent library for Qt and TDE bindings. Used by QtRuby * smoke: Language independent library for Qt and TDE bindings. Used by TQtRuby
and PerlQt. and PerlQt.
* kalyptus: a header parser and bindings generator for Qt/TDE. Used for * kalyptus: a header parser and bindings generator for Qt/TDE. Used for
Smoke, Java, C# and KSVG bindings generation at present. Smoke, Java, C# and KSVG bindings generation at present.

@ -14,7 +14,7 @@ Chief Wreck On The Highway
Bug fixes, enhancements, sample code Bug fixes, enhancements, sample code
Alex Kellett Alex Kellett
QtRuby is a ruby version of the PerlQt/Smoke project, written by: TQtRuby is a ruby version of the PerlQt/Smoke project, written by:
Ashley Winters Ashley Winters
Germain Garand Germain Garand
David Faure David Faure

@ -1,6 +1,6 @@
2007-03-05 Richard Dale <rdale@foton.es> 2007-03-05 Richard Dale <rdale@foton.es>
* Added a marshaller for TQValueList<WId>& as requested by volty on #qtruby * Added a marshaller for TQValueList<WId>& as requested by volty on #tqtruby
2007-07-06 Richard Dale <rdale@foton.es> 2007-07-06 Richard Dale <rdale@foton.es>
@ -41,7 +41,7 @@
2006-08-18 Richard Dale <rdale@foton.es> 2006-08-18 Richard Dale <rdale@foton.es>
* Added a TDEActionPtrList marshaller. Fixes problem reported by * Added a TDEActionPtrList marshaller. Fixes problem reported by
eskatos on the #qtruby irc channel. eskatos on the #tqtruby irc channel.
2006-06-05 Richard Dale <rdale@foton.es> 2006-06-05 Richard Dale <rdale@foton.es>
@ -91,7 +91,7 @@
Han Holl. Han Holl.
* KDE::CmdLineArgs and KDE::AboutData instances are no longer * KDE::CmdLineArgs and KDE::AboutData instances are no longer
deleted by qtruby on garbage collection. Fixes another problem deleted by tqtruby on garbage collection. Fixes another problem
reported by Han Holl. reported by Han Holl.
2005-12-08 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2005-12-08 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
@ -190,7 +190,7 @@
* The DCOPObject inspect method was crashing if the instance hadn't been fully * The DCOPObject inspect method was crashing if the instance hadn't been fully
constructed constructed
* The kde_resolve_classname function's arg types were changed to match the new * The kde_resolve_classname function's arg types were changed to match the new
ones in the resolve_classname() function of QtRuby/handlers.cpp. ones in the resolve_classname() function of TQtRuby/handlers.cpp.
2004-12-11 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-12-11 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
@ -223,7 +223,7 @@
2004-10-11 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-10-11 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Set global flag 'application_terminated' when KDE::Application or KDE::UniqueApplication * Set global flag 'application_terminated' when KDE::Application or KDE::UniqueApplication
has returned from exec(). Once this is set the QtRuby runtime will no longer delete any has returned from exec(). Once this is set the TQtRuby runtime will no longer delete any
C++ instances. This will hopefully fix crash on application exit problems reported by Thibauld C++ instances. This will hopefully fix crash on application exit problems reported by Thibauld
Favre. Favre.
@ -265,7 +265,7 @@ CCMAIL: kde-bindings@kde.org
2004-09-30 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-09-30 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* The resolve_classname() function in qtruby handlers.cpp uses the various Qt rtti mechanisms to * The resolve_classname() function in tqtruby handlers.cpp uses the various Qt rtti mechanisms to
get a more accurate classname to instantiate as a ruby instance. It has now been extended get a more accurate classname to instantiate as a ruby instance. It has now been extended
with a callback to the Korundum library to do the same for KDE classes. with a callback to the Korundum library to do the same for KDE classes.

@ -1,4 +1,4 @@
Please see tdebindings/qtruby/README Please see tdebindings/tqtruby/README
KDE Specific Infomation: KDE Specific Infomation:

@ -4,10 +4,10 @@ bin_PROGRAMS = krubyinit
krubyinit_LDFLAGS = -module $(all_libraries) -version-info 0:0:0 -L$(top_srcdir)/smoke/tde/ -L$(RUBY_LIBDIR) -ltdemdi -ltdenewstuff krubyinit_LDFLAGS = -module $(all_libraries) -version-info 0:0:0 -L$(top_srcdir)/smoke/tde/ -L$(RUBY_LIBDIR) -ltdemdi -ltdenewstuff
krubyinit_METASOURCES = AUTO krubyinit_METASOURCES = AUTO
krubyinit_SOURCES = krubyinit.cpp krubyinit_SOURCES = krubyinit.cpp
krubyinit_LDADD = $(LIB_KDE) $(RUBY_LIBRUBYARG) $(top_builddir)/smoke/tde/libsmoketde.la $(top_builddir)/qtruby/rubylib/qtruby/libtqtrubyinternal.la krubyinit_LDADD = $(LIB_KDE) $(RUBY_LIBRUBYARG) $(top_builddir)/smoke/tde/libsmoketde.la $(top_builddir)/tqtruby/rubylib/tqtruby/libtqtrubyinternal.la
install-exec-local: install-exec-local:
@-rm -f $(DESTDIR)$(bindir)/rbtdeapi @-rm -f $(DESTDIR)$(bindir)/rbtdeapi
@$(LN_S) rbqtapi $(DESTDIR)$(bindir)/rbtdeapi @$(LN_S) rbtqtapi $(DESTDIR)$(bindir)/rbtdeapi
@-rm -f $(DESTDIR)$(bindir)/rbtdesh @-rm -f $(DESTDIR)$(bindir)/rbtdesh
@$(LN_S) rbqtsh $(DESTDIR)$(bindir)/rbtdesh @$(LN_S) rbtqtsh $(DESTDIR)$(bindir)/rbtdesh

@ -36,7 +36,7 @@
#include <ruby.h> #include <ruby.h>
#include <marshall.h> #include <marshall.h>
#include <qtruby.h> #include <tqtruby.h>
#include <smokeruby.h> #include <smokeruby.h>
#include <smoke.h> #include <smoke.h>
@ -905,7 +905,7 @@ public:
}; };
extern "C" { extern "C" {
extern void Init_qtruby(); extern void Init_tqtruby();
extern void set_new_kde(VALUE (*new_kde) (int, VALUE *, VALUE)); extern void set_new_kde(VALUE (*new_kde) (int, VALUE *, VALUE));
extern void set_tdeconfigskeletonitem_immutable(VALUE (*tdeconfigskeletonitem_immutable) (VALUE)); extern void set_tdeconfigskeletonitem_immutable(VALUE (*tdeconfigskeletonitem_immutable) (VALUE));
extern void set_kde_resolve_classname(const char * (*kde_resolve_classname) (Smoke*, int, void *)); extern void set_kde_resolve_classname(const char * (*kde_resolve_classname) (Smoke*, int, void *));
@ -1163,9 +1163,9 @@ Init_korundum()
// The Qt extension is linked against libsmoketqt.so, but Korundum links against // The Qt extension is linked against libsmoketqt.so, but Korundum links against
// libsmoketde.so only. Specifying both a 'require Qt' and a 'require Korundum', // libsmoketde.so only. Specifying both a 'require Qt' and a 'require Korundum',
// would give a link error (see the rb_fatal() error above). // would give a link error (see the rb_fatal() error above).
// So call the Init_qtruby() initialization function explicitely, not via 'require Qt' // So call the Init_tqtruby() initialization function explicitely, not via 'require Qt'
// (Qt.o is linked into libtqtruby.so, as well as the Qt.so extension). // (Qt.o is linked into libtqtruby.so, as well as the Qt.so extension).
Init_qtruby(); Init_tqtruby();
install_handlers(KDE_handlers); install_handlers(KDE_handlers);
kde_internal_module = rb_define_module_under(kde_module, "Internal"); kde_internal_module = rb_define_module_under(kde_module, "Internal");

@ -1,10 +1,10 @@
INCLUDES = -I$(top_srcdir)/smoke -I$(top_srcdir)/qtruby/rubylib/qtruby $(all_includes) -I$(RUBY_ARCHDIR) $(RUBY_CFLAGS) INCLUDES = -I$(top_srcdir)/smoke -I$(top_srcdir)/tqtruby/rubylib/tqtruby $(all_includes) -I$(RUBY_ARCHDIR) $(RUBY_CFLAGS)
rubylibdir = $(RUBY_ARCHDIR) rubylibdir = $(RUBY_ARCHDIR)
rubylib_LTLIBRARIES = korundum.la rubylib_LTLIBRARIES = korundum.la
korundum_la_LDFLAGS = -module $(all_libraries) -version-info 0:0:0 korundum_la_LDFLAGS = -module $(all_libraries) -version-info 0:0:0
korundum_la_METASOURCES = AUTO korundum_la_METASOURCES = AUTO
korundum_la_SOURCES = Korundum.cpp tdehandlers.cpp korundum_la_SOURCES = Korundum.cpp tdehandlers.cpp
korundum_la_LIBADD = $(LIB_KDE) $(top_builddir)/smoke/tde/libsmoketde.la $(top_builddir)/qtruby/rubylib/qtruby/libtqtrubyinternal.la $(RUBY_LIBRUBYARG) korundum_la_LIBADD = $(LIB_KDE) $(top_builddir)/smoke/tde/libsmoketde.la $(top_builddir)/tqtruby/rubylib/tqtruby/libtqtrubyinternal.la $(RUBY_LIBRUBYARG)
SUBDIRS = lib SUBDIRS = lib

@ -15,7 +15,7 @@
* * * *
***************************************************************************/ ***************************************************************************/
#include <qtruby.h> #include <tqtruby.h>
#include <smokeruby.h> #include <smokeruby.h>
#include <tdeversion.h> #include <tdeversion.h>

@ -1,9 +0,0 @@
INCLUDES = $(all_includes) -I$(RUBY_ARCHDIR) $(RUBY_CFLAGS)
bin_PROGRAMS = qtrubyinit
qtrubyinit_LDFLAGS = -module $(all_libraries) -version-info 0:0:0 -L$(top_srcdir)/smoke/tqt/ -L$(RUBY_LIBDIR)
qtrubyinit_METASOURCES = AUTO
qtrubyinit_SOURCES = qtrubyinit.cpp
qtrubyinit_LDADD = $(LIB_TQT) $(RUBY_LIBRUBYARG) $(top_builddir)/smoke/tqt/libsmoketqt.la $(top_builddir)/qtruby/rubylib/qtruby/libtqtrubyinternal.la
bin_SCRIPTS = rbqtapi rbqtsh

@ -1 +0,0 @@
SUBDIRS = qtruby designer

@ -1,6 +0,0 @@
require 'mkmf'
dir_config('smoke')
dir_config('qt')
$CPPFLAGS += " -I../../../../smoke -I../../qtruby "
$LOCAL_LIBS += '-bundle_loader ../../qtruby/qtruby.bundle -lsmoketqt -ltqui -ltqt-mt -lstdc++'
create_makefile("tqui")

@ -1,15 +0,0 @@
INCLUDES = -I$(top_srcdir)/smoke $(all_includes) -I$(RUBY_ARCHDIR) $(RUBY_CFLAGS)
noinst_HEADERS = qtruby.h marshall.h smokeruby.h extconf.rb
noinst_LTLIBRARIES = libtqtrubyinternal.la
libtqtrubyinternal_la_SOURCES = Qt.cpp handlers.cpp
libtqtrubyinternal_la_METASOURCES = AUTO
rubylibdir = $(RUBY_ARCHDIR)
rubylib_LTLIBRARIES = qtruby.la
qtruby_la_SOURCES =
qtruby_la_LDFLAGS = -module $(all_libraries) -version-info 0:0:0
qtruby_la_LIBADD = libtqtrubyinternal.la $(LIB_TQT) $(top_builddir)/smoke/tqt/libsmoketqt.la $(LIB_TDECORE) $(RUBY_LIBRUBYARG) -lstdc++
SUBDIRS = lib

@ -1,4 +0,0 @@
SUBDIRS = Qt
rubylibdir = $(RUBY_RUBYLIBDIR)
rubylib_DATA = Qt.rb

@ -1,2 +0,0 @@
qtrubylibdir = $(RUBY_RUBYLIBDIR)/Qt
qtrubylib_DATA = qtruby.rb

@ -38,7 +38,7 @@ Other contributions (from the ChangeLog), bug reports, fixes etc:
Daniel Morris Daniel Morris
Ryutaro Amano Ryutaro Amano
QtRuby is a ruby version of the PerlQt/Smoke project, written by: TQtRuby is a ruby version of the PerlTQt/Smoke project, written by:
Ashley Winters Ashley Winters
Germain Garand Germain Garand
David Faure David Faure
@ -47,7 +47,7 @@ Equipment
800 Mhz iBook with Yellow Dog 3.0, Macally Micro 3 button mouse 800 Mhz iBook with Yellow Dog 3.0, Macally Micro 3 button mouse
Books Books
'Programming with Qt' by Mathias Kalle Dalheimer 'Programming with TQt' by Mathias Kalle Dalheimer
'Programming Ruby' by David Thomas and Andrew Hunt 'Programming Ruby' by David Thomas and Andrew Hunt
'The Ruby Way' by Hal Fulton 'The Ruby Way' by Hal Fulton
'Ruby In a Nutshell' by Yukihiro Matsumoto 'Ruby In a Nutshell' by Yukihiro Matsumoto

@ -1,8 +1,8 @@
Trademarks Trademarks
---------- ----------
"[QtRuby": "[Qt]" name usage by permission of Trolltech AS, owner of the "[TQtRuby": "[TQt]" name usage by permission of Trolltech AS, owner of the
Qt(TM) trademark TQt(TM) trademark
License License

@ -7,7 +7,7 @@
2006-12-05 Richard Dale <rdale@foton.es> 2006-12-05 Richard Dale <rdale@foton.es>
* Backported some improvements to TQt::Variants from Qt4 QtRuby * Backported some improvements to TQt::Variants from Qt4 TQtRuby
* When marhalling TQMap types with TQVariant values, if the Ruby value isn't * When marhalling TQMap types with TQVariant values, if the Ruby value isn't
a TQt::Variant then one is created a TQt::Variant then one is created
* TQt::Variants can now be constructed with Hash's of String/TQt::Variant * TQt::Variants can now be constructed with Hash's of String/TQt::Variant
@ -25,7 +25,7 @@
* Made TQt::ListView, TQt::ListViewItem, TQt::BoxLayout, TQt::HBoxLayout, * Made TQt::ListView, TQt::ListViewItem, TQt::BoxLayout, TQt::HBoxLayout,
TQt::VBoxLayout and TQt::GridLayout Enumerable with implementations TQt::VBoxLayout and TQt::GridLayout Enumerable with implementations
of each() so they don't need to use the Qt External iterators like of each() so they don't need to use the TQt External iterators like
TQt::LayoutIterator anymore. For instance: TQt::LayoutIterator anymore. For instance:
lv = TQt::ListView.new do lv = TQt::ListView.new do
@ -44,7 +44,7 @@
2006-09-19 Richard Dale <rdale@foton.es> 2006-09-19 Richard Dale <rdale@foton.es>
* Upped the QtRuby version to 1.0.13 for the KDE 3.5.5 release * Upped the TQtRuby version to 1.0.13 for the KDE 3.5.5 release
* Fixed a crash when a slot was inherited by a subclass, and the * Fixed a crash when a slot was inherited by a subclass, and the
subclass had no slots or signals of its own subclass had no slots or signals of its own
@ -63,7 +63,7 @@
The block is called in the context of where the connect call was made, and 'self' The block is called in the context of where the connect call was made, and 'self'
needn't be a TQt::Object. It is similar to the signal_connect() method in needn't be a TQt::Object. It is similar to the signal_connect() method in
ruby-gnome. This was suggested by rickdangerous on the #qtruby irc channel. ruby-gnome. This was suggested by rickdangerous on the #tqtruby irc channel.
2006-09-13 Richard Dale <rdale@foton.es> 2006-09-13 Richard Dale <rdale@foton.es>
@ -97,7 +97,7 @@
2006-08-29 Richard Dale <rdale@foton.es> 2006-08-29 Richard Dale <rdale@foton.es>
* Backported some memory leak fixes from Qt4 QtRuby * Backported some memory leak fixes from Qt4 TQtRuby
2006-08-10 Richard Dale <rdale@foton.es> 2006-08-10 Richard Dale <rdale@foton.es>
@ -160,12 +160,12 @@
2006-05-07 Richard Dale <rdale@foton.es> 2006-05-07 Richard Dale <rdale@foton.es>
* An an type of TQ_UINT16 wasn't working with QtRuby. Fixes problem * An an type of TQ_UINT16 wasn't working with TQtRuby. Fixes problem
reported by maelclerambault. reported by maelclerambault.
2006-05-03 Richard Dale <rdale@foton.es> 2006-05-03 Richard Dale <rdale@foton.es>
* The tqt_emit() and tqt_invoke() methods are overriden by the QtRuby * The tqt_emit() and tqt_invoke() methods are overriden by the TQtRuby
runtime. When they are called the runtime looks for a Ruby slot or runtime. When they are called the runtime looks for a Ruby slot or
signal matching the call, and invokes it if found. If a Ruby version signal matching the call, and invokes it if found. If a Ruby version
wasn't found for a signal however, the tqt_invoke() method was being wasn't found for a signal however, the tqt_invoke() method was being
@ -181,7 +181,7 @@
2006-03-29 Richard Dale <rdale@foton.es> 2006-03-29 Richard Dale <rdale@foton.es>
* Don't special case open() in virtual method callbacks, because all * Don't special case open() in virtual method callbacks, because all
the Qt classes with open methods now have explicit open() method the TQt classes with open methods now have explicit open() method
calls. So it isn't possible that Kernel.open() will be called calls. So it isn't possible that Kernel.open() will be called
wrongly anymore. wrongly anymore.
@ -197,7 +197,7 @@
etc. Otherwise, the corresponding methods in the Smoke library were etc. Otherwise, the corresponding methods in the Smoke library were
not being invoked correctly. not being invoked correctly.
* Removed a virtual destructor compile warning * Removed a virtual destructor compile warning
* Removed obsolete qtruby-only.patch and tdevelop project file * Removed obsolete tqtruby-only.patch and tdevelop project file
2006-03-14 Richard Dale <rdale@foton.es> 2006-03-14 Richard Dale <rdale@foton.es>
@ -208,7 +208,7 @@
* The Kernel#select method was being redefined as it clashed with * The Kernel#select method was being redefined as it clashed with
TQt::SqlCursor#select and TQt::SqlSelectCursor#select methods. This TQt::SqlCursor#select and TQt::SqlSelectCursor#select methods. This
caused a problem when QtRuby was used with Rails ActiveRecord which caused a problem when TQtRuby was used with Rails ActiveRecord which
also has a select method. So the methods are now defined in the Sql also has a select method. So the methods are now defined in the Sql
classes, and use method_missing() to explictly invoke the methods in classes, and use method_missing() to explictly invoke the methods in
the Smoke library. Fixes problem reported by Imo Sosa. the Smoke library. Fixes problem reported by Imo Sosa.
@ -233,7 +233,7 @@
2005-12-08 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2005-12-08 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* The ruby display() method was clashing with a display() method in some * The ruby display() method was clashing with a display() method in some
QtRuby classes, and so it was aliased to _display(). However, this caused TQtRuby classes, and so it was aliased to _display(). However, this caused
problems with the ruby RMagick extension. The display methods are now problems with the ruby RMagick extension. The display methods are now
special cased in TQt::LCDNumber, TQt::WhatsThis and TQt::TimeEdit. Fixes special cased in TQt::LCDNumber, TQt::WhatsThis and TQt::TimeEdit. Fixes
problem reported by David Corbin. problem reported by David Corbin.
@ -243,9 +243,9 @@
2005-12-06 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2005-12-06 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* QtRuby didn't work with versions of ruby > 1.8.3, as it didn't call * TQtRuby didn't work with versions of ruby > 1.8.3, as it didn't call
initialize methods correctly. It used the rb_respond_to() method initialize methods correctly. It used the rb_respond_to() method
to check it a newly created qt instance responded to :initialize. to check it a newly created tqt instance responded to :initialize.
However, in newer versions of ruby rb_responds_to() ignores However, in newer versions of ruby rb_responds_to() ignores
private methods such as initialize(). The solution was to just remove private methods such as initialize(). The solution was to just remove
the test, as it was redundant anyway. the test, as it was redundant anyway.
@ -285,7 +285,7 @@
2005-09-26 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2005-09-26 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Added some fixes from the Qt4 version of QtRuby * Added some fixes from the Qt4 version of TQtRuby
* There was a clash between operator methods in Kernel * There was a clash between operator methods in Kernel
for '>', '>=', '<' and '<=' and the ones in the Smoke lib. for '>', '>=', '<' and '<=' and the ones in the Smoke lib.
* Fixed a TQt::ByteArray marshalling problem * Fixed a TQt::ByteArray marshalling problem
@ -307,7 +307,7 @@
2005-08-09 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2005-08-09 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Caleb Tennis wrote: * Caleb Tennis wrote:
One nice feature would be to allow TQt::Object::inherits() to use the QtRuby One nice feature would be to allow TQt::Object::inherits() to use the TQtRuby
naming scheme for valid lookups. For example, right now: naming scheme for valid lookups. For example, right now:
irb(main):001:0> w = TQt::Widget.new(nil) irb(main):001:0> w = TQt::Widget.new(nil)
@ -324,8 +324,8 @@
2005-08-04 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2005-08-04 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Added a file called 'COPYING' to the qtruby project, with a note that * Added a file called 'COPYING' to the tqtruby project, with a note that
the 'Qt' trademark in the QtRuby name is used with Trolltech's permission, the 'TQt' trademark in the TQtRuby name is used with Trolltech's permission,
followed by the text of the GPL v2 license. followed by the text of the GPL v2 license.
2005-07-30 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2005-07-30 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
@ -344,7 +344,7 @@
2005-07-14 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2005-07-14 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Added example programs for client/server programming with TQt::Socket * Added example programs for client/server programming with TQt::Socket
and associated classes. client.rb illustrates current bugs in QtRuby and associated classes. client.rb illustrates current bugs in TQtRuby
* TQt::Socket.canReadLine() always returns true * TQt::Socket.canReadLine() always returns true
* TQt::readLine() seg faults when called a second time * TQt::readLine() seg faults when called a second time
* A memory leak and seg faulting problems like the above were reported * A memory leak and seg faulting problems like the above were reported
@ -352,7 +352,7 @@
2005-07-09 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2005-07-09 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* When a Qt method returned a TQString value type, such as: * When a TQt method returned a TQString value type, such as:
TQString TQSocket::readLine() TQString TQSocket::readLine()
A temporary TQString was being created that wasn't deleted and caused a A temporary TQString was being created that wasn't deleted and caused a
memory leak. Fixes problem reported by Caleb Tennis. memory leak. Fixes problem reported by Caleb Tennis.
@ -417,7 +417,7 @@
2005-05-21 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2005-05-21 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Improved the format of enums displayed by rbqtapi and rbkdeapi * Improved the format of enums displayed by rbtqtapi and rbkdeapi
2005-05-20 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2005-05-20 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
@ -444,7 +444,7 @@
2005-04-09 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2005-04-09 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Fixed regressions in the rbqtapi and rbkdeapi utilities caused by the TQt::Internal namespace * Fixed regressions in the rbtqtapi and rbkdeapi utilities caused by the TQt::Internal namespace
tidy up tidy up
* TQt::version and TQt::ruby_version had wrongly been moved to the TQt::Internal module * TQt::version and TQt::ruby_version had wrongly been moved to the TQt::Internal module
@ -454,13 +454,13 @@
2005-03-30 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2005-03-30 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* An 'include Qt' statement in qtruby.rb where a couple of methods were being added to * An 'include TQt' statement in tqtruby.rb where a couple of methods were being added to
class Module was causing all the Qt methods to be added to Module. Oops, this a really class Module was causing all the TQt methods to be added to Module. Oops, this a really
serious bug. Various methods in qtruby.rb are now module methods in the TQt::Internal serious bug. Various methods in tqtruby.rb are now module methods in the TQt::Internal
module. Big thanks to Eric Veensta and Samir Patel for pointing out this can of worms. module. Big thanks to Eric Veensta and Samir Patel for pointing out this can of worms.
* It also fixes a problem reported by David Crosby where a "require 'time'" statement was * It also fixes a problem reported by David Crosby where a "require 'time'" statement was
incompatible with a "require 'Qt'" statement. As the cause was unknown, a hacky workround incompatible with a "require 'TQt'" statement. As the cause was unknown, a hacky workround
had to be added, which is no longer needed. had to be added, which is no longer needed.
2005-03-24 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2005-03-24 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
@ -474,7 +474,7 @@
2005-03-21 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2005-03-21 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Moved Qt.rb from qtruby/lib/Qt to qtruby/lib. Fixes problem building qtruby on Mac OS X * Moved TQt.rb from tqtruby/lib/TQt to tqtruby/lib. Fixes problem building tqtruby on Mac OS X
with extconf.rb reported by Michael Doppler with extconf.rb reported by Michael Doppler
* Rename 'README.build' as INSTALL * Rename 'README.build' as INSTALL
@ -540,7 +540,7 @@
* Fixed an interesting bug reported by Stephan Oehlert. Kernel has a method called * Fixed an interesting bug reported by Stephan Oehlert. Kernel has a method called
open() which takes a String as the first argument. But when a call is made to an open() open() which takes a String as the first argument. But when a call is made to an open()
method in the Qt classes, it messes up the method_missing() logic to divert it to the method in the TQt classes, it messes up the method_missing() logic to divert it to the
Smoke library. Instead it attempts to call the Kernel method with the wrong arg types. Smoke library. Instead it attempts to call the Kernel method with the wrong arg types.
* The problem is fixed by calling the appropriate method based on the * The problem is fixed by calling the appropriate method based on the
@ -560,7 +560,7 @@
2004-12-21 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-12-21 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* The qtruby runtime needs to be able to run the code for an initialize() method up * The tqtruby runtime needs to be able to run the code for an initialize() method up
to the point where the C++ instance has been constructed and wrapped, and then to the point where the C++ instance has been constructed and wrapped, and then
jump out. It then re-runs initialize() with the wrapped instance. Before a callcc() call jump out. It then re-runs initialize() with the wrapped instance. Before a callcc() call
had been used for the jumping which worked fine. However, it made the frame stack had been used for the jumping which worked fine. However, it made the frame stack
@ -569,7 +569,7 @@
2004-12-20 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-12-20 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Added a work round for a bug caused by an incompatibility between QtRuby * Added a work round for a bug caused by an incompatibility between TQtRuby
the 'require time' statement, reported by David Crosby the 'require time' statement, reported by David Crosby
CCMAIL: dcrosby42@gmail.com CCMAIL: dcrosby42@gmail.com
@ -616,7 +616,7 @@
2004-12-10 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-12-10 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Added inspect() and pretty_print() methods for TQt::SizePolicy * Added inspect() and pretty_print() methods for TQt::SizePolicy
* Greatly improved the TQt::Object Qt property based inspect() and pretty_print() * Greatly improved the TQt::Object TQt property based inspect() and pretty_print()
methods. Property types such as TQt::Point, TQt::Font and TQt::Rect can be methods. Property types such as TQt::Point, TQt::Font and TQt::Rect can be
viewed as expandable items in the KDevelop debugger variable tree. viewed as expandable items in the KDevelop debugger variable tree.
@ -633,12 +633,12 @@
2004-11-29 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-11-29 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Upped the QtRuby version to 1.0.5 for the KDE 3.3.2 release * Upped the TQtRuby version to 1.0.5 for the KDE 3.3.2 release
2004-10-30 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-10-30 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* qError(), tqWarning() and tqFatal() are now Object instance methods, rather than Qt module * qError(), tqWarning() and tqFatal() are now Object instance methods, rather than TQt module
methods. This means they don't need to be referenced with an ugly 'Qt.' module scope anymore. methods. This means they don't need to be referenced with an ugly 'TQt.' module scope anymore.
2004-10-21 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-10-21 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
@ -653,7 +653,7 @@
2004-10-16 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-10-16 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Until super has been called in an initialize() method, Qt methods can't be called on * Until super has been called in an initialize() method, TQt methods can't be called on
it. An exception is now thrown 'Instance not initialized', instead of it causing a seg fault. it. An exception is now thrown 'Instance not initialized', instead of it causing a seg fault.
* For instance: * For instance:
@ -701,16 +701,16 @@
* Added greater than and less than operators to TQt::Enum, so that enums can be compared with * Added greater than and less than operators to TQt::Enum, so that enums can be compared with
Integers Integers
* Added the chart example for Qt Tutorial #2 * Added the chart example for TQt Tutorial #2
2004-10-12 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-10-12 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Added TQt::Application.ARGV. It returns the original ruby ARGV array with Qt command line * Added TQt::Application.ARGV. It returns the original ruby ARGV array with TQt command line
options removed. options removed.
2004-10-11 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-10-11 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Added a global flag 'application_terminated'. Once this is set the QtRuby runtime will no longer * Added a global flag 'application_terminated'. Once this is set the TQtRuby runtime will no longer
delete any C++ instances. This will hopefully fix crash on application exit problems reported delete any C++ instances. This will hopefully fix crash on application exit problems reported
by Thibauld Favre. by Thibauld Favre.
@ -753,7 +753,7 @@
2004-10-07 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-10-07 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Added Qt Designer Tutorial 'Creating Dialogs' translated into QtRuby. It * Added TQt Designer Tutorial 'Creating Dialogs' translated into TQtRuby. It
shows how you can combine ruby code generated from .ui files with the rbuic shows how you can combine ruby code generated from .ui files with the rbuic
tool, with your own code. tool, with your own code.
@ -778,12 +778,12 @@
2004-10-05 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-10-05 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Given a C++ instance and an approximate classname, the QtRuby runtime uses the * Given a C++ instance and an approximate classname, the TQtRuby runtime uses the
various Qt rtti mechanisms such as TQObject::className() to improve the resolution various TQt rtti mechanisms such as TQObject::className() to improve the resolution
of the name. However, the numeric classId into the array of classnames in the Smoke of the name. However, the numeric classId into the array of classnames in the Smoke
runtime was not being updated in line with the more accurate name. runtime was not being updated in line with the more accurate name.
* This caused problems with method argument matching which uses the numeric classId * This caused problems with method argument matching which uses the numeric classId
rather than the ruby object's classname, and so QtRuby wrongly assumed that a an rather than the ruby object's classname, and so TQtRuby wrongly assumed that a an
instance of a TQt::Widget was a TQt::Object. instance of a TQt::Widget was a TQt::Object.
* Fixes problem reported by Han Holl * Fixes problem reported by Han Holl
@ -812,10 +812,10 @@
2004-10-03 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-10-03 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Han Holl's report about a when you pass an incorrect arg type to a QtRuby * Han Holl's report about a when you pass an incorrect arg type to a TQtRuby
method, it caused a crash has opened a 'can of worms'. This was because there method, it caused a crash has opened a 'can of worms'. This was because there
was no arg type checking if there was only one candidate method in the was no arg type checking if there was only one candidate method in the
Smoke runtime. Now that arg type checking is applied to all QtRuby method calls, not Smoke runtime. Now that arg type checking is applied to all TQtRuby method calls, not
not just those that after lookup in Smoke map onto a single method, the overloaded not just those that after lookup in Smoke map onto a single method, the overloaded
method resolution via the arg types has had to be greatly improved. This has method resolution via the arg types has had to be greatly improved. This has
been done, and so the arg type matching is now extremely fussy. been done, and so the arg type matching is now extremely fussy.
@ -843,7 +843,7 @@
2004-10-03 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-10-03 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* A common programming error is to accidently leave off the 'new' method call when * A common programming error is to accidently leave off the 'new' method call when
creating an instance. The QtRuby runtime wasn't correctly trapping an attempt to creating an instance. The TQtRuby runtime wasn't correctly trapping an attempt to
call an instance method on a class object, and was seg faulting rather than call an instance method on a class object, and was seg faulting rather than
throwing an exception. throwing an exception.
@ -868,7 +868,7 @@
2004-09-30 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-09-30 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* The resolve_classname() function in handlers.cpp uses the various Qt rtti mechanisms to * The resolve_classname() function in handlers.cpp uses the various TQt rtti mechanisms to
get a more accurate classname to instantiate as a ruby instance. It has now been extended get a more accurate classname to instantiate as a ruby instance. It has now been extended
with a callback to the Korundum library to do the same for KDE classes. with a callback to the Korundum library to do the same for KDE classes.
@ -885,10 +885,10 @@
2004-09-12 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-09-12 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Added a 'tqui' extension for reading in .ui Qt Designer files at runtime * Added a 'tqui' extension for reading in .ui TQt Designer files at runtime
* For example: * For example:
require 'Qt' require 'TQt'
require 'tqui' require 'tqui'
a = TQt::Application.new(ARGV) a = TQt::Application.new(ARGV)
@ -924,7 +924,7 @@
* Brought the rbuic code to uncompress zip files in line with the current uic code * Brought the rbuic code to uncompress zip files in line with the current uic code
* Added a qmake project file for building the rbuic tool on Mac OS X, and some * Added a qmake project file for building the rbuic tool on Mac OS X, and some
notes on how to build QtRuby on a Mac. notes on how to build TQtRuby on a Mac.
2004-08-29 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-08-29 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
@ -947,7 +947,7 @@
2004-08-04 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-08-04 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Upped the QtRuby version to 1.0.0 - it must work now then.. * Upped the TQtRuby version to 1.0.0 - it must work now then..
2004-08-02 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-08-02 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
@ -976,7 +976,7 @@
had virtual method callbacks, this meant that the ruby instance couldn't had virtual method callbacks, this meant that the ruby instance couldn't
be found, and the callback couldn't be made. be found, and the callback couldn't be made.
* Hence, the TQt::ToolTip callback in examples/qt-examples/tooltip didn't * Hence, the TQt::ToolTip callback in examples/tqt-examples/tooltip didn't
work, as that class doesn't have a virtual destructor. work, as that class doesn't have a virtual destructor.
* Added an 'isEnum()' function to use when matching args in overloaded * Added an 'isEnum()' function to use when matching args in overloaded
@ -1100,12 +1100,12 @@
2004-07-11 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-07-11 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Qt eucJP and Shift-JIS codecs used to support ruby $KCODE values of 's' * TQt eucJP and Shift-JIS codecs used to support ruby $KCODE values of 's'
for SJIS and 'e' for EUC for SJIS and 'e' for EUC
2004-07-08 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-07-08 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Added support for strings in QtRuby programs being written in UTF-8. * Added support for strings in TQtRuby programs being written in UTF-8.
Use the '-Ku' command line option or '$KCODE=u' in the program. Use the '-Ku' command line option or '$KCODE=u' in the program.
* Removed recently added TQChar marshalling as it wasn't very i18n friendly * Removed recently added TQChar marshalling as it wasn't very i18n friendly
@ -1188,7 +1188,7 @@
* The marshalling TypeHandler function pointers are now looked up in a * The marshalling TypeHandler function pointers are now looked up in a
TQAsciiDict, rather than a ruby Hash. TQAsciiDict, rather than a ruby Hash.
* Some unused functions removed * Some unused functions removed
* QtRuby version upped to 0.9.8 * TQtRuby version upped to 0.9.8
2004-06-09 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-06-09 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
@ -1206,7 +1206,7 @@
2004-05-03 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-05-03 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Added a '-kde' option to the rbuic tool to generate require 'Korundum' * Added a '-kde' option to the rbuic tool to generate require 'Korundum'
instead of require 'Qt' statements, and use KDE widgets. instead of require 'TQt' statements, and use KDE widgets.
2004-04-30 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-04-30 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
@ -1254,7 +1254,7 @@
corresponding ruby arg VALUE after the call. corresponding ruby arg VALUE after the call.
- A pointer to a locally allocated TQString was being returned, - A pointer to a locally allocated TQString was being returned,
giving memory corruption problems. giving memory corruption problems.
* The default debug level in qtruby.rb is DebugLevel::OFF, otherwise * The default debug level in tqtruby.rb is DebugLevel::OFF, otherwise
very verbose error messages are produced. very verbose error messages are produced.
2004-01-28 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2004-01-28 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
@ -1267,13 +1267,13 @@
* Added DOM:: namespace for the DOM:: classes in the Smoke library. * Added DOM:: namespace for the DOM:: classes in the Smoke library.
* The scope operator in nested classnames is now '::' rather * The scope operator in nested classnames is now '::' rather
than '__', so changed the qtruby runtime to expect that. than '__', so changed the tqtruby runtime to expect that.
2003-11-13 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-11-13 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Added the KillerFilter event filtering example from chapter 16 * Added the KillerFilter event filtering example from chapter 16
of 'Programming with Qt' of 'Programming with TQt'
* Improved classname resolution via the Qt rtti mechanisms in * Improved classname resolution via the TQt rtti mechanisms in
TQObject, TQEvent and TQCanvasItem. This fixed a problem in the TQObject, TQEvent and TQCanvasItem. This fixed a problem in the
KillerFilter example when a TQMouseEvent was passed to the ruby KillerFilter example when a TQMouseEvent was passed to the ruby
event handler, it was being instantiated as a ruby TQt::Event, event handler, it was being instantiated as a ruby TQt::Event,
@ -1282,7 +1282,7 @@
2003-11-11 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-11-11 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Improved nil argument matching, and nil can match any type now * Improved nil argument matching, and nil can match any type now
not just classes. Translated the code from the Qt.pm in PerlQt, not just classes. Translated the code from the TQt.pm in PerlTQt,
after discussion on the kde-perl list. after discussion on the kde-perl list.
* Fixed bug in rbuic where a C++ 'TQString::null' was "" in ruby, and * Fixed bug in rbuic where a C++ 'TQString::null' was "" in ruby, and
should have been a nil. should have been a nil.
@ -1296,7 +1296,7 @@
* Put some C++ code inside blocks to ensure that the destructor clean * Put some C++ code inside blocks to ensure that the destructor clean
up code was called, when the current f'n longjmp's up the stack rather up code was called, when the current f'n longjmp's up the stack rather
than returns normally. than returns normally.
* QtRuby looking good, raised the version to 0.9.6 to celebrate * TQtRuby looking good, raised the version to 0.9.6 to celebrate
2003-11-07 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-11-07 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
@ -1309,9 +1309,9 @@
2003-11-03 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-11-03 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* When marshalling a const ref type to a ruby VALUE, it is now copied * When marshalling a const ref type to a ruby VALUE, it is now copied
* Applied some fixes for construct_copy() from the PerlQt version of * Applied some fixes for construct_copy() from the PerlTQt version of
handlers.cpp handlers.cpp
* Fixed some minor bugs in the progress.rb Qt example * Fixed some minor bugs in the progress.rb TQt example
2003-11-03 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-11-03 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
@ -1375,18 +1375,18 @@
2003-10-08 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-10-08 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Korundum KDE ruby extension * Korundum KDE ruby extension
- made various changes so it can be linked against the QtRuby code - made various changes so it can be linked against the TQtRuby code
2003-09-18 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-09-18 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Removed leading 'K' from class names of when adding to KDE:: namespace. * Removed leading 'K' from class names of when adding to KDE:: namespace.
As per Germain Garand's suggestion on the kde-bindings list: As per Germain Garand's suggestion on the kde-bindings list:
..actually, I used the same scheme as for Qt when possible, that is: ..actually, I used the same scheme as for TQt when possible, that is:
$class =~ s/^Q/TQt::/ or $class =~ s/^Q/TQt::/ or
$class =~ s/^K/KDE::/ or $class =~ s/^K/KDE::/ or
$class = "KDE::" . $class $class = "KDE::" . $class
unless $class eq "Qt"; unless $class eq "TQt";
2003-09-18 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-09-18 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
@ -1435,8 +1435,8 @@
2003-09-10 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-09-10 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Improved garbage collection with various 'ad hoc' rules from the * Improved garbage collection with various 'ad hoc' rules from the
QtJava bindings about when it's ok/not ok to destruct an instance. TQtJava bindings about when it's ok/not ok to destruct an instance.
Not always just a 'parent() != 0' check in Qt. Not always just a 'parent() != 0' check in TQt.
2003-09-10 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-09-10 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
@ -1469,13 +1469,13 @@
* smokeruby_free() and smokeruby_mark() have been implemented * smokeruby_free() and smokeruby_mark() have been implemented
* The C++ instance for a ruby object is deleted in smokeruby_free(), * The C++ instance for a ruby object is deleted in smokeruby_free(),
so watch out for extra crashes! so watch out for extra crashes!
* Improved README with more details about QtRuby * Improved README with more details about TQtRuby
2003-09-07 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-09-07 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Improved error message handling, changed rb_error() calls to rb_raise() * Improved error message handling, changed rb_error() calls to rb_raise()
* Decided changing method calls like foobar? to isFoobar() not a good idea, * Decided changing method calls like foobar? to isFoobar() not a good idea,
as the Qt property could just as also be hasFoobar() or foobar() as the TQt property could just as also be hasFoobar() or foobar()
2003-09-06 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-09-06 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
@ -1484,7 +1484,7 @@
2003-08-31 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-08-31 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* rbuic code generation brought up to date wrt Qt 3.2 uic * rbuic code generation brought up to date wrt TQt 3.2 uic
Main change is that a 'languageChanged()' method is generated Main change is that a 'languageChanged()' method is generated
2003-08-30 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-08-30 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
@ -1493,7 +1493,7 @@
2003-08-30 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-08-30 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Added 'Run Selection' menu option to the QtRuby shell * Added 'Run Selection' menu option to the TQtRuby shell
2003-08-30 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-08-30 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
@ -1510,17 +1510,17 @@
2003-08-27 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-08-27 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Changed the operator overloading implementation to be more like PerlQt * Changed the operator overloading implementation to be more like PerlTQt
2003-08-27 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-08-27 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Translated the rbqtsh filePrint() method from perl * Translated the rbtqtsh filePrint() method from perl
2003-08-26 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-08-26 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Added 'changed' attribute to the MetaInfo class, so that the C++ metaObject * Added 'changed' attribute to the MetaInfo class, so that the C++ metaObject
is reconstructed if the slots or signals are changed. is reconstructed if the slots or signals are changed.
* Changed window title on rbqtsh to 'QtRuby'. The example slot now works * Changed window title on rbtqtsh to 'TQtRuby'. The example slot now works
correctly. Only just tried this utility - Wow Alex!! correctly. Only just tried this utility - Wow Alex!!
2003-08-26 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-08-26 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
@ -1538,16 +1538,16 @@
* Removed obsolete rb_enable_super() calls * Removed obsolete rb_enable_super() calls
* Removed test for _current_object in class_method_missing() * Removed test for _current_object in class_method_missing()
* Fixed missing index in signalInfo() method * Fixed missing index in signalInfo() method
* Added Qt scribble example - TODO add TQt::PaintDevice.bitBlt() calls to SMOKE runtime * Added TQt scribble example - TODO add TQt::PaintDevice.bitBlt() calls to SMOKE runtime
2003-08-23 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-08-23 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Added rbuic tool for ruby Qt Designer support * Added rbuic tool for ruby TQt Designer support
2003-08-12 Alexander Kellett <lypanov@kde.org> 2003-08-12 Alexander Kellett <lypanov@kde.org>
* Add debug level setting via TQt::debug_level * Add debug level setting via TQt::debug_level
* When calling .new on a Qt object with a incorrect prototype * When calling .new on a TQt object with a incorrect prototype
the list of appropriate constructors is printed the list of appropriate constructors is printed
* Fix a number of cases in which imperfect code would cause a crash * Fix a number of cases in which imperfect code would cause a crash
@ -1562,7 +1562,7 @@
2003-08-07 Alexander Kellett <lypanov@kde.org> 2003-08-07 Alexander Kellett <lypanov@kde.org>
* Added rbqtapi and rbqt tools (port of the PerlQt tools of the same name) * Added rbtqtapi and rbtqt tools (port of the PerlTQt tools of the same name)
2003-08-06 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-08-06 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
@ -1575,8 +1575,8 @@
2003-08-12 Alexander Kellett <lypanov@kde.org> 2003-08-12 Alexander Kellett <lypanov@kde.org>
* Add several new marshalling types - TQCanvasItemList for example, * Add several new marshalling types - TQCanvasItemList for example,
unfortuantely due to several improvements in Qt 3.2 these unfortuantely due to several improvements in TQt 3.2 these
improvements will not be seen when compiling against Qt 3.1.2 improvements will not be seen when compiling against TQt 3.1.2
2003-08-05 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-08-05 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
@ -1584,7 +1584,7 @@
2003-08-05 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-08-05 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Removed redundant 'rb_eval_string("include Qt")' call from extension initialization. * Removed redundant 'rb_eval_string("include TQt")' call from extension initialization.
2003-08-05 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-08-05 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
@ -1611,8 +1611,8 @@
2003-08-01 Alexander Kellett <lypanov@kde.org> 2003-08-01 Alexander Kellett <lypanov@kde.org>
* Slightly improve ease of debugging of qtruby programs * Slightly improve ease of debugging of tqtruby programs
which subclass Qt base classes by print out some useful which subclass TQt base classes by print out some useful
debugging informationn when/if method_missing ever debugging informationn when/if method_missing ever
fails to find a matching function in the baseclass. fails to find a matching function in the baseclass.
@ -1627,14 +1627,14 @@
2003-07-31 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-07-31 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Changed require in Qt.cpp to 'Qt/Qt.rb' instead of 'lib/Qt/Qt.rb' * Changed require in TQt.cpp to 'TQt/TQt.rb' instead of 'lib/TQt/TQt.rb'
2003-07-31 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-07-31 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Fixed problem with non-working installed version, lib/Qt.rb moved to lib/Qt/Qt.rb * Fixed problem with non-working installed version, lib/TQt.rb moved to lib/TQt/TQt.rb
2003-07-30 Richard Dale <Richard_Dale@tipitina.demon.co.uk> 2003-07-30 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* QtRuby - a Ruby SMOKE adaptor for Qt, initial checkin * TQtRuby - a Ruby SMOKE adaptor for TQt, initial checkin

@ -3,7 +3,7 @@ Dependencies
- ruby 1.8 or greater - ruby 1.8 or greater
- automake 1.7 or greater - automake 1.7 or greater
- Qt 3.1 or greater - TQt 3.1 or greater
- KDE 3.1 or greater (for korundum) - KDE 3.1 or greater (for korundum)
CVS Snapshot CVS Snapshot
@ -17,19 +17,19 @@ Configure flags needed
---------------------- ----------------------
In order to build korundum: (this is the default in fact, so you can just use ./configure) In order to build korundum: (this is the default in fact, so you can just use ./configure)
./configure --with-smoke="qt kde" ./configure --with-smoke="tqt kde"
in order to build just qtruby: in order to build just tqtruby:
./configure --with-smoke="qt" ./configure --with-smoke="tqt"
Building the Qt extension without KDE build process Building the TQt extension without KDE build process
--------------------------------------------------- ---------------------------------------------------
To build the Qt.so extension, provide 'extconf.rb' with the directories where To build the TQt.so extension, provide 'extconf.rb' with the directories where
the Qt and Smoke libraries are installed: the TQt and Smoke libraries are installed:
$ cd qtruby/rubylib/qtruby $ cd tqtruby/rubylib/tqtruby
$ ruby extconf.rb --with-smoke-dir=/usr \ $ ruby extconf.rb --with-smoke-dir=/usr \
--with-qt-dir=/home/duke/src/kde/HEAD/qt-copy --with-tqt-dir=/home/duke/src/kde/HEAD/tqt-copy
$ make $ make
$ make install $ make install
@ -37,16 +37,16 @@ Building on Mac OS X
-------------------- --------------------
Automake/autoconf don't work very well on Mac OS X, and so qmake and Automake/autoconf don't work very well on Mac OS X, and so qmake and
exconf.rb must be used instead. You can use the native Aqua/Quartz Qt/Mac exconf.rb must be used instead. You can use the native Aqua/Quartz TQt/Mac
version of Qt - QtRuby doesn't require X11. version of TQt - TQtRuby doesn't require X11.
Build Qt/Mac and install in /Developer/qt. These configure flags work well: Build TQt/Mac and install in /Developer/tqt. These configure flags work well:
./configure -system-zlib -qt-gif -plugin-imgfmt-mng -thread -no-stl ./configure -system-zlib -tqt-gif -plugin-imgfmt-mng -thread -no-stl
-no-exceptions -fast -no-exceptions -fast
Configure QtRuby and build the Smoke library: Configure TQtRuby and build the Smoke library:
$ ./configure '--with-qt-dir=/Developer/qt' '--enable-mac' $ ./configure '--with-tqt-dir=/Developer/tqt' '--enable-mac'
$ cd smoke/tqt $ cd smoke/tqt
# Generate the Smoke library sources: # Generate the Smoke library sources:
$ perl generate.pl $ perl generate.pl
@ -56,27 +56,27 @@ $ qmake -makefile
$ sudo make $ sudo make
... ...
# Build the 'Qt' extension: # Build the 'TQt' extension:
$ cd qtruby/rubylib/qtruby $ cd tqtruby/rubylib/tqtruby
$ ruby extconf.rb --with-qt-dir=/Developer/qt --with-smoke-dir=/usr \ $ ruby extconf.rb --with-tqt-dir=/Developer/tqt --with-smoke-dir=/usr \
--with-smoke-include=../../../smoke --with-smoke-include=../../../smoke
$ make $ make
$ sudo make install $ sudo make install
... ...
# Build the rbuic tool and install into /usr/bin # Build the rbuic tool and install into /usr/bin
$ cd qtruby/rubylib/designer/rbuic $ cd tqtruby/rubylib/designer/rbuic
$ qmake -makefile $ qmake -makefile
$ sudo make $ sudo make
... ...
# Build the 'tqui' TQWidgetFactory extension # Build the 'tqui' TQWidgetFactory extension
$ cd qtruby/rubylib/designer/uilib $ cd tqtruby/rubylib/designer/uilib
$ ruby extconf.rb --with-qtruby-include=../../qtruby --with-qt-dir=/Developer/qt $ ruby extconf.rb --with-tqtruby-include=../../tqtruby --with-tqt-dir=/Developer/tqt
$ make $ make
$ sudo make install $ sudo make install
To get Mac menus to appear, when a QtRuby program is run from the command line, To get Mac menus to appear, when a TQtRuby program is run from the command line,
link ruby against the carbon resource lib and call it 'rubyw', see: link ruby against the carbon resource lib and call it 'rubyw', see:
http://www.rubygarden.org/ruby?RubyTkOnOSX http://www.rubygarden.org/ruby?RubyTkOnOSX
@ -97,12 +97,12 @@ Ryutaro Amano wrote this about creating a double clickable bundle:
"Thanks all, I have succeeded make rubyw. "Thanks all, I have succeeded make rubyw.
sample script is launched in foreground. sample script is launched in foreground.
And I have known the following steps to launch qt-ruby script by double clicking And I have known the following steps to launch tqt-ruby script by double clicking
from Finder. from Finder.
As an example, I take qtruby-1.0.11/qtruby/rubylib/tutorial/t14 As an example, I take tqtruby-1.0.11/tqtruby/rubylib/tutorial/t14
cd qtruby-1.0.11/qtruby/rubylib/tutorial/t14 cd tqtruby-1.0.11/tqtruby/rubylib/tutorial/t14
chmod 755 t14.rb chmod 755 t14.rb
replace first line of t14.rb with "#!/usr/local/bin/rubyw" replace first line of t14.rb with "#!/usr/local/bin/rubyw"
mkdir -p Shoot.app/Contents/MacOS mkdir -p Shoot.app/Contents/MacOS
@ -119,7 +119,7 @@ Info.plist is
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>Shoot</string> <string>Shoot</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
<string>jp.co.ryutaro.qtquit</string> <string>jp.co.ryutaro.tqtquit</string>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
@ -129,7 +129,7 @@ Info.plist is
echo -n "APPL????" > Shoot.app/Contents/PkgInfo echo -n "APPL????" > Shoot.app/Contents/PkgInfo
Double click Shoot.app, Qt-Window appears in foreground." Double click Shoot.app, TQt-Window appears in foreground."
TQScintilla text editing widget support TQScintilla text editing widget support
-------------------------------------- --------------------------------------
@ -139,6 +139,6 @@ number of languages including ruby. It can be downloaded from here:
http://www.riverbankcomputing.co.uk/qscintilla/download.php http://www.riverbankcomputing.co.uk/qscintilla/download.php
Use the '--enable-qscintilla=yes' configure option to build QtRuby with Use the '--enable-qscintilla=yes' configure option to build TQtRuby with
TQScintilla support. The classes in a 'Qext::' module, with names such as TQScintilla support. The classes in a 'Qext::' module, with names such as
Qext::Scintilla. Qext::Scintilla.

@ -8,7 +8,7 @@
* * * *
***************************************************************************/ ***************************************************************************/
Here is a Ruby SMOKE adaptor for Qt Here is a Ruby SMOKE adaptor for TQt
Why ruby? From the rubytalk list Why ruby? From the rubytalk list
@ -31,11 +31,11 @@ On 8/28/03 8:56 PM, "Scott Thompson" wrote:
So there you have it! :) So there you have it! :)
Here is 'Hello World' in QtRuby: Here is 'Hello World' in TQtRuby:
#!/usr/bin/ruby -w #!/usr/bin/ruby -w
require 'Qt' require 'TQt'
a = TQt::Application.new(ARGV) a = TQt::Application.new(ARGV)
hello = TQt::PushButton.new("Hello World!", nil) hello = TQt::PushButton.new("Hello World!", nil)
@ -46,12 +46,12 @@ a.exec()
Ruby 1.8 is unfortunately implicitly required as with 1.6.x it is not possible to: Ruby 1.8 is unfortunately implicitly required as with 1.6.x it is not possible to:
Make dynamic constants available (thus forcing syntax such as Qt.RichText rather than TQt::RichText)<br> Make dynamic constants available (thus forcing syntax such as TQt.RichText rather than TQt::RichText)<br>
Call super in the initialize method thus making subclassing of non trivial classes impossible Call super in the initialize method thus making subclassing of non trivial classes impossible
QtRuby features a very complete coverage of the Qt api: TQtRuby features a very complete coverage of the TQt api:
- You can call all Qt public and protected methods, and all friend methods - You can call all TQt public and protected methods, and all friend methods
such as bitBlt() etc such as bitBlt() etc
- Virtual methods - Virtual methods
@ -73,7 +73,7 @@ QtRuby features a very complete coverage of the Qt api:
createStandardStatusBarAction() createStandardStatusBarAction()
- Operator overloading - Operator overloading
The full range of Qt operator methods is available, for example: The full range of TQt operator methods is available, for example:
p1 = TQt::Point.new(5,5) => (5, 5) p1 = TQt::Point.new(5,5) => (5, 5)
p2 = TQt::Point.new(20,20) => (20, 20) p2 = TQt::Point.new(20,20) => (20, 20)
@ -85,7 +85,7 @@ QtRuby features a very complete coverage of the Qt api:
slots 'setColor(TQColor)', 'slotLoad(const TQString&)'.. slots 'setColor(TQColor)', 'slotLoad(const TQString&)'..
signals 'clicked()'.. signals 'clicked()'..
Currently C++ type signatures must be used, a future version of QtRuby Currently C++ type signatures must be used, a future version of TQtRuby
will allow ruby type signatures instead. will allow ruby type signatures instead.
Connect slots and signals like this: Connect slots and signals like this:
@ -163,7 +163,7 @@ QtRuby features a very complete coverage of the Qt api:
error, you can turn on debugging to trace the matching process: error, you can turn on debugging to trace the matching process:
a = TQt::Application.new(ARGV) a = TQt::Application.new(ARGV)
Qt.debug_level = TQt::DebugLevel::High TQt.debug_level = TQt::DebugLevel::High
a.loadLibrary("foo") # Non existent method a.loadLibrary("foo") # Non existent method
Will give the following output: Will give the following output:
@ -181,21 +181,21 @@ QtRuby features a very complete coverage of the Qt api:
Another debugging mechanism allows various trace 'channels' to be switched on. Another debugging mechanism allows various trace 'channels' to be switched on.
You can trace virtual method callbacks: You can trace virtual method callbacks:
TQt::Internal::setDebug(TQt::QtDebugChannel::TQTDB_VIRTUAL) TQt::Internal::setDebug(TQt::TQtDebugChannel::TQTDB_VIRTUAL)
Or trace QtRuby garbage collection: Or trace TQtRuby garbage collection:
TQt::Internal::setDebug(TQt::QtDebugChannel::TQTDB_GC) TQt::Internal::setDebug(TQt::TQtDebugChannel::TQTDB_GC)
- String i18n - String i18n
QtRuby supports $KCODE values of 'u', 'e' and TQtRuby supports $KCODE values of 'u', 'e' and
's' or the corresponding '-K' options from the command line. Qt Designer 's' or the corresponding '-K' options from the command line. TQt Designer
.ui files have UTF-8 strings so if you use any 8 bit UTF-8 characters, you .ui files have UTF-8 strings so if you use any 8 bit UTF-8 characters, you
will need to set $KCODE='u' or use the -Ku command line option. will need to set $KCODE='u' or use the -Ku command line option.
- Qt Designer - TQt Designer
A 'rbuic' tool is included in qtruby/rubylib/designer/rbuic to compile A 'rbuic' tool is included in tqtruby/rubylib/designer/rbuic to compile
.ui files into ruby code. As described above, Qt Designer uses UTF-8. .ui files into ruby code. As described above, TQt Designer uses UTF-8.
In addition to the options in the original uic C++ utility an '-x' flag In addition to the options in the original uic C++ utility an '-x' flag
has been added. This will generate a top level stub in the code: has been added. This will generate a top level stub in the code:
@ -216,10 +216,10 @@ QtRuby features a very complete coverage of the Qt api:
$ ruby mainform.rb $ ruby mainform.rb
- Loading .ui files at runtime with TQWidgetFactory - Loading .ui files at runtime with TQWidgetFactory
You can load a Qt Designer .ui file at runtime with the tqui extension, You can load a TQt Designer .ui file at runtime with the tqui extension,
for example: for example:
require 'Qt' require 'TQt'
require 'tqui' require 'tqui'
a = TQt::Application.new(ARGV) a = TQt::Application.new(ARGV)
@ -238,18 +238,18 @@ QtRuby features a very complete coverage of the Qt api:
a.exec() a.exec()
end end
- QtRuby shell - TQtRuby shell
You can use the QtRuby shell in bin/rbqtsh to create widgets You can use the TQtRuby shell in bin/rbtqtsh to create widgets
interactively from the command line. interactively from the command line.
- API reference - API reference
Use the bin/rbqtapi tool to discover which methods are available in Use the bin/rbtqtapi tool to discover which methods are available in
the QtRuby api. the TQtRuby api.
- Example programs - Example programs
The best way to start programming QtRuby is to look at some existing The best way to start programming TQtRuby is to look at some existing
code and start messing with it.. code and start messing with it..
The are various samples under qtruby/rubylib/examples. The are various samples under tqtruby/rubylib/examples.
- Optional TQScintilla text editing widget support - Optional TQScintilla text editing widget support
Great for building your own ruby IDE.. Great for building your own ruby IDE..

@ -6,8 +6,8 @@
* See the separate TODO list for the rbuic tool * See the separate TODO list for the rbuic tool
* Write a rubyeditor plugin for Qt Designer * Write a rubyeditor plugin for TQt Designer
* Add an option to rbqtapi to show the api in ruby format, rather than C++ * Add an option to rbtqtapi to show the api in ruby format, rather than C++
* Write a graphic class browser based on rbqtapi * Write a graphic class browser based on rbtqtapi

@ -0,0 +1,9 @@
INCLUDES = $(all_includes) -I$(RUBY_ARCHDIR) $(RUBY_CFLAGS)
bin_PROGRAMS = tqtrubyinit
tqtrubyinit_LDFLAGS = -module $(all_libraries) -version-info 0:0:0 -L$(top_srcdir)/smoke/tqt/ -L$(RUBY_LIBDIR)
tqtrubyinit_METASOURCES = AUTO
tqtrubyinit_SOURCES = tqtrubyinit.cpp
tqtrubyinit_LDADD = $(LIB_TQT) $(RUBY_LIBRUBYARG) $(top_builddir)/smoke/tqt/libsmoketqt.la $(top_builddir)/tqtruby/rubylib/tqtruby/libtqtrubyinternal.la
bin_SCRIPTS = rbtqtapi rbtqtsh

@ -1,21 +1,21 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
# Note: this program is part of qtruby and makes use of its internal functions. # Note: this program is part of tqtruby and makes use of its internal functions.
# You should not rely on those in your own programs. # You should not rely on those in your own programs.
require 'getopts' require 'getopts'
getopts('r:hvimp') getopts('r:hvimp')
case File.basename $0 case File.basename $0
when "rbqtapi" when "rbtqtapi"
require 'Qt' require 'TQt'
when "rbtdeapi" when "rbtdeapi"
require 'Korundum' require 'Korundum'
end end
if $OPT_v if $OPT_v
# TODO add and use version number #{TQt::VERSION} # TODO add and use version number #{TQt::VERSION}
print "qtruby using Qt-#{TQt::version}\n" print "tqtruby using TQt-#{TQt::version}\n"
exit 0 exit 0
elsif $OPT_h elsif $OPT_h
print $usage print $usage
@ -89,15 +89,15 @@ end
BEGIN { BEGIN {
$usage = <<USAGE $usage = <<USAGE
rbqtapi - a qtruby introspection tool\t(c) Germain Garand 2003 <germain\@ebooksfrance.org> rbtqtapi - a tqtruby introspection tool\t(c) Germain Garand 2003 <germain\@ebooksfrance.org>
usage: rbqtapi [-r <re>] [<class>] usage: rbtqtapi [-r <re>] [<class>]
options: options:
\t-r <re> : find all functions matching regular expression/keyword <re> \t-r <re> : find all functions matching regular expression/keyword <re>
\t-i : together with -r, performs a case insensitive search \t-i : together with -r, performs a case insensitive search
\t-p : display also inherited methods for <class>. \t-p : display also inherited methods for <class>.
\t-v : print qtruby and Qt versions \t-v : print tqtruby and TQt versions
\t-h : print this help message \t-h : print this help message
USAGE USAGE
} }

@ -1,6 +1,6 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
# rbqtsh : a graphical shell for qtruby. # rbtqtsh : a graphical shell for tqtruby.
# #
# author: Germain Garand <germain@ebooksfrance.org> # author: Germain Garand <germain@ebooksfrance.org>
# ruby port: Alexander Kellett <lypanov@kde.org> # ruby port: Alexander Kellett <lypanov@kde.org>
@ -10,13 +10,13 @@
require 'stringio' require 'stringio'
case File.basename $0 case File.basename $0
when "rbqtsh" when "rbtqtsh"
require 'Qt' require 'TQt'
when "rbtdesh" when "rbtdesh"
require 'Korundum' require 'Korundum'
end end
include Qt include TQt
$image0_data = $image0_data =
["22 22 7 1", ["22 22 7 1",
@ -224,7 +224,7 @@ $image3_data =
"QtQt.d#r#s#s#t#p.T.T.T#u#u.z#e#e#v.o.kQtQtQt"] "QtQt.d#r#s#s#t#p.T.T.T#u#u.z#e#e#v.o.kQtQtQt"]
class QtShellControl < TQt::MainWindow class TQtShellControl < TQt::MainWindow
attr_accessor :menubar, :fileMenu, :helpMenu, :toolBar, :fileName, :fileOpenAction attr_accessor :menubar, :fileMenu, :helpMenu, :toolBar, :fileName, :fileOpenAction
attr_accessor :fileSaveAction, :fileSaveAsAction, :filePrintAction, :fileExitAction attr_accessor :fileSaveAction, :fileSaveAsAction, :filePrintAction, :fileExitAction
attr_accessor :helpExampleAction, :comboBox, :sessionLog, :executedLines, :printer attr_accessor :helpExampleAction, :comboBox, :sessionLog, :executedLines, :printer
@ -248,7 +248,7 @@ class QtShellControl < TQt::MainWindow
self.setCentralWidget(box) self.setCentralWidget(box)
@comboBox.setFocus @comboBox.setFocus
self.resize(500,300) self.resize(500,300)
self.setCaption("QtRuby Shell") self.setCaption("TQtRuby Shell")
def trUtf8(k) def trUtf8(k)
return k return k
end end
@ -331,7 +331,7 @@ class QtShellControl < TQt::MainWindow
def fileOpen def fileOpen
fname = TQt::FileDialog::getOpenFileName( fname = TQt::FileDialog::getOpenFileName(
".", ".",
"Rbqtsh Session (*.rbqts)", "Rbtqtsh Session (*.rbtqts)",
self, self,
"open session", "open session",
"Choose a file to open") "Choose a file to open")
@ -342,12 +342,12 @@ class QtShellControl < TQt::MainWindow
def getFileName def getFileName
@fileName = TQt::FileDialog::getSaveFileName( @fileName = TQt::FileDialog::getSaveFileName(
".", ".",
"Rbqtsh Session (*.rbqts)", "Rbtqtsh Session (*.rbtqts)",
self, self,
"save session", "save session",
"Choose a filename" ) "Choose a filename" )
unless @fileName =~ /\.rbqts$/ unless @fileName =~ /\.rbtqts$/
@fileName << ".rbqts" @fileName << ".rbtqts"
end end
@fileName @fileName
end end
@ -479,7 +479,7 @@ class QtShellControl < TQt::MainWindow
end end
class QtShell < TQt::MainWindow class TQtShell < TQt::MainWindow
slots 'evalInput()', 'evalFile(TQString)', 'evalSelection(TQString)' slots 'evalInput()', 'evalFile(TQString)', 'evalSelection(TQString)'
attr_accessor :shellWindow attr_accessor :shellWindow
@@binding = binding @@binding = binding
@ -490,7 +490,7 @@ end
def initialize(*k) def initialize(*k)
super(*k) super(*k)
@shellWindow = QtShellControl.new(nil, "shellWindow") @shellWindow = TQtShellControl.new(nil, "shellWindow")
self.resize(350,350) self.resize(350,350)
self.move(Point.new(10,10)) self.move(Point.new(10,10))
@shellWindow.move(Point.new(300,200)) @shellWindow.move(Point.new(300,200))
@ -603,7 +603,7 @@ end
end end
app = TQt::Application.new(ARGV) app = TQt::Application.new(ARGV)
w = QtShell.new(nil, "mainWindow") w = TQtShell.new(nil, "mainWindow")
app.setMainWidget(w.shellWindow) app.setMainWidget(w.shellWindow)
app.exec app.exec

@ -0,0 +1 @@
SUBDIRS = tqtruby designer

@ -1,4 +1,4 @@
This is the Qt Designer Tutorial 'Creating Dialogs' translated into QtRuby. It This is the TQt Designer Tutorial 'Creating Dialogs' translated into TQtRuby. It
shows how you can combine ruby code generated from .ui files with the rbuic shows how you can combine ruby code generated from .ui files with the rbuic
tool, with your own code. tool, with your own code.

@ -1,4 +1,4 @@
require 'Qt' require 'TQt'
require 'mainform.rb' require 'mainform.rb'
require 'mainform.ui.rb' require 'mainform.ui.rb'

@ -6,7 +6,7 @@ class MainForm
COL_NAME = 0 COL_NAME = 0
COL_HEX = 1 COL_HEX = 1
COL_WEB = 2 COL_WEB = 2
WINDOWS_REGISTRY = "/QtExamples" WINDOWS_REGISTRY = "/TQtExamples"
APP_KEY = "/ColorTool/" APP_KEY = "/ColorTool/"
def init() def init()

@ -1,15 +1,15 @@
/********************************************************************** /**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved. ** Copyright (C) 2000 Trolltech AS. All rights reserved.
** **
** This file is part of Qt Designer. ** This file is part of TQt Designer.
** **
** This file may be distributed and/or modified under the terms of the ** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software ** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the ** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. ** packaging of this file.
** **
** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition ** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition
** licenses may use this file in accordance with the Qt Commercial License ** licenses may use this file in accordance with the TQt Commercial License
** Agreement provided with the Software. ** Agreement provided with the Software.
** **
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
@ -17,7 +17,7 @@
** **
** See http://www.trolltech.com/gpl/ for GPL licensing information. ** See http://www.trolltech.com/gpl/ for GPL licensing information.
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
** information about Qt Commercial License Agreements. ** information about TQt Commercial License Agreements.
** **
** Contact info@trolltech.com if any conditions of this licensing are ** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you. ** not clear to you.
@ -352,7 +352,7 @@ static bool toBool( const TQString& s )
} }
/*! /*!
Convert Qt 2.x format to Qt 3.0 format if necessary Convert Qt 2.x format to TQt 3.0 format if necessary
*/ */
void DomTool::fixDocument( TQDomDocument& doc ) void DomTool::fixDocument( TQDomDocument& doc )
{ {

@ -1,15 +1,15 @@
/********************************************************************** /**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved. ** Copyright (C) 2000 Trolltech AS. All rights reserved.
** **
** This file is part of Qt Designer. ** This file is part of TQt Designer.
** **
** This file may be distributed and/or modified under the terms of the ** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software ** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the ** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. ** packaging of this file.
** **
** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition ** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition
** licenses may use this file in accordance with the Qt Commercial License ** licenses may use this file in accordance with the TQt Commercial License
** Agreement provided with the Software. ** Agreement provided with the Software.
** **
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
@ -17,7 +17,7 @@
** **
** See http://www.trolltech.com/gpl/ for GPL licensing information. ** See http://www.trolltech.com/gpl/ for GPL licensing information.
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
** information about Qt Commercial License Agreements. ** information about TQt Commercial License Agreements.
** **
** Contact info@trolltech.com if any conditions of this licensing are ** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you. ** not clear to you.
@ -33,7 +33,7 @@
class TQDomElement; class TQDomElement;
class TQDomDocument; class TQDomDocument;
class DomTool : public Qt class DomTool : public TQt
{ {
public: public:
static TQVariant readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue ); static TQVariant readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue );

@ -4,7 +4,7 @@
** Copyright (c) 2002 Riverbank Computing Limited <info@riverbankcomputing.co.uk> ** Copyright (c) 2002 Riverbank Computing Limited <info@riverbankcomputing.co.uk>
** Copyright (c) 2002 Germain Garand <germain@ebooksfrance.com> ** Copyright (c) 2002 Germain Garand <germain@ebooksfrance.com>
** **
** This file is part of Qt Designer. ** This file is part of TQt Designer.
** **
** This file may be distributed and/or modified under the terms of the ** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software ** GNU General Public License version 2 as published by the Free Software
@ -21,14 +21,14 @@
** **
**********************************************************************/ **********************************************************************/
/* /*
** 06/2002 : Initial release of puic, the PerlQt User Interface Compiler, ** 06/2002 : Initial release of puic, the PerlTQt User Interface Compiler,
** a work derivated from uic (the Qt User Interface Compiler) ** a work derivated from uic (the TQt User Interface Compiler)
** and pyuic (the PyQt User Interface Compiler). ** and pyuic (the PyTQt User Interface Compiler).
** **
** G.Garand ** G.Garand
** **
** 08/2003 : Initial release of rbuic, the QtRuby User Interface Compiler, ** 08/2003 : Initial release of rbuic, the TQtRuby User Interface Compiler,
** a work derived from the PerlQt puic. ** a work derived from the PerlTQt puic.
** **
** Richard Dale ** Richard Dale
** **
@ -133,14 +133,14 @@ void Uic::embed( TQTextStream& out, const char* project, const TQStringList& ima
out << "# " << *it << endl; out << "# " << *it << endl;
out << "#" << endl; out << "#" << endl;
out << "# Created: " << TQDateTime::currentDateTime().toString() << endl; out << "# Created: " << TQDateTime::currentDateTime().toString() << endl;
out << "# by: The QtRuby User Interface Compiler (rbuic)" << endl; out << "# by: The TQtRuby User Interface Compiler (rbuic)" << endl;
out << "#" << endl; out << "#" << endl;
out << "# WARNING! All changes made in this file will be lost!" << endl; out << "# WARNING! All changes made in this file will be lost!" << endl;
out << endl; out << endl;
if (hasKDEwidget) { if (hasKDEwidget) {
out << "require 'Korundum'" << endl; out << "require 'Korundum'" << endl;
} else { } else {
out << "require 'Qt'" << endl; out << "require 'TQt'" << endl;
} }
out << endl; out << endl;

@ -2,7 +2,7 @@
** Copyright (C) 2000 Trolltech AS. All rights reserved. ** Copyright (C) 2000 Trolltech AS. All rights reserved.
** Copyright (c) 2002 Germain Garand <germain@ebooksfrance.com> ** Copyright (c) 2002 Germain Garand <germain@ebooksfrance.com>
** **
** This file is part of Qt Designer. ** This file is part of TQt Designer.
** **
** This file may be distributed and/or modified under the terms of the ** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software ** GNU General Public License version 2 as published by the Free Software
@ -19,9 +19,9 @@
** **
**********************************************************************/ **********************************************************************/
/* /*
** 06/2002 : Initial release of puic, the PerlQt User Interface Compiler, ** 06/2002 : Initial release of puic, the PerlTQt User Interface Compiler,
** a work derivated from uic (the Qt User Interface Compiler) ** a work derivated from uic (the TQt User Interface Compiler)
** and pyuic (the PyQt User Interface Compiler). ** and pyuic (the PyTQt User Interface Compiler).
** **
** G.Garand ** G.Garand
** **
@ -97,7 +97,7 @@ void Uic::createFormImpl( const TQDomElement &e )
if (hasKDEwidget) { if (hasKDEwidget) {
out << indent << "require 'Korundum'" << endl << endl; out << indent << "require 'Korundum'" << endl << endl;
} else { } else {
out << indent << "require 'Qt'" << endl << endl; out << indent << "require 'TQt'" << endl << endl;
} }
// generate local and local includes required // generate local and local includes required
@ -208,7 +208,7 @@ void Uic::createFormImpl( const TQDomElement &e )
out << "class " << nameOfClass << " < " << objClass << endl << endl; out << "class " << nameOfClass << " < " << objClass << endl << endl;
// QtRuby sig/slot declaration // TQtRuby sig/slot declaration
++indent; ++indent;
@ -771,7 +771,7 @@ void Uic::createFormImpl( const TQDomElement &e )
} }
} }
// QtRuby - FIXME: what the heck is this ? // TQtRuby - FIXME: what the heck is this ?
// buddies // buddies
bool firstBuddy = true; bool firstBuddy = true;
for ( TQValueList<Buddy>::Iterator buddy = buddies.begin(); buddy != buddies.end(); ++buddy ) { for ( TQValueList<Buddy>::Iterator buddy = buddies.begin(); buddy != buddies.end(); ++buddy ) {
@ -816,7 +816,7 @@ void Uic::createFormImpl( const TQDomElement &e )
break; break;
} }
// PerlQt - TODO: is this needed ? // PerlTQt - TODO: is this needed ?
// Seems not.. let's ifzero for now... // Seems not.. let's ifzero for now...
if ( 0 && needFontEventHandler) { if ( 0 && needFontEventHandler) {
@ -1009,7 +1009,7 @@ void Uic::createFormImpl( const TQDomElement& e, const TQString& form, const TQS
} }
// Generate a QtRuby signal/slot definition. // Generate a TQtRuby signal/slot definition.
void Uic::rubySlot(TQStringList::Iterator &it) void Uic::rubySlot(TQStringList::Iterator &it)
{ {

@ -1,7 +1,7 @@
/********************************************************************** /**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved. ** Copyright (C) 2000 Trolltech AS. All rights reserved.
** **
** This file is part of Qt Designer. ** This file is part of TQt Designer.
** **
** This file may be distributed and/or modified under the terms of the ** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software ** GNU General Public License version 2 as published by the Free Software

@ -3,7 +3,7 @@
** Copyright (c) 2001 Phil Thompson <phil@river-bank.demon.co.uk> ** Copyright (c) 2001 Phil Thompson <phil@river-bank.demon.co.uk>
** Copyright (c) 2002 Germain Garand <germain@ebooksfrance.com> ** Copyright (c) 2002 Germain Garand <germain@ebooksfrance.com>
** **
** This file is part of Qt Designer. ** This file is part of TQt Designer.
** **
** This file may be distributed and/or modified under the terms of the ** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software ** GNU General Public License version 2 as published by the Free Software
@ -20,14 +20,14 @@
** **
**********************************************************************/ **********************************************************************/
/* /*
** 06/2002 : Initial release of puic, the PerlQt User Interface Compiler, ** 06/2002 : Initial release of puic, the PerlTQt User Interface Compiler,
** a work derivated from uic (the Qt User Interface Compiler) ** a work derivated from uic (the TQt User Interface Compiler)
** and pyuic (the PyQt User Interface Compiler). ** and pyuic (the PyTQt User Interface Compiler).
** **
** G.Garand ** G.Garand
** **
** 08/2003 : Initial release of rbuic, the QtRuby User Interface Compiler, ** 08/2003 : Initial release of rbuic, the TQtRuby User Interface Compiler,
** a work derived from the PerlQt puic. ** a work derived from the PerlTQt puic.
** **
** Richard Dale ** Richard Dale
** **
@ -116,7 +116,7 @@ int main( int argc, char * argv[] )
} }
} else if ( opt == "version" ) { } else if ( opt == "version" ) {
fprintf( stderr, fprintf( stderr,
"QtRuby User Interface Compiler v%s for Qt version %s\n", RBUIC_VERSION, "TQtRuby User Interface Compiler v%s for TQt version %s\n", RBUIC_VERSION,
TQT_VERSION_STR ); TQT_VERSION_STR );
exit( 1 ); exit( 1 );
} else if ( opt == "help" ) { } else if ( opt == "help" ) {
@ -156,7 +156,7 @@ int main( int argc, char * argv[] )
} }
if ( argc < 2 || error || (!fileName && !imagecollection ) ) { if ( argc < 2 || error || (!fileName && !imagecollection ) ) {
fprintf( stderr, "QtRuby user interface compiler.\n" ); fprintf( stderr, "TQtRuby user interface compiler.\n" );
if ( error ) if ( error )
fprintf( stderr, "rbuic: %s\n", error ); fprintf( stderr, "rbuic: %s\n", error );
@ -224,7 +224,7 @@ int main( int argc, char * argv[] )
out << "# Form implementation generated from reading ui file '" << fileName << "'" << endl; out << "# Form implementation generated from reading ui file '" << fileName << "'" << endl;
out << "#" << endl; out << "#" << endl;
out << "# Created: " << TQDateTime::currentDateTime().toString() << endl; out << "# Created: " << TQDateTime::currentDateTime().toString() << endl;
out << "# by: The QtRuby User Interface Compiler (rbuic)" << endl; out << "# by: The TQtRuby User Interface Compiler (rbuic)" << endl;
out << "#" << endl; out << "#" << endl;
out << "# WARNING! All changes made in this file will be lost!" << endl; out << "# WARNING! All changes made in this file will be lost!" << endl;
out << endl; out << endl;

@ -1,7 +1,7 @@
/********************************************************************** /**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved. ** Copyright (C) 2000 Trolltech AS. All rights reserved.
** **
** This file is part of Qt Designer. ** This file is part of TQt Designer.
** **
** This file may be distributed and/or modified under the terms of the ** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software ** GNU General Public License version 2 as published by the Free Software
@ -16,8 +16,8 @@
** Contact info@trolltech.com if any conditions of this licensing are ** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you. ** not clear to you.
** **
** 08/2003 : Initial release of rbuic, the QtRuby User Interface Compiler, ** 08/2003 : Initial release of rbuic, the TQtRuby User Interface Compiler,
** a work derived from the PerlQt puic. ** a work derived from the PerlTQt puic.
** **
** Richard Dale ** Richard Dale
** **
@ -63,7 +63,7 @@ void Uic::createObjectDecl( const TQDomElement& e )
} }
/*! /*!
Creates a QtRuby attribute declaration for the object given in \a e. Creates a TQtRuby attribute declaration for the object given in \a e.
Children are not traversed recursively. Children are not traversed recursively.
@ -160,7 +160,7 @@ TQString Uic::createObjectImpl( const TQDomElement &e, const TQString& parentCla
} }
// Layouts don't go into the class instance dictionary. // Layouts don't go into the class instance dictionary.
// FIXME PerlQt: fullObjName isn't used anymore => remove // FIXME PerlTQt: fullObjName isn't used anymore => remove
fullObjName = objName; fullObjName = objName;
} else if ( objClass != "TQt::ToolBar" && objClass != "TQt::MenuBar" ) { } else if ( objClass != "TQt::ToolBar" && objClass != "TQt::MenuBar" ) {
// register the object and unify its name // register the object and unify its name
@ -511,7 +511,7 @@ TQString Uic::setObjectProperty( const TQString& objClass, const TQString& obj,
v = "\"%1\""; v = "\"%1\"";
v = v.arg( e.firstChild().toText().data() ); v = v.arg( e.firstChild().toText().data() );
} else if ( e.tagName() == "number" ) { } else if ( e.tagName() == "number" ) {
// FIXME: hack. QtRuby needs a TQKeySequence to build an accel // FIXME: hack. TQtRuby needs a TQKeySequence to build an accel
if( e.parentNode().toElement().attribute("name") == "accel" ) if( e.parentNode().toElement().attribute("name") == "accel" )
v = "TQt::KeySequence.new(%1)"; v = "TQt::KeySequence.new(%1)";
else else

@ -1,7 +1,7 @@
/********************************************************************** /**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved. ** Copyright (C) 2000 Trolltech AS. All rights reserved.
** **
** This file is part of Qt Designer. ** This file is part of TQt Designer.
** **
** This file may be distributed and/or modified under the terms of the ** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software ** GNU General Public License version 2 as published by the Free Software
@ -16,8 +16,8 @@
** Contact info@trolltech.com if any conditions of this licensing are ** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you. ** not clear to you.
** **
** 08/2003 : Initial release of rbuic, the QtRuby User Interface Compiler, ** 08/2003 : Initial release of rbuic, the TQtRuby User Interface Compiler,
** a work derived from the PerlQt puic. ** a work derived from the PerlTQt puic.
** **
** Richard Dale ** Richard Dale
** **

@ -1,7 +1,7 @@
/********************************************************************** /**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved. ** Copyright (C) 2000 Trolltech AS. All rights reserved.
** **
** This file is part of Qt Designer. ** This file is part of TQt Designer.
** **
** This file may be distributed and/or modified under the terms of the ** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software ** GNU General Public License version 2 as published by the Free Software

@ -1,5 +1,5 @@
TEMPLATE = app TEMPLATE = app
CONFIG += qt console warn_on release professional CONFIG += tqt console warn_on release professional
HEADERS = uic.h \ HEADERS = uic.h \
widgetdatabase.h \ widgetdatabase.h \
domtool.h \ domtool.h \

@ -1,7 +1,7 @@
/********************************************************************** /**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved. ** Copyright (C) 2000 Trolltech AS. All rights reserved.
** **
** This file is part of Qt Designer. ** This file is part of TQt Designer.
** **
** This file may be distributed and/or modified under the terms of the ** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software ** GNU General Public License version 2 as published by the Free Software
@ -52,7 +52,7 @@ void Uic::createSubImpl( const TQDomElement &e, const TQString& subClass )
if (hasKDEwidget) { if (hasKDEwidget) {
out << indent << "require 'Korundum'" << endl; out << indent << "require 'Korundum'" << endl;
} else { } else {
out << indent << "require 'Qt'" << endl; out << indent << "require 'TQt'" << endl;
} }
out << endl; out << endl;
out << indent << "class " << subClass << " < " << nameOfClass << endl; out << indent << "class " << subClass << " < " << nameOfClass << endl;

@ -3,7 +3,7 @@
** Copyright (c) 2001 Phil Thompson <phil@river-bank.demon.co.uk> ** Copyright (c) 2001 Phil Thompson <phil@river-bank.demon.co.uk>
** Copyright (c) 2002 Germain Garand <germain@ebooksfrance.com> ** Copyright (c) 2002 Germain Garand <germain@ebooksfrance.com>
** **
** This file is part of Qt Designer. ** This file is part of TQt Designer.
** **
** This file may be distributed and/or modified under the terms of the ** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software ** GNU General Public License version 2 as published by the Free Software
@ -20,14 +20,14 @@
** **
**********************************************************************/ **********************************************************************/
/* /*
** 06/2002 : Initial release of puic, the PerlQt User Interface Compiler, ** 06/2002 : Initial release of puic, the PerlTQt User Interface Compiler,
** a work derivated from uic (the Qt User Interface Compiler) ** a work derivated from uic (the TQt User Interface Compiler)
** and pyuic (the PyQt User Interface Compiler). ** and pyuic (the PyTQt User Interface Compiler).
** **
** G.Garand ** G.Garand
** **
** 08/2003 : Initial release of rbuic, the QtRuby User Interface Compiler, ** 08/2003 : Initial release of rbuic, the TQtRuby User Interface Compiler,
** a work derived from the PerlQt puic. ** a work derived from the PerlTQt puic.
** **
** Richard Dale ** Richard Dale
** **
@ -127,7 +127,7 @@ bool Uic::isEmptyFunction( const TQString& fname )
TQString body = (*fit).mid( begin + 1, (*fit).findRev( "}" ) - begin - 1 ); TQString body = (*fit).mid( begin + 1, (*fit).findRev( "}" ) - begin - 1 );
return body.simplifyWhiteSpace().isEmpty(); return body.simplifyWhiteSpace().isEmpty();
} }
// For now ruby functions are always empty, until a rubyeditor Qt Designer plugin exists.. // For now ruby functions are always empty, until a rubyeditor TQt Designer plugin exists..
return true; return true;
} }

@ -2,7 +2,7 @@
** Copyright (C) 2000 Trolltech AS. All rights reserved. ** Copyright (C) 2000 Trolltech AS. All rights reserved.
** Copyright (c) 2001 Phil Thompson <phil@river-bank.demon.co.uk> ** Copyright (c) 2001 Phil Thompson <phil@river-bank.demon.co.uk>
** **
** This file is part of Qt Designer. ** This file is part of TQt Designer.
** **
** This file may be distributed and/or modified under the terms of the ** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software ** GNU General Public License version 2 as published by the Free Software
@ -48,7 +48,7 @@ private:
}; };
class Uic : public Qt class Uic : public TQt
{ {
public: public:
Uic( const TQString &fn, TQTextStream& out, TQDomDocument doc, bool subcl, Uic( const TQString &fn, TQTextStream& out, TQDomDocument doc, bool subcl,

@ -1,7 +1,7 @@
/********************************************************************** /**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved. ** Copyright (C) 2000 Trolltech AS. All rights reserved.
** **
** This file is part of Qt Designer. ** This file is part of TQt Designer.
** **
** This file may be distributed and/or modified under the terms of the ** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software ** GNU General Public License version 2 as published by the Free Software

@ -1,7 +1,7 @@
/********************************************************************** /**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved. ** Copyright (C) 2000 Trolltech AS. All rights reserved.
** **
** This file is part of Qt Designer. ** This file is part of TQt Designer.
** **
** This file may be distributed and/or modified under the terms of the ** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software ** GNU General Public License version 2 as published by the Free Software
@ -40,7 +40,7 @@ struct WidgetDatabaseRecord
int nameCounter; int nameCounter;
}; };
class WidgetDatabase : public Qt class WidgetDatabase : public TQt
{ {
public: public:
WidgetDatabase(); WidgetDatabase();

@ -1,7 +1,7 @@
/********************************************************************** /**********************************************************************
** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. ** Copyright (C) 2000-2001 Trolltech AS. All rights reserved.
** **
** This file is part of Qt Designer. ** This file is part of TQt Designer.
** **
** This file may be distributed and/or modified under the terms of the ** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software ** GNU General Public License version 2 as published by the Free Software

@ -1,7 +1,7 @@
INCLUDES = -I$(top_srcdir)/smoke -I$(top_srcdir)/qtruby/rubylib/qtruby $(all_includes) -I$(RUBY_ARCHDIR) $(RUBY_CFLAGS) INCLUDES = -I$(top_srcdir)/smoke -I$(top_srcdir)/tqtruby/rubylib/tqtruby $(all_includes) -I$(RUBY_ARCHDIR) $(RUBY_CFLAGS)
rubylibdir = $(RUBY_ARCHDIR) rubylibdir = $(RUBY_ARCHDIR)
rubylib_LTLIBRARIES = tqui.la rubylib_LTLIBRARIES = tqui.la
tqui_la_SOURCES = tqui.cpp tqui_la_SOURCES = tqui.cpp
tqui_la_LDFLAGS = -module -export-dynamic $(all_libraries) -version-info 0:0:0 tqui_la_LDFLAGS = -module -export-dynamic $(all_libraries) -version-info 0:0:0
tqui_la_LIBADD = -ltqui $(LIB_TQT) $(RUBY_LIBRUBYARG) $(top_builddir)/smoke/tqt/libsmoketqt.la $(top_builddir)/qtruby/rubylib/qtruby/libtqtrubyinternal.la tqui_la_LIBADD = -ltqui $(LIB_TQT) $(RUBY_LIBRUBYARG) $(top_builddir)/smoke/tqt/libsmoketqt.la $(top_builddir)/tqtruby/rubylib/tqtruby/libtqtrubyinternal.la

@ -0,0 +1,6 @@
require 'mkmf'
dir_config('smoke')
dir_config('tqt')
$CPPFLAGS += " -I../../../../smoke -I../../tqtruby "
$LOCAL_LIBS += '-bundle_loader ../../tqtruby/tqtruby.bundle -lsmoketqt -ltqui -ltqt-mt -lstdc++'
create_makefile("tqui")

@ -1,4 +1,4 @@
require 'Qt' require 'TQt'
require 'tqui' require 'tqui'
a = TQt::Application.new(ARGV) a = TQt::Application.new(ARGV)

@ -32,10 +32,10 @@
#endif #endif
#include <ruby.h> #include <ruby.h>
#include "qtruby.h" #include "tqtruby.h"
#include "smokeruby.h" #include "smokeruby.h"
extern Smoke *qt_Smoke; extern Smoke *tqt_Smoke;
extern bool isDerivedFrom(Smoke *smoke, Smoke::Index classId, Smoke::Index baseId); extern bool isDerivedFrom(Smoke *smoke, Smoke::Index classId, Smoke::Index baseId);
extern "C" { extern "C" {
@ -93,7 +93,7 @@ create(int argc, VALUE * argv, VALUE /*klass*/)
TQIODevice * dev = 0; TQIODevice * dev = 0;
smokeruby_object *o = value_obj_info(argv[0]); smokeruby_object *o = value_obj_info(argv[0]);
if (o != 0 && o->ptr != 0 && o->classId == qt_Smoke->idClass("TQIODevice")) { if (o != 0 && o->ptr != 0 && o->classId == tqt_Smoke->idClass("TQIODevice")) {
dev = (TQIODevice *) o->ptr; dev = (TQIODevice *) o->ptr;
} else { } else {
rb_raise(rb_eArgError, "invalid argument type\n"); rb_raise(rb_eArgError, "invalid argument type\n");
@ -106,12 +106,12 @@ create(int argc, VALUE * argv, VALUE /*klass*/)
if (topLevelWidget != 0) { if (topLevelWidget != 0) {
smokeruby_object * o = (smokeruby_object *) malloc(sizeof(smokeruby_object)); smokeruby_object * o = (smokeruby_object *) malloc(sizeof(smokeruby_object));
o->smoke = qt_Smoke; o->smoke = tqt_Smoke;
o->classId = qt_Smoke->idClass(topLevelWidget->className()); o->classId = tqt_Smoke->idClass(topLevelWidget->className());
o->ptr = topLevelWidget; o->ptr = topLevelWidget;
o->allocated = false; o->allocated = false;
const char * className = qt_Smoke->binding->className(o->classId); const char * className = tqt_Smoke->binding->className(o->classId);
result = set_obj_info(className, o); result = set_obj_info(className, o);
} }

@ -28,7 +28,7 @@ class TDEIconCollection
icon_set.setPixmap(pixmap, TQt::IconSet.Small) icon_set.setPixmap(pixmap, TQt::IconSet.Small)
icon_set icon_set
end end
def make_qt_action(parent, text_with_accel, icon_type) def make_tqt_action(parent, text_with_accel, icon_type)
act = TQt::Action.new(parent) act = TQt::Action.new(parent)
act.setIconSet(get_icon_set(icon_type)) act.setIconSet(get_icon_set(icon_type))
act.setMenuText(text_with_accel) act.setMenuText(text_with_accel)

@ -10,12 +10,12 @@ def build_actions(actions)
|to| a.id = to.insertSeparator() |to| a.id = to.insertSeparator()
} }
else else
qt_action = $kIcons.make_qt_action(self, a.text_with_accel, a.icon_type) tqt_action = $kIcons.make_tqt_action(self, a.text_with_accel, a.icon_type)
connect(qt_action, SIGNAL('activated()'), a.rec, a.slot) connect(tqt_action, SIGNAL('activated()'), a.rec, a.slot)
a.included_in.each { a.included_in.each {
|to| qt_action.addTo(to) |to| tqt_action.addTo(to)
} }
a.action = qt_action a.action = tqt_action
end end
} }
end end

@ -1,6 +1,6 @@
#!/usr/bin/env ruby -w #!/usr/bin/env ruby -w
require 'Qt' require 'TQt'
require 'rexml/document' require 'rexml/document'
require '../base/kicons.rb' require '../base/kicons.rb'

@ -1,8 +1,8 @@
#!/usr/bin/env ruby -w #!/usr/bin/env ruby -w
# This is the EventFilter example from Chapter 16 of 'Programming with Qt' # This is the EventFilter example from Chapter 16 of 'Programming with TQt'
require 'Qt' require 'TQt'
class KillerFilter < TQt::Object class KillerFilter < TQt::Object

@ -1,4 +1,4 @@
require 'Qt' require 'TQt'
=begin =begin
The ClientSocket class provides a socket that is connected with a client. The ClientSocket class provides a socket that is connected with a client.

@ -1,6 +1,6 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
require 'Qt' require 'TQt'
class PassiveWindow < TQt::Frame class PassiveWindow < TQt::Frame
MARGIN = 20 MARGIN = 20

@ -1,7 +1,7 @@
INTRODUCTION INTRODUCTION
============ ============
RuBoids is a Boids simulation written in Ruby and using OpenGL and Qt. For RuBoids is a Boids simulation written in Ruby and using OpenGL and TQt. For
information on Boids, see http://www.red3d.com/cwr/boids/. information on Boids, see http://www.red3d.com/cwr/boids/.
Ruby is an object-oriented scripting language by Yukihiro Matsumoto. The Ruby is an object-oriented scripting language by Yukihiro Matsumoto. The
@ -30,7 +30,7 @@ directory:
DEPENDENCIES DEPENDENCIES
============ ============
RuBoids requires the OpenGL and Qt packages, which can be found on the Ruby RuBoids requires the OpenGL and TQt packages, which can be found on the Ruby
Application Archive. Application Archive.
COPYING COPYING

@ -56,7 +56,7 @@ RuBoids<BR>
<h1>Introduction</h1> <h1>Introduction</h1>
<p> <p>
RuBoids is a Boids simulation written in Ruby and using OpenGL and Qt. For RuBoids is a Boids simulation written in Ruby and using OpenGL and TQt. For
information on Boids, see <a information on Boids, see <a
href="http://www.red3d.com/cwr/boids/">http://www.red3d.com/cwr/boids/</a>. href="http://www.red3d.com/cwr/boids/">http://www.red3d.com/cwr/boids/</a>.
</p> </p>
@ -82,7 +82,7 @@ where the latest release may be found.
<h1>Dependencies</h1> <h1>Dependencies</h1>
<p> <p>
RuBoids requires the OpenGL and Qt packages, which can be found on the <a RuBoids requires the OpenGL and TQt packages, which can be found on the <a
href="html://www.ruby-lang.org/en/raa.html">Ruby Application Archive</a>. href="html://www.ruby-lang.org/en/raa.html">Ruby Application Archive</a>.
</p> </p>

@ -5,7 +5,7 @@
# http://www.ruby-lang.org/en/LICENSE.txt. # http://www.ruby-lang.org/en/LICENSE.txt.
# #
require 'Qt' require 'TQt'
require 'World' require 'World'
require 'Camera' require 'Camera'

@ -5,7 +5,7 @@
# http://www.ruby-lang.org/en/LICENSE.txt. # http://www.ruby-lang.org/en/LICENSE.txt.
# #
require 'Qt' require 'TQt'
require 'opengl' require 'opengl'
require 'World' require 'World'
require 'Cloud' require 'Cloud'

@ -5,7 +5,7 @@
# http://www.ruby-lang.org/en/LICENSE.txt. # http://www.ruby-lang.org/en/LICENSE.txt.
# #
require 'Qt' require 'TQt'
require 'View' require 'View'
require 'Cloud' require 'Cloud'
require 'Params' require 'Params'

@ -6,7 +6,7 @@
# #
require 'singleton' require 'singleton'
require 'Qt' require 'TQt'
require 'Params' require 'Params'
require 'Cloud' require 'Cloud'
require 'Flock' require 'Flock'

@ -5,7 +5,7 @@
# http://www.ruby-lang.org/en/LICENSE.txt. # http://www.ruby-lang.org/en/LICENSE.txt.
# #
require 'Qt' require 'TQt'
require 'Canvas' require 'Canvas'
require 'CameraDialog' require 'CameraDialog'

@ -6,7 +6,7 @@
# http://www.ruby-lang.org/en/LICENSE.txt. # http://www.ruby-lang.org/en/LICENSE.txt.
# #
require 'Qt' require 'TQt'
require 'World' require 'World'
require 'WorldWindow' require 'WorldWindow'
require 'Canvas' require 'Canvas'

@ -1,4 +1,4 @@
require 'Qt' require 'TQt'
#### TODO ### #### TODO ###

@ -1,4 +1,4 @@
require 'Qt' require 'TQt'
#### CRASH ### #### CRASH ###
# param mismatch? # param mismatch?

@ -1,4 +1,4 @@
require 'Qt' require 'TQt'
class TQt::Point class TQt::Point
def to_s def to_s

@ -1,6 +1,6 @@
#!/usr/bin/ruby -w #!/usr/bin/ruby -w
require 'Qt' require 'TQt'
require 'rexml/document' require 'rexml/document'
require '../base/rui.rb' require '../base/rui.rb'

@ -1,6 +1,6 @@
#!/usr/bin/env ruby -w #!/usr/bin/env ruby -w
require 'Qt' require 'TQt'
# an analog clock widget using an internal TQTimer # an analog clock widget using an internal TQTimer
class AnalogClock < TQt::Widget class AnalogClock < TQt::Widget

@ -1,6 +1,6 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
require 'Qt' require 'TQt'
require 'aclock' require 'aclock'
a = TQt::Application.new(ARGV) a = TQt::Application.new(ARGV)
@ -10,6 +10,6 @@ ARGV.each {|arg|
} }
clock.resize(100, 100) clock.resize(100, 100)
a.setMainWidget(clock) a.setMainWidget(clock)
clock.setCaption('QtRuby example - Analog Clock') clock.setCaption('TQtRuby example - Analog Clock')
clock.show clock.show
a.exec a.exec

@ -5,4 +5,4 @@ This is a complete example program with a main window, menus and
toolbars. The main widget is a TQt::Canvas, and this example toolbars. The main widget is a TQt::Canvas, and this example
demonstrates basic canvas usage. demonstrates basic canvas usage.
This example is the subject of Qt Tutorial #2 This example is the subject of TQt Tutorial #2

@ -14,7 +14,7 @@ class ChartForm < TQt::MainWindow
'optionsSetOptions()', 'optionsSetOptions()',
'helpHelp()', 'helpHelp()',
'helpAbout()', 'helpAbout()',
'helpAboutQt()', 'helpAboutTQt()',
'saveOptions()' 'saveOptions()'
attr_accessor :changed attr_accessor :changed
@ -31,7 +31,7 @@ class ChartForm < TQt::MainWindow
YES = 1 YES = 1
AS_PERCENTAGE = 2 AS_PERCENTAGE = 2
WINDOWS_REGISTRY = "/Trolltech/QtExamples" WINDOWS_REGISTRY = "/Trolltech/TQtExamples"
APP_KEY = "/Chart/" APP_KEY = "/Chart/"
def initialize( filename ) def initialize( filename )
@ -166,7 +166,7 @@ class ChartForm < TQt::MainWindow
menuBar().insertItem( "&Help", helpMenu ) menuBar().insertItem( "&Help", helpMenu )
helpMenu.insertItem( "&Help", self, SLOT('helpHelp()'), TQt::KeySequence.new(Key_F1) ) helpMenu.insertItem( "&Help", self, SLOT('helpHelp()'), TQt::KeySequence.new(Key_F1) )
helpMenu.insertItem( "&About", self, SLOT('helpAbout()') ) helpMenu.insertItem( "&About", self, SLOT('helpAbout()') )
helpMenu.insertItem( "About &Qt", self, SLOT('helpAboutQt()') ) helpMenu.insertItem( "About &TQt", self, SLOT('helpAboutTQt()') )
@printer = nil @printer = nil
@ -480,8 +480,8 @@ class ChartForm < TQt::MainWindow
end end
def helpAboutQt() def helpAboutTQt()
TQt::MessageBox.aboutTQt( self, "Chart -- About Qt" ) TQt::MessageBox.aboutTQt( self, "Chart -- About TQt" )
end end
end end

@ -6,7 +6,7 @@ class ChartForm
it.dispose it.dispose
end end
# 360 * 16 for pies Qt works with 16ths of degrees # 360 * 16 for pies TQt works with 16ths of degrees
scaleFactor = @chartType == PIE ? 5760 : scaleFactor = @chartType == PIE ? 5760 :
@chartType == VERTICAL_BAR ? @canvas.height() : @chartType == VERTICAL_BAR ? @canvas.height() :
@canvas.width() @canvas.width()

@ -1,4 +1,4 @@
require 'Qt' require 'TQt'
require 'canvasview.rb' require 'canvasview.rb'
require 'canvastext.rb' require 'canvastext.rb'

@ -1,4 +1,4 @@
require 'Qt' require 'TQt'
class CheckLists < TQt::Widget class CheckLists < TQt::Widget
slots 'copy1to2()', 'copy2to3()' slots 'copy1to2()', 'copy2to3()'

@ -1,6 +1,6 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
require 'Qt' require 'TQt'
require 'checklists' require 'checklists'
@ -8,7 +8,7 @@ a = TQt::Application.new(ARGV)
checklists = CheckLists.new checklists = CheckLists.new
checklists.resize(650, 350) checklists.resize(650, 350)
checklists.setCaption('QtRuby Example - CheckLists') checklists.setCaption('TQtRuby Example - CheckLists')
a.setMainWidget(checklists) a.setMainWidget(checklists)
checklists.show checklists.show

@ -1,4 +1,4 @@
require 'Qt' require 'TQt'
class DigitalClock < TQt::LCDNumber class DigitalClock < TQt::LCDNumber

@ -1,12 +1,12 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
require 'Qt' require 'TQt'
require 'dclock' require 'dclock'
a = TQt::Application.new(ARGV) a = TQt::Application.new(ARGV)
clock = DigitalClock.new clock = DigitalClock.new
clock.resize(170,80) clock.resize(170,80)
a.setMainWidget(clock) a.setMainWidget(clock)
clock.setCaption('QtRuby Example - Digital Clock') clock.setCaption('TQtRuby Example - Digital Clock')
clock.show clock.show
a.exec a.exec

@ -1,6 +1,6 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
require 'Qt' require 'TQt'
require 'viewer' require 'viewer'
$KCODE='u' $KCODE='u'
@ -8,7 +8,7 @@ $KCODE='u'
a = TQt::Application.new(ARGV) a = TQt::Application.new(ARGV)
textViewer = Viewer.new textViewer = Viewer.new
textViewer.setCaption('QtRuby Example - Simple TQFont Demo') textViewer.setCaption('TQtRuby Example - Simple TQFont Demo')
a.setMainWidget(textViewer) a.setMainWidget(textViewer)
textViewer.show textViewer.show
a.exec() a.exec()

@ -1,6 +1,6 @@
#!/usr/bin/env ruby -w #!/usr/bin/env ruby -w
require 'Qt' require 'TQt'
# #
# Forever - a widget that draws rectangles forever. # Forever - a widget that draws rectangles forever.
@ -33,7 +33,7 @@ class Forever < TQt::Widget
def updateCaption() def updateCaption()
s = "Qt Example - Forever - " + @rectangles.to_s + " rectangles/second" s = "TQt Example - Forever - " + @rectangles.to_s + " rectangles/second"
@rectangles = 0 @rectangles = 0
self.caption = s self.caption = s
end end
@ -79,6 +79,6 @@ a = TQt::Application.new(ARGV)
always = Forever.new always = Forever.new
always.resize( 400, 250 ) # start up with size 400x250 always.resize( 400, 250 ) # start up with size 400x250
a.mainWidget = always # set as main widget a.mainWidget = always # set as main widget
always.caption = "QtRuby Example - Forever" always.caption = "TQtRuby Example - Forever"
always.show always.show
a.exec a.exec

@ -1,4 +1,4 @@
require 'Qt' require 'TQt'
class Hello < TQt::Widget class Hello < TQt::Widget

@ -1,6 +1,6 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
require 'Qt' require 'TQt'
require 'hello' require 'hello'
a = TQt::Application.new(ARGV) a = TQt::Application.new(ARGV)
@ -13,7 +13,7 @@ if (s.empty?)
end end
h = Hello.new(s) h = Hello.new(s)
h.setCaption('QtRuby says hello') h.setCaption('TQtRuby says hello')
h.connect(h, SIGNAL('clicked()'), a, SLOT('quit()')) h.connect(h, SIGNAL('clicked()'), a, SLOT('quit()'))
h.setFont(TQt::Font.new('times', 32, TQt::Font.Bold)) # default font h.setFont(TQt::Font.new('times', 32, TQt::Font.Bold)) # default font
h.setBackgroundColor(TQt::white) # default bg color h.setBackgroundColor(TQt::white) # default bg color

@ -1,6 +1,6 @@
#!/usr/bin/env ruby -w #!/usr/bin/env ruby -w
require 'Qt' require 'TQt'
class AnimatedThingy < TQt::Label class AnimatedThingy < TQt::Label
attr_accessor :label, :step attr_accessor :label, :step

@ -1,6 +1,6 @@
#!/usr/bin/env ruby -w #!/usr/bin/env ruby -w
require 'Qt' require 'TQt'
require 'tictac' require 'tictac'
a = TQt::Application.new(ARGV) a = TQt::Application.new(ARGV)
@ -8,6 +8,6 @@ n = 3 # get board size n
ttt = TicTacToe.new(n) ttt = TicTacToe.new(n)
a.setMainWidget(ttt) a.setMainWidget(ttt)
ttt.setCaption('QtRuby Example - TicTac') ttt.setCaption('TQtRuby Example - TicTac')
ttt.show() ttt.show()
a.exec() a.exec()

@ -1,4 +1,4 @@
require 'Qt' require 'TQt'
class TicTacButton < TQt::PushButton class TicTacButton < TQt::PushButton

@ -1,12 +1,12 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
require 'Qt' require 'TQt'
require 'tooltip' require 'tooltip'
a = TQt::Application.new(ARGV) a = TQt::Application.new(ARGV)
mw = TellMe.new mw = TellMe.new
mw.setCaption('QtRuby Example - Dynamic Tool Tips') mw.setCaption('TQtRuby Example - Dynamic Tool Tips')
a.setMainWidget(mw) a.setMainWidget(mw)
mw.show mw.show
a.exec a.exec

@ -1,4 +1,4 @@
require 'Qt' require 'TQt'
class DynamicTip < TQt::ToolTip class DynamicTip < TQt::ToolTip
def initialize(p) def initialize(p)

@ -5,7 +5,7 @@
# window knows how to redraw itself. # window knows how to redraw itself.
# #
require 'Qt' require 'TQt'
class ScribbleArea < TQt::Widget class ScribbleArea < TQt::Widget
@ -145,7 +145,7 @@ require 'Qt'
class ScribbleWindow < TQt::Widget class ScribbleWindow < TQt::Widget
slots "slotAbout()", "slotAboutQt()", "slotColorMenu(int)", "slotLoad()", "slotSave()" slots "slotAbout()", "slotAboutTQt()", "slotColorMenu(int)", "slotLoad()", "slotSave()"
signals "colorChanged(TQColor)", "load(const TQString&)", "save(const TQString&)" signals "colorChanged(TQColor)", "load(const TQString&)", "save(const TQString&)"
COLOR_MENU_ID_BLACK = 0 COLOR_MENU_ID_BLACK = 0
@ -174,8 +174,8 @@ class ScribbleWindow < TQt::Widget
self, SLOT( "slotColorMenu( int )" ) ) self, SLOT( "slotColorMenu( int )" ) )
@_helpmenu = TQt::PopupMenu.new() # create a help menu @_helpmenu = TQt::PopupMenu.new() # create a help menu
@_helpmenu.insertItem( "&About QtScribble", self, SLOT( "slotAbout()" ) ) @_helpmenu.insertItem( "&About TQtScribble", self, SLOT( "slotAbout()" ) )
@_helpmenu.insertItem( "&About Qt", self, SLOT( "slotAboutQt()" ) ) @_helpmenu.insertItem( "&About TQt", self, SLOT( "slotAboutTQt()" ) )
@_menubar = TQt::MenuBar.new( self, "" ) # create a menu bar @_menubar = TQt::MenuBar.new( self, "" ) # create a menu bar
@_menubar.insertItem( "&File", @_filemenu ) @_menubar.insertItem( "&File", @_filemenu )
@ -209,13 +209,13 @@ class ScribbleWindow < TQt::Widget
def slotAbout() def slotAbout()
TQt::MessageBox.information( self, "About QtScribble 5", TQt::MessageBox.information( self, "About TQtScribble 5",
"This is the Scribble 5 application\n" + "This is the Scribble 5 application\n" +
"Copyright 1998 by Mathias Kalle Dalheimer\n") "Copyright 1998 by Mathias Kalle Dalheimer\n")
end end
def slotAboutQt() def slotAboutTQt()
TQt::MessageBox.aboutTQt( self, "About Qt" ) TQt::MessageBox.aboutTQt( self, "About TQt" )
end end
def slotColorMenu( item ) def slotColorMenu( item )

@ -0,0 +1,15 @@
INCLUDES = -I$(top_srcdir)/smoke $(all_includes) -I$(RUBY_ARCHDIR) $(RUBY_CFLAGS)
noinst_HEADERS = tqtruby.h marshall.h smokeruby.h extconf.rb
noinst_LTLIBRARIES = libtqtrubyinternal.la
libtqtrubyinternal_la_SOURCES = TQt.cpp handlers.cpp
libtqtrubyinternal_la_METASOURCES = AUTO
rubylibdir = $(RUBY_ARCHDIR)
rubylib_LTLIBRARIES = tqtruby.la
tqtruby_la_SOURCES =
tqtruby_la_LDFLAGS = -module $(all_libraries) -version-info 0:0:0
tqtruby_la_LIBADD = libtqtrubyinternal.la $(LIB_TQT) $(top_builddir)/smoke/tqt/libsmoketqt.la $(LIB_TDECORE) $(RUBY_LIBRUBYARG) -lstdc++
SUBDIRS = lib

@ -5,7 +5,7 @@ KDE_FIND_PATH(pkg-config, PKGCONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin
AC_CHECK_PROG(RUBY, ruby, ruby) AC_CHECK_PROG(RUBY, ruby, ruby)
if test -z "$RUBY"; then if test -z "$RUBY"; then
DO_NOT_COMPILE="$DO_NOT_COMPILE qtruby" DO_NOT_COMPILE="$DO_NOT_COMPILE tqtruby"
else else
AC_MSG_CHECKING(for ruby dirs) AC_MSG_CHECKING(for ruby dirs)
# Note: pkgconfig file exists only for ruby >= 1.9.3 # Note: pkgconfig file exists only for ruby >= 1.9.3

@ -1,5 +1,5 @@
require 'mkmf' require 'mkmf'
dir_config('smoke') dir_config('smoke')
dir_config('qt') dir_config('tqt')
$LOCAL_LIBS += '-lsmoketqt -ltqt-mt -lstdc++' $LOCAL_LIBS += '-lsmoketqt -ltqt-mt -lstdc++'
create_makefile("qtruby") create_makefile("tqtruby")

@ -40,7 +40,7 @@
#include <ruby.h> #include <ruby.h>
#include "marshall.h" #include "marshall.h"
#include "qtruby.h" #include "tqtruby.h"
#include "smokeruby.h" #include "smokeruby.h"
#ifndef HINT_BYTES #ifndef HINT_BYTES
@ -59,7 +59,7 @@
extern "C" { extern "C" {
extern VALUE set_obj_info(const char * className, smokeruby_object * o); extern VALUE set_obj_info(const char * className, smokeruby_object * o);
extern VALUE qt_internal_module; extern VALUE tqt_internal_module;
extern VALUE qvariant_class; extern VALUE qvariant_class;
extern bool application_terminated; extern bool application_terminated;
}; };
@ -95,7 +95,7 @@ mark_qobject_children(TQObject * qobject)
++it; ++it;
obj = getPointerObject(child); obj = getPointerObject(child);
if (obj != Qnil) { if (obj != Qnil) {
if(do_debug & qtdb_gc) tqWarning("Marking (%s*)%p -> %p\n", child->className(), child, (void*)obj); if(do_debug & tqtdb_gc) tqWarning("Marking (%s*)%p -> %p\n", child->className(), child, (void*)obj);
rb_gc_mark(obj); rb_gc_mark(obj);
} }
@ -110,7 +110,7 @@ smokeruby_mark(void * p)
smokeruby_object * o = (smokeruby_object *) p; smokeruby_object * o = (smokeruby_object *) p;
const char *className = o->smoke->classes[o->classId].className; const char *className = o->smoke->classes[o->classId].className;
if(do_debug & qtdb_gc) tqWarning("Checking for mark (%s*)%p\n", className, o->ptr); if(do_debug & tqtdb_gc) tqWarning("Checking for mark (%s*)%p\n", className, o->ptr);
if(o->ptr && o->allocated) { if(o->ptr && o->allocated) {
if (isDerivedFromByName(o->smoke, className, "TQListView")) { if (isDerivedFromByName(o->smoke, className, "TQListView")) {
@ -122,7 +122,7 @@ smokeruby_mark(void * p)
++it; ++it;
obj = getPointerObject(item); obj = getPointerObject(item);
if (obj != Qnil) { if (obj != Qnil) {
if(do_debug & qtdb_gc) tqWarning("Marking (%s*)%p -> %p\n", className, item, (void*)obj); if(do_debug & tqtdb_gc) tqWarning("Marking (%s*)%p -> %p\n", className, item, (void*)obj);
rb_gc_mark(obj); rb_gc_mark(obj);
} }
} }
@ -138,7 +138,7 @@ smokeruby_mark(void * p)
item = table->item(row, col); item = table->item(row, col);
obj = getPointerObject(item); obj = getPointerObject(item);
if (obj != Qnil) { if (obj != Qnil) {
if(do_debug & qtdb_gc) tqWarning("Marking (%s*)%p -> %p\n", className, item, (void*)obj); if(do_debug & tqtdb_gc) tqWarning("Marking (%s*)%p -> %p\n", className, item, (void*)obj);
rb_gc_mark(obj); rb_gc_mark(obj);
} }
} }
@ -152,7 +152,7 @@ smokeruby_mark(void * p)
for ( TQCanvasItemList::iterator it = list.begin(); it != list.end(); ++it ) { for ( TQCanvasItemList::iterator it = list.begin(); it != list.end(); ++it ) {
obj = getPointerObject(*it); obj = getPointerObject(*it);
if (obj != Qnil) { if (obj != Qnil) {
if(do_debug & qtdb_gc) tqWarning("Marking (%s*)%p -> %p\n", className, *it, (void*)obj); if(do_debug & tqtdb_gc) tqWarning("Marking (%s*)%p -> %p\n", className, *it, (void*)obj);
rb_gc_mark(obj); rb_gc_mark(obj);
} }
} }
@ -164,7 +164,7 @@ smokeruby_mark(void * p)
TQCanvas * canvas = item->canvas(); TQCanvas * canvas = item->canvas();
obj = getPointerObject(canvas); obj = getPointerObject(canvas);
if (obj != Qnil) { if (obj != Qnil) {
if(do_debug & qtdb_gc) tqWarning("Marking (%s*)%p -> %p\n", "TQCanvas", canvas, (void*)obj); if(do_debug & tqtdb_gc) tqWarning("Marking (%s*)%p -> %p\n", "TQCanvas", canvas, (void*)obj);
rb_gc_mark(obj); rb_gc_mark(obj);
} }
return; return;
@ -184,7 +184,7 @@ smokeruby_free(void * p)
smokeruby_object *o = (smokeruby_object*)p; smokeruby_object *o = (smokeruby_object*)p;
const char *className = o->smoke->classes[o->classId].className; const char *className = o->smoke->classes[o->classId].className;
if(do_debug & qtdb_gc) tqWarning("Checking for delete (%s*)%p allocated: %s\n", className, o->ptr, o->allocated ? "true" : "false"); if(do_debug & tqtdb_gc) tqWarning("Checking for delete (%s*)%p allocated: %s\n", className, o->ptr, o->allocated ? "true" : "false");
if(application_terminated || !o->allocated || o->ptr == 0) { if(application_terminated || !o->allocated || o->ptr == 0) {
free(o); free(o);
@ -257,7 +257,7 @@ smokeruby_free(void * p)
} }
} }
if(do_debug & qtdb_gc) tqWarning("Deleting (%s*)%p\n", className, o->ptr); if(do_debug & tqtdb_gc) tqWarning("Deleting (%s*)%p\n", className, o->ptr);
char *methodName = new char[strlen(className) + 2]; char *methodName = new char[strlen(className) + 2];
methodName[0] = '~'; methodName[0] = '~';
@ -277,8 +277,8 @@ smokeruby_free(void * p)
} }
/* /*
* Given an approximate classname and a qt instance, try to improve the resolution of the name * Given an approximate classname and a tqt instance, try to improve the resolution of the name
* by using the various Qt rtti mechanisms for TQObjects, TQEvents and TQCanvasItems * by using the various TQt rtti mechanisms for TQObjects, TQEvents and TQCanvasItems
*/ */
static const char * static const char *
resolve_classname(Smoke* smoke, int classId, void * ptr) resolve_classname(Smoke* smoke, int classId, void * ptr)
@ -475,7 +475,7 @@ marshall_basetype(Marshall *m)
case Marshall::FromVALUE: case Marshall::FromVALUE:
if (TYPE(*(m->var())) == T_OBJECT) { if (TYPE(*(m->var())) == T_OBJECT) {
// A TQt::Boolean has been passed as a value // A TQt::Boolean has been passed as a value
VALUE temp = rb_funcall(qt_internal_module, rb_intern("get_qboolean"), 1, *(m->var())); VALUE temp = rb_funcall(tqt_internal_module, rb_intern("get_qboolean"), 1, *(m->var()));
m->item().s_bool = (temp == Qtrue ? true : false); m->item().s_bool = (temp == Qtrue ? true : false);
} else { } else {
m->item().s_bool = (*(m->var()) == Qtrue ? true : false); m->item().s_bool = (*(m->var()) == Qtrue ? true : false);
@ -545,7 +545,7 @@ marshall_basetype(Marshall *m)
switch(m->action()) { switch(m->action()) {
case Marshall::FromVALUE: case Marshall::FromVALUE:
if (TYPE(*(m->var())) == T_OBJECT) { if (TYPE(*(m->var())) == T_OBJECT) {
m->item().s_int = (int) NUM2INT(rb_funcall(qt_internal_module, rb_intern("get_qinteger"), 1, *(m->var()))); m->item().s_int = (int) NUM2INT(rb_funcall(tqt_internal_module, rb_intern("get_qinteger"), 1, *(m->var())));
} else { } else {
m->item().s_int = (int) NUM2INT(*(m->var())); m->item().s_int = (int) NUM2INT(*(m->var()));
} }
@ -562,7 +562,7 @@ marshall_basetype(Marshall *m)
switch(m->action()) { switch(m->action()) {
case Marshall::FromVALUE: case Marshall::FromVALUE:
if (TYPE(*(m->var())) == T_OBJECT) { if (TYPE(*(m->var())) == T_OBJECT) {
m->item().s_int = (unsigned int) NUM2UINT(rb_funcall(qt_internal_module, rb_intern("get_qinteger"), 1, *(m->var()))); m->item().s_int = (unsigned int) NUM2UINT(rb_funcall(tqt_internal_module, rb_intern("get_qinteger"), 1, *(m->var())));
} else { } else {
m->item().s_uint = (unsigned int) NUM2UINT(*(m->var())); m->item().s_uint = (unsigned int) NUM2UINT(*(m->var()));
} }
@ -579,7 +579,7 @@ marshall_basetype(Marshall *m)
switch(m->action()) { switch(m->action()) {
case Marshall::FromVALUE: case Marshall::FromVALUE:
if (TYPE(*(m->var())) == T_OBJECT) { if (TYPE(*(m->var())) == T_OBJECT) {
m->item().s_int = (long) NUM2LONG(rb_funcall(qt_internal_module, rb_intern("get_qinteger"), 1, *(m->var()))); m->item().s_int = (long) NUM2LONG(rb_funcall(tqt_internal_module, rb_intern("get_qinteger"), 1, *(m->var())));
} else { } else {
m->item().s_long = (long) NUM2LONG(*(m->var())); m->item().s_long = (long) NUM2LONG(*(m->var()));
} }
@ -596,7 +596,7 @@ marshall_basetype(Marshall *m)
switch(m->action()) { switch(m->action()) {
case Marshall::FromVALUE: case Marshall::FromVALUE:
if (TYPE(*(m->var())) == T_OBJECT) { if (TYPE(*(m->var())) == T_OBJECT) {
m->item().s_int = (unsigned long) NUM2ULONG(rb_funcall(qt_internal_module, rb_intern("get_qinteger"), 1, *(m->var()))); m->item().s_int = (unsigned long) NUM2ULONG(rb_funcall(tqt_internal_module, rb_intern("get_qinteger"), 1, *(m->var())));
} else { } else {
m->item().s_ulong = (unsigned long) NUM2ULONG(*(m->var())); m->item().s_ulong = (unsigned long) NUM2ULONG(*(m->var()));
} }
@ -641,7 +641,7 @@ marshall_basetype(Marshall *m)
{ {
if (TYPE(*(m->var())) == T_OBJECT) { if (TYPE(*(m->var())) == T_OBJECT) {
// A TQt::Enum is a subclass of TQt::Integer, so 'get_qinteger()' can be called ok // A TQt::Enum is a subclass of TQt::Integer, so 'get_qinteger()' can be called ok
VALUE temp = rb_funcall(qt_internal_module, rb_intern("get_qinteger"), 1, *(m->var())); VALUE temp = rb_funcall(tqt_internal_module, rb_intern("get_qinteger"), 1, *(m->var()));
m->item().s_enum = (long) NUM2LONG(temp); m->item().s_enum = (long) NUM2LONG(temp);
} else { } else {
m->item().s_enum = (long) NUM2LONG(*(m->var())); m->item().s_enum = (long) NUM2LONG(*(m->var()));
@ -649,7 +649,7 @@ marshall_basetype(Marshall *m)
} }
break; break;
case Marshall::ToVALUE: case Marshall::ToVALUE:
*(m->var()) = rb_funcall( qt_internal_module, *(m->var()) = rb_funcall( tqt_internal_module,
rb_intern("create_qenum"), rb_intern("create_qenum"),
2, INT2NUM(m->item().s_enum), rb_str_new2(m->type().name()) ); 2, INT2NUM(m->item().s_enum), rb_str_new2(m->type().name()) );
@ -726,7 +726,7 @@ marshall_basetype(Marshall *m)
} }
obj = set_obj_info(classname, o); obj = set_obj_info(classname, o);
if (do_debug & qtdb_calls) { if (do_debug & tqtdb_calls) {
tqWarning("allocating %s %p -> %p\n", classname, o->ptr, (void*)obj); tqWarning("allocating %s %p -> %p\n", classname, o->ptr, (void*)obj);
} }
@ -914,7 +914,7 @@ static void marshall_TQString(Marshall *m) {
// The only way to convert a TQChar to a TQString is to // The only way to convert a TQChar to a TQString is to
// pass a TQChar to a TQString constructor. However, // pass a TQChar to a TQString constructor. However,
// TQStrings aren't in the QtRuby api, so add this // TQStrings aren't in the TQtRuby api, so add this
// convenience method 'TQt::Char.to_s' to get a ruby // convenience method 'TQt::Char.to_s' to get a ruby
// string from a TQt::Char. // string from a TQt::Char.
VALUE VALUE
@ -1090,11 +1090,11 @@ static void marshall_intR(Marshall *m) {
int * i = new int; int * i = new int;
if (TYPE(rv) == T_OBJECT) { if (TYPE(rv) == T_OBJECT) {
// A TQt::Integer has been passed as an integer value // A TQt::Integer has been passed as an integer value
VALUE temp = rb_funcall(qt_internal_module, rb_intern("get_qinteger"), 1, rv); VALUE temp = rb_funcall(tqt_internal_module, rb_intern("get_qinteger"), 1, rv);
*i = NUM2INT(temp); *i = NUM2INT(temp);
m->item().s_voidp = i; m->item().s_voidp = i;
m->next(); m->next();
rb_funcall(qt_internal_module, rb_intern("set_qinteger"), 2, rv, INT2NUM(*i)); rb_funcall(tqt_internal_module, rb_intern("set_qinteger"), 2, rv, INT2NUM(*i));
rv = temp; rv = temp;
} else { } else {
*i = NUM2INT(rv); *i = NUM2INT(rv);
@ -1136,11 +1136,11 @@ static void marshall_boolR(Marshall *m) {
bool * b = new bool; bool * b = new bool;
if (TYPE(rv) == T_OBJECT) { if (TYPE(rv) == T_OBJECT) {
// A TQt::Boolean has been passed as a value // A TQt::Boolean has been passed as a value
VALUE temp = rb_funcall(qt_internal_module, rb_intern("get_qboolean"), 1, rv); VALUE temp = rb_funcall(tqt_internal_module, rb_intern("get_qboolean"), 1, rv);
*b = (temp == Qtrue ? true : false); *b = (temp == Qtrue ? true : false);
m->item().s_voidp = b; m->item().s_voidp = b;
m->next(); m->next();
rb_funcall(qt_internal_module, rb_intern("set_qboolean"), 2, rv, (*b ? Qtrue : Qfalse)); rb_funcall(tqt_internal_module, rb_intern("set_qboolean"), 2, rv, (*b ? Qtrue : Qfalse));
} else { } else {
*b = (rv == Qtrue ? true : false); *b = (rv == Qtrue ? true : false);
m->item().s_voidp = b; m->item().s_voidp = b;
@ -1889,7 +1889,7 @@ DEF_VALUELIST_MARSHALLER( TQUrlInfoList, TQValueList<TQUrlInfo>, TQUrlInfo, TQVa
DEF_VALUELIST_MARSHALLER( TQTranslatorMessageList, TQValueList<TQTranslatorMessage>, TQTranslatorMessage, TQValueList<TQTranslatorMessage>::Iterator ) DEF_VALUELIST_MARSHALLER( TQTranslatorMessageList, TQValueList<TQTranslatorMessage>, TQTranslatorMessage, TQValueList<TQTranslatorMessage>::Iterator )
DEF_VALUELIST_MARSHALLER( TQHostAddressList, TQValueList<TQHostAddress>, TQHostAddress, TQValueList<TQHostAddress>::Iterator ) DEF_VALUELIST_MARSHALLER( TQHostAddressList, TQValueList<TQHostAddress>, TQHostAddress, TQValueList<TQHostAddress>::Iterator )
TypeHandler Qt_handlers[] = { TypeHandler TQt_handlers[] = {
{ "TQString", marshall_TQString }, { "TQString", marshall_TQString },
{ "TQString&", marshall_TQString }, { "TQString&", marshall_TQString },
{ "TQString*", marshall_TQString }, { "TQString*", marshall_TQString },

@ -0,0 +1,4 @@
SUBDIRS = TQt
rubylibdir = $(RUBY_RUBYLIBDIR)
rubylib_DATA = TQt.rb

@ -0,0 +1,2 @@
tqtrubylibdir = $(RUBY_RUBYLIBDIR)/TQt
tqtrubylib_DATA = tqtruby.rb

@ -1,6 +1,6 @@
=begin =begin
/*************************************************************************** /***************************************************************************
qtruby.rb - description tqtruby.rb - description
------------------- -------------------
begin : Fri Jul 4 2003 begin : Fri Jul 4 2003
copyright : (C) 2003 by Richard Dale copyright : (C) 2003 by Richard Dale
@ -22,7 +22,7 @@ module TQt
Off, Minimal, High, Extensive = 0, 1, 2, 3 Off, Minimal, High, Extensive = 0, 1, 2, 3
end end
module QtDebugChannel module TQtDebugChannel
TQTDB_NONE = 0x00 TQTDB_NONE = 0x00
TQTDB_AMBIGUOUS = 0x01 TQTDB_AMBIGUOUS = 0x01
TQTDB_METHOD_MISSING = 0x02 TQTDB_METHOD_MISSING = 0x02
@ -36,7 +36,7 @@ module TQt
@@debug_level = DebugLevel::Off @@debug_level = DebugLevel::Off
def TQt.debug_level=(level) def TQt.debug_level=(level)
@@debug_level = level @@debug_level = level
Internal::setDebug TQt::QtDebugChannel::TQTDB_ALL if level >= DebugLevel::Extensive Internal::setDebug TQt::TQtDebugChannel::TQTDB_ALL if level >= DebugLevel::Extensive
end end
def TQt.debug_level def TQt.debug_level
@ -145,12 +145,12 @@ module TQt
return singleton_methods return singleton_methods
end end
qt_methods(super, 0x0) tqt_methods(super, 0x0)
end end
def protected_methods def protected_methods
# From smoke.h, Smoke::mf_protected 0x80 # From smoke.h, Smoke::mf_protected 0x80
qt_methods(super, 0x80) tqt_methods(super, 0x80)
end end
def public_methods def public_methods
@ -159,11 +159,11 @@ module TQt
def singleton_methods def singleton_methods
# From smoke.h, Smoke::mf_static 0x01 # From smoke.h, Smoke::mf_static 0x01
qt_methods(super, 0x01) tqt_methods(super, 0x01)
end end
private private
def qt_methods(meths, flags) def tqt_methods(meths, flags)
ids = [] ids = []
# These methods are all defined in TQt::Base, even if they aren't supported by a particular # These methods are all defined in TQt::Base, even if they aren't supported by a particular
# subclass, so remove them to avoid confusion # subclass, so remove them to avoid confusion
@ -1371,12 +1371,12 @@ module TQt
@@idclass[classId] = classname @@idclass[classId] = classname
@@cpp_names[classname] = c @@cpp_names[classname] = c
klass = isTQObject(classId) ? create_qobject_class(classname) \ klass = isTQObject(classId) ? create_qobject_class(classname) \
: create_qt_class(classname) : create_tqt_class(classname)
@@classes[classname] = klass unless klass.nil? @@classes[classname] = klass unless klass.nil?
end end
def Internal.debug_level def Internal.debug_level
Qt.debug_level TQt.debug_level
end end
def Internal.checkarg(argtype, typename) def Internal.checkarg(argtype, typename)
@ -1471,12 +1471,12 @@ module TQt
@@classes[classname] @@classes[classname]
end end
# Runs the initializer as far as allocating the Qt C++ instance. # Runs the initializer as far as allocating the TQt C++ instance.
# Then use a throw to jump back to here with the C++ instance # Then use a throw to jump back to here with the C++ instance
# wrapped in a new ruby variable of type T_DATA # wrapped in a new ruby variable of type T_DATA
def Internal.try_initialize(instance, *args) def Internal.try_initialize(instance, *args)
initializer = instance.method(:initialize) initializer = instance.method(:initialize)
catch "newqt" do catch "newtqt" do
initializer.call(*args) initializer.call(*args)
end end
end end
@ -1501,7 +1501,7 @@ module TQt
else else
classname = @@cpp_names[klass.name] classname = @@cpp_names[klass.name]
if classname.nil? if classname.nil?
if klass != Object and klass != Qt if klass != Object and klass != TQt
return do_method_missing(package, method, klass.superclass, this, *args) return do_method_missing(package, method, klass.superclass, this, *args)
else else
return nil return nil
@ -1611,9 +1611,9 @@ module TQt
def Internal.init_all_classes() def Internal.init_all_classes()
TQt::Internal::getClassList().each do |c| TQt::Internal::getClassList().each do |c|
if c == "Qt" if c == "TQt"
# Don't change Qt to TQt::t, just leave as is # Don't change TQt to TQt::t, just leave as is
@@cpp_names["Qt"] = c @@cpp_names["TQt"] = c
elsif c != "TQInternal" elsif c != "TQInternal"
TQt::Internal::init_class(c) TQt::Internal::init_class(c)
end end
@ -1875,7 +1875,7 @@ module TQt
IO_TimeOutError = 7 IO_TimeOutError = 7
IO_UnspecifiedError= 8 IO_UnspecifiedError= 8
end # Qt end # TQt
class Object class Object
def SIGNAL(signal) def SIGNAL(signal)
@ -1901,7 +1901,7 @@ class Object
# See the discussion here: http://eigenclass.org/hiki.rb?instance_exec # See the discussion here: http://eigenclass.org/hiki.rb?instance_exec
# about implementations of the ruby 1.9 method instance_exec(). This # about implementations of the ruby 1.9 method instance_exec(). This
# version is the one from Rails. It isn't thread safe, but that doesn't # version is the one from Rails. It isn't thread safe, but that doesn't
# matter for the intended use in invoking blocks as Qt slots. # matter for the intended use in invoking blocks as TQt slots.
def instance_exec(*arguments, &block) def instance_exec(*arguments, &block)
block.bind(self)[*arguments] block.bind(self)[*arguments]
end end
@ -1931,23 +1931,23 @@ class Module
private :_protected_instance_methods, :_public_instance_methods private :_protected_instance_methods, :_public_instance_methods
def constants def constants
qt_methods(_constants, 0x10, true) tqt_methods(_constants, 0x10, true)
end end
def instance_methods(inc_super=true) def instance_methods(inc_super=true)
qt_methods(_instance_methods(inc_super), 0x0, inc_super) tqt_methods(_instance_methods(inc_super), 0x0, inc_super)
end end
def protected_instance_methods(inc_super=true) def protected_instance_methods(inc_super=true)
qt_methods(_protected_instance_methods(inc_super), 0x80, inc_super) tqt_methods(_protected_instance_methods(inc_super), 0x80, inc_super)
end end
def public_instance_methods(inc_super=true) def public_instance_methods(inc_super=true)
qt_methods(_public_instance_methods(inc_super), 0x0, inc_super) tqt_methods(_public_instance_methods(inc_super), 0x0, inc_super)
end end
private private
def qt_methods(meths, flags, inc_super=true) def tqt_methods(meths, flags, inc_super=true)
if !self.kind_of? Class if !self.kind_of? Class
return meths return meths
end end

@ -17,7 +17,7 @@
#include <tqcstring.h> #include <tqcstring.h>
#include "qtruby.h" #include "tqtruby.h"
#include "marshall.h" #include "marshall.h"

@ -1,5 +1,5 @@
/*************************************************************************** /***************************************************************************
qtruby.h - description tqtruby.h - description
------------------- -------------------
begin : Fri Jul 4 2003 begin : Fri Jul 4 2003
copyright : (C) 2003 by Richard Dale copyright : (C) 2003 by Richard Dale
@ -36,16 +36,16 @@ extern int do_debug; // evil
extern VALUE rv_qapp; extern VALUE rv_qapp;
extern int object_count; extern int object_count;
// keep this enum in sync with lib/Qt/debug.pm // keep this enum in sync with lib/TQt/debug.pm
enum QtDebugChannel { enum TQtDebugChannel {
qtdb_none = 0x00, tqtdb_none = 0x00,
qtdb_ambiguous = 0x01, tqtdb_ambiguous = 0x01,
qtdb_method_missing = 0x02, tqtdb_method_missing = 0x02,
qtdb_calls = 0x04, tqtdb_calls = 0x04,
qtdb_gc = 0x08, tqtdb_gc = 0x08,
qtdb_virtual = 0x10, tqtdb_virtual = 0x10,
qtdb_verbose = 0x20 tqtdb_verbose = 0x20
}; };
void unmapPointer(smokeruby_object *, Smoke::Index, void*); void unmapPointer(smokeruby_object *, Smoke::Index, void*);

@ -1,7 +1,7 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
$VERBOSE = true; $:.unshift File.dirname($0) $VERBOSE = true; $:.unshift File.dirname($0)
require 'Qt' require 'TQt'
a = TQt::Application.new(ARGV) a = TQt::Application.new(ARGV)
hello = TQt::PushButton.new('Hello World!', nil) hello = TQt::PushButton.new('Hello World!', nil)

@ -1,4 +1,4 @@
require 'Qt' require 'TQt'
class CannonField < TQt::Widget class CannonField < TQt::Widget
signals 'angleChanged(int)', 'forceChanged(int)' signals 'angleChanged(int)', 'forceChanged(int)'

@ -1,4 +1,4 @@
require 'Qt' require 'TQt'
class LCDRange < TQt::VBox class LCDRange < TQt::VBox
signals 'valueChanged(int)' signals 'valueChanged(int)'

@ -1,7 +1,7 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
$VERBOSE = true; $:.unshift File.dirname($0) $VERBOSE = true; $:.unshift File.dirname($0)
require 'Qt' require 'TQt'
require 'lcdrange.rb' require 'lcdrange.rb'
require 'cannon.rb' require 'cannon.rb'

@ -1,5 +1,5 @@
include Math include Math
require 'Qt' require 'TQt'
class CannonField < TQt::Widget class CannonField < TQt::Widget

@ -1,4 +1,4 @@
require 'Qt' require 'TQt'
class LCDRange < TQt::VBox class LCDRange < TQt::VBox
signals 'valueChanged(int)' signals 'valueChanged(int)'

@ -1,7 +1,7 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
$VERBOSE = true; $:.unshift File.dirname($0) $VERBOSE = true; $:.unshift File.dirname($0)
require 'Qt' require 'TQt'
require 'lcdrange.rb' require 'lcdrange.rb'
require 'cannon.rb' require 'cannon.rb'

@ -1,5 +1,5 @@
include Math include Math
require 'Qt' require 'TQt'
class CannonField < TQt::Widget class CannonField < TQt::Widget

@ -1,4 +1,4 @@
require 'Qt' require 'TQt'
class LCDRange < TQt::VBox class LCDRange < TQt::VBox
signals 'valueChanged(int)' signals 'valueChanged(int)'

@ -1,7 +1,7 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
$VERBOSE = true; $:.unshift File.dirname($0) $VERBOSE = true; $:.unshift File.dirname($0)
require 'Qt' require 'TQt'
require 'lcdrange.rb' require 'lcdrange.rb'
require 'cannon.rb' require 'cannon.rb'

@ -1,4 +1,4 @@
require 'Qt' require 'TQt'
include Math include Math
class CannonField < TQt::Widget class CannonField < TQt::Widget

@ -1,4 +1,4 @@
require 'Qt' require 'TQt'
require 'lcdrange.rb' require 'lcdrange.rb'
require 'cannon.rb' require 'cannon.rb'

@ -1,4 +1,4 @@
require 'Qt' require 'TQt'
class LCDRange < TQt::Widget class LCDRange < TQt::Widget
signals 'valueChanged(int)' signals 'valueChanged(int)'

@ -1,7 +1,7 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
$VERBOSE = true; $:.unshift File.dirname($0) $VERBOSE = true; $:.unshift File.dirname($0)
require 'Qt' require 'TQt'
require 'gamebrd.rb' require 'gamebrd.rb'
TQt::Application.setColorSpec( TQt::Application::CustomColor ) TQt::Application.setColorSpec( TQt::Application::CustomColor )

@ -1,4 +1,4 @@
require 'Qt' require 'TQt'
include Math include Math
class CannonField < TQt::Widget class CannonField < TQt::Widget

@ -1,4 +1,4 @@
require 'Qt' require 'TQt'
class LCDRange < TQt::Widget class LCDRange < TQt::Widget
signals 'valueChanged(int)' signals 'valueChanged(int)'

@ -1,7 +1,7 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
$VERBOSE = true; $:.unshift File.dirname($0) $VERBOSE = true; $:.unshift File.dirname($0)
require 'Qt' require 'TQt'
require 'gamebrd.rb' require 'gamebrd.rb'
TQt::Application.setColorSpec( TQt::Application::CustomColor ) TQt::Application.setColorSpec( TQt::Application::CustomColor )

@ -1,7 +1,7 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
$VERBOSE = true; $:.unshift File.dirname($0) $VERBOSE = true; $:.unshift File.dirname($0)
require 'Qt'; require 'TQt';
a = TQt::Application.new(ARGV) a = TQt::Application.new(ARGV)

@ -1,7 +1,7 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
$VERBOSE = true; $:.unshift File.dirname($0) $VERBOSE = true; $:.unshift File.dirname($0)
require 'Qt' require 'TQt'
a = TQt::Application.new(ARGV) a = TQt::Application.new(ARGV)

@ -1,7 +1,7 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
$VERBOSE = true; $:.unshift File.dirname($0) $VERBOSE = true; $:.unshift File.dirname($0)
require 'Qt' require 'TQt'
class MyWidget < TQt::Widget class MyWidget < TQt::Widget

@ -1,7 +1,7 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
$VERBOSE = true; $:.unshift File.dirname($0) $VERBOSE = true; $:.unshift File.dirname($0)
require 'Qt' require 'TQt'
class MyWidget < TQt::VBox class MyWidget < TQt::VBox

@ -1,7 +1,7 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
$VERBOSE = true; $:.unshift File.dirname($0) $VERBOSE = true; $:.unshift File.dirname($0)
require 'Qt' require 'TQt'
class LCDRange < TQt::VBox class LCDRange < TQt::VBox

@ -1,5 +1,5 @@
#!/usr/bin/ruby -w #!/usr/bin/ruby -w
require 'Qt' require 'TQt'
class LCDRange < TQt::VBox class LCDRange < TQt::VBox
signals 'valueChanged(int)' signals 'valueChanged(int)'

@ -1,7 +1,7 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
$VERBOSE = true; $:.unshift File.dirname($0) $VERBOSE = true; $:.unshift File.dirname($0)
require 'Qt' require 'TQt'
require 'lcdrange.rb' require 'lcdrange.rb'
class MyWidget < TQt::VBox class MyWidget < TQt::VBox

@ -1,4 +1,4 @@
require 'Qt' require 'TQt'
class CannonField < TQt::Widget class CannonField < TQt::Widget
signals 'angleChanged(int)' signals 'angleChanged(int)'

@ -1,4 +1,4 @@
require 'Qt' require 'TQt'
class LCDRange < TQt::VBox class LCDRange < TQt::VBox
signals 'valueChanged(int)' signals 'valueChanged(int)'

@ -1,7 +1,7 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
$VERBOSE = true; $:.unshift File.dirname($0) $VERBOSE = true; $:.unshift File.dirname($0)
require 'Qt' require 'TQt'
require 'lcdrange.rb' require 'lcdrange.rb'
require 'cannon.rb' require 'cannon.rb'
@ -26,7 +26,7 @@ class MyWidget < TQt::Widget
# 2x2, 10 pixel border # 2x2, 10 pixel border
grid.addWidget( quit, 0, 0 ) grid.addWidget( quit, 0, 0 )
grid.addWidget( angle, 1, 0, Qt.AlignTop ) grid.addWidget( angle, 1, 0, TQt.AlignTop )
grid.addWidget( cannonField, 1, 1 ) grid.addWidget( cannonField, 1, 1 )
grid.setColStretch( 1, 10 ) grid.setColStretch( 1, 10 )

@ -1,4 +1,4 @@
require 'Qt' require 'TQt'
class CannonField < TQt::Widget class CannonField < TQt::Widget
signals 'angleChanged(int)' signals 'angleChanged(int)'

@ -1,4 +1,4 @@
require 'Qt' require 'TQt'
class LCDRange < TQt::VBox class LCDRange < TQt::VBox
signals 'valueChanged(int)' signals 'valueChanged(int)'

@ -1,7 +1,7 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
$VERBOSE = true; $:.unshift File.dirname($0) $VERBOSE = true; $:.unshift File.dirname($0)
require 'Qt' require 'TQt'
require 'lcdrange.rb' require 'lcdrange.rb'
require 'cannon.rb' require 'cannon.rb'
Loading…
Cancel
Save