qtbindings 4.8.3.0 → 4.8.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/qt4.rb ADDED
@@ -0,0 +1,101 @@
1
+ windows = false
2
+ platform = RUBY_PLATFORM.split("-")[1]
3
+ windows = true if platform =~ /mswin32/ or platform =~ /mingw32/
4
+
5
+ module Qt
6
+ PLUGIN_PATH = File.expand_path(File.join(File.dirname(__FILE__), '..', 'bin', 'plugins'))
7
+ end
8
+ if RUBY_VERSION.split('.')[0].to_i == 1
9
+ if windows
10
+ ENV['PATH'] = File.join(File.dirname(__FILE__), '../bin') + ';' + File.join(File.dirname(__FILE__), '../lib/1.9') + ';' + File.join(File.dirname(__FILE__), '../bin/plugins') + ';' + File.join(File.dirname(__FILE__), '../bin/1.9') + ';' + ENV['PATH']
11
+ end
12
+ $: << File.join(File.dirname(__FILE__), '../lib/1.9')
13
+ require '1.9/qtruby4'
14
+ else
15
+ if windows
16
+ ENV['PATH'] = File.join(File.dirname(__FILE__), '../bin') + ';' + File.join(File.dirname(__FILE__), '../lib/2.0') + ';' + File.join(File.dirname(__FILE__), '../bin/plugins') + ';' + File.join(File.dirname(__FILE__), '../bin/2.0') + ';' + ENV['PATH']
17
+ end
18
+ $: << File.join(File.dirname(__FILE__), '../lib/2.0')
19
+ require '2.0/qtruby4'
20
+ end
21
+
22
+ module Qt
23
+ class RubyThreadFix < Qt::Object
24
+ slots 'ruby_thread_timeout()'
25
+ slots 'callback_timeout()'
26
+ slots 'callback_timeout2()'
27
+ @@queue = Queue.new
28
+
29
+ def initialize
30
+ super()
31
+ # Enable threading
32
+ @ruby_thread_sleep_period = 0.01
33
+ @ruby_thread_timer = Qt::Timer.new(self)
34
+ connect(@ruby_thread_timer, SIGNAL('timeout()'), SLOT('ruby_thread_timeout()'))
35
+ @ruby_thread_timer.start(0)
36
+ @callback_timer = Qt::Timer.new(self)
37
+ connect(@callback_timer, SIGNAL('timeout()'), SLOT('callback_timeout()'))
38
+ @callback_timer.start(1)
39
+ @callback_timer2 = Qt::Timer.new(self)
40
+ connect(@callback_timer2, SIGNAL('timeout()'), SLOT('callback_timeout2()'))
41
+ @running = true
42
+ end
43
+
44
+ def ruby_thread_timeout
45
+ sleep(@ruby_thread_sleep_period)
46
+ end
47
+
48
+ def callback_timeout
49
+ if !@@queue.empty?
50
+ # Start a backup timer in case this one goes modal.
51
+ @callback_timer2.start(100)
52
+ @@queue.pop.call until @@queue.empty?
53
+ # Cancel the backup timer
54
+ @callback_timer2.stop if @callback_timer2
55
+ end
56
+ end
57
+
58
+ def callback_timeout2
59
+ @callback_timer2.interval = 10
60
+ @@queue.pop.call until @@queue.empty?
61
+ end
62
+
63
+ def self.queue
64
+ @@queue
65
+ end
66
+
67
+ def stop
68
+ if @running
69
+ @running = false
70
+ @ruby_thread_timer.stop
71
+ @callback_timer.stop
72
+ @callback_timer2.stop
73
+ @ruby_thread_timer.dispose
74
+ @callback_timer.dispose
75
+ @callback_timer2.dispose
76
+ @ruby_thread_timer = nil
77
+ @callback_timer = nil
78
+ @callback_timer2 = nil
79
+ end
80
+ end
81
+ end
82
+
83
+ def self.execute_in_main_thread (blocking = false, sleep_period = 0.001, delay_execution = false)
84
+ if Thread.current != Thread.main
85
+ complete = false
86
+ RubyThreadFix.queue << lambda {|| yield; complete = true}
87
+ if blocking
88
+ until complete
89
+ sleep(sleep_period)
90
+ end
91
+ end
92
+ else
93
+ if delay_execution
94
+ RubyThreadFix.queue << lambda {|| yield; complete = true}
95
+ else
96
+ yield
97
+ end
98
+ end
99
+ end
100
+
101
+ end # module Qt
@@ -1,2 +1,2 @@
1
- QTBINDINGS_VERSION = '4.8.3.0'
2
- QTBINDINGS_RELEASE_DATE = '2012-10-01 21:56:20 -0600'
1
+ QTBINDINGS_VERSION = '4.8.5.0'
2
+ QTBINDINGS_RELEASE_DATE = '2013-12-03 16:46:31 -0700'
data/qtbindings.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  require './lib/qtbindings_version'
2
2
 
3
3
  spec = Gem::Specification.new do |s|
4
- s.authors = ['Richard Dale', 'Arno Rehn', 'Ryan Melton']
4
+ s.authors = ['Ryan Melton', 'Jason Thomas', 'Richard Dale', 'Arno Rehn']
5
5
  s.email = 'kde-bindings@kde.org'
6
6
  s.rubyforge_project = 'qtbindings'
7
7
  s.summary = "Qt bindings for ruby"
@@ -1,7 +1,7 @@
1
1
  require './lib/qtbindings_version'
2
2
 
3
3
  spec = Gem::Specification.new do |s|
4
- s.authors = ['Richard Dale', 'Arno Rehn', 'Ryan Melton']
4
+ s.authors = ['Ryan Melton', 'Jason Thomas', 'Richard Dale', 'Arno Rehn']
5
5
  s.email = 'kde-bindings@kde.org'
6
6
  s.rubyforge_project = 'qtbindings'
7
7
  s.platform = Gem::Platform::CURRENT
@@ -1,119 +1,127 @@
1
- qtbindings
2
- ----------
3
- This project provides bindings that allow the QT Gui toolkit to be used from the
4
- Ruby Programming language. Overall it is a repackaging of a subset of the KDE
5
- bindings ruby and smoke systems into a format that lends itself well to
6
- packaging into a Ruby gem.
7
-
8
- Goals
9
- -----
10
- 1. To make it easy to install a Qt binding for Ruby on all platforms using
11
- RubyGems
12
- 2. To maintain an up-to-date binary gem for Windows that is bundled with
13
- the latest version of Qt from http://qt.nokia.com
14
- 3. To reduce the scope and maintenance of the bindings to only bind to the
15
- libraries provided by the Qt SDK.
16
- 4. To increase compatibility with non-linux platforms
17
-
18
- Tested Environments
19
- --------------------
20
- Mac OSX 10.6.8 (Snow Leopard)
21
- XCode 3.2.6
22
- Brew - QT 4.8.2
23
- Cmake 2.8.6
24
-
25
- Windows XP SP3
26
- QT Libraries 4.8.3
27
- Mingw 4.4
28
- Cmake 2.6.4
29
- Ruby 1.8.7p370 and 1.9.3p0 installed from rubyinstaller.org
30
-
31
- Note: Ruby 1.9.3 patch levels 125 and 194 on Windows have a bug in the I/O
32
- system which prevent the usage of the pos method. That is why I'm using 1.9.3p0.
33
- See http://bugs.ruby-lang.org/issues/6179 and http://bugs.ruby-lang.org/issues/6401
34
-
35
- Ubuntu Linux 11.10
36
- QT SDK 4.8.1
37
- Cmake 2.8.5
38
-
39
- Compiling
40
- ---------
41
- Compiling qtbindings requires the following prerequisites:
42
- 1. cmake 2.8.x installed and in your path
43
- 2. QT 4.8.x installed and in your path
44
- 3. Ruby installed and in your path
45
- 4. gcc 4.x
46
-
47
- Additionally: all of the operating system prequisites for compiling,
48
- window system development, opengl, etc must be installed.
49
-
50
- Rakefile
51
- --------
52
- Perform the following steps to build the gem on Unix or Mac:
53
- 1. rake VERSION=4.8.x.y gem
54
- Where the x is the subversion of QT and y is the patch level of qtbindings
55
-
56
- Perform the following steps to build the gem on Windows:
57
- 1. Ensure you are running Ruby 1.8.7
58
- ruby -v #=> ruby 1.8.7
59
- 2. rake distclean
60
- 3. rake build
61
- 4. Switch to Ruby 1.9.3
62
- ruby -v #=> ruby 1.9.3
63
- 5. rake build
64
- 6. rake VERSION=4.8.x.y gemnative
65
- Where the x is the subversion of QT and y is the patch level of qtbindings
66
-
67
- Note: The gem is built twice to create the FAT binary which will work
68
- on both Ruby 1.8 and 1.9. The Windows utility called pik is useful for
69
- switching between Ruby versions.
70
-
71
- After building the gem, verify the examples work by running:
72
- 1. rake examples
73
-
74
- Operating Systems Notes:
75
-
76
- Debian Linux
77
- ------------
78
- 1. The following should get you the packages you need:
79
- sudo aptitude install build-essential bison openssl libreadline5
80
- libreadline-dev curl git-core zlib1g zlib1g-dev libssl-dev vim
81
- libsqlite3-0 libsqlite3-dev sqlite3 libreadline5-dev libreadline6-dev
82
- libxml2-dev git-core subversion autoconf xorg-dev libgl1-mesa-dev
83
- libglu1-mesa-dev
84
-
85
- Mac OSX Snow Leopard
86
- -----------------------
87
- 1. XCode
88
- 2. Brew (http://mxcl.github.com/homebrew/)
89
- Install qt with 'brew install qt'
90
-
91
- Windows - Note: Only necessary for debugging (binary gem available)
92
- --------
93
- 1. mingw from the Qt SDK in your path: ie C:\Qt\2010.04\mingw\bin
94
-
95
- Install
96
- ------
97
- On linux/MacOSX you must make sure you have all the necessary prerequisites
98
- installed or the compile will fail.
99
-
100
- gem install qtbindings
101
-
102
- This should always work flawlessly on Windows because everything is nicely
103
- packaged into a binary gem. However, the gem is very large ~90MB, so please
104
- be patient while gem downloads the file.
105
-
106
- To get help:
107
- Sign up to the kdebindings mailing list at:
108
- https://mail.kde.org/mailman/listinfo/kde-bindings
109
- You can also file tickets here at github for issues specific to the
110
- qtbindings gem.
111
-
112
- License:
113
- This library is released under the LGPL Version 2.1.
114
- See COPYING.LIB.txt
115
-
116
- Disclaimer:
117
- Almost all of this code was written by the great guys who work on the KDE
118
- bindings project, particurly Arno Rehn and Richard Dale. I hope to increase
119
- the adoption and use of the code that they have written.
1
+ qtbindings
2
+ ----------
3
+ This project provides bindings that allow the QT Gui toolkit to be used from the
4
+ Ruby Programming language. Overall it is a repackaging of a subset of the KDE
5
+ bindings ruby and smoke systems into a format that lends itself well to
6
+ packaging into a Ruby gem.
7
+
8
+ Goals
9
+ -----
10
+ 1. To make it easy to install a Qt binding for Ruby on all platforms using
11
+ RubyGems
12
+ 2. To maintain an up-to-date binary gem for Windows that is bundled with
13
+ the latest version of Qt from http://qt.nokia.com
14
+ 3. To reduce the scope and maintenance of the bindings to only bind to the
15
+ libraries provided by the Qt SDK.
16
+ 4. To increase compatibility with non-linux platforms
17
+
18
+ Note: This gem only supports Ruby 1.9.3 and Ruby 2.0.0 starting at qtbindings version 4.8.5.0.
19
+ For Ruby 1.8.x you can try installing version 4.8.3.0, however upgrading Ruby is
20
+ highly recommended.
21
+
22
+ Usage Notes
23
+ ------------
24
+ Ruby threading is now fully supported out of the box. All GUI access however must be done
25
+ inside the main thread. To support updating the GUI using other threads, use the following function
26
+ provided in Qt4.rb:
27
+
28
+ Qt.execute_in_main_thread(true) do
29
+ # GUI code here
30
+ end
31
+
32
+ Tested Environments
33
+ --------------------
34
+ Mac OSX 10.6.8 (Snow Leopard)
35
+ XCode 3.2.6 (gcc 4.2.1)
36
+ Brew - QT 4.8.5
37
+ Cmake 2.8.11.2
38
+ Ruby 1.9.3p448
39
+
40
+ Windows XP SP3
41
+ QT SDK 4.8.5
42
+ Cmake 2.8.8
43
+ Ruby 1.9.3p448 and Ruby 2.0.0p353 installed from rubyinstaller.org
44
+
45
+ Ubuntu Linux 11.10
46
+ QT SDK 4.8.1
47
+ Cmake 2.8.5
48
+
49
+ Compiling
50
+ ---------
51
+ Compiling qtbindings requires the following prerequisites:
52
+ 1. cmake 2.8.x installed and in your path
53
+ 2. QT 4.8.x installed and in your path
54
+ 3. Ruby installed and in your path
55
+ 4. gcc 4.x
56
+
57
+ Additionally: all of the operating system prequisites for compiling,
58
+ window system development, opengl, etc must be installed.
59
+
60
+ Rakefile
61
+ --------
62
+ Perform the following steps to build the gem on Unix or Mac:
63
+ 1. rake VERSION=4.8.x.y gem
64
+ Where the x is the subversion of QT and y is the patch level of qtbindings
65
+
66
+ Perform the following steps to build the gem on Windows:
67
+ 1. Ensure you are running Ruby 1.9.3
68
+ ruby -v #=> ruby 1.9.3
69
+ 2. rake distclean
70
+ 3. rake build
71
+ 4. Switch to Ruby 2.0.0
72
+ ruby -v #=> ruby 2.0.0
73
+ 5. rake build
74
+ 6. rake VERSION=4.8.x.y gemnative
75
+ Where the x is the subversion of QT and y is the patch level of qtbindings
76
+
77
+ Note: The gem is built twice to create the FAT binary which will work
78
+ on both Ruby 1.9 and 2.0. The Windows utility called pik is useful for
79
+ switching between Ruby versions.
80
+
81
+ After building the gem, verify the examples work by running:
82
+ 1. rake examples
83
+
84
+ Operating Systems Notes:
85
+
86
+ Debian Linux
87
+ ------------
88
+ 1. The following should get you the packages you need:
89
+ sudo aptitude install build-essential bison openssl libreadline5
90
+ libreadline-dev curl git-core zlib1g zlib1g-dev libssl-dev vim
91
+ libsqlite3-0 libsqlite3-dev sqlite3 libreadline5-dev libreadline6-dev
92
+ libxml2-dev git-core subversion autoconf xorg-dev libgl1-mesa-dev
93
+ libglu1-mesa-dev
94
+
95
+ Mac OSX Snow Leopard
96
+ -----------------------
97
+ 1. XCode
98
+ 2. Brew (http://mxcl.github.com/homebrew/)
99
+ Install qt with 'brew install qt'
100
+
101
+ Windows - Note: Only necessary for debugging (binary gem available)
102
+ --------
103
+ 1. mingw 4.4 in your path (from here or elsewhere: http://nosymbolfound.blogspot.com/2012/12/since-until-now-qt-under-windows-is.html#!/2012/12/since-until-now-qt-under-windows-is.html)
104
+
105
+ Install
106
+ ------
107
+ On linux/MacOSX you must make sure you have all the necessary prerequisites
108
+ installed or the compile will fail.
109
+
110
+ gem install qtbindings
111
+
112
+ This should always work flawlessly on Windows because everything is nicely
113
+ packaged into a binary gem. However, the gem is very large ~90MB, so please
114
+ be patient while gem downloads the file.
115
+
116
+ To get help:
117
+ You can file tickets here at github for issues specific to the
118
+ qtbindings gem.
119
+
120
+ License:
121
+ This library is released under the LGPL Version 2.1.
122
+ See COPYING.LIB.txt
123
+
124
+ Disclaimer:
125
+ Almost all of this code was written by the guys who worked on the KDE
126
+ bindings project, particurly Arno Rehn and Richard Dale. I hope to increase
127
+ the adoption and use of the code that they have written.
@@ -1,3 +1,2 @@
1
1
  1. Get all of the examples to run on every platform
2
2
  2. Remove all compiler warnings
3
- 3. Test against Qt 4.7
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qtbindings
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.8.3.0
5
- prerelease:
4
+ version: 4.8.5.0
6
5
  platform: ruby
7
6
  authors:
7
+ - Ryan Melton
8
+ - Jason Thomas
8
9
  - Richard Dale
9
10
  - Arno Rehn
10
- - Ryan Melton
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-10-02 00:00:00.000000000 Z
14
+ date: 2013-12-03 00:00:00.000000000 Z
15
15
  dependencies: []
16
16
  description: qtbindings provides ruby bindings to QT4.x. It is derived from the kdebindings
17
17
  project.
@@ -28,7 +28,7 @@ extra_rdoc_files: []
28
28
  files:
29
29
  - lib/Qt/qtruby4.rb
30
30
  - lib/Qt.rb
31
- - lib/Qt4.rb
31
+ - lib/qt4.rb
32
32
  - lib/qtbindings_version.rb
33
33
  - lib/qtscript/qtscript.rb
34
34
  - lib/qttest/qttest.rb
@@ -621,7 +621,7 @@ files:
621
621
  - ext/ruby/qtruby/src/marshall_primitives.h
622
622
  - ext/ruby/qtruby/src/marshall_types.cpp
623
623
  - ext/ruby/qtruby/src/marshall_types.h
624
- - ext/ruby/qtruby/src/Qt.cpp
624
+ - ext/ruby/qtruby/src/qt.cpp
625
625
  - ext/ruby/qtruby/src/qtruby.cpp
626
626
  - ext/ruby/qtruby/src/qtruby.h
627
627
  - ext/ruby/qtruby/src/smokeruby.h
@@ -785,13 +785,13 @@ files:
785
785
  - ext/smoke/smokebase/CMakeLists.txt
786
786
  - ext/smoke/smokebase/smokebase.cpp
787
787
  - ext/smoke/solid_smoke.h
788
- - CHANGELOG.txt
788
+ - changelog.txt
789
789
  - CMakeLists.txt
790
790
  - COPYING.LIB.txt
791
791
  - COPYING.txt
792
- - KNOWN_ISSUES.txt
793
- - README.txt
794
- - TODO.txt
792
+ - known_issues.txt
793
+ - readme.txt
794
+ - todo.txt
795
795
  - extconf.rb
796
796
  - qtbindings.gemspec
797
797
  - qtbindingsnative.gemspec
@@ -799,18 +799,17 @@ files:
799
799
  homepage: http://github.com/ryanmelt/qtbindings
800
800
  licenses:
801
801
  - LGPLv2.1
802
+ metadata: {}
802
803
  post_install_message:
803
804
  rdoc_options: []
804
805
  require_paths:
805
806
  - lib
806
807
  required_ruby_version: !ruby/object:Gem::Requirement
807
- none: false
808
808
  requirements:
809
809
  - - ! '>='
810
810
  - !ruby/object:Gem::Version
811
811
  version: '0'
812
812
  required_rubygems_version: !ruby/object:Gem::Requirement
813
- none: false
814
813
  requirements:
815
814
  - - ! '>='
816
815
  - !ruby/object:Gem::Version
@@ -818,8 +817,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
818
817
  requirements:
819
818
  - none
820
819
  rubyforge_project: qtbindings
821
- rubygems_version: 1.8.10
820
+ rubygems_version: 2.1.5
822
821
  signing_key:
823
- specification_version: 3
822
+ specification_version: 4
824
823
  summary: Qt bindings for ruby
825
824
  test_files: []