~kubuntu-members/korundum/4.11

« back to all changes in this revision

Viewing changes to qtruby/modules/qtscript/qtscript.rb

  • Committer: Ian Monroe
  • Date: 2010-11-21 15:55:01 UTC
  • Revision ID: git-v1:c37670e4e3c59f5eb2ba112f5341a5e706217f6f
Split up Smoke into Qt and KDE directories. 
Move libsmoke stuff into the generator directory
Split up Ruby into qtruby and korundum directories

svn path=/trunk/KDE/kdebindings/ruby/; revision=1199320

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
=begin
 
2
/***************************************************************************
 
3
                          qtscript.rb  -  QtScript ruby client lib
 
4
                             -------------------
 
5
    begin                : 11-07-2008
 
6
    copyright            : (C) 2008 by Richard Dale
 
7
    email                : richard.j.dale@gmail.com
 
8
 ***************************************************************************/
 
9
 
 
10
/***************************************************************************
 
11
 *                                                                         *
 
12
 *   This program is free software; you can redistribute it and/or modify  *
 
13
 *   it under the terms of the GNU General Public License as published by  *
 
14
 *   the Free Software Foundation; either version 2 of the License, or     *
 
15
 *   (at your option) any later version.                                   *
 
16
 *                                                                         *
 
17
 ***************************************************************************/
 
18
=end
 
19
 
 
20
module QtScript
 
21
  module Internal
 
22
    def self.init_all_classes
 
23
#      Qt::Internal::add_normalize_proc(Proc.new do |classname|
 
24
#        if classname =~ /^QtScript/
 
25
#          now = classname.sub(/^QtScript?(?=[A-Z])/,'QtScript::')
 
26
#        end
 
27
#        now
 
28
#      end)
 
29
      getClassList.each do |c|
 
30
        classname = Qt::Internal::normalize_classname(c)
 
31
        id = Qt::Internal::findClass(c);
 
32
        Qt::Internal::insert_pclassid(classname, id)
 
33
        Qt::Internal::cpp_names[classname] = c
 
34
        klass = Qt::Internal::isQObject(c) ? Qt::Internal::create_qobject_class(classname, Qt) \
 
35
                                           : Qt::Internal::create_qt_class(classname, Qt)
 
36
        Qt::Internal::classes[classname] = klass unless klass.nil?
 
37
      end
 
38
    end
 
39
  end
 
40
end