qtbindings 4.6.3.0-x86-mingw32 → 4.6.3.1-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.txt +4 -1
- data/KNOWN_ISSUES.txt +11 -20
- data/README.txt +3 -2
- data/TODO.txt +1 -0
- data/bin/1.8/rbrcc.exe +0 -0
- data/bin/1.8/rbuic4.exe +0 -0
- data/bin/1.8/smokeapi.exe +0 -0
- data/bin/1.8/smokedeptool.exe +0 -0
- data/bin/1.9/rbrcc.exe +0 -0
- data/bin/1.9/rbuic4.exe +0 -0
- data/bin/1.9/smokeapi.exe +0 -0
- data/bin/1.9/smokedeptool.exe +0 -0
- data/bin/plugins/{qtaccessiblecompatwidgets4.dll → accessible/qtaccessiblecompatwidgets4.dll} +0 -0
- data/bin/plugins/{qtaccessiblewidgets4.dll → accessible/qtaccessiblewidgets4.dll} +0 -0
- data/bin/plugins/{qcncodecs4.dll → codecs/qcncodecs4.dll} +0 -0
- data/bin/plugins/{qjpcodecs4.dll → codecs/qjpcodecs4.dll} +0 -0
- data/bin/plugins/{qkrcodecs4.dll → codecs/qkrcodecs4.dll} +0 -0
- data/bin/plugins/{qtwcodecs4.dll → codecs/qtwcodecs4.dll} +0 -0
- data/bin/plugins/{arthurplugin.dll → designer/arthurplugin.dll} +0 -0
- data/bin/plugins/{containerextension.dll → designer/containerextension.dll} +0 -0
- data/bin/plugins/{customwidgetplugin.dll → designer/customwidgetplugin.dll} +0 -0
- data/bin/plugins/{phononwidgets.dll → designer/phononwidgets.dll} +0 -0
- data/bin/plugins/{qt3supportwidgets.dll → designer/qt3supportwidgets.dll} +0 -0
- data/bin/plugins/{qwebview.dll → designer/qwebview.dll} +0 -0
- data/bin/plugins/{taskmenuextension.dll → designer/taskmenuextension.dll} +0 -0
- data/bin/plugins/{worldtimeclockplugin.dll → designer/worldtimeclockplugin.dll} +0 -0
- data/bin/plugins/{qglgraphicssystem4.dll → graphicssystems/qglgraphicssystem4.dll} +0 -0
- data/bin/plugins/{qtracegraphicssystem4.dll → graphicssystems/qtracegraphicssystem4.dll} +0 -0
- data/bin/plugins/{qsvgicon4.dll → iconengines/qsvgicon4.dll} +0 -0
- data/bin/plugins/{qgif4.dll → imageformats/qgif4.dll} +0 -0
- data/bin/plugins/{qico4.dll → imageformats/qico4.dll} +0 -0
- data/bin/plugins/{qjpeg4.dll → imageformats/qjpeg4.dll} +0 -0
- data/bin/plugins/{qmng4.dll → imageformats/qmng4.dll} +0 -0
- data/bin/plugins/{qsvg4.dll → imageformats/qsvg4.dll} +0 -0
- data/bin/plugins/{qtiff4.dll → imageformats/qtiff4.dll} +0 -0
- data/bin/plugins/phonon_backend/phonon_ds94.dll +0 -0
- data/bin/plugins/{qsqlite4.dll → sqldrivers/qsqlite4.dll} +0 -0
- data/bin/plugins/{qsqlodbc4.dll → sqldrivers/qsqlodbc4.dll} +0 -0
- data/examples/designer/calculatorbuilder/main.rb +2 -2
- data/examples/designer/calculatorform/calculatorform.rb +1 -1
- data/examples/designer/calculatorform/main.rb +1 -1
- data/examples/desktop/screenshot/main.rb +1 -1
- data/examples/desktop/systray/main.rb +2 -2
- data/examples/dialogs/complexwizard/licensewizard.rb +1 -1
- data/examples/dialogs/complexwizard/main.rb +1 -1
- data/examples/dialogs/configdialog/configdialog.rb +1 -1
- data/examples/dialogs/configdialog/main.rb +1 -1
- data/examples/dialogs/extension/main.rb +1 -1
- data/examples/dialogs/findfiles/main.rb +1 -1
- data/examples/dialogs/simplewizard/classwizard.rb +4 -4
- data/examples/dialogs/simplewizard/main.rb +1 -1
- data/examples/dialogs/standarddialogs/main.rb +1 -1
- data/examples/dialogs/tabdialog/main.rb +1 -1
- data/examples/draganddrop/draggableicons/main.rb +1 -1
- data/examples/draganddrop/draggabletext/dragwidget.rb +1 -1
- data/examples/draganddrop/draggabletext/main.rb +1 -1
- data/examples/draganddrop/dropsite/dropsitewindow.rb +1 -1
- data/examples/draganddrop/dropsite/main.rb +1 -1
- data/examples/draganddrop/fridgemagnets/dragwidget.rb +1 -1
- data/examples/draganddrop/fridgemagnets/main.rb +1 -1
- data/examples/draganddrop/puzzle/main.rb +1 -1
- data/examples/draganddrop/puzzle/mainwindow.rb +2 -2
- data/examples/graphicsview/collidingmice/main.rb +2 -2
- data/examples/graphicsview/dragdroprobot/main.rb +3 -3
- data/examples/itemviews/chart/main.rb +2 -2
- data/examples/itemviews/chart/mainwindow.rb +1 -1
- data/examples/itemviews/chart/pieview.rb +2 -2
- data/examples/itemviews/pixelator/main.rb +2 -2
- data/examples/itemviews/pixelator/mainwindow.rb +2 -2
- data/examples/itemviews/puzzle/main.rb +1 -1
- data/examples/itemviews/puzzle/mainwindow.rb +2 -2
- data/examples/itemviews/simpledommodel/dommodel.rb +7 -7
- data/examples/itemviews/simpledommodel/main.rb +1 -1
- data/examples/itemviews/simpledommodel/mainwindow.rb +1 -1
- data/examples/itemviews/simpletreemodel/main.rb +2 -2
- data/examples/itemviews/simpletreemodel/treemodel.rb +1 -1
- data/examples/itemviews/sortingmodel/main.rb +1 -1
- data/examples/itemviews/sortingmodel/treemodel.rb +1 -1
- data/examples/itemviews/spinboxdelegate/main.rb +1 -1
- data/examples/itemviews/spinboxdelegate/spinboxdelegate.rb +2 -2
- data/examples/layouts/basiclayouts/main.rb +1 -1
- data/examples/layouts/borderlayout/main.rb +1 -1
- data/examples/layouts/borderlayout/window.rb +1 -1
- data/examples/layouts/flowlayouts/main.rb +1 -1
- data/examples/layouts/flowlayouts/window.rb +1 -1
- data/examples/mainwindows/application/main.rb +1 -1
- data/examples/mainwindows/dockwidgets/main.rb +1 -1
- data/examples/mainwindows/dockwidgets/mainwindow.rb +1 -1
- data/examples/mainwindows/mdi/main.rb +1 -1
- data/examples/mainwindows/mdi/mainwindow.rb +1 -1
- data/examples/mainwindows/mdi/mdichild.rb +1 -1
- data/examples/mainwindows/menus/main.rb +1 -1
- data/examples/mainwindows/recentfiles/main.rb +1 -1
- data/examples/mainwindows/sdi/main.rb +1 -1
- data/examples/network/broadcastreceiver/main.rb +1 -1
- data/examples/network/broadcastsender/main.rb +1 -1
- data/examples/network/fortuneclient/client.rb +3 -4
- data/examples/network/fortuneclient/main.rb +1 -1
- data/examples/network/fortuneserver/main.rb +1 -1
- data/examples/network/ftp/main.rb +1 -1
- data/examples/network/http/main.rb +1 -1
- data/examples/network/loopback/main.rb +1 -1
- data/examples/opengl/grabber/main.rb +1 -1
- data/examples/opengl/grabber/mainwindow.rb +1 -1
- data/examples/opengl/hellogl/main.rb +1 -1
- data/examples/opengl/hellogl/window.rb +1 -1
- data/examples/opengl/textures/main.rb +1 -1
- data/examples/opengl/textures/window.rb +1 -1
- data/examples/painting/basicdrawing/main.rb +1 -1
- data/examples/painting/basicdrawing/renderarea.rb +13 -13
- data/examples/painting/basicdrawing/window.rb +1 -1
- data/examples/painting/concentriccircles/main.rb +1 -1
- data/examples/painting/concentriccircles/window.rb +1 -1
- data/examples/painting/fontsampler/main.rb +1 -1
- data/examples/painting/fontsampler/mainwindow.rb +2 -2
- data/examples/painting/fontsampler/previewdialog.rb +2 -2
- data/examples/painting/imagecomposition/main.rb +2 -2
- data/examples/painting/painterpaths/main.rb +1 -1
- data/examples/painting/painterpaths/window.rb +1 -1
- data/examples/painting/svgviewer/main.rb +2 -2
- data/examples/painting/svgviewer/mainwindow.rb +1 -1
- data/examples/painting/svgviewer/svgwindow.rb +1 -1
- data/examples/painting/transformations/main.rb +1 -1
- data/examples/painting/transformations/renderarea.rb +4 -4
- data/examples/painting/transformations/window.rb +1 -1
- data/examples/qdbus/chat/chat.rb +2 -2
- data/examples/qdbus/complexpingpong/complexping.rb +1 -1
- data/examples/qdbus/complexpingpong/complexpong.rb +1 -1
- data/examples/qdbus/pingpong/ping.rb +1 -1
- data/examples/qdbus/pingpong/pong.rb +1 -1
- data/examples/qdbus/remotecontrolledcar/car/main.rb +1 -1
- data/examples/qdbus/remotecontrolledcar/controller/controller.rb +1 -1
- data/examples/qdbus/remotecontrolledcar/controller/main.rb +1 -1
- data/examples/richtext/calendar/main.rb +1 -1
- data/examples/richtext/orderform/main.rb +1 -1
- data/examples/richtext/orderform/mainwindow.rb +1 -1
- data/examples/richtext/syntaxhighlighter/main.rb +1 -1
- data/examples/richtext/syntaxhighlighter/mainwindow.rb +1 -1
- data/examples/ruboids/release.rb +2 -2
- data/examples/ruboids/ruboids/Boid.rb +4 -4
- data/examples/ruboids/ruboids/BoidView.rb +1 -1
- data/examples/ruboids/ruboids/Camera.rb +1 -1
- data/examples/ruboids/ruboids/CameraDialog.rb +2 -2
- data/examples/ruboids/ruboids/Canvas.rb +5 -5
- data/examples/ruboids/ruboids/Cloud.rb +3 -3
- data/examples/ruboids/ruboids/CloudView.rb +5 -5
- data/examples/ruboids/ruboids/Flock.rb +3 -3
- data/examples/ruboids/ruboids/Graphics.rb +1 -1
- data/examples/ruboids/ruboids/Thing.rb +1 -1
- data/examples/ruboids/ruboids/Triangle.rb +1 -1
- data/examples/ruboids/ruboids/World.rb +6 -6
- data/examples/ruboids/ruboids/WorldWindow.rb +2 -2
- data/examples/ruboids/ruboids/ruboids.rb +4 -4
- data/examples/textedit/textedit.rb +1 -1
- data/examples/tutorial/t10/t10.rb +2 -2
- data/examples/tutorial/t11/t11.rb +2 -2
- data/examples/tutorial/t12/t12.rb +2 -2
- data/examples/tutorial/t13/gamebrd.rb +2 -2
- data/examples/tutorial/t13/t13.rb +1 -1
- data/examples/tutorial/t14/cannon.rb +1 -1
- data/examples/tutorial/t14/gamebrd.rb +2 -2
- data/examples/tutorial/t14/t14.rb +1 -1
- data/examples/tutorial/t7/t7.rb +1 -1
- data/examples/tutorial/t8/t8.rb +2 -2
- data/examples/tutorial/t9/t9.rb +2 -2
- data/examples/widgets/analogclock/main.rb +1 -1
- data/examples/widgets/calculator/calculator.rb +1 -1
- data/examples/widgets/calculator/main.rb +1 -1
- data/examples/widgets/charactermap/main.rb +1 -1
- data/examples/widgets/charactermap/mainwindow.rb +2 -2
- data/examples/widgets/digitalclock/main.rb +1 -1
- data/examples/widgets/groupbox/main.rb +1 -1
- data/examples/widgets/icons/main.rb +1 -1
- data/examples/widgets/icons/mainwindow.rb +3 -3
- data/examples/widgets/imageviewer/main.rb +1 -1
- data/examples/widgets/lineedits/main.rb +1 -1
- data/examples/widgets/lineedits/window.rb +2 -2
- data/examples/widgets/movie/main.rb +1 -1
- data/examples/widgets/screenshot/main.rb +1 -1
- data/examples/widgets/scribble/main.rb +1 -1
- data/examples/widgets/scribble/mainwindow.rb +1 -1
- data/examples/widgets/sliders/main.rb +1 -1
- data/examples/widgets/sliders/slidersgroup.rb +1 -1
- data/examples/widgets/sliders/window.rb +3 -3
- data/examples/widgets/spinboxes/main.rb +1 -1
- data/examples/widgets/tetrix/main.rb +1 -1
- data/examples/widgets/tetrix/tetrixboard.rb +7 -7
- data/examples/widgets/tetrix/tetrixwindow.rb +1 -1
- data/examples/widgets/tooltips/main.rb +1 -1
- data/examples/widgets/tooltips/sortingbox.rb +1 -1
- data/examples/widgets/wiggly/dialog.rb +2 -2
- data/examples/widgets/wiggly/main.rb +1 -1
- data/examples/widgets/windowflags/controllerwindow.rb +1 -1
- data/examples/widgets/windowflags/main.rb +1 -1
- data/examples/xml/dombookmarks/main.rb +1 -1
- data/examples/xml/dombookmarks/mainwindow.rb +1 -1
- data/examples/xml/saxbookmarks/main.rb +1 -1
- data/examples/xml/saxbookmarks/mainwindow.rb +1 -1
- data/examples/xml/saxbookmarks/xbelhandler.rb +1 -1
- data/ext/cmake/modules/MacroOptionalAddBindings.cmake +2 -2
- data/ext/generator/generators/smoke/helpers.cpp +4 -3
- data/ext/generator/generators/smoke/writeSmokeDataFile.cpp +1 -1
- data/ext/ruby/CMakeLists.txt +1 -0
- data/ext/ruby/qtdeclarative/CMakeLists.txt +17 -0
- data/ext/ruby/qtdeclarative/qtdeclarative.cpp +66 -0
- data/ext/ruby/qtdeclarative/qtdeclarative.rb +17 -0
- data/ext/ruby/qtdeclarative/qtdeclarativehandlers.cpp +35 -0
- data/ext/ruby/qtruby/src/Qt.cpp +30 -21
- data/ext/ruby/qtruby/src/qtruby.cpp +8 -3
- data/ext/smoke/CMakeLists.txt +1 -0
- data/ext/smoke/qtcore/QtGuess.txt +1 -0
- data/ext/smoke/qtcore/smokeconfig.xml +1 -0
- data/ext/smoke/qtdeclarative/CMakeLists.txt +45 -0
- data/ext/smoke/qtdeclarative/config.xml.cmake +12 -0
- data/ext/smoke/qtdeclarative/qtdeclarative_includes.h +3 -0
- data/ext/smoke/qtdeclarative/smokeconfig.xml +58 -0
- data/ext/smoke/qtdeclarative_smoke.h +16 -0
- data/ext/smoke/qtnetwork/smokeconfig.xml +14 -11
- data/ext/smoke/qtopengl/smokeconfig.xml +1 -0
- data/ext/smoke/qtsql/CMakeLists.txt +4 -0
- data/ext/smoke/qtsql/qtsql_includes.h +1 -0
- data/ext/smoke/qtsql/smokeconfig.xml +3 -0
- data/extconf.rb +64 -18
- data/lib/1.8/libqtruby4shared.dll +0 -0
- data/lib/1.8/libsmokebase.dll +0 -0
- data/lib/1.8/libsmokeqtcore.dll +0 -0
- data/lib/1.8/libsmokeqtgui.dll +0 -0
- data/lib/1.8/libsmokeqtmultimedia.dll +0 -0
- data/lib/1.8/libsmokeqtnetwork.dll +0 -0
- data/lib/1.8/libsmokeqtopengl.dll +0 -0
- data/lib/1.8/libsmokeqtscript.dll +0 -0
- data/lib/1.8/libsmokeqtsql.dll +0 -0
- data/lib/1.8/libsmokeqtsvg.dll +0 -0
- data/lib/1.8/libsmokeqttest.dll +0 -0
- data/lib/1.8/libsmokeqtuitools.dll +0 -0
- data/lib/1.8/libsmokeqtwebkit.dll +0 -0
- data/lib/1.8/libsmokeqtxml.dll +0 -0
- data/lib/1.8/libsmokeqtxmlpatterns.dll +0 -0
- data/lib/1.8/qtruby4.so +0 -0
- data/lib/1.8/qtscript.so +0 -0
- data/lib/1.8/qttest.so +0 -0
- data/lib/1.8/qtuitools.so +0 -0
- data/lib/1.8/qtwebkit.so +0 -0
- data/lib/1.9/libqtruby4shared.dll +0 -0
- data/lib/1.9/libsmokebase.dll +0 -0
- data/lib/1.9/libsmokeqtcore.dll +0 -0
- data/lib/1.9/libsmokeqtgui.dll +0 -0
- data/lib/1.9/libsmokeqtmultimedia.dll +0 -0
- data/lib/1.9/libsmokeqtnetwork.dll +0 -0
- data/lib/1.9/libsmokeqtopengl.dll +0 -0
- data/lib/1.9/libsmokeqtscript.dll +0 -0
- data/lib/1.9/libsmokeqtsql.dll +0 -0
- data/lib/1.9/libsmokeqtsvg.dll +0 -0
- data/lib/1.9/libsmokeqttest.dll +0 -0
- data/lib/1.9/libsmokeqtuitools.dll +0 -0
- data/lib/1.9/libsmokeqtwebkit.dll +0 -0
- data/lib/1.9/libsmokeqtxml.dll +0 -0
- data/lib/1.9/libsmokeqtxmlpatterns.dll +0 -0
- data/lib/1.9/qtruby4.so +0 -0
- data/lib/1.9/qtscript.so +0 -0
- data/lib/1.9/qttest.so +0 -0
- data/lib/1.9/qtuitools.so +0 -0
- data/lib/1.9/qtwebkit.so +0 -0
- data/lib/Qt/qtruby4.rb +3177 -3140
- data/lib/qtbindings_version.rb +2 -2
- metadata +39 -425
- data/examples/qtscribble/scribble.rb +0 -270
- data/ext/ruby/qtruby/examples/base/kicons.rb +0 -54
- data/ext/ruby/qtruby/examples/base/rui.rb +0 -21
- data/ext/ruby/qtruby/examples/designer/calculatorbuilder/calculatorbuilder.qrc +0 -5
- data/ext/ruby/qtruby/examples/designer/calculatorbuilder/calculatorform.rb +0 -60
- data/ext/ruby/qtruby/examples/designer/calculatorbuilder/calculatorform.ui +0 -299
- data/ext/ruby/qtruby/examples/designer/calculatorbuilder/main.rb +0 -33
- data/ext/ruby/qtruby/examples/designer/calculatorbuilder/makefile +0 -2
- data/ext/ruby/qtruby/examples/designer/calculatorform/calculatorform.rb +0 -46
- data/ext/ruby/qtruby/examples/designer/calculatorform/calculatorform.ui +0 -277
- data/ext/ruby/qtruby/examples/designer/calculatorform/main.rb +0 -32
- data/ext/ruby/qtruby/examples/designer/calculatorform/makefile +0 -3
- data/ext/ruby/qtruby/examples/desktop/screenshot/main.rb +0 -32
- data/ext/ruby/qtruby/examples/desktop/screenshot/screenshot.rb +0 -156
- data/ext/ruby/qtruby/examples/desktop/systray/images/bad.svg +0 -64
- data/ext/ruby/qtruby/examples/desktop/systray/images/heart.svg +0 -55
- data/ext/ruby/qtruby/examples/desktop/systray/images/trash.svg +0 -58
- data/ext/ruby/qtruby/examples/desktop/systray/main.rb +0 -41
- data/ext/ruby/qtruby/examples/desktop/systray/makefile +0 -2
- data/ext/ruby/qtruby/examples/desktop/systray/systray.qrc +0 -7
- data/ext/ruby/qtruby/examples/desktop/systray/window.rb +0 -223
- data/ext/ruby/qtruby/examples/dialogs/complexwizard/complexwizard.rb +0 -140
- data/ext/ruby/qtruby/examples/dialogs/complexwizard/licensewizard.rb +0 -294
- data/ext/ruby/qtruby/examples/dialogs/complexwizard/main.rb +0 -31
- data/ext/ruby/qtruby/examples/dialogs/configdialog/configdialog.rb +0 -109
- data/ext/ruby/qtruby/examples/dialogs/configdialog/images/config.png +0 -0
- data/ext/ruby/qtruby/examples/dialogs/configdialog/images/query.png +0 -0
- data/ext/ruby/qtruby/examples/dialogs/configdialog/images/update.png +0 -0
- data/ext/ruby/qtruby/examples/dialogs/configdialog/main.rb +0 -31
- data/ext/ruby/qtruby/examples/dialogs/configdialog/pages.rb +0 -140
- data/ext/ruby/qtruby/examples/dialogs/extension/finddialog.rb +0 -89
- data/ext/ruby/qtruby/examples/dialogs/extension/main.rb +0 -31
- data/ext/ruby/qtruby/examples/dialogs/findfiles/main.rb +0 -32
- data/ext/ruby/qtruby/examples/dialogs/findfiles/window.rb +0 -177
- data/ext/ruby/qtruby/examples/dialogs/simplewizard/classwizard.rb +0 -374
- data/ext/ruby/qtruby/examples/dialogs/simplewizard/main.rb +0 -31
- data/ext/ruby/qtruby/examples/dialogs/simplewizard/simplewizard.rb +0 -110
- data/ext/ruby/qtruby/examples/dialogs/standarddialogs/dialog.rb +0 -340
- data/ext/ruby/qtruby/examples/dialogs/standarddialogs/main.rb +0 -31
- data/ext/ruby/qtruby/examples/dialogs/tabdialog/main.rb +0 -38
- data/ext/ruby/qtruby/examples/dialogs/tabdialog/tabdialog.rb +0 -178
- data/ext/ruby/qtruby/examples/draganddrop/draggableicons/dragwidget.rb +0 -125
- data/ext/ruby/qtruby/examples/draganddrop/draggableicons/images/boat.png +0 -0
- data/ext/ruby/qtruby/examples/draganddrop/draggableicons/images/car.png +0 -0
- data/ext/ruby/qtruby/examples/draganddrop/draggableicons/images/house.png +0 -0
- data/ext/ruby/qtruby/examples/draganddrop/draggableicons/main.rb +0 -41
- data/ext/ruby/qtruby/examples/draganddrop/draggabletext/draglabel.rb +0 -51
- data/ext/ruby/qtruby/examples/draganddrop/draggabletext/dragwidget.rb +0 -94
- data/ext/ruby/qtruby/examples/draganddrop/draggabletext/main.rb +0 -33
- data/ext/ruby/qtruby/examples/draganddrop/draggabletext/words.txt +0 -41
- data/ext/ruby/qtruby/examples/draganddrop/dropsite/dropsitewidget.rb +0 -98
- data/ext/ruby/qtruby/examples/draganddrop/dropsite/dropsitewindow.rb +0 -114
- data/ext/ruby/qtruby/examples/draganddrop/dropsite/main.rb +0 -33
- data/ext/ruby/qtruby/examples/draganddrop/fridgemagnets/draglabel.rb +0 -78
- data/ext/ruby/qtruby/examples/draganddrop/fridgemagnets/dragwidget.rb +0 -130
- data/ext/ruby/qtruby/examples/draganddrop/fridgemagnets/main.rb +0 -33
- data/ext/ruby/qtruby/examples/draganddrop/fridgemagnets/words.txt +0 -48
- data/ext/ruby/qtruby/examples/draganddrop/puzzle/example.jpg +0 -0
- data/ext/ruby/qtruby/examples/draganddrop/puzzle/main.rb +0 -33
- data/ext/ruby/qtruby/examples/draganddrop/puzzle/mainwindow.rb +0 -136
- data/ext/ruby/qtruby/examples/draganddrop/puzzle/pieceslist.rb +0 -95
- data/ext/ruby/qtruby/examples/draganddrop/puzzle/puzzlewidget.rb +0 -190
- data/ext/ruby/qtruby/examples/graphicsview/collidingmice/images/cheese.jpg +0 -0
- data/ext/ruby/qtruby/examples/graphicsview/collidingmice/main.rb +0 -53
- data/ext/ruby/qtruby/examples/graphicsview/collidingmice/makefile +0 -2
- data/ext/ruby/qtruby/examples/graphicsview/collidingmice/mice.qrc +0 -5
- data/ext/ruby/qtruby/examples/graphicsview/collidingmice/mouse.rb +0 -176
- data/ext/ruby/qtruby/examples/graphicsview/dragdroprobot/coloritem.rb +0 -86
- data/ext/ruby/qtruby/examples/graphicsview/dragdroprobot/images/head.png +0 -0
- data/ext/ruby/qtruby/examples/graphicsview/dragdroprobot/main.rb +0 -57
- data/ext/ruby/qtruby/examples/graphicsview/dragdroprobot/makefile +0 -2
- data/ext/ruby/qtruby/examples/graphicsview/dragdroprobot/robot.qrc +0 -5
- data/ext/ruby/qtruby/examples/graphicsview/dragdroprobot/robot.rb +0 -246
- data/ext/ruby/qtruby/examples/itemviews/chart/chart.qrc +0 -5
- data/ext/ruby/qtruby/examples/itemviews/chart/main.rb +0 -33
- data/ext/ruby/qtruby/examples/itemviews/chart/mainwindow.rb +0 -151
- data/ext/ruby/qtruby/examples/itemviews/chart/makefile +0 -2
- data/ext/ruby/qtruby/examples/itemviews/chart/mydata.cht +0 -8
- data/ext/ruby/qtruby/examples/itemviews/chart/pieview.rb +0 -516
- data/ext/ruby/qtruby/examples/itemviews/chart/qtdata.cht +0 -14
- data/ext/ruby/qtruby/examples/itemviews/dirview/main.rb +0 -39
- data/ext/ruby/qtruby/examples/itemviews/pixelator/imagemodel.rb +0 -51
- data/ext/ruby/qtruby/examples/itemviews/pixelator/images.qrc +0 -5
- data/ext/ruby/qtruby/examples/itemviews/pixelator/images/qt.png +0 -0
- data/ext/ruby/qtruby/examples/itemviews/pixelator/main.rb +0 -34
- data/ext/ruby/qtruby/examples/itemviews/pixelator/mainwindow.rb +0 -218
- data/ext/ruby/qtruby/examples/itemviews/pixelator/makefile +0 -3
- data/ext/ruby/qtruby/examples/itemviews/pixelator/pixeldelegate.rb +0 -67
- data/ext/ruby/qtruby/examples/itemviews/puzzle/example.jpg +0 -0
- data/ext/ruby/qtruby/examples/itemviews/puzzle/main.rb +0 -36
- data/ext/ruby/qtruby/examples/itemviews/puzzle/mainwindow.rb +0 -143
- data/ext/ruby/qtruby/examples/itemviews/puzzle/piecesmodel.rb +0 -174
- data/ext/ruby/qtruby/examples/itemviews/puzzle/puzzlewidget.rb +0 -192
- data/ext/ruby/qtruby/examples/itemviews/simpledommodel/domitem.rb +0 -62
- data/ext/ruby/qtruby/examples/itemviews/simpledommodel/dommodel.rb +0 -139
- data/ext/ruby/qtruby/examples/itemviews/simpledommodel/main.rb +0 -33
- data/ext/ruby/qtruby/examples/itemviews/simpledommodel/mainwindow.rb +0 -66
- data/ext/ruby/qtruby/examples/itemviews/simpletreemodel/default.txt +0 -40
- data/ext/ruby/qtruby/examples/itemviews/simpletreemodel/main.rb +0 -41
- data/ext/ruby/qtruby/examples/itemviews/simpletreemodel/makefile +0 -2
- data/ext/ruby/qtruby/examples/itemviews/simpletreemodel/simpletreemodel.qrc +0 -5
- data/ext/ruby/qtruby/examples/itemviews/simpletreemodel/treeitem.rb +0 -67
- data/ext/ruby/qtruby/examples/itemviews/simpletreemodel/treemodel.rb +0 -164
- data/ext/ruby/qtruby/examples/itemviews/sortingmodel/default.txt +0 -40
- data/ext/ruby/qtruby/examples/itemviews/sortingmodel/main.rb +0 -53
- data/ext/ruby/qtruby/examples/itemviews/sortingmodel/treeitem.rb +0 -73
- data/ext/ruby/qtruby/examples/itemviews/sortingmodel/treemodel.rb +0 -166
- data/ext/ruby/qtruby/examples/itemviews/spinboxdelegate/main.rb +0 -47
- data/ext/ruby/qtruby/examples/itemviews/spinboxdelegate/spinboxdelegate.rb +0 -62
- data/ext/ruby/qtruby/examples/killerfilter/killerfilter.rb +0 -55
- data/ext/ruby/qtruby/examples/layouts/basiclayouts/dialog.rb +0 -110
- data/ext/ruby/qtruby/examples/layouts/basiclayouts/main.rb +0 -31
- data/ext/ruby/qtruby/examples/layouts/borderlayout/borderlayout.rb +0 -190
- data/ext/ruby/qtruby/examples/layouts/borderlayout/main.rb +0 -32
- data/ext/ruby/qtruby/examples/layouts/borderlayout/window.rb +0 -52
- data/ext/ruby/qtruby/examples/layouts/flowlayouts/flowlayout.rb +0 -108
- data/ext/ruby/qtruby/examples/layouts/flowlayouts/main.rb +0 -32
- data/ext/ruby/qtruby/examples/layouts/flowlayouts/window.rb +0 -43
- data/ext/ruby/qtruby/examples/mainwindows/application/images/copy.png +0 -0
- data/ext/ruby/qtruby/examples/mainwindows/application/images/cut.png +0 -0
- data/ext/ruby/qtruby/examples/mainwindows/application/images/new.png +0 -0
- data/ext/ruby/qtruby/examples/mainwindows/application/images/open.png +0 -0
- data/ext/ruby/qtruby/examples/mainwindows/application/images/paste.png +0 -0
- data/ext/ruby/qtruby/examples/mainwindows/application/images/save.png +0 -0
- data/ext/ruby/qtruby/examples/mainwindows/application/main.rb +0 -32
- data/ext/ruby/qtruby/examples/mainwindows/application/mainwindow.rb +0 -285
- data/ext/ruby/qtruby/examples/mainwindows/dockwidgets/images/new.png +0 -0
- data/ext/ruby/qtruby/examples/mainwindows/dockwidgets/images/print.png +0 -0
- data/ext/ruby/qtruby/examples/mainwindows/dockwidgets/images/save.png +0 -0
- data/ext/ruby/qtruby/examples/mainwindows/dockwidgets/images/undo.png +0 -0
- data/ext/ruby/qtruby/examples/mainwindows/dockwidgets/main.rb +0 -32
- data/ext/ruby/qtruby/examples/mainwindows/dockwidgets/mainwindow.rb +0 -302
- data/ext/ruby/qtruby/examples/mainwindows/mdi/images/copy.png +0 -0
- data/ext/ruby/qtruby/examples/mainwindows/mdi/images/cut.png +0 -0
- data/ext/ruby/qtruby/examples/mainwindows/mdi/images/new.png +0 -0
- data/ext/ruby/qtruby/examples/mainwindows/mdi/images/open.png +0 -0
- data/ext/ruby/qtruby/examples/mainwindows/mdi/images/paste.png +0 -0
- data/ext/ruby/qtruby/examples/mainwindows/mdi/images/save.png +0 -0
- data/ext/ruby/qtruby/examples/mainwindows/mdi/main.rb +0 -32
- data/ext/ruby/qtruby/examples/mainwindows/mdi/mainwindow.rb +0 -363
- data/ext/ruby/qtruby/examples/mainwindows/mdi/mdichild.rb +0 -152
- data/ext/ruby/qtruby/examples/mainwindows/menus/main.rb +0 -32
- data/ext/ruby/qtruby/examples/mainwindows/menus/mainwindow.rb +0 -327
- data/ext/ruby/qtruby/examples/mainwindows/recentfiles/main.rb +0 -32
- data/ext/ruby/qtruby/examples/mainwindows/recentfiles/mainwindow.rb +0 -258
- data/ext/ruby/qtruby/examples/mainwindows/sdi/images/copy.png +0 -0
- data/ext/ruby/qtruby/examples/mainwindows/sdi/images/cut.png +0 -0
- data/ext/ruby/qtruby/examples/mainwindows/sdi/images/new.png +0 -0
- data/ext/ruby/qtruby/examples/mainwindows/sdi/images/open.png +0 -0
- data/ext/ruby/qtruby/examples/mainwindows/sdi/images/paste.png +0 -0
- data/ext/ruby/qtruby/examples/mainwindows/sdi/images/save.png +0 -0
- data/ext/ruby/qtruby/examples/mainwindows/sdi/main.rb +0 -32
- data/ext/ruby/qtruby/examples/mainwindows/sdi/mainwindow.rb +0 -335
- data/ext/ruby/qtruby/examples/network/broadcastreceiver/main.rb +0 -32
- data/ext/ruby/qtruby/examples/network/broadcastreceiver/receiver.rb +0 -64
- data/ext/ruby/qtruby/examples/network/broadcastsender/main.rb +0 -32
- data/ext/ruby/qtruby/examples/network/broadcastsender/sender.rb +0 -70
- data/ext/ruby/qtruby/examples/network/fortuneclient/client.rb +0 -150
- data/ext/ruby/qtruby/examples/network/fortuneclient/main.rb +0 -32
- data/ext/ruby/qtruby/examples/network/fortuneserver/main.rb +0 -32
- data/ext/ruby/qtruby/examples/network/fortuneserver/server.rb +0 -88
- data/ext/ruby/qtruby/examples/network/ftp/ftpwindow.rb +0 -254
- data/ext/ruby/qtruby/examples/network/ftp/images/cdtoparent.png +0 -0
- data/ext/ruby/qtruby/examples/network/ftp/images/dir.png +0 -0
- data/ext/ruby/qtruby/examples/network/ftp/images/file.png +0 -0
- data/ext/ruby/qtruby/examples/network/ftp/main.rb +0 -32
- data/ext/ruby/qtruby/examples/network/http/httpwindow.rb +0 -187
- data/ext/ruby/qtruby/examples/network/http/main.rb +0 -32
- data/ext/ruby/qtruby/examples/network/loopback/dialog.rb +0 -163
- data/ext/ruby/qtruby/examples/network/loopback/main.rb +0 -32
- data/ext/ruby/qtruby/examples/opengl/grabber/glwidget.rb +0 -265
- data/ext/ruby/qtruby/examples/opengl/grabber/main.rb +0 -32
- data/ext/ruby/qtruby/examples/opengl/grabber/mainwindow.rb +0 -189
- data/ext/ruby/qtruby/examples/opengl/hellogl/glwidget.rb +0 -226
- data/ext/ruby/qtruby/examples/opengl/hellogl/main.rb +0 -32
- data/ext/ruby/qtruby/examples/opengl/hellogl/window.rb +0 -66
- data/ext/ruby/qtruby/examples/opengl/textures/glwidget.rb +0 -151
- data/ext/ruby/qtruby/examples/opengl/textures/images/side1.png +0 -0
- data/ext/ruby/qtruby/examples/opengl/textures/images/side2.png +0 -0
- data/ext/ruby/qtruby/examples/opengl/textures/images/side3.png +0 -0
- data/ext/ruby/qtruby/examples/opengl/textures/images/side4.png +0 -0
- data/ext/ruby/qtruby/examples/opengl/textures/images/side5.png +0 -0
- data/ext/ruby/qtruby/examples/opengl/textures/images/side6.png +0 -0
- data/ext/ruby/qtruby/examples/opengl/textures/main.rb +0 -32
- data/ext/ruby/qtruby/examples/opengl/textures/window.rb +0 -77
- data/ext/ruby/qtruby/examples/painting/basicdrawing/images/brick.png +0 -0
- data/ext/ruby/qtruby/examples/painting/basicdrawing/images/qt-logo.png +0 -0
- data/ext/ruby/qtruby/examples/painting/basicdrawing/main.rb +0 -32
- data/ext/ruby/qtruby/examples/painting/basicdrawing/renderarea.rb +0 -166
- data/ext/ruby/qtruby/examples/painting/basicdrawing/window.rb +0 -215
- data/ext/ruby/qtruby/examples/painting/concentriccircles/circlewidget.rb +0 -88
- data/ext/ruby/qtruby/examples/painting/concentriccircles/main.rb +0 -32
- data/ext/ruby/qtruby/examples/painting/concentriccircles/window.rb +0 -72
- data/ext/ruby/qtruby/examples/painting/fontsampler/main.rb +0 -32
- data/ext/ruby/qtruby/examples/painting/fontsampler/mainwindow.rb +0 -368
- data/ext/ruby/qtruby/examples/painting/fontsampler/mainwindowbase.ui +0 -136
- data/ext/ruby/qtruby/examples/painting/fontsampler/makefile +0 -8
- data/ext/ruby/qtruby/examples/painting/fontsampler/previewdialog.rb +0 -256
- data/ext/ruby/qtruby/examples/painting/fontsampler/previewdialogbase.ui +0 -224
- data/ext/ruby/qtruby/examples/painting/fontsampler/previewlabel.rb +0 -43
- data/ext/ruby/qtruby/examples/painting/imagecomposition/imagecomposer.rb +0 -152
- data/ext/ruby/qtruby/examples/painting/imagecomposition/imagecomposition.qrc +0 -6
- data/ext/ruby/qtruby/examples/painting/imagecomposition/images/background.png +0 -0
- data/ext/ruby/qtruby/examples/painting/imagecomposition/images/blackrectangle.png +0 -0
- data/ext/ruby/qtruby/examples/painting/imagecomposition/images/butterfly.png +0 -0
- data/ext/ruby/qtruby/examples/painting/imagecomposition/images/checker.png +0 -0
- data/ext/ruby/qtruby/examples/painting/imagecomposition/main.rb +0 -33
- data/ext/ruby/qtruby/examples/painting/imagecomposition/makefile +0 -2
- data/ext/ruby/qtruby/examples/painting/painterpaths/main.rb +0 -32
- data/ext/ruby/qtruby/examples/painting/painterpaths/renderarea.rb +0 -97
- data/ext/ruby/qtruby/examples/painting/painterpaths/window.rb +0 -247
- data/ext/ruby/qtruby/examples/painting/svgviewer/files/bubbles.svg +0 -212
- data/ext/ruby/qtruby/examples/painting/svgviewer/files/cubic.svg +0 -77
- data/ext/ruby/qtruby/examples/painting/svgviewer/files/spheres.svg +0 -79
- data/ext/ruby/qtruby/examples/painting/svgviewer/main.rb +0 -38
- data/ext/ruby/qtruby/examples/painting/svgviewer/mainwindow.rb +0 -99
- data/ext/ruby/qtruby/examples/painting/svgviewer/makefile +0 -2
- data/ext/ruby/qtruby/examples/painting/svgviewer/svgview.rb +0 -156
- data/ext/ruby/qtruby/examples/painting/svgviewer/svgviewer.qrc +0 -6
- data/ext/ruby/qtruby/examples/painting/svgviewer/svgwindow.rb +0 -87
- data/ext/ruby/qtruby/examples/painting/transformations/main.rb +0 -32
- data/ext/ruby/qtruby/examples/painting/transformations/renderarea.rb +0 -127
- data/ext/ruby/qtruby/examples/painting/transformations/window.rb +0 -153
- data/ext/ruby/qtruby/examples/passivepopup/passivepopup.rb +0 -38
- data/ext/ruby/qtruby/examples/qdbus/chat/chat.rb +0 -146
- data/ext/ruby/qtruby/examples/qdbus/chat/chat_adaptor.rb +0 -12
- data/ext/ruby/qtruby/examples/qdbus/chat/chat_interface.rb +0 -13
- data/ext/ruby/qtruby/examples/qdbus/chat/chatmainwindow.ui +0 -184
- data/ext/ruby/qtruby/examples/qdbus/chat/chatsetnickname.ui +0 -145
- data/ext/ruby/qtruby/examples/qdbus/chat/makefile +0 -8
- data/ext/ruby/qtruby/examples/qdbus/complexpingpong/complexping.rb +0 -92
- data/ext/ruby/qtruby/examples/qdbus/complexpingpong/complexpong.rb +0 -83
- data/ext/ruby/qtruby/examples/qdbus/complexpingpong/ping-common.rb +0 -1
- data/ext/ruby/qtruby/examples/qdbus/listnames/listnames.rb +0 -69
- data/ext/ruby/qtruby/examples/qdbus/pingpong/ping-common.rb +0 -1
- data/ext/ruby/qtruby/examples/qdbus/pingpong/ping.rb +0 -52
- data/ext/ruby/qtruby/examples/qdbus/pingpong/pong.rb +0 -55
- data/ext/ruby/qtruby/examples/qdbus/remotecontrolledcar/car/car.rb +0 -151
- data/ext/ruby/qtruby/examples/qdbus/remotecontrolledcar/car/main.rb +0 -50
- data/ext/ruby/qtruby/examples/qdbus/remotecontrolledcar/controller/controller.rb +0 -66
- data/ext/ruby/qtruby/examples/qdbus/remotecontrolledcar/controller/controller.ui +0 -61
- data/ext/ruby/qtruby/examples/qdbus/remotecontrolledcar/controller/main.rb +0 -32
- data/ext/ruby/qtruby/examples/qdbus/remotecontrolledcar/controller/makefile +0 -2
- data/ext/ruby/qtruby/examples/qtscribble/scribble.rb +0 -270
- data/ext/ruby/qtruby/examples/richtext/calendar/main.rb +0 -33
- data/ext/ruby/qtruby/examples/richtext/calendar/mainwindow.rb +0 -173
- data/ext/ruby/qtruby/examples/richtext/orderform/detailsdialog.rb +0 -130
- data/ext/ruby/qtruby/examples/richtext/orderform/main.rb +0 -34
- data/ext/ruby/qtruby/examples/richtext/orderform/mainwindow.rb +0 -194
- data/ext/ruby/qtruby/examples/richtext/syntaxhighlighter/examples/example +0 -79
- data/ext/ruby/qtruby/examples/richtext/syntaxhighlighter/highlighter.rb +0 -90
- data/ext/ruby/qtruby/examples/richtext/syntaxhighlighter/main.rb +0 -34
- data/ext/ruby/qtruby/examples/richtext/syntaxhighlighter/mainwindow.rb +0 -105
- data/ext/ruby/qtruby/examples/ruboids/Manifest +0 -26
- data/ext/ruby/qtruby/examples/ruboids/README +0 -53
- data/ext/ruby/qtruby/examples/ruboids/TODO +0 -29
- data/ext/ruby/qtruby/examples/ruboids/boids.properties +0 -33
- data/ext/ruby/qtruby/examples/ruboids/generateManifest.rb +0 -42
- data/ext/ruby/qtruby/examples/ruboids/index.html +0 -147
- data/ext/ruby/qtruby/examples/ruboids/release.rb +0 -152
- data/ext/ruby/qtruby/examples/ruboids/ruboids/Boid.rb +0 -141
- data/ext/ruby/qtruby/examples/ruboids/ruboids/BoidView.rb +0 -159
- data/ext/ruby/qtruby/examples/ruboids/ruboids/Camera.rb +0 -24
- data/ext/ruby/qtruby/examples/ruboids/ruboids/CameraDialog.rb +0 -218
- data/ext/ruby/qtruby/examples/ruboids/ruboids/Canvas.rb +0 -143
- data/ext/ruby/qtruby/examples/ruboids/ruboids/Cloud.rb +0 -61
- data/ext/ruby/qtruby/examples/ruboids/ruboids/CloudView.rb +0 -54
- data/ext/ruby/qtruby/examples/ruboids/ruboids/Flock.rb +0 -47
- data/ext/ruby/qtruby/examples/ruboids/ruboids/Graphics.rb +0 -278
- data/ext/ruby/qtruby/examples/ruboids/ruboids/Params.rb +0 -87
- data/ext/ruby/qtruby/examples/ruboids/ruboids/Point.rb +0 -153
- data/ext/ruby/qtruby/examples/ruboids/ruboids/Thing.rb +0 -34
- data/ext/ruby/qtruby/examples/ruboids/ruboids/Triangle.rb +0 -21
- data/ext/ruby/qtruby/examples/ruboids/ruboids/View.rb +0 -88
- data/ext/ruby/qtruby/examples/ruboids/ruboids/World.rb +0 -82
- data/ext/ruby/qtruby/examples/ruboids/ruboids/WorldWindow.rb +0 -52
- data/ext/ruby/qtruby/examples/ruboids/ruboids/info.rb +0 -12
- data/ext/ruby/qtruby/examples/ruboids/ruboids/ruboids.rb +0 -29
- data/ext/ruby/qtruby/examples/textedit/textedit.rb +0 -150
- data/ext/ruby/qtruby/examples/tutorial/t1/t1.rb +0 -10
- data/ext/ruby/qtruby/examples/tutorial/t10/cannon.rb +0 -72
- data/ext/ruby/qtruby/examples/tutorial/t10/lcdrange.rb +0 -45
- data/ext/ruby/qtruby/examples/tutorial/t10/t10.rb +0 -55
- data/ext/ruby/qtruby/examples/tutorial/t11/cannon.rb +0 -124
- data/ext/ruby/qtruby/examples/tutorial/t11/lcdrange.rb +0 -45
- data/ext/ruby/qtruby/examples/tutorial/t11/t11.rb +0 -65
- data/ext/ruby/qtruby/examples/tutorial/t12/cannon.rb +0 -158
- data/ext/ruby/qtruby/examples/tutorial/t12/lcdrange.rb +0 -59
- data/ext/ruby/qtruby/examples/tutorial/t12/t12.rb +0 -66
- data/ext/ruby/qtruby/examples/tutorial/t13/cannon.rb +0 -208
- data/ext/ruby/qtruby/examples/tutorial/t13/gamebrd.rb +0 -113
- data/ext/ruby/qtruby/examples/tutorial/t13/lcdrange.rb +0 -60
- data/ext/ruby/qtruby/examples/tutorial/t13/t13.rb +0 -11
- data/ext/ruby/qtruby/examples/tutorial/t14/cannon.rb +0 -263
- data/ext/ruby/qtruby/examples/tutorial/t14/gamebrd.rb +0 -123
- data/ext/ruby/qtruby/examples/tutorial/t14/lcdrange.rb +0 -63
- data/ext/ruby/qtruby/examples/tutorial/t14/t14.rb +0 -11
- data/ext/ruby/qtruby/examples/tutorial/t2/t2.rb +0 -16
- data/ext/ruby/qtruby/examples/tutorial/t3/t3.rb +0 -18
- data/ext/ruby/qtruby/examples/tutorial/t4/t4.rb +0 -25
- data/ext/ruby/qtruby/examples/tutorial/t5/t5.rb +0 -37
- data/ext/ruby/qtruby/examples/tutorial/t6/t6.rb +0 -52
- data/ext/ruby/qtruby/examples/tutorial/t7/lcdrange.rb +0 -32
- data/ext/ruby/qtruby/examples/tutorial/t7/t7.rb +0 -42
- data/ext/ruby/qtruby/examples/tutorial/t8/cannon.rb +0 -38
- data/ext/ruby/qtruby/examples/tutorial/t8/lcdrange.rb +0 -45
- data/ext/ruby/qtruby/examples/tutorial/t8/t8.rb +0 -43
- data/ext/ruby/qtruby/examples/tutorial/t9/cannon.rb +0 -45
- data/ext/ruby/qtruby/examples/tutorial/t9/lcdrange.rb +0 -46
- data/ext/ruby/qtruby/examples/tutorial/t9/t9.rb +0 -43
- data/ext/ruby/qtruby/examples/widgets/analogclock/analogclock.rb +0 -94
- data/ext/ruby/qtruby/examples/widgets/analogclock/main.rb +0 -9
- data/ext/ruby/qtruby/examples/widgets/calculator/button.rb +0 -45
- data/ext/ruby/qtruby/examples/widgets/calculator/calculator.rb +0 -382
- data/ext/ruby/qtruby/examples/widgets/calculator/main.rb +0 -32
- data/ext/ruby/qtruby/examples/widgets/charactermap/characterwidget.rb +0 -110
- data/ext/ruby/qtruby/examples/widgets/charactermap/main.rb +0 -32
- data/ext/ruby/qtruby/examples/widgets/charactermap/mainwindow.rb +0 -118
- data/ext/ruby/qtruby/examples/widgets/digitalclock/digitalclock.rb +0 -30
- data/ext/ruby/qtruby/examples/widgets/digitalclock/main.rb +0 -9
- data/ext/ruby/qtruby/examples/widgets/groupbox/main.rb +0 -32
- data/ext/ruby/qtruby/examples/widgets/groupbox/window.rb +0 -134
- data/ext/ruby/qtruby/examples/widgets/icons/iconpreviewarea.rb +0 -111
- data/ext/ruby/qtruby/examples/widgets/icons/iconsizespinbox.rb +0 -39
- data/ext/ruby/qtruby/examples/widgets/icons/imagedelegate.rb +0 -73
- data/ext/ruby/qtruby/examples/widgets/icons/images/designer.png +0 -0
- data/ext/ruby/qtruby/examples/widgets/icons/images/find_disabled.png +0 -0
- data/ext/ruby/qtruby/examples/widgets/icons/images/find_normal.png +0 -0
- data/ext/ruby/qtruby/examples/widgets/icons/images/monkey_off_128x128.png +0 -0
- data/ext/ruby/qtruby/examples/widgets/icons/images/monkey_off_16x16.png +0 -0
- data/ext/ruby/qtruby/examples/widgets/icons/images/monkey_off_32x32.png +0 -0
- data/ext/ruby/qtruby/examples/widgets/icons/images/monkey_off_64x64.png +0 -0
- data/ext/ruby/qtruby/examples/widgets/icons/images/monkey_on_128x128.png +0 -0
- data/ext/ruby/qtruby/examples/widgets/icons/images/monkey_on_16x16.png +0 -0
- data/ext/ruby/qtruby/examples/widgets/icons/images/monkey_on_32x32.png +0 -0
- data/ext/ruby/qtruby/examples/widgets/icons/images/monkey_on_64x64.png +0 -0
- data/ext/ruby/qtruby/examples/widgets/icons/images/qtopia_16x16.png +0 -0
- data/ext/ruby/qtruby/examples/widgets/icons/images/qtopia_32x32.png +0 -0
- data/ext/ruby/qtruby/examples/widgets/icons/images/qtopia_48x48.png +0 -0
- data/ext/ruby/qtruby/examples/widgets/icons/main.rb +0 -32
- data/ext/ruby/qtruby/examples/widgets/icons/mainwindow.rb +0 -351
- data/ext/ruby/qtruby/examples/widgets/imageviewer/imageviewer.rb +0 -219
- data/ext/ruby/qtruby/examples/widgets/imageviewer/main.rb +0 -32
- data/ext/ruby/qtruby/examples/widgets/lineedits/main.rb +0 -32
- data/ext/ruby/qtruby/examples/widgets/lineedits/window.rb +0 -199
- data/ext/ruby/qtruby/examples/widgets/movie/images/open.png +0 -0
- data/ext/ruby/qtruby/examples/widgets/movie/images/pause.png +0 -0
- data/ext/ruby/qtruby/examples/widgets/movie/images/play.png +0 -0
- data/ext/ruby/qtruby/examples/widgets/movie/images/quit.png +0 -0
- data/ext/ruby/qtruby/examples/widgets/movie/images/stop.png +0 -0
- data/ext/ruby/qtruby/examples/widgets/movie/main.rb +0 -32
- data/ext/ruby/qtruby/examples/widgets/movie/movieplayer.rb +0 -201
- data/ext/ruby/qtruby/examples/widgets/movie/movies/fire.mng +0 -0
- data/ext/ruby/qtruby/examples/widgets/screenshot/main.rb +0 -32
- data/ext/ruby/qtruby/examples/widgets/screenshot/screenshot.rb +0 -155
- data/ext/ruby/qtruby/examples/widgets/scribble/main.rb +0 -32
- data/ext/ruby/qtruby/examples/widgets/scribble/mainwindow.rb +0 -202
- data/ext/ruby/qtruby/examples/widgets/scribble/scribblearea.rb +0 -154
- data/ext/ruby/qtruby/examples/widgets/sliders/main.rb +0 -32
- data/ext/ruby/qtruby/examples/widgets/sliders/slidersgroup.rb +0 -97
- data/ext/ruby/qtruby/examples/widgets/sliders/window.rb +0 -124
- data/ext/ruby/qtruby/examples/widgets/spinboxes/main.rb +0 -32
- data/ext/ruby/qtruby/examples/widgets/spinboxes/window.rb +0 -213
- data/ext/ruby/qtruby/examples/widgets/tetrix/main.rb +0 -33
- data/ext/ruby/qtruby/examples/widgets/tetrix/tetrixboard.rb +0 -346
- data/ext/ruby/qtruby/examples/widgets/tetrix/tetrixpiece.rb +0 -135
- data/ext/ruby/qtruby/examples/widgets/tetrix/tetrixwindow.rb +0 -88
- data/ext/ruby/qtruby/examples/widgets/tooltips/images/circle.png +0 -0
- data/ext/ruby/qtruby/examples/widgets/tooltips/images/square.png +0 -0
- data/ext/ruby/qtruby/examples/widgets/tooltips/images/triangle.png +0 -0
- data/ext/ruby/qtruby/examples/widgets/tooltips/main.rb +0 -32
- data/ext/ruby/qtruby/examples/widgets/tooltips/shapeitem.rb +0 -31
- data/ext/ruby/qtruby/examples/widgets/tooltips/sortingbox.rb +0 -222
- data/ext/ruby/qtruby/examples/widgets/wiggly/dialog.rb +0 -48
- data/ext/ruby/qtruby/examples/widgets/wiggly/main.rb +0 -9
- data/ext/ruby/qtruby/examples/widgets/wiggly/wigglywidget.rb +0 -76
- data/ext/ruby/qtruby/examples/widgets/windowflags/controllerwindow.rb +0 -195
- data/ext/ruby/qtruby/examples/widgets/windowflags/main.rb +0 -32
- data/ext/ruby/qtruby/examples/widgets/windowflags/previewwindow.rb +0 -103
- data/ext/ruby/qtruby/examples/xml/dombookmarks/frank.xbel +0 -230
- data/ext/ruby/qtruby/examples/xml/dombookmarks/jennifer.xbel +0 -93
- data/ext/ruby/qtruby/examples/xml/dombookmarks/main.rb +0 -34
- data/ext/ruby/qtruby/examples/xml/dombookmarks/mainwindow.rb +0 -129
- data/ext/ruby/qtruby/examples/xml/dombookmarks/xbeltree.rb +0 -172
- data/ext/ruby/qtruby/examples/xml/saxbookmarks/frank.xbel +0 -230
- data/ext/ruby/qtruby/examples/xml/saxbookmarks/jennifer.xbel +0 -93
- data/ext/ruby/qtruby/examples/xml/saxbookmarks/main.rb +0 -34
- data/ext/ruby/qtruby/examples/xml/saxbookmarks/mainwindow.rb +0 -144
- data/ext/ruby/qtruby/examples/xml/saxbookmarks/xbelgenerator.rb +0 -95
- data/ext/ruby/qtruby/examples/xml/saxbookmarks/xbelhandler.rb +0 -122
- data/ext/ruby/qtruby/src/lib/CMakeLists.txt +0 -16
- data/ext/ruby/qtruby/src/lib/Qt.rb +0 -1
- data/ext/ruby/qtruby/src/lib/Qt/CMakeLists.txt +0 -9
- data/ext/ruby/qtruby/src/lib/Qt/qtruby4.rb +0 -3177
- data/ext/ruby/qtruby/src/lib/Qt3.rb +0 -6
- data/ext/ruby/qtruby/src/lib/Qt4.rb +0 -6
@@ -1,34 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
**
|
3
|
-
** Copyright (C) 2004-2005 Trolltech AS. All rights reserved.
|
4
|
-
**
|
5
|
-
** This file is part of the example classes of the Qt Toolkit.
|
6
|
-
**
|
7
|
-
** This file may be used under the terms of the GNU General Public
|
8
|
-
** License version 2.0 as published by the Free Software Foundation
|
9
|
-
** and appearing in the file LICENSE.GPL included in the packaging of
|
10
|
-
** this file. Please review the following information to ensure GNU
|
11
|
-
** General Public Licensing requirements will be met:
|
12
|
-
** http://www.trolltech.com/products/qt/opensource.html
|
13
|
-
**
|
14
|
-
** If you are unsure which license is appropriate for your use, please
|
15
|
-
** review the following information:
|
16
|
-
** http://www.trolltech.com/products/qt/licensing.html or contact the
|
17
|
-
** sales department at sales@trolltech.com.
|
18
|
-
**
|
19
|
-
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
20
|
-
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
21
|
-
**
|
22
|
-
|
23
|
-
** Translated to QtRuby by Richard Dale
|
24
|
-
=end
|
25
|
-
|
26
|
-
require 'Qt'
|
27
|
-
require 'mainwindow.rb'
|
28
|
-
|
29
|
-
$KCODE = 'u'
|
30
|
-
|
31
|
-
app = Qt::Application.new(ARGV)
|
32
|
-
mainWin = MainWindow.new
|
33
|
-
mainWin.show
|
34
|
-
app.exec
|
@@ -1,144 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
**
|
3
|
-
** Copyright (C) 2004-2005 Trolltech AS. All rights reserved.
|
4
|
-
**
|
5
|
-
** This file is part of the example classes of the Qt Toolkit.
|
6
|
-
**
|
7
|
-
** This file may be used under the terms of the GNU General Public
|
8
|
-
** License version 2.0 as published by the Free Software Foundation
|
9
|
-
** and appearing in the file LICENSE.GPL included in the packaging of
|
10
|
-
** this file. Please review the following information to ensure GNU
|
11
|
-
** General Public Licensing requirements will be met:
|
12
|
-
** http://www.trolltech.com/products/qt/opensource.html
|
13
|
-
**
|
14
|
-
** If you are unsure which license is appropriate for your use, please
|
15
|
-
** review the following information:
|
16
|
-
** http://www.trolltech.com/products/qt/licensing.html or contact the
|
17
|
-
** sales department at sales@trolltech.com.
|
18
|
-
**
|
19
|
-
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
20
|
-
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
21
|
-
**
|
22
|
-
|
23
|
-
** Translated to QtRuby by Richard Dale
|
24
|
-
=end
|
25
|
-
|
26
|
-
require 'xbelhandler.rb'
|
27
|
-
|
28
|
-
class MainWindow < Qt::MainWindow
|
29
|
-
|
30
|
-
slots :open, :saveAs, :about
|
31
|
-
|
32
|
-
def initialize(parent = nil)
|
33
|
-
super(parent)
|
34
|
-
labels = []
|
35
|
-
labels << tr("Title") << tr("Location")
|
36
|
-
|
37
|
-
@treeWidget = Qt::TreeWidget.new
|
38
|
-
@treeWidget.header().resizeMode = Qt::HeaderView::Stretch
|
39
|
-
@treeWidget.headerLabels = labels
|
40
|
-
setCentralWidget(@treeWidget)
|
41
|
-
|
42
|
-
createActions()
|
43
|
-
createMenus()
|
44
|
-
|
45
|
-
statusBar().showMessage(tr("Ready"))
|
46
|
-
|
47
|
-
setWindowTitle(tr("SAX Bookmarks"))
|
48
|
-
resize(480, 320)
|
49
|
-
end
|
50
|
-
|
51
|
-
def open()
|
52
|
-
fileName =
|
53
|
-
Qt::FileDialog.getOpenFileName(self, tr("Open Bookmark File"),
|
54
|
-
Qt::Dir.currentPath(),
|
55
|
-
tr("XBEL Files (*.xbel *.xml)"))
|
56
|
-
if fileName.nil?
|
57
|
-
return
|
58
|
-
end
|
59
|
-
|
60
|
-
@treeWidget.clear()
|
61
|
-
|
62
|
-
handler = XbelHandler.new(@treeWidget)
|
63
|
-
reader = Qt::XmlSimpleReader.new
|
64
|
-
reader.contentHandler = handler
|
65
|
-
reader.errorHandler = handler
|
66
|
-
|
67
|
-
file = Qt::File.new(fileName)
|
68
|
-
if !file.open(Qt::File::ReadOnly | Qt::File::Text)
|
69
|
-
Qt::MessageBox.warning(self, tr("SAX Bookmarks"),
|
70
|
-
tr("Cannot read file %s:\n%s." %
|
71
|
-
[fileName, file.errorString]))
|
72
|
-
return
|
73
|
-
end
|
74
|
-
|
75
|
-
xmlInputSource = Qt::XmlInputSource.new(file)
|
76
|
-
if reader.parse(xmlInputSource, false)
|
77
|
-
statusBar().showMessage(tr("File loaded"), 2000)
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
def saveAs()
|
82
|
-
fileName =
|
83
|
-
Qt::FileDialog::getSaveFileName(self, tr("Save Bookmark File"),
|
84
|
-
Qt::Dir.currentPath(),
|
85
|
-
tr("XBEL Files (*.xbel *.xml)"))
|
86
|
-
if fileName.nil?
|
87
|
-
return
|
88
|
-
end
|
89
|
-
|
90
|
-
file = Qt::File.new(fileName)
|
91
|
-
if !file.open(Qt::File::WriteOnly | Qt::File::Text.to_i)
|
92
|
-
Qt::MessageBox.warning(self, tr("SAX Bookmarks"),
|
93
|
-
tr("Cannot write file %s:\n%s." %
|
94
|
-
[fileName, file.errorString]))
|
95
|
-
return
|
96
|
-
end
|
97
|
-
|
98
|
-
generator = XbelGenerator.new(@treeWidget)
|
99
|
-
if generator.write(file)
|
100
|
-
statusBar().showMessage(tr("File saved"), 2000)
|
101
|
-
end
|
102
|
-
file.close
|
103
|
-
end
|
104
|
-
|
105
|
-
def about()
|
106
|
-
Qt::MessageBox.about(self, tr("About SAX Bookmarks"),
|
107
|
-
tr("The <b>SAX Bookmarks</b> example demonstrates how to use Qt's " \
|
108
|
-
"SAX classes to read XML documents and how to generate XML by " \
|
109
|
-
"hand."))
|
110
|
-
end
|
111
|
-
|
112
|
-
def createActions()
|
113
|
-
@openAct = Qt::Action.new(tr("&Open..."), self)
|
114
|
-
@openAct.shortcut = Qt::KeySequence.new( tr("Ctrl+O"))
|
115
|
-
connect(@openAct, SIGNAL(:triggered), self, SLOT(:open))
|
116
|
-
|
117
|
-
@saveAsAct = Qt::Action.new(tr("&Save As..."), self)
|
118
|
-
@saveAsAct.shortcut = Qt::KeySequence.new( tr("Ctrl+S"))
|
119
|
-
connect(@saveAsAct, SIGNAL(:triggered), self, SLOT(:saveAs))
|
120
|
-
|
121
|
-
@exitAct = Qt::Action.new(tr("E&xit"), self)
|
122
|
-
@exitAct.shortcut = Qt::KeySequence.new( tr("Ctrl+Q"))
|
123
|
-
connect(@exitAct, SIGNAL(:triggered), self, SLOT(:close))
|
124
|
-
|
125
|
-
@aboutAct = Qt::Action.new(tr("&About"), self)
|
126
|
-
connect(@aboutAct, SIGNAL(:triggered), self, SLOT(:about))
|
127
|
-
|
128
|
-
@aboutQtAct = Qt::Action.new(tr("About &Qt"), self)
|
129
|
-
connect(@aboutQtAct, SIGNAL(:triggered), $qApp, SLOT(:aboutQt))
|
130
|
-
end
|
131
|
-
|
132
|
-
def createMenus()
|
133
|
-
@fileMenu = menuBar.addMenu(tr("&File"))
|
134
|
-
@fileMenu.addAction(@openAct)
|
135
|
-
@fileMenu.addAction(@saveAsAct)
|
136
|
-
@fileMenu.addAction(@exitAct)
|
137
|
-
|
138
|
-
menuBar().addSeparator()
|
139
|
-
|
140
|
-
@helpMenu = menuBar.addMenu(tr("&Help"))
|
141
|
-
@helpMenu.addAction(@aboutAct)
|
142
|
-
@helpMenu.addAction(@aboutQtAct)
|
143
|
-
end
|
144
|
-
end
|
@@ -1,95 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
**
|
3
|
-
** Copyright (C) 2004-2005 Trolltech AS. All rights reserved.
|
4
|
-
**
|
5
|
-
** This file is part of the example classes of the Qt Toolkit.
|
6
|
-
**
|
7
|
-
** This file may be used under the terms of the GNU General Public
|
8
|
-
** License version 2.0 as published by the Free Software Foundation
|
9
|
-
** and appearing in the file LICENSE.GPL included in the packaging of
|
10
|
-
** this file. Please review the following information to ensure GNU
|
11
|
-
** General Public Licensing requirements will be met:
|
12
|
-
** http://www.trolltech.com/products/qt/opensource.html
|
13
|
-
**
|
14
|
-
** If you are unsure which license is appropriate for your use, please
|
15
|
-
** review the following information:
|
16
|
-
** http://www.trolltech.com/products/qt/licensing.html or contact the
|
17
|
-
** sales department at sales@trolltech.com.
|
18
|
-
**
|
19
|
-
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
20
|
-
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
21
|
-
**
|
22
|
-
|
23
|
-
** Translated to QtRuby by Richard Dale
|
24
|
-
=end
|
25
|
-
|
26
|
-
|
27
|
-
class XbelGenerator
|
28
|
-
IndentSize = 4
|
29
|
-
|
30
|
-
def initialize(treeWidget)
|
31
|
-
@treeWidget = treeWidget
|
32
|
-
@outf = Qt::TextStream.new
|
33
|
-
end
|
34
|
-
|
35
|
-
def write(device)
|
36
|
-
@outf.device = device
|
37
|
-
@outf.codec = "UTF-8"
|
38
|
-
@outf << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" <<
|
39
|
-
"<!DOCTYPE xbel>\n" <<
|
40
|
-
"<xbel version=\"1.0\">\n"
|
41
|
-
|
42
|
-
for i in 0...@treeWidget.topLevelItemCount()
|
43
|
-
generateItem(@treeWidget.topLevelItem(i), 1)
|
44
|
-
end
|
45
|
-
|
46
|
-
@outf << "</xbel>\n"
|
47
|
-
return true
|
48
|
-
end
|
49
|
-
|
50
|
-
def indent(depth)
|
51
|
-
return " " * (IndentSize * depth)
|
52
|
-
end
|
53
|
-
|
54
|
-
def escapedText(str)
|
55
|
-
result = str
|
56
|
-
result.gsub!("&", "&")
|
57
|
-
result.gsub!("<", "<")
|
58
|
-
result.gsub!(">", ">")
|
59
|
-
return result
|
60
|
-
end
|
61
|
-
|
62
|
-
def escapedAttribute(str)
|
63
|
-
result = escapedText(str)
|
64
|
-
result.gsub!("\"", """)
|
65
|
-
return '"' + result + '"'
|
66
|
-
end
|
67
|
-
|
68
|
-
def generateItem(item, depth)
|
69
|
-
tagName = item.data(0, Qt::UserRole).toString()
|
70
|
-
if tagName == "folder"
|
71
|
-
folded = !@treeWidget.isItemExpanded(item)
|
72
|
-
@outf << indent(depth) << "<folder folded=\"" << (folded ? "yes" : "no") <<
|
73
|
-
"\">\n" <<
|
74
|
-
indent(depth + 1) << "<title>" << escapedText(item.text(0)) <<
|
75
|
-
"</title>\n"
|
76
|
-
|
77
|
-
for i in 0...item.childCount()
|
78
|
-
generateItem(item.child(i), depth + 1)
|
79
|
-
end
|
80
|
-
|
81
|
-
@outf << indent(depth) << "</folder>\n"
|
82
|
-
elsif tagName == "bookmark"
|
83
|
-
@outf << indent(depth) << "<bookmark"
|
84
|
-
if !item.text(1).empty?
|
85
|
-
@outf << " href=" << escapedAttribute(item.text(1))
|
86
|
-
end
|
87
|
-
@outf << ">\n" <<
|
88
|
-
indent(depth + 1) << "<title>" << escapedText(item.text(0)) <<
|
89
|
-
"</title>\n" <<
|
90
|
-
indent(depth) << "</bookmark>\n"
|
91
|
-
elsif tagName == "separator"
|
92
|
-
@outf << indent(depth) << "<separator/>\n"
|
93
|
-
end
|
94
|
-
end
|
95
|
-
end
|
@@ -1,122 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
**
|
3
|
-
** Copyright (C) 2004-2005 Trolltech AS. All rights reserved.
|
4
|
-
**
|
5
|
-
** This file is part of the example classes of the Qt Toolkit.
|
6
|
-
**
|
7
|
-
** This file may be used under the terms of the GNU General Public
|
8
|
-
** License version 2.0 as published by the Free Software Foundation
|
9
|
-
** and appearing in the file LICENSE.GPL included in the packaging of
|
10
|
-
** this file. Please review the following information to ensure GNU
|
11
|
-
** General Public Licensing requirements will be met:
|
12
|
-
** http://www.trolltech.com/products/qt/opensource.html
|
13
|
-
**
|
14
|
-
** If you are unsure which license is appropriate for your use, please
|
15
|
-
** review the following information:
|
16
|
-
** http://www.trolltech.com/products/qt/licensing.html or contact the
|
17
|
-
** sales department at sales@trolltech.com.
|
18
|
-
**
|
19
|
-
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
20
|
-
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
21
|
-
**
|
22
|
-
|
23
|
-
** Translated to QtRuby by Richard Dale
|
24
|
-
=end
|
25
|
-
|
26
|
-
require 'xbelgenerator.rb'
|
27
|
-
|
28
|
-
class XbelHandler < Qt::XmlDefaultHandler
|
29
|
-
|
30
|
-
def initialize(treeWidget)
|
31
|
-
super()
|
32
|
-
@treeWidget = treeWidget
|
33
|
-
@item = nil
|
34
|
-
@metXbelTag = false
|
35
|
-
@currentText = ""
|
36
|
-
|
37
|
-
style = @treeWidget.style()
|
38
|
-
|
39
|
-
@folderIcon = Qt::Icon.new
|
40
|
-
@folderIcon.addPixmap(style.standardPixmap(Qt::Style::SP_DirClosedIcon),
|
41
|
-
Qt::Icon::Normal, Qt::Icon::Off)
|
42
|
-
@folderIcon.addPixmap(style.standardPixmap(Qt::Style::SP_DirOpenIcon),
|
43
|
-
Qt::Icon::Normal, Qt::Icon::On)
|
44
|
-
@bookmarkIcon = Qt::Icon.new
|
45
|
-
@bookmarkIcon.addPixmap(style.standardPixmap(Qt::Style::SP_FileIcon))
|
46
|
-
end
|
47
|
-
|
48
|
-
def startElement(namespaceURI, localName, qName, attributes)
|
49
|
-
if !@metXbelTag && qName != "xbel"
|
50
|
-
@errorStr = Qt::Object.tr("The file is not an XBEL file.")
|
51
|
-
return false
|
52
|
-
end
|
53
|
-
|
54
|
-
if qName == "xbel"
|
55
|
-
version = attributes.value("version")
|
56
|
-
if !version.empty? && version != "1.0"
|
57
|
-
@errorStr = Qt::Object.tr("The file is not an XBEL version 1.0 file.")
|
58
|
-
return false
|
59
|
-
end
|
60
|
-
@metXbelTag = true
|
61
|
-
elsif qName == "folder"
|
62
|
-
@item = createChildItem(qName)
|
63
|
-
@item.flags = @item.flags | Qt::ItemIsEditable.to_i
|
64
|
-
@item.setIcon(0, @folderIcon)
|
65
|
-
@item.setText(0, Qt::Object.tr("Folder"))
|
66
|
-
folded = (attributes.value("folded") != "no")
|
67
|
-
@treeWidget.setItemExpanded(@item, !folded)
|
68
|
-
elsif qName == "bookmark"
|
69
|
-
@item = createChildItem(qName)
|
70
|
-
@item.flags = @item.flags | Qt::ItemIsEditable.to_i
|
71
|
-
@item.setIcon(0, @bookmarkIcon)
|
72
|
-
@item.setText(0, Qt::Object.tr("Unknown title"))
|
73
|
-
@item.setText(1, attributes.value("href"))
|
74
|
-
elsif qName == "separator"
|
75
|
-
@item = createChildItem(qName)
|
76
|
-
@item.flags = @item.flags & ~Qt::ItemIsSelectable.to_i
|
77
|
-
# @item.setText(0, Qt::String(30, 0xB7))
|
78
|
-
@item.setText(0, "..............................")
|
79
|
-
end
|
80
|
-
|
81
|
-
@currentText = ""
|
82
|
-
return true
|
83
|
-
end
|
84
|
-
|
85
|
-
def endElement(namespaceURI, localName, qName)
|
86
|
-
if qName == "title"
|
87
|
-
if !@item.nil?
|
88
|
-
@item.setText(0, @currentText)
|
89
|
-
end
|
90
|
-
elsif qName == "folder" || qName == "bookmark" ||
|
91
|
-
qName == "separator"
|
92
|
-
@item = @item.parent()
|
93
|
-
end
|
94
|
-
return true
|
95
|
-
end
|
96
|
-
|
97
|
-
def characters(str)
|
98
|
-
@currentText += str
|
99
|
-
return true
|
100
|
-
end
|
101
|
-
|
102
|
-
def fatalError(exception)
|
103
|
-
Qt::MessageBox.information(@treeWidget.window(), Qt::Object.tr("SAX Bookmarks"),
|
104
|
-
Qt::Object::tr("Parse error at line %s, column %s:\n%s" %
|
105
|
-
[exception.lineNumber, exception.columnNumber,exception.message]))
|
106
|
-
return false
|
107
|
-
end
|
108
|
-
|
109
|
-
def errorString()
|
110
|
-
return @errorStr
|
111
|
-
end
|
112
|
-
|
113
|
-
def createChildItem(tagName)
|
114
|
-
if !@item.nil?
|
115
|
-
childItem = Qt::TreeWidgetItem.new(@item, Qt::TreeWidgetItem::Type)
|
116
|
-
else
|
117
|
-
childItem = Qt::TreeWidgetItem.new(@treeWidget)
|
118
|
-
end
|
119
|
-
childItem.setData(0, Qt::UserRole, Qt::Variant.new(tagName))
|
120
|
-
return childItem
|
121
|
-
end
|
122
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
|
2
|
-
add_subdirectory( Qt )
|
3
|
-
|
4
|
-
install( FILES Qt.rb Qt4.rb Qt3.rb DESTINATION ${CUSTOM_RUBY_SITE_LIB_DIR} )
|
5
|
-
|
6
|
-
#original Makefile.am contents follow:
|
7
|
-
|
8
|
-
#SUBDIRS = Qt
|
9
|
-
#
|
10
|
-
#rubylibdir = $(RUBY_SITEDIR)
|
11
|
-
#rubylib_DATA = Qt4.rb Qt3.rb
|
12
|
-
#
|
13
|
-
#install-data-local:
|
14
|
-
# @-rm -f $(RUBY_SITEDIR)/Qt.rb
|
15
|
-
# @$(LN_S) $(RUBY_SITEDIR)/Qt4.rb $(RUBY_SITEDIR)/Qt.rb
|
16
|
-
#
|
@@ -1 +0,0 @@
|
|
1
|
-
require 'qtruby4'
|
@@ -1,3177 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
/***************************************************************************
|
3
|
-
qtruby.rb - description
|
4
|
-
-------------------
|
5
|
-
begin : Fri Jul 4 2003
|
6
|
-
copyright : (C) 2003-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 Lesser General Public License as *
|
14
|
-
* published by the Free Software Foundation; either version 2 of the *
|
15
|
-
* License, or (at your option) any later version. *
|
16
|
-
* *
|
17
|
-
***************************************************************************/
|
18
|
-
=end
|
19
|
-
|
20
|
-
module Qt
|
21
|
-
module DebugLevel
|
22
|
-
Off, Minimal, High, Extensive = 0, 1, 2, 3
|
23
|
-
end
|
24
|
-
|
25
|
-
module QtDebugChannel
|
26
|
-
QTDB_NONE = 0x00
|
27
|
-
QTDB_AMBIGUOUS = 0x01
|
28
|
-
QTDB_METHOD_MISSING = 0x02
|
29
|
-
QTDB_CALLS = 0x04
|
30
|
-
QTDB_GC = 0x08
|
31
|
-
QTDB_VIRTUAL = 0x10
|
32
|
-
QTDB_VERBOSE = 0x20
|
33
|
-
QTDB_ALL = QTDB_VERBOSE | QTDB_VIRTUAL | QTDB_GC | QTDB_CALLS | QTDB_METHOD_MISSING | QTDB_AMBIGUOUS
|
34
|
-
end
|
35
|
-
|
36
|
-
@@debug_level = DebugLevel::Off
|
37
|
-
def Qt.debug_level=(level)
|
38
|
-
@@debug_level = level
|
39
|
-
Internal::setDebug Qt::QtDebugChannel::QTDB_ALL if level >= DebugLevel::Extensive
|
40
|
-
end
|
41
|
-
|
42
|
-
def Qt.debug_level
|
43
|
-
@@debug_level
|
44
|
-
end
|
45
|
-
|
46
|
-
module Internal
|
47
|
-
#
|
48
|
-
# From the enum MethodFlags in qt-copy/src/tools/moc/generator.cpp
|
49
|
-
#
|
50
|
-
AccessPrivate = 0x00
|
51
|
-
AccessProtected = 0x01
|
52
|
-
AccessPublic = 0x02
|
53
|
-
MethodMethod = 0x00
|
54
|
-
MethodSignal = 0x04
|
55
|
-
MethodSlot = 0x08
|
56
|
-
MethodCompatibility = 0x10
|
57
|
-
MethodCloned = 0x20
|
58
|
-
MethodScriptable = 0x40
|
59
|
-
end
|
60
|
-
|
61
|
-
class Base
|
62
|
-
def self.signals(*signal_list)
|
63
|
-
meta = Qt::Meta[self.name] || Qt::MetaInfo.new(self)
|
64
|
-
meta.add_signals(signal_list, Internal::MethodSignal | Internal::AccessProtected)
|
65
|
-
meta.changed = true
|
66
|
-
end
|
67
|
-
|
68
|
-
def self.slots(*slot_list)
|
69
|
-
meta = Qt::Meta[self.name] || Qt::MetaInfo.new(self)
|
70
|
-
meta.add_slots(slot_list, Internal::MethodSlot | Internal::AccessPublic)
|
71
|
-
meta.changed = true
|
72
|
-
end
|
73
|
-
|
74
|
-
def self.private_slots(*slot_list)
|
75
|
-
meta = Qt::Meta[self.name] || Qt::MetaInfo.new(self)
|
76
|
-
meta.add_slots(slot_list, Internal::MethodSlot | Internal::AccessPrivate)
|
77
|
-
meta.changed = true
|
78
|
-
end
|
79
|
-
|
80
|
-
def self.q_signal(signal)
|
81
|
-
meta = Qt::Meta[self.name] || Qt::MetaInfo.new(self)
|
82
|
-
meta.add_signals([signal], Internal::MethodSignal | Internal::AccessProtected)
|
83
|
-
meta.changed = true
|
84
|
-
end
|
85
|
-
|
86
|
-
def self.q_slot(slot)
|
87
|
-
meta = Qt::Meta[self.name] || Qt::MetaInfo.new(self)
|
88
|
-
meta.add_slots([slot], Internal::MethodSlot | Internal::AccessPublic)
|
89
|
-
meta.changed = true
|
90
|
-
end
|
91
|
-
|
92
|
-
def self.q_classinfo(key, value)
|
93
|
-
meta = Qt::Meta[self.name] || Qt::MetaInfo.new(self)
|
94
|
-
meta.add_classinfo(key, value)
|
95
|
-
meta.changed = true
|
96
|
-
end
|
97
|
-
|
98
|
-
def **(a)
|
99
|
-
return Qt::**(self, a)
|
100
|
-
end
|
101
|
-
def +(a)
|
102
|
-
return Qt::+(self, a)
|
103
|
-
end
|
104
|
-
def ~(a)
|
105
|
-
return Qt::~(self, a)
|
106
|
-
end
|
107
|
-
def -@()
|
108
|
-
return Qt::-(self)
|
109
|
-
end
|
110
|
-
def -(a)
|
111
|
-
return Qt::-(self, a)
|
112
|
-
end
|
113
|
-
def *(a)
|
114
|
-
return Qt::*(self, a)
|
115
|
-
end
|
116
|
-
def /(a)
|
117
|
-
return Qt::/(self, a)
|
118
|
-
end
|
119
|
-
def %(a)
|
120
|
-
return Qt::%(self, a)
|
121
|
-
end
|
122
|
-
def >>(a)
|
123
|
-
return Qt::>>(self, a)
|
124
|
-
end
|
125
|
-
def <<(a)
|
126
|
-
return Qt::<<(self, a)
|
127
|
-
end
|
128
|
-
def &(a)
|
129
|
-
return Qt::&(self, a)
|
130
|
-
end
|
131
|
-
def ^(a)
|
132
|
-
return Qt::^(self, a)
|
133
|
-
end
|
134
|
-
def |(a)
|
135
|
-
return Qt::|(self, a)
|
136
|
-
end
|
137
|
-
|
138
|
-
# Module has '<', '<=', '>' and '>=' operator instance methods, so pretend they
|
139
|
-
# don't exist by calling method_missing() explicitely
|
140
|
-
def <(a)
|
141
|
-
begin
|
142
|
-
Qt::method_missing(:<, self, a)
|
143
|
-
rescue
|
144
|
-
super(a)
|
145
|
-
end
|
146
|
-
end
|
147
|
-
|
148
|
-
def <=(a)
|
149
|
-
begin
|
150
|
-
Qt::method_missing(:<=, self, a)
|
151
|
-
rescue
|
152
|
-
super(a)
|
153
|
-
end
|
154
|
-
end
|
155
|
-
|
156
|
-
def >(a)
|
157
|
-
begin
|
158
|
-
Qt::method_missing(:>, self, a)
|
159
|
-
rescue
|
160
|
-
super(a)
|
161
|
-
end
|
162
|
-
end
|
163
|
-
|
164
|
-
def >=(a)
|
165
|
-
begin
|
166
|
-
Qt::method_missing(:>=, self, a)
|
167
|
-
rescue
|
168
|
-
super(a)
|
169
|
-
end
|
170
|
-
end
|
171
|
-
|
172
|
-
# Object has a '==' operator instance method, so pretend it
|
173
|
-
# don't exist by calling method_missing() explicitely
|
174
|
-
def ==(a)
|
175
|
-
return false if a.nil?
|
176
|
-
begin
|
177
|
-
Qt::method_missing(:==, self, a)
|
178
|
-
rescue
|
179
|
-
super(a)
|
180
|
-
end
|
181
|
-
end
|
182
|
-
|
183
|
-
def self.ancestors
|
184
|
-
klass = self
|
185
|
-
classid = nil
|
186
|
-
loop do
|
187
|
-
classid = Qt::Internal::find_pclassid(klass.name)
|
188
|
-
break if classid.index
|
189
|
-
|
190
|
-
klass = klass.superclass
|
191
|
-
if klass.nil?
|
192
|
-
return super
|
193
|
-
end
|
194
|
-
end
|
195
|
-
|
196
|
-
klasses = super
|
197
|
-
klasses.delete(Qt::Base)
|
198
|
-
klasses.delete(self)
|
199
|
-
ids = []
|
200
|
-
Qt::Internal::getAllParents(classid, ids)
|
201
|
-
return [self] + ids.map {|id| Qt::Internal.find_class(Qt::Internal.classid2name(id))} + klasses
|
202
|
-
end
|
203
|
-
|
204
|
-
# Change the behaviors of is_a? and kind_of? (alias of is_a?) to use above self.ancestors method
|
205
|
-
# Note: this definition also affects Object#===
|
206
|
-
def is_a?(mod)
|
207
|
-
super || self.class.ancestors.include?(mod)
|
208
|
-
end
|
209
|
-
alias :kind_of? :is_a?
|
210
|
-
|
211
|
-
def methods(regular=true)
|
212
|
-
if !regular
|
213
|
-
return singleton_methods
|
214
|
-
end
|
215
|
-
|
216
|
-
qt_methods(super, 0x0)
|
217
|
-
end
|
218
|
-
|
219
|
-
def protected_methods(all=true)
|
220
|
-
# From smoke.h, Smoke::mf_protected 0x80
|
221
|
-
qt_methods(super, 0x80)
|
222
|
-
end
|
223
|
-
|
224
|
-
def public_methods(all=true)
|
225
|
-
methods
|
226
|
-
end
|
227
|
-
|
228
|
-
def singleton_methods(all=true)
|
229
|
-
# From smoke.h, Smoke::mf_static 0x01
|
230
|
-
qt_methods(super, 0x01)
|
231
|
-
end
|
232
|
-
|
233
|
-
private
|
234
|
-
def qt_methods(meths, flags)
|
235
|
-
ids = []
|
236
|
-
# These methods are all defined in Qt::Base, even if they aren't supported by a particular
|
237
|
-
# subclass, so remove them to avoid confusion
|
238
|
-
meths -= ["%", "&", "*", "**", "+", "-", "-@", "/", "<", "<<", "<=", ">", ">=", ">>", "|", "~", "^"]
|
239
|
-
classid = Qt::Internal::idInstance(self)
|
240
|
-
Qt::Internal::getAllParents(classid, ids)
|
241
|
-
ids << classid
|
242
|
-
ids.each { |c| Qt::Internal::findAllMethodNames(meths, c, flags) }
|
243
|
-
return meths.uniq
|
244
|
-
end
|
245
|
-
end # Qt::Base
|
246
|
-
|
247
|
-
# Provides a mutable numeric class for passing to methods with
|
248
|
-
# C++ 'int*' or 'int&' arg types
|
249
|
-
class Integer
|
250
|
-
attr_accessor :value
|
251
|
-
def initialize(n=0) @value = n end
|
252
|
-
|
253
|
-
def +(n)
|
254
|
-
return Integer.new(@value + n.to_i)
|
255
|
-
end
|
256
|
-
def -(n)
|
257
|
-
return Integer.new(@value - n.to_i)
|
258
|
-
end
|
259
|
-
def *(n)
|
260
|
-
return Integer.new(@value * n.to_i)
|
261
|
-
end
|
262
|
-
def /(n)
|
263
|
-
return Integer.new(@value / n.to_i)
|
264
|
-
end
|
265
|
-
def %(n)
|
266
|
-
return Integer.new(@value % n.to_i)
|
267
|
-
end
|
268
|
-
def **(n)
|
269
|
-
return Integer.new(@value ** n.to_i)
|
270
|
-
end
|
271
|
-
|
272
|
-
def |(n)
|
273
|
-
return Integer.new(@value | n.to_i)
|
274
|
-
end
|
275
|
-
def &(n)
|
276
|
-
return Integer.new(@value & n.to_i)
|
277
|
-
end
|
278
|
-
def ^(n)
|
279
|
-
return Integer.new(@value ^ n.to_i)
|
280
|
-
end
|
281
|
-
def <<(n)
|
282
|
-
return Integer.new(@value << n.to_i)
|
283
|
-
end
|
284
|
-
def >>(n)
|
285
|
-
return Integer.new(@value >> n.to_i)
|
286
|
-
end
|
287
|
-
def >(n)
|
288
|
-
return @value > n.to_i
|
289
|
-
end
|
290
|
-
def >=(n)
|
291
|
-
return @value >= n.to_i
|
292
|
-
end
|
293
|
-
def <(n)
|
294
|
-
return @value < n.to_i
|
295
|
-
end
|
296
|
-
def <=(n)
|
297
|
-
return @value <= n.to_i
|
298
|
-
end
|
299
|
-
|
300
|
-
def <=>(n)
|
301
|
-
if @value < n.to_i
|
302
|
-
return -1
|
303
|
-
elsif @value > n.to_i
|
304
|
-
return 1
|
305
|
-
else
|
306
|
-
return 0
|
307
|
-
end
|
308
|
-
end
|
309
|
-
|
310
|
-
def to_f() return @value.to_f end
|
311
|
-
def to_i() return @value.to_i end
|
312
|
-
def to_s() return @value.to_s end
|
313
|
-
|
314
|
-
def coerce(n)
|
315
|
-
[n, @value]
|
316
|
-
end
|
317
|
-
end
|
318
|
-
|
319
|
-
# If a C++ enum was converted to an ordinary ruby Integer, the
|
320
|
-
# name of the type is lost. The enum type name is needed for overloaded
|
321
|
-
# method resolution when two methods differ only by an enum type.
|
322
|
-
class Enum
|
323
|
-
attr_accessor :type, :value
|
324
|
-
def initialize(n, enum_type)
|
325
|
-
@value = n
|
326
|
-
@type = enum_type
|
327
|
-
end
|
328
|
-
|
329
|
-
def +(n)
|
330
|
-
return @value + n.to_i
|
331
|
-
end
|
332
|
-
def -(n)
|
333
|
-
return @value - n.to_i
|
334
|
-
end
|
335
|
-
def *(n)
|
336
|
-
return @value * n.to_i
|
337
|
-
end
|
338
|
-
def /(n)
|
339
|
-
return @value / n.to_i
|
340
|
-
end
|
341
|
-
def %(n)
|
342
|
-
return @value % n.to_i
|
343
|
-
end
|
344
|
-
def **(n)
|
345
|
-
return @value ** n.to_i
|
346
|
-
end
|
347
|
-
|
348
|
-
def |(n)
|
349
|
-
return Enum.new(@value | n.to_i, @type)
|
350
|
-
end
|
351
|
-
def &(n)
|
352
|
-
return Enum.new(@value & n.to_i, @type)
|
353
|
-
end
|
354
|
-
def ^(n)
|
355
|
-
return Enum.new(@value ^ n.to_i, @type)
|
356
|
-
end
|
357
|
-
def ~()
|
358
|
-
return ~ @value
|
359
|
-
end
|
360
|
-
def <(n)
|
361
|
-
return @value < n.to_i
|
362
|
-
end
|
363
|
-
def <=(n)
|
364
|
-
return @value <= n.to_i
|
365
|
-
end
|
366
|
-
def >(n)
|
367
|
-
return @value > n.to_i
|
368
|
-
end
|
369
|
-
def >=(n)
|
370
|
-
return @value >= n.to_i
|
371
|
-
end
|
372
|
-
def <<(n)
|
373
|
-
return Enum.new(@value << n.to_i, @type)
|
374
|
-
end
|
375
|
-
def >>(n)
|
376
|
-
return Enum.new(@value >> n.to_i, @type)
|
377
|
-
end
|
378
|
-
|
379
|
-
def ==(n) return @value == n.to_i end
|
380
|
-
def to_i() return @value end
|
381
|
-
|
382
|
-
def to_f() return @value.to_f end
|
383
|
-
def to_s() return @value.to_s end
|
384
|
-
|
385
|
-
def coerce(n)
|
386
|
-
[n, @value]
|
387
|
-
end
|
388
|
-
|
389
|
-
def inspect
|
390
|
-
to_s
|
391
|
-
end
|
392
|
-
|
393
|
-
def pretty_print(pp)
|
394
|
-
pp.text "#<%s:0x%8.8x @type=%s, @value=%d>" % [self.class.name, object_id, type, value]
|
395
|
-
end
|
396
|
-
end
|
397
|
-
|
398
|
-
# Provides a mutable boolean class for passing to methods with
|
399
|
-
# C++ 'bool*' or 'bool&' arg types
|
400
|
-
class Boolean
|
401
|
-
attr_accessor :value
|
402
|
-
def initialize(b=false) @value = b end
|
403
|
-
def nil?
|
404
|
-
return !@value
|
405
|
-
end
|
406
|
-
end
|
407
|
-
|
408
|
-
class AbstractSlider < Qt::Base
|
409
|
-
def range=(arg)
|
410
|
-
if arg.kind_of? Range
|
411
|
-
return super(arg.begin, arg.exclude_end? ? arg.end - 1 : arg.end)
|
412
|
-
else
|
413
|
-
return super(arg)
|
414
|
-
end
|
415
|
-
end
|
416
|
-
end
|
417
|
-
|
418
|
-
class AbstractSocket < Qt::Base
|
419
|
-
def abort(*args)
|
420
|
-
method_missing(:abort, *args)
|
421
|
-
end
|
422
|
-
end
|
423
|
-
|
424
|
-
class AbstractTextDocumentLayout < Qt::Base
|
425
|
-
def format(*args)
|
426
|
-
method_missing(:format, *args)
|
427
|
-
end
|
428
|
-
end
|
429
|
-
|
430
|
-
class AccessibleEvent < Qt::Base
|
431
|
-
def type(*args)
|
432
|
-
method_missing(:type, *args)
|
433
|
-
end
|
434
|
-
end
|
435
|
-
|
436
|
-
class ActionEvent < Qt::Base
|
437
|
-
def type(*args)
|
438
|
-
method_missing(:type, *args)
|
439
|
-
end
|
440
|
-
end
|
441
|
-
|
442
|
-
class Action < Qt::Base
|
443
|
-
def setShortcut(arg)
|
444
|
-
if arg.kind_of?(String)
|
445
|
-
return super(Qt::KeySequence.new(arg))
|
446
|
-
else
|
447
|
-
return super(arg)
|
448
|
-
end
|
449
|
-
end
|
450
|
-
|
451
|
-
def shortcut=(arg)
|
452
|
-
setShortcut(arg)
|
453
|
-
end
|
454
|
-
end
|
455
|
-
|
456
|
-
class Application < Qt::Base
|
457
|
-
def initialize(*args)
|
458
|
-
if args.length == 1 && args[0].kind_of?(Array)
|
459
|
-
super(args.length + 1, [$0] + args[0])
|
460
|
-
else
|
461
|
-
super(*args)
|
462
|
-
end
|
463
|
-
$qApp = self
|
464
|
-
end
|
465
|
-
# Delete the underlying C++ instance after exec returns
|
466
|
-
# Otherwise, rb_gc_call_finalizer_at_exit() can delete
|
467
|
-
# stuff that Qt::Application still needs for its cleanup.
|
468
|
-
def exec
|
469
|
-
method_missing(:exec)
|
470
|
-
self.dispose
|
471
|
-
Qt::Internal.application_terminated = true
|
472
|
-
end
|
473
|
-
|
474
|
-
def type(*args)
|
475
|
-
method_missing(:type, *args)
|
476
|
-
end
|
477
|
-
end
|
478
|
-
|
479
|
-
class Buffer < Qt::Base
|
480
|
-
def open(*args)
|
481
|
-
method_missing(:open, *args)
|
482
|
-
end
|
483
|
-
end
|
484
|
-
|
485
|
-
class ButtonGroup < Qt::Base
|
486
|
-
def id(*args)
|
487
|
-
method_missing(:id, *args)
|
488
|
-
end
|
489
|
-
end
|
490
|
-
|
491
|
-
class ByteArray < Qt::Base
|
492
|
-
def initialize(*args)
|
493
|
-
if args.size == 1 && args[0].kind_of?(String)
|
494
|
-
super(args[0], args[0].size)
|
495
|
-
else
|
496
|
-
super
|
497
|
-
end
|
498
|
-
end
|
499
|
-
|
500
|
-
def to_s
|
501
|
-
return constData()
|
502
|
-
end
|
503
|
-
|
504
|
-
def to_i
|
505
|
-
return toInt()
|
506
|
-
end
|
507
|
-
|
508
|
-
def to_f
|
509
|
-
return toDouble()
|
510
|
-
end
|
511
|
-
|
512
|
-
def chop(*args)
|
513
|
-
method_missing(:chop, *args)
|
514
|
-
end
|
515
|
-
|
516
|
-
def split(*args)
|
517
|
-
method_missing(:split, *args)
|
518
|
-
end
|
519
|
-
end
|
520
|
-
|
521
|
-
class CheckBox < Qt::Base
|
522
|
-
def setShortcut(arg)
|
523
|
-
if arg.kind_of?(String)
|
524
|
-
return super(Qt::KeySequence.new(arg))
|
525
|
-
else
|
526
|
-
return super(arg)
|
527
|
-
end
|
528
|
-
end
|
529
|
-
|
530
|
-
def shortcut=(arg)
|
531
|
-
setShortcut(arg)
|
532
|
-
end
|
533
|
-
end
|
534
|
-
|
535
|
-
class ChildEvent < Qt::Base
|
536
|
-
def type(*args)
|
537
|
-
method_missing(:type, *args)
|
538
|
-
end
|
539
|
-
end
|
540
|
-
|
541
|
-
class CloseEvent < Qt::Base
|
542
|
-
def type(*args)
|
543
|
-
method_missing(:type, *args)
|
544
|
-
end
|
545
|
-
end
|
546
|
-
|
547
|
-
class Color < Qt::Base
|
548
|
-
def inspect
|
549
|
-
str = super
|
550
|
-
str.sub(/>$/, " %s>" % name)
|
551
|
-
end
|
552
|
-
|
553
|
-
def pretty_print(pp)
|
554
|
-
str = to_s
|
555
|
-
pp.text str.sub(/>$/, " %s>" % name)
|
556
|
-
end
|
557
|
-
|
558
|
-
def name(*args)
|
559
|
-
method_missing(:name, *args)
|
560
|
-
end
|
561
|
-
end
|
562
|
-
|
563
|
-
class Connection < Qt::Base
|
564
|
-
def inspect
|
565
|
-
str = super
|
566
|
-
str.sub(/>$/, " memberName=%s, memberType=%s, object=%s>" %
|
567
|
-
[memberName.inspect, memberType == 1 ? "SLOT" : "SIGNAL", object.inspect] )
|
568
|
-
end
|
569
|
-
|
570
|
-
def pretty_print(pp)
|
571
|
-
str = to_s
|
572
|
-
pp.text str.sub(/>$/, "\n memberName=%s,\n memberType=%s,\n object=%s>" %
|
573
|
-
[memberName.inspect, memberType == 1 ? "SLOT" : "SIGNAL", object.inspect] )
|
574
|
-
end
|
575
|
-
end
|
576
|
-
|
577
|
-
class ContextMenuEvent < Qt::Base
|
578
|
-
def type(*args)
|
579
|
-
method_missing(:type, *args)
|
580
|
-
end
|
581
|
-
end
|
582
|
-
|
583
|
-
class CoreApplication < Qt::Base
|
584
|
-
def initialize(*args)
|
585
|
-
if args.length == 1 && args[0].kind_of?(Array)
|
586
|
-
super(args.length + 1, [$0] + args[0])
|
587
|
-
else
|
588
|
-
super(*args)
|
589
|
-
end
|
590
|
-
$qApp = self
|
591
|
-
end
|
592
|
-
|
593
|
-
# Delete the underlying C++ instance after exec returns
|
594
|
-
# Otherwise, rb_gc_call_finalizer_at_exit() can delete
|
595
|
-
# stuff that Qt::Application still needs for its cleanup.
|
596
|
-
def exec
|
597
|
-
method_missing(:exec)
|
598
|
-
self.dispose
|
599
|
-
Qt::Internal.application_terminated = true
|
600
|
-
end
|
601
|
-
|
602
|
-
def type(*args)
|
603
|
-
method_missing(:type, *args)
|
604
|
-
end
|
605
|
-
|
606
|
-
def exit(*args)
|
607
|
-
method_missing(:exit, *args)
|
608
|
-
end
|
609
|
-
end
|
610
|
-
|
611
|
-
class Cursor < Qt::Base
|
612
|
-
def inspect
|
613
|
-
str = super
|
614
|
-
str.sub(/>$/, " shape=%d>" % shape)
|
615
|
-
end
|
616
|
-
|
617
|
-
def pretty_print(pp)
|
618
|
-
str = to_s
|
619
|
-
pp.text str.sub(/>$/, " shape=%d>" % shape)
|
620
|
-
end
|
621
|
-
end
|
622
|
-
|
623
|
-
class CustomEvent < Qt::Base
|
624
|
-
def type(*args)
|
625
|
-
method_missing(:type, *args)
|
626
|
-
end
|
627
|
-
end
|
628
|
-
|
629
|
-
class Date < Qt::Base
|
630
|
-
def initialize(*args)
|
631
|
-
if args.size == 1 && args[0].class.name == "Date"
|
632
|
-
return super(args[0].year, args[0].month, args[0].day)
|
633
|
-
else
|
634
|
-
return super(*args)
|
635
|
-
end
|
636
|
-
end
|
637
|
-
|
638
|
-
def inspect
|
639
|
-
str = super
|
640
|
-
str.sub(/>$/, " %s>" % toString)
|
641
|
-
end
|
642
|
-
|
643
|
-
def pretty_print(pp)
|
644
|
-
str = to_s
|
645
|
-
pp.text str.sub(/>$/, " %s>" % toString)
|
646
|
-
end
|
647
|
-
|
648
|
-
def to_date
|
649
|
-
::Date.new! to_julian_day
|
650
|
-
end
|
651
|
-
end
|
652
|
-
|
653
|
-
class DateTime < Qt::Base
|
654
|
-
def initialize(*args)
|
655
|
-
if args.size == 1 && args[0].class.name == "DateTime"
|
656
|
-
return super( Qt::Date.new(args[0].year, args[0].month, args[0].day),
|
657
|
-
Qt::Time.new(args[0].hour, args[0].min, args[0].sec) )
|
658
|
-
elsif args.size == 1 && args[0].class.name == "Time"
|
659
|
-
result = super( Qt::Date.new(args[0].year, args[0].month, args[0].day),
|
660
|
-
Qt::Time.new(args[0].hour, args[0].min, args[0].sec, args[0].usec / 1000) )
|
661
|
-
result.timeSpec = (args[0].utc? ? Qt::UTC : Qt::LocalTime)
|
662
|
-
return result
|
663
|
-
else
|
664
|
-
return super(*args)
|
665
|
-
end
|
666
|
-
end
|
667
|
-
|
668
|
-
def to_time
|
669
|
-
if timeSpec == Qt::UTC
|
670
|
-
return ::Time.utc( date.year, date.month, date.day,
|
671
|
-
time.hour, time.minute, time.second, time.msec * 1000 )
|
672
|
-
else
|
673
|
-
return ::Time.local( date.year, date.month, date.day,
|
674
|
-
time.hour, time.minute, time.second, time.msec * 1000 )
|
675
|
-
end
|
676
|
-
end
|
677
|
-
|
678
|
-
def inspect
|
679
|
-
str = super
|
680
|
-
str.sub(/>$/, " %s>" % toString)
|
681
|
-
end
|
682
|
-
|
683
|
-
def pretty_print(pp)
|
684
|
-
str = to_s
|
685
|
-
pp.text str.sub(/>$/, " %s>" % toString)
|
686
|
-
end
|
687
|
-
end
|
688
|
-
|
689
|
-
class DBusArgument < Qt::Base
|
690
|
-
def inspect
|
691
|
-
str = super
|
692
|
-
str.sub(/>$/, " currentSignature='%s', atEnd=%s>" % [currentSignature, atEnd])
|
693
|
-
end
|
694
|
-
|
695
|
-
def pretty_print(pp)
|
696
|
-
str = to_s
|
697
|
-
pp.text str.sub(/>$/, " currentSignature='%s, atEnd=%s'>" % [currentSignature, atEnd])
|
698
|
-
end
|
699
|
-
end
|
700
|
-
|
701
|
-
class DBusConnection < Qt::Base
|
702
|
-
def send(*args)
|
703
|
-
method_missing(:send, *args)
|
704
|
-
end
|
705
|
-
end
|
706
|
-
|
707
|
-
class DBusConnectionInterface < Qt::Base
|
708
|
-
def serviceOwner(name)
|
709
|
-
return Qt::DBusReply.new(internalConstCall(Qt::DBus::AutoDetect, "GetNameOwner", [Qt::Variant.new(name)]))
|
710
|
-
end
|
711
|
-
|
712
|
-
def service_owner(name)
|
713
|
-
return serviceOwner(name)
|
714
|
-
end
|
715
|
-
|
716
|
-
def registeredServiceNames
|
717
|
-
return Qt::DBusReply.new(internalConstCall(Qt::DBus::AutoDetect, "ListNames"))
|
718
|
-
end
|
719
|
-
|
720
|
-
def registered_service_names
|
721
|
-
return registeredServiceNames
|
722
|
-
end
|
723
|
-
|
724
|
-
def isServiceRegistered(serviceName)
|
725
|
-
return Qt::DBusReply.new(internalConstCall(Qt::DBus::AutoDetect, "NameHasOwner", [Qt::Variant.new(serviceName)]))
|
726
|
-
end
|
727
|
-
|
728
|
-
def is_service_registered(serviceName)
|
729
|
-
return isServiceRegistered(serviceName)
|
730
|
-
end
|
731
|
-
|
732
|
-
def serviceRegistered?(serviceName)
|
733
|
-
return isServiceRegistered(serviceName)
|
734
|
-
end
|
735
|
-
|
736
|
-
def service_registered?(serviceName)
|
737
|
-
return isServiceRegistered(serviceName)
|
738
|
-
end
|
739
|
-
|
740
|
-
def servicePid(serviceName)
|
741
|
-
return Qt::DBusReply.new(internalConstCall(Qt::DBus::AutoDetect, "GetConnectionUnixProcessID", [Qt::Variant.new(serviceName)]))
|
742
|
-
end
|
743
|
-
|
744
|
-
def service_pid(serviceName)
|
745
|
-
return servicePid(serviceName)
|
746
|
-
end
|
747
|
-
|
748
|
-
def serviceUid(serviceName)
|
749
|
-
return Qt::DBusReply.new(internalConstCall(Qt::DBus::AutoDetect, "GetConnectionUnixUser", [Qt::Variant.new(serviceName)]))
|
750
|
-
end
|
751
|
-
|
752
|
-
def service_uid(serviceName)
|
753
|
-
return serviceUid(serviceName)
|
754
|
-
end
|
755
|
-
|
756
|
-
def startService(name)
|
757
|
-
return call("StartServiceByName", Qt::Variant.new(name), Qt::Variant.new(0)).value
|
758
|
-
end
|
759
|
-
|
760
|
-
def start_service(name)
|
761
|
-
startService(name)
|
762
|
-
end
|
763
|
-
end
|
764
|
-
|
765
|
-
class DBusError < Qt::Base
|
766
|
-
def type(*args)
|
767
|
-
method_missing(:type, *args)
|
768
|
-
end
|
769
|
-
end
|
770
|
-
|
771
|
-
class DBusInterface < Qt::Base
|
772
|
-
def call(method_name, *args)
|
773
|
-
if args.length == 0
|
774
|
-
return super(method_name)
|
775
|
-
elsif method_name.is_a? Qt::Enum
|
776
|
-
opt = args.shift
|
777
|
-
qdbusArgs = args.collect {|arg| qVariantFromValue(arg)}
|
778
|
-
return super(method_name, opt, *qdbusArgs)
|
779
|
-
else
|
780
|
-
# If the method is Qt::DBusInterface.call(), create an Array
|
781
|
-
# 'dbusArgs' of Qt::Variants from '*args'
|
782
|
-
qdbusArgs = args.collect {|arg| qVariantFromValue(arg)}
|
783
|
-
return super(method_name, *qdbusArgs)
|
784
|
-
end
|
785
|
-
end
|
786
|
-
|
787
|
-
def method_missing(id, *args)
|
788
|
-
begin
|
789
|
-
# First look for a method in the Smoke runtime
|
790
|
-
# If not found, then throw an exception and try dbus.
|
791
|
-
super(id, *args)
|
792
|
-
rescue
|
793
|
-
if args.length == 0
|
794
|
-
return call(id.to_s).value
|
795
|
-
else
|
796
|
-
return call(id.to_s, *args).value
|
797
|
-
end
|
798
|
-
end
|
799
|
-
end
|
800
|
-
end
|
801
|
-
|
802
|
-
class DBusMessage < Qt::Base
|
803
|
-
def type(*args)
|
804
|
-
method_missing(:type, *args)
|
805
|
-
end
|
806
|
-
|
807
|
-
def value
|
808
|
-
if type() == Qt::DBusMessage::ReplyMessage
|
809
|
-
reply = arguments()
|
810
|
-
if reply.length == 0
|
811
|
-
return nil
|
812
|
-
elsif reply.length == 1
|
813
|
-
return reply[0].value
|
814
|
-
else
|
815
|
-
return reply.collect {|v| v.value}
|
816
|
-
end
|
817
|
-
else
|
818
|
-
return nil
|
819
|
-
end
|
820
|
-
end
|
821
|
-
|
822
|
-
def <<(a)
|
823
|
-
if a.kind_of?(Qt::Variant)
|
824
|
-
return super(a)
|
825
|
-
else
|
826
|
-
return super(qVariantFromValue(a))
|
827
|
-
end
|
828
|
-
end
|
829
|
-
end
|
830
|
-
|
831
|
-
class DBusReply
|
832
|
-
def initialize(reply)
|
833
|
-
@error = Qt::DBusError.new(reply)
|
834
|
-
|
835
|
-
if @error.valid?
|
836
|
-
@data = Qt::Variant.new
|
837
|
-
return
|
838
|
-
end
|
839
|
-
|
840
|
-
if reply.arguments.length >= 1
|
841
|
-
@data = reply.arguments[0]
|
842
|
-
return
|
843
|
-
end
|
844
|
-
|
845
|
-
# error
|
846
|
-
@error = Qt::DBusError.new( Qt::DBusError::InvalidSignature,
|
847
|
-
"Unexpected reply signature" )
|
848
|
-
@data = Qt::Variant.new # clear it
|
849
|
-
end
|
850
|
-
|
851
|
-
def isValid
|
852
|
-
return !@error.isValid
|
853
|
-
end
|
854
|
-
|
855
|
-
def valid?
|
856
|
-
return !@error.isValid
|
857
|
-
end
|
858
|
-
|
859
|
-
def value
|
860
|
-
return @data.value
|
861
|
-
end
|
862
|
-
|
863
|
-
def error
|
864
|
-
return @error
|
865
|
-
end
|
866
|
-
end
|
867
|
-
|
868
|
-
class Dial < Qt::Base
|
869
|
-
def range=(arg)
|
870
|
-
if arg.kind_of? Range
|
871
|
-
return super(arg.begin, arg.exclude_end? ? arg.end - 1 : arg.end)
|
872
|
-
else
|
873
|
-
return super(arg)
|
874
|
-
end
|
875
|
-
end
|
876
|
-
end
|
877
|
-
|
878
|
-
class Dialog < Qt::Base
|
879
|
-
def exec(*args)
|
880
|
-
method_missing(:exec, *args)
|
881
|
-
end
|
882
|
-
end
|
883
|
-
|
884
|
-
class Dir < Qt::Base
|
885
|
-
Time = Qt::Enum.new(1, "QDir::SortFlag")
|
886
|
-
end
|
887
|
-
|
888
|
-
class DomAttr < Qt::Base
|
889
|
-
def name(*args)
|
890
|
-
method_missing(:name, *args)
|
891
|
-
end
|
892
|
-
end
|
893
|
-
|
894
|
-
class DoubleSpinBox < Qt::Base
|
895
|
-
def range=(arg)
|
896
|
-
if arg.kind_of? Range
|
897
|
-
return super(arg.begin, arg.exclude_end? ? arg.end - 1 : arg.end)
|
898
|
-
else
|
899
|
-
return super(arg)
|
900
|
-
end
|
901
|
-
end
|
902
|
-
end
|
903
|
-
|
904
|
-
class DoubleValidator < Qt::Base
|
905
|
-
def range=(arg)
|
906
|
-
if arg.kind_of? Range
|
907
|
-
return super(arg.begin, arg.exclude_end? ? arg.end - 1 : arg.end)
|
908
|
-
else
|
909
|
-
return super(arg)
|
910
|
-
end
|
911
|
-
end
|
912
|
-
end
|
913
|
-
|
914
|
-
class DomDocumentType < Qt::Base
|
915
|
-
def name(*args)
|
916
|
-
method_missing(:name, *args)
|
917
|
-
end
|
918
|
-
|
919
|
-
def type(*args)
|
920
|
-
method_missing(:type, *args)
|
921
|
-
end
|
922
|
-
end
|
923
|
-
|
924
|
-
class DragEnterEvent < Qt::Base
|
925
|
-
def type(*args)
|
926
|
-
method_missing(:type, *args)
|
927
|
-
end
|
928
|
-
end
|
929
|
-
|
930
|
-
class DragLeaveEvent < Qt::Base
|
931
|
-
def type(*args)
|
932
|
-
method_missing(:type, *args)
|
933
|
-
end
|
934
|
-
end
|
935
|
-
|
936
|
-
class DropEvent < Qt::Base
|
937
|
-
def format(*args)
|
938
|
-
method_missing(:format, *args)
|
939
|
-
end
|
940
|
-
def type(*args)
|
941
|
-
method_missing(:type, *args)
|
942
|
-
end
|
943
|
-
end
|
944
|
-
|
945
|
-
class Event < Qt::Base
|
946
|
-
def type(*args)
|
947
|
-
method_missing(:type, *args)
|
948
|
-
end
|
949
|
-
end
|
950
|
-
|
951
|
-
class EventLoop < Qt::Base
|
952
|
-
def exec(*args)
|
953
|
-
method_missing(:exec, *args)
|
954
|
-
end
|
955
|
-
|
956
|
-
def exit(*args)
|
957
|
-
method_missing(:exit, *args)
|
958
|
-
end
|
959
|
-
end
|
960
|
-
|
961
|
-
class File < Qt::Base
|
962
|
-
def open(*args)
|
963
|
-
method_missing(:open, *args)
|
964
|
-
end
|
965
|
-
end
|
966
|
-
|
967
|
-
class FileOpenEvent < Qt::Base
|
968
|
-
def type(*args)
|
969
|
-
method_missing(:type, *args)
|
970
|
-
end
|
971
|
-
end
|
972
|
-
|
973
|
-
class FileIconProvider < Qt::Base
|
974
|
-
File = Qt::Enum.new(6, "QFileIconProvider::IconType")
|
975
|
-
|
976
|
-
def type(*args)
|
977
|
-
method_missing(:type, *args)
|
978
|
-
end
|
979
|
-
end
|
980
|
-
|
981
|
-
class FocusEvent < Qt::Base
|
982
|
-
def type(*args)
|
983
|
-
method_missing(:type, *args)
|
984
|
-
end
|
985
|
-
end
|
986
|
-
|
987
|
-
class Font < Qt::Base
|
988
|
-
def inspect
|
989
|
-
str = super
|
990
|
-
str.sub(/>$/, " family=%s, pointSize=%d, weight=%d, italic=%s, bold=%s, underline=%s, strikeOut=%s>" %
|
991
|
-
[family.inspect, pointSize, weight, italic, bold, underline, strikeOut])
|
992
|
-
end
|
993
|
-
|
994
|
-
def pretty_print(pp)
|
995
|
-
str = to_s
|
996
|
-
pp.text str.sub(/>$/, "\n family=%s,\n pointSize=%d,\n weight=%d,\n italic=%s,\n bold=%s,\n underline=%s,\n strikeOut=%s>" %
|
997
|
-
[family.inspect, pointSize, weight, italic, bold, underline, strikeOut])
|
998
|
-
end
|
999
|
-
end
|
1000
|
-
|
1001
|
-
class FontDatabase < Qt::Base
|
1002
|
-
Symbol = Qt::Enum.new(30, "QFontDatabase::WritingSystem")
|
1003
|
-
end
|
1004
|
-
|
1005
|
-
class Ftp < Qt::Base
|
1006
|
-
def abort(*args)
|
1007
|
-
method_missing(:abort, *args)
|
1008
|
-
end
|
1009
|
-
end
|
1010
|
-
|
1011
|
-
class GLContext < Qt::Base
|
1012
|
-
def format(*args)
|
1013
|
-
method_missing(:format, *args)
|
1014
|
-
end
|
1015
|
-
end
|
1016
|
-
|
1017
|
-
class GLPixelBuffer < Qt::Base
|
1018
|
-
def format(*args)
|
1019
|
-
method_missing(:format, *args)
|
1020
|
-
end
|
1021
|
-
end
|
1022
|
-
|
1023
|
-
class GLWidget < Qt::Base
|
1024
|
-
def format(*args)
|
1025
|
-
method_missing(:format, *args)
|
1026
|
-
end
|
1027
|
-
end
|
1028
|
-
|
1029
|
-
class GenericArgument < Qt::Base
|
1030
|
-
def name(*args)
|
1031
|
-
method_missing(:name, *args)
|
1032
|
-
end
|
1033
|
-
end
|
1034
|
-
|
1035
|
-
class Gradient < Qt::Base
|
1036
|
-
def type(*args)
|
1037
|
-
method_missing(:type, *args)
|
1038
|
-
end
|
1039
|
-
end
|
1040
|
-
|
1041
|
-
class GraphicsEllipseItem < Qt::Base
|
1042
|
-
def type(*args)
|
1043
|
-
method_missing(:type, *args)
|
1044
|
-
end
|
1045
|
-
end
|
1046
|
-
|
1047
|
-
class GraphicsItem < Qt::Base
|
1048
|
-
def type(*args)
|
1049
|
-
method_missing(:type, *args)
|
1050
|
-
end
|
1051
|
-
end
|
1052
|
-
|
1053
|
-
class GraphicsItemGroup < Qt::Base
|
1054
|
-
Type = 10
|
1055
|
-
|
1056
|
-
def type(*args)
|
1057
|
-
method_missing(:type, *args)
|
1058
|
-
end
|
1059
|
-
end
|
1060
|
-
|
1061
|
-
class GraphicsLineItem < Qt::Base
|
1062
|
-
Type = 6
|
1063
|
-
def type(*args)
|
1064
|
-
method_missing(:type, *args)
|
1065
|
-
end
|
1066
|
-
end
|
1067
|
-
|
1068
|
-
class GraphicsPathItem < Qt::Base
|
1069
|
-
Type = 2
|
1070
|
-
def type(*args)
|
1071
|
-
method_missing(:type, *args)
|
1072
|
-
end
|
1073
|
-
end
|
1074
|
-
|
1075
|
-
class GraphicsPixmapItem < Qt::Base
|
1076
|
-
def type(*args)
|
1077
|
-
method_missing(:type, *args)
|
1078
|
-
end
|
1079
|
-
end
|
1080
|
-
|
1081
|
-
class GraphicsPolygonItem < Qt::Base
|
1082
|
-
Type = 5
|
1083
|
-
def type(*args)
|
1084
|
-
method_missing(:type, *args)
|
1085
|
-
end
|
1086
|
-
end
|
1087
|
-
|
1088
|
-
class GraphicsProxyWidget < Qt::Base
|
1089
|
-
Type = 12
|
1090
|
-
def type(*args)
|
1091
|
-
method_missing(:type, *args)
|
1092
|
-
end
|
1093
|
-
end
|
1094
|
-
|
1095
|
-
class GraphicsRectItem < Qt::Base
|
1096
|
-
Type = 3
|
1097
|
-
def type(*args)
|
1098
|
-
method_missing(:type, *args)
|
1099
|
-
end
|
1100
|
-
end
|
1101
|
-
|
1102
|
-
class GraphicsSceneDragDropEvent < Qt::Base
|
1103
|
-
def type(*args)
|
1104
|
-
method_missing(:type, *args)
|
1105
|
-
end
|
1106
|
-
end
|
1107
|
-
|
1108
|
-
class GraphicsSceneMouseEvent < Qt::Base
|
1109
|
-
def type(*args)
|
1110
|
-
method_missing(:type, *args)
|
1111
|
-
end
|
1112
|
-
end
|
1113
|
-
|
1114
|
-
class GraphicsSceneContextMenuEvent < Qt::Base
|
1115
|
-
def type(*args)
|
1116
|
-
method_missing(:type, *args)
|
1117
|
-
end
|
1118
|
-
end
|
1119
|
-
|
1120
|
-
class GraphicsSceneHoverEvent < Qt::Base
|
1121
|
-
def type(*args)
|
1122
|
-
method_missing(:type, *args)
|
1123
|
-
end
|
1124
|
-
end
|
1125
|
-
|
1126
|
-
class GraphicsSceneHelpEvent < Qt::Base
|
1127
|
-
def type(*args)
|
1128
|
-
method_missing(:type, *args)
|
1129
|
-
end
|
1130
|
-
end
|
1131
|
-
|
1132
|
-
class GraphicsSceneWheelEvent < Qt::Base
|
1133
|
-
def type(*args)
|
1134
|
-
method_missing(:type, *args)
|
1135
|
-
end
|
1136
|
-
end
|
1137
|
-
|
1138
|
-
class GraphicsSimpleTextItem < Qt::Base
|
1139
|
-
Type = 9
|
1140
|
-
def type(*args)
|
1141
|
-
method_missing(:type, *args)
|
1142
|
-
end
|
1143
|
-
end
|
1144
|
-
|
1145
|
-
class GraphicsSvgItem < Qt::Base
|
1146
|
-
Type = 13
|
1147
|
-
def type(*args)
|
1148
|
-
method_missing(:type, *args)
|
1149
|
-
end
|
1150
|
-
end
|
1151
|
-
|
1152
|
-
class GraphicsTextItem < Qt::Base
|
1153
|
-
Type = 8
|
1154
|
-
def type(*args)
|
1155
|
-
method_missing(:type, *args)
|
1156
|
-
end
|
1157
|
-
end
|
1158
|
-
|
1159
|
-
class GraphicsWidget < Qt::Base
|
1160
|
-
Type = 11
|
1161
|
-
def type(*args)
|
1162
|
-
method_missing(:type, *args)
|
1163
|
-
end
|
1164
|
-
end
|
1165
|
-
|
1166
|
-
class HelpEvent < Qt::Base
|
1167
|
-
def type(*args)
|
1168
|
-
method_missing(:type, *args)
|
1169
|
-
end
|
1170
|
-
end
|
1171
|
-
|
1172
|
-
class HideEvent < Qt::Base
|
1173
|
-
def type(*args)
|
1174
|
-
method_missing(:type, *args)
|
1175
|
-
end
|
1176
|
-
end
|
1177
|
-
|
1178
|
-
class HoverEvent < Qt::Base
|
1179
|
-
def type(*args)
|
1180
|
-
method_missing(:type, *args)
|
1181
|
-
end
|
1182
|
-
end
|
1183
|
-
|
1184
|
-
class Http < Qt::Base
|
1185
|
-
def abort(*args)
|
1186
|
-
method_missing(:abort, *args)
|
1187
|
-
end
|
1188
|
-
end
|
1189
|
-
|
1190
|
-
class HttpRequestHeader < Qt::Base
|
1191
|
-
def method(*args)
|
1192
|
-
if args.length == 1
|
1193
|
-
super(*args)
|
1194
|
-
else
|
1195
|
-
method_missing(:method, *args)
|
1196
|
-
end
|
1197
|
-
end
|
1198
|
-
end
|
1199
|
-
|
1200
|
-
class IconDragEvent < Qt::Base
|
1201
|
-
def type(*args)
|
1202
|
-
method_missing(:type, *args)
|
1203
|
-
end
|
1204
|
-
end
|
1205
|
-
|
1206
|
-
class InputEvent < Qt::Base
|
1207
|
-
def type(*args)
|
1208
|
-
method_missing(:type, *args)
|
1209
|
-
end
|
1210
|
-
end
|
1211
|
-
|
1212
|
-
class InputMethodEvent < Qt::Base
|
1213
|
-
def type(*args)
|
1214
|
-
method_missing(:type, *args)
|
1215
|
-
end
|
1216
|
-
end
|
1217
|
-
|
1218
|
-
class IODevice < Qt::Base
|
1219
|
-
def open(*args)
|
1220
|
-
method_missing(:open, *args)
|
1221
|
-
end
|
1222
|
-
end
|
1223
|
-
|
1224
|
-
class Image < Qt::Base
|
1225
|
-
def fromImage(image)
|
1226
|
-
send("operator=".to_sym, image)
|
1227
|
-
end
|
1228
|
-
|
1229
|
-
def format(*args)
|
1230
|
-
method_missing(:format, *args)
|
1231
|
-
end
|
1232
|
-
|
1233
|
-
def load(*args)
|
1234
|
-
method_missing(:load, *args)
|
1235
|
-
end
|
1236
|
-
end
|
1237
|
-
|
1238
|
-
class ImageIOHandler < Qt::Base
|
1239
|
-
def format(*args)
|
1240
|
-
method_missing(:format, *args)
|
1241
|
-
end
|
1242
|
-
|
1243
|
-
def name(*args)
|
1244
|
-
method_missing(:name, *args)
|
1245
|
-
end
|
1246
|
-
end
|
1247
|
-
|
1248
|
-
class ImageReader < Qt::Base
|
1249
|
-
def format(*args)
|
1250
|
-
method_missing(:format, *args)
|
1251
|
-
end
|
1252
|
-
end
|
1253
|
-
|
1254
|
-
class ImageWriter < Qt::Base
|
1255
|
-
def format(*args)
|
1256
|
-
method_missing(:format, *args)
|
1257
|
-
end
|
1258
|
-
end
|
1259
|
-
|
1260
|
-
class IntValidator < Qt::Base
|
1261
|
-
def range=(arg)
|
1262
|
-
if arg.kind_of? Range
|
1263
|
-
return super(arg.begin, arg.exclude_end? ? arg.end - 1 : arg.end)
|
1264
|
-
else
|
1265
|
-
return super(arg)
|
1266
|
-
end
|
1267
|
-
end
|
1268
|
-
end
|
1269
|
-
|
1270
|
-
class ItemSelection < Qt::Base
|
1271
|
-
include Enumerable
|
1272
|
-
|
1273
|
-
def each
|
1274
|
-
for i in 0...count
|
1275
|
-
yield at(i)
|
1276
|
-
end
|
1277
|
-
return self
|
1278
|
-
end
|
1279
|
-
|
1280
|
-
def select(*args)
|
1281
|
-
method_missing(:select, *args)
|
1282
|
-
end
|
1283
|
-
|
1284
|
-
def split(*args)
|
1285
|
-
method_missing(:split, *args)
|
1286
|
-
end
|
1287
|
-
end
|
1288
|
-
|
1289
|
-
class ItemSelectionModel < Qt::Base
|
1290
|
-
def select(*args)
|
1291
|
-
method_missing(:select, *args)
|
1292
|
-
end
|
1293
|
-
end
|
1294
|
-
|
1295
|
-
class KeyEvent < Qt::Base
|
1296
|
-
def type(*args)
|
1297
|
-
method_missing(:type, *args)
|
1298
|
-
end
|
1299
|
-
end
|
1300
|
-
|
1301
|
-
class KeySequence < Qt::Base
|
1302
|
-
def initialize(*args)
|
1303
|
-
if args.length == 1 && args[0].kind_of?(Qt::Enum) && args[0].type == "Qt::Key"
|
1304
|
-
return super(args[0].to_i)
|
1305
|
-
end
|
1306
|
-
return super(*args)
|
1307
|
-
end
|
1308
|
-
|
1309
|
-
def inspect
|
1310
|
-
str = super
|
1311
|
-
str.sub(/>$/, " %s>" % toString)
|
1312
|
-
end
|
1313
|
-
|
1314
|
-
def pretty_print(pp)
|
1315
|
-
str = to_s
|
1316
|
-
pp.text str.sub(/>$/, " %s>" % toString)
|
1317
|
-
end
|
1318
|
-
end
|
1319
|
-
|
1320
|
-
class LCDNumber < Qt::Base
|
1321
|
-
def display(item)
|
1322
|
-
method_missing(:display, item)
|
1323
|
-
end
|
1324
|
-
end
|
1325
|
-
|
1326
|
-
class Library < Qt::Base
|
1327
|
-
def load(*args)
|
1328
|
-
method_missing(:load, *args)
|
1329
|
-
end
|
1330
|
-
end
|
1331
|
-
|
1332
|
-
class ListWidgetItem < Qt::Base
|
1333
|
-
def clone(*args)
|
1334
|
-
Qt::ListWidgetItem.new(self)
|
1335
|
-
end
|
1336
|
-
|
1337
|
-
def type(*args)
|
1338
|
-
method_missing(:type, *args)
|
1339
|
-
end
|
1340
|
-
|
1341
|
-
def inspect
|
1342
|
-
str = super
|
1343
|
-
str.sub(/>$/, " text='%s'>" % text)
|
1344
|
-
end
|
1345
|
-
|
1346
|
-
def pretty_print(pp)
|
1347
|
-
str = to_s
|
1348
|
-
pp.text str.sub(/>$/, " text='%s'>" % text)
|
1349
|
-
end
|
1350
|
-
end
|
1351
|
-
|
1352
|
-
class Locale < Qt::Base
|
1353
|
-
def name(*args)
|
1354
|
-
method_missing(:name, *args)
|
1355
|
-
end
|
1356
|
-
|
1357
|
-
def system(*args)
|
1358
|
-
method_missing(:system, *args)
|
1359
|
-
end
|
1360
|
-
end
|
1361
|
-
|
1362
|
-
class Menu < Qt::Base
|
1363
|
-
def exec(*args)
|
1364
|
-
method_missing(:exec, *args)
|
1365
|
-
end
|
1366
|
-
end
|
1367
|
-
|
1368
|
-
class MetaClassInfo < Qt::Base
|
1369
|
-
def name(*args)
|
1370
|
-
method_missing(:name, *args)
|
1371
|
-
end
|
1372
|
-
end
|
1373
|
-
|
1374
|
-
class MetaEnum < Qt::Base
|
1375
|
-
def name(*args)
|
1376
|
-
method_missing(:name, *args)
|
1377
|
-
end
|
1378
|
-
|
1379
|
-
def keyValues()
|
1380
|
-
res = []
|
1381
|
-
for i in 0...keyCount()
|
1382
|
-
if flag?
|
1383
|
-
res.push "%s=0x%x" % [key(i), value(i)]
|
1384
|
-
else
|
1385
|
-
res.push "%s=%d" % [key(i), value(i)]
|
1386
|
-
end
|
1387
|
-
end
|
1388
|
-
return res
|
1389
|
-
end
|
1390
|
-
|
1391
|
-
def inspect
|
1392
|
-
str = super
|
1393
|
-
str.sub(/>$/, " scope=%s, name=%s, keyValues=Array (%d element(s))>" % [scope, name, keyValues.length])
|
1394
|
-
end
|
1395
|
-
|
1396
|
-
def pretty_print(pp)
|
1397
|
-
str = to_s
|
1398
|
-
pp.text str.sub(/>$/, " scope=%s, name=%s, keyValues=Array (%d element(s))>" % [scope, name, keyValues.length])
|
1399
|
-
end
|
1400
|
-
end
|
1401
|
-
|
1402
|
-
class MetaMethod < Qt::Base
|
1403
|
-
# Oops, name clash with the Signal module so hard code
|
1404
|
-
# this value rather than get it from the Smoke runtime
|
1405
|
-
Method = Qt::Enum.new(0, "QMetaMethod::MethodType")
|
1406
|
-
Signal = Qt::Enum.new(1, "QMetaMethod::MethodType")
|
1407
|
-
end
|
1408
|
-
|
1409
|
-
class MetaObject < Qt::Base
|
1410
|
-
def method(*args)
|
1411
|
-
if args.length == 1 && args[0].kind_of?(Symbol)
|
1412
|
-
super(*args)
|
1413
|
-
else
|
1414
|
-
method_missing(:method, *args)
|
1415
|
-
end
|
1416
|
-
end
|
1417
|
-
|
1418
|
-
# Add three methods, 'propertyNames()', 'slotNames()' and 'signalNames()'
|
1419
|
-
# from Qt3, as they are very useful when debugging
|
1420
|
-
|
1421
|
-
def propertyNames(inherits = false)
|
1422
|
-
res = []
|
1423
|
-
if inherits
|
1424
|
-
for p in 0...propertyCount()
|
1425
|
-
res.push property(p).name
|
1426
|
-
end
|
1427
|
-
else
|
1428
|
-
for p in propertyOffset()...propertyCount()
|
1429
|
-
res.push property(p).name
|
1430
|
-
end
|
1431
|
-
end
|
1432
|
-
return res
|
1433
|
-
end
|
1434
|
-
|
1435
|
-
def slotNames(inherits = false)
|
1436
|
-
res = []
|
1437
|
-
if inherits
|
1438
|
-
for m in 0...methodCount()
|
1439
|
-
if method(m).methodType == Qt::MetaMethod::Slot
|
1440
|
-
res.push "%s %s" % [method(m).typeName == "" ? "void" : method(m).typeName,
|
1441
|
-
method(m).signature]
|
1442
|
-
end
|
1443
|
-
end
|
1444
|
-
else
|
1445
|
-
for m in methodOffset()...methodCount()
|
1446
|
-
if method(m).methodType == Qt::MetaMethod::Slot
|
1447
|
-
res.push "%s %s" % [method(m).typeName == "" ? "void" : method(m).typeName,
|
1448
|
-
method(m).signature]
|
1449
|
-
end
|
1450
|
-
end
|
1451
|
-
end
|
1452
|
-
return res
|
1453
|
-
end
|
1454
|
-
|
1455
|
-
def signalNames(inherits = false)
|
1456
|
-
res = []
|
1457
|
-
if inherits
|
1458
|
-
for m in 0...methodCount()
|
1459
|
-
if method(m).methodType == Qt::MetaMethod::Signal
|
1460
|
-
res.push "%s %s" % [method(m).typeName == "" ? "void" : method(m).typeName,
|
1461
|
-
method(m).signature]
|
1462
|
-
end
|
1463
|
-
end
|
1464
|
-
else
|
1465
|
-
for m in methodOffset()...methodCount()
|
1466
|
-
if method(m).methodType == Qt::MetaMethod::Signal
|
1467
|
-
res.push "%s %s" % [method(m).typeName == "" ? "void" : method(m).typeName,
|
1468
|
-
method(m).signature]
|
1469
|
-
end
|
1470
|
-
end
|
1471
|
-
end
|
1472
|
-
return res
|
1473
|
-
end
|
1474
|
-
|
1475
|
-
def enumerators(inherits = false)
|
1476
|
-
res = []
|
1477
|
-
if inherits
|
1478
|
-
for e in 0...enumeratorCount()
|
1479
|
-
res.push enumerator(e)
|
1480
|
-
end
|
1481
|
-
else
|
1482
|
-
for e in enumeratorOffset()...enumeratorCount()
|
1483
|
-
res.push enumerator(e)
|
1484
|
-
end
|
1485
|
-
end
|
1486
|
-
return res
|
1487
|
-
end
|
1488
|
-
|
1489
|
-
def inspect
|
1490
|
-
str = super
|
1491
|
-
str.sub!(/>$/, "")
|
1492
|
-
str << " className=%s," % className
|
1493
|
-
str << " propertyNames=Array (%d element(s))," % propertyNames.length unless propertyNames.length == 0
|
1494
|
-
str << " signalNames=Array (%d element(s))," % signalNames.length unless signalNames.length == 0
|
1495
|
-
str << " slotNames=Array (%d element(s))," % slotNames.length unless slotNames.length == 0
|
1496
|
-
str << " enumerators=Array (%d element(s))," % enumerators.length unless enumerators.length == 0
|
1497
|
-
str << " superClass=%s," % superClass.inspect unless superClass == nil
|
1498
|
-
str.chop!
|
1499
|
-
str << ">"
|
1500
|
-
end
|
1501
|
-
|
1502
|
-
def pretty_print(pp)
|
1503
|
-
str = to_s
|
1504
|
-
str.sub!(/>$/, "")
|
1505
|
-
str << "\n className=%s," % className
|
1506
|
-
str << "\n propertyNames=Array (%d element(s))," % propertyNames.length unless propertyNames.length == 0
|
1507
|
-
str << "\n signalNames=Array (%d element(s))," % signalNames.length unless signalNames.length == 0
|
1508
|
-
str << "\n slotNames=Array (%d element(s))," % slotNames.length unless slotNames.length == 0
|
1509
|
-
str << "\n enumerators=Array (%d element(s))," % enumerators.length unless enumerators.length == 0
|
1510
|
-
str << "\n superClass=%s," % superClass.inspect unless superClass == nil
|
1511
|
-
str << "\n methodCount=%d," % methodCount
|
1512
|
-
str << "\n methodOffset=%d," % methodOffset
|
1513
|
-
str << "\n propertyCount=%d," % propertyCount
|
1514
|
-
str << "\n propertyOffset=%d," % propertyOffset
|
1515
|
-
str << "\n enumeratorCount=%d," % enumeratorCount
|
1516
|
-
str << "\n enumeratorOffset=%d," % enumeratorOffset
|
1517
|
-
str.chop!
|
1518
|
-
str << ">"
|
1519
|
-
pp.text str
|
1520
|
-
end
|
1521
|
-
end
|
1522
|
-
|
1523
|
-
class MetaProperty < Qt::Base
|
1524
|
-
def name(*args)
|
1525
|
-
method_missing(:name, *args)
|
1526
|
-
end
|
1527
|
-
|
1528
|
-
def type(*args)
|
1529
|
-
method_missing(:type, *args)
|
1530
|
-
end
|
1531
|
-
end
|
1532
|
-
|
1533
|
-
class MetaType < Qt::Base
|
1534
|
-
Float = Qt::Enum.new(135, "QMetaType::Type")
|
1535
|
-
|
1536
|
-
def load(*args)
|
1537
|
-
method_missing(:load, *args)
|
1538
|
-
end
|
1539
|
-
|
1540
|
-
def type(*args)
|
1541
|
-
method_missing(:type, *args)
|
1542
|
-
end
|
1543
|
-
end
|
1544
|
-
|
1545
|
-
class MouseEvent < Qt::Base
|
1546
|
-
def type(*args)
|
1547
|
-
method_missing(:type, *args)
|
1548
|
-
end
|
1549
|
-
end
|
1550
|
-
|
1551
|
-
class MoveEvent < Qt::Base
|
1552
|
-
def type(*args)
|
1553
|
-
method_missing(:type, *args)
|
1554
|
-
end
|
1555
|
-
end
|
1556
|
-
|
1557
|
-
class Movie < Qt::Base
|
1558
|
-
def format(*args)
|
1559
|
-
method_missing(:format, *args)
|
1560
|
-
end
|
1561
|
-
end
|
1562
|
-
|
1563
|
-
class NetworkProxy < Qt::Base
|
1564
|
-
def type(*args)
|
1565
|
-
method_missing(:type, *args)
|
1566
|
-
end
|
1567
|
-
end
|
1568
|
-
|
1569
|
-
class Object < Qt::Base
|
1570
|
-
end
|
1571
|
-
|
1572
|
-
class PageSetupDialog < Qt::Base
|
1573
|
-
def exec(*args)
|
1574
|
-
method_missing(:exec, *args)
|
1575
|
-
end
|
1576
|
-
end
|
1577
|
-
|
1578
|
-
class PaintEvent < Qt::Base
|
1579
|
-
def type(*args)
|
1580
|
-
method_missing(:type, *args)
|
1581
|
-
end
|
1582
|
-
end
|
1583
|
-
|
1584
|
-
class Picture < Qt::Base
|
1585
|
-
def load(*args)
|
1586
|
-
method_missing(:load, *args)
|
1587
|
-
end
|
1588
|
-
end
|
1589
|
-
|
1590
|
-
class PictureIO < Qt::Base
|
1591
|
-
def format(*args)
|
1592
|
-
method_missing(:format, *args)
|
1593
|
-
end
|
1594
|
-
end
|
1595
|
-
|
1596
|
-
class Pixmap < Qt::Base
|
1597
|
-
def load(*args)
|
1598
|
-
method_missing(:load, *args)
|
1599
|
-
end
|
1600
|
-
end
|
1601
|
-
|
1602
|
-
class PluginLoader < Qt::Base
|
1603
|
-
def load(*args)
|
1604
|
-
method_missing(:load, *args)
|
1605
|
-
end
|
1606
|
-
end
|
1607
|
-
|
1608
|
-
class Point < Qt::Base
|
1609
|
-
def inspect
|
1610
|
-
str = super
|
1611
|
-
str.sub(/>$/, " x=%d, y=%d>" % [self.x, self.y])
|
1612
|
-
end
|
1613
|
-
|
1614
|
-
def pretty_print(pp)
|
1615
|
-
str = to_s
|
1616
|
-
pp.text str.sub(/>$/, "\n x=%d,\n y=%d>" % [self.x, self.y])
|
1617
|
-
end
|
1618
|
-
end
|
1619
|
-
|
1620
|
-
class PointF < Qt::Base
|
1621
|
-
def inspect
|
1622
|
-
str = super
|
1623
|
-
str.sub(/>$/, " x=%f, y=%f>" % [self.x, self.y])
|
1624
|
-
end
|
1625
|
-
|
1626
|
-
def pretty_print(pp)
|
1627
|
-
str = to_s
|
1628
|
-
pp.text str.sub(/>$/, "\n x=%f,\n y=%f>" % [self.x, self.y])
|
1629
|
-
end
|
1630
|
-
end
|
1631
|
-
|
1632
|
-
class Polygon < Qt::Base
|
1633
|
-
include Enumerable
|
1634
|
-
|
1635
|
-
def each
|
1636
|
-
for i in 0...count
|
1637
|
-
yield point(i)
|
1638
|
-
end
|
1639
|
-
return self
|
1640
|
-
end
|
1641
|
-
end
|
1642
|
-
|
1643
|
-
class PolygonF < Qt::Base
|
1644
|
-
include Enumerable
|
1645
|
-
|
1646
|
-
def each
|
1647
|
-
for i in 0...count
|
1648
|
-
yield point(i)
|
1649
|
-
end
|
1650
|
-
return self
|
1651
|
-
end
|
1652
|
-
end
|
1653
|
-
|
1654
|
-
class PrintDialog < Qt::Base
|
1655
|
-
def exec(*args)
|
1656
|
-
method_missing(:exec, *args)
|
1657
|
-
end
|
1658
|
-
end
|
1659
|
-
|
1660
|
-
class Process < Qt::Base
|
1661
|
-
StandardError = Qt::Enum.new(1, "QProcess::ProcessChannel")
|
1662
|
-
end
|
1663
|
-
|
1664
|
-
class ProgressBar < Qt::Base
|
1665
|
-
def range=(arg)
|
1666
|
-
if arg.kind_of? Range
|
1667
|
-
return super(arg.begin, arg.exclude_end? ? arg.end - 1 : arg.end)
|
1668
|
-
else
|
1669
|
-
return super(arg)
|
1670
|
-
end
|
1671
|
-
end
|
1672
|
-
end
|
1673
|
-
|
1674
|
-
class ProgressDialog < Qt::Base
|
1675
|
-
def range=(arg)
|
1676
|
-
if arg.kind_of? Range
|
1677
|
-
return super(arg.begin, arg.exclude_end? ? arg.end - 1 : arg.end)
|
1678
|
-
else
|
1679
|
-
return super(arg)
|
1680
|
-
end
|
1681
|
-
end
|
1682
|
-
end
|
1683
|
-
|
1684
|
-
class Printer < Qt::Base
|
1685
|
-
def abort(*args)
|
1686
|
-
method_missing(:abort, *args)
|
1687
|
-
end
|
1688
|
-
end
|
1689
|
-
|
1690
|
-
class PushButton < Qt::Base
|
1691
|
-
def setShortcut(arg)
|
1692
|
-
if arg.kind_of?(String)
|
1693
|
-
return super(Qt::KeySequence.new(arg))
|
1694
|
-
else
|
1695
|
-
return super(arg)
|
1696
|
-
end
|
1697
|
-
end
|
1698
|
-
|
1699
|
-
def shortcut=(arg)
|
1700
|
-
setShortcut(arg)
|
1701
|
-
end
|
1702
|
-
end
|
1703
|
-
|
1704
|
-
class Line < Qt::Base
|
1705
|
-
def inspect
|
1706
|
-
str = super
|
1707
|
-
str.sub(/>$/, " x1=%d, y1=%d, x2=%d, y2=%d>" % [x1, y1, x2, y2])
|
1708
|
-
end
|
1709
|
-
|
1710
|
-
def pretty_print(pp)
|
1711
|
-
str = to_s
|
1712
|
-
pp.text str.sub(/>$/, "\n x1=%d,\n y1=%d,\n x2=%d,\n y2=%d>" % [x1, y1, x2, y2])
|
1713
|
-
end
|
1714
|
-
end
|
1715
|
-
|
1716
|
-
class LineF < Qt::Base
|
1717
|
-
def inspect
|
1718
|
-
str = super
|
1719
|
-
str.sub(/>$/, " x1=%f, y1=%f, x2=%f, y2=%f>" % [x1, y1, x2, y2])
|
1720
|
-
end
|
1721
|
-
|
1722
|
-
def pretty_print(pp)
|
1723
|
-
str = to_s
|
1724
|
-
pp.text str.sub(/>$/, "\n x1=%f,\n y1=%f,\n x2=%f,\n y2=%f>" % [x1, y1, x2, y2])
|
1725
|
-
end
|
1726
|
-
end
|
1727
|
-
|
1728
|
-
class MetaType < Qt::Base
|
1729
|
-
def self.type(*args)
|
1730
|
-
method_missing(:type, *args)
|
1731
|
-
end
|
1732
|
-
end
|
1733
|
-
|
1734
|
-
class ModelIndex < Qt::Base
|
1735
|
-
def inspect
|
1736
|
-
str = super
|
1737
|
-
str.sub(/>$/, " valid?=%s, row=%s, column=%s>" % [valid?, row, column])
|
1738
|
-
end
|
1739
|
-
|
1740
|
-
def pretty_print(pp)
|
1741
|
-
str = to_s
|
1742
|
-
pp.text str.sub(/>$/, "\n valid?=%s,\n row=%s,\n column=%s>" % [valid?, row, column])
|
1743
|
-
end
|
1744
|
-
end
|
1745
|
-
|
1746
|
-
class RadioButton < Qt::Base
|
1747
|
-
def setShortcut(arg)
|
1748
|
-
if arg.kind_of?(String)
|
1749
|
-
return super(Qt::KeySequence.new(arg))
|
1750
|
-
else
|
1751
|
-
return super(arg)
|
1752
|
-
end
|
1753
|
-
end
|
1754
|
-
|
1755
|
-
def shortcut=(arg)
|
1756
|
-
setShortcut(arg)
|
1757
|
-
end
|
1758
|
-
end
|
1759
|
-
|
1760
|
-
class Rect < Qt::Base
|
1761
|
-
def inspect
|
1762
|
-
str = super
|
1763
|
-
str.sub(/>$/, " x=%d, y=%d, width=%d, height=%d>" % [self.x, self.y, width, height])
|
1764
|
-
end
|
1765
|
-
|
1766
|
-
def pretty_print(pp)
|
1767
|
-
str = to_s
|
1768
|
-
pp.text str.sub(/>$/, "\n x=%d,\n y=%d,\n width=%d,\n height=%d>" % [self.x, self.y, width, height])
|
1769
|
-
end
|
1770
|
-
end
|
1771
|
-
|
1772
|
-
class RectF < Qt::Base
|
1773
|
-
def inspect
|
1774
|
-
str = super
|
1775
|
-
str.sub(/>$/, " x=%f, y=%f, width=%f, height=%f>" % [self.x, self.y, width, height])
|
1776
|
-
end
|
1777
|
-
|
1778
|
-
def pretty_print(pp)
|
1779
|
-
str = to_s
|
1780
|
-
pp.text str.sub(/>$/, "\n x=%f,\n y=%f,\n width=%f,\n height=%f>" % [self.x, self.y, width, height])
|
1781
|
-
end
|
1782
|
-
end
|
1783
|
-
|
1784
|
-
class ResizeEvent < Qt::Base
|
1785
|
-
def type(*args)
|
1786
|
-
method_missing(:type, *args)
|
1787
|
-
end
|
1788
|
-
end
|
1789
|
-
|
1790
|
-
class ScrollBar < Qt::Base
|
1791
|
-
def range=(arg)
|
1792
|
-
if arg.kind_of? Range
|
1793
|
-
return super(arg.begin, arg.exclude_end? ? arg.end - 1 : arg.end)
|
1794
|
-
else
|
1795
|
-
return super(arg)
|
1796
|
-
end
|
1797
|
-
end
|
1798
|
-
end
|
1799
|
-
|
1800
|
-
class Shortcut < Qt::Base
|
1801
|
-
def id(*args)
|
1802
|
-
method_missing(:id, *args)
|
1803
|
-
end
|
1804
|
-
end
|
1805
|
-
|
1806
|
-
class ShortcutEvent < Qt::Base
|
1807
|
-
def type(*args)
|
1808
|
-
method_missing(:type, *args)
|
1809
|
-
end
|
1810
|
-
end
|
1811
|
-
|
1812
|
-
class ShowEvent < Qt::Base
|
1813
|
-
def type(*args)
|
1814
|
-
method_missing(:type, *args)
|
1815
|
-
end
|
1816
|
-
end
|
1817
|
-
|
1818
|
-
class Size < Qt::Base
|
1819
|
-
def inspect
|
1820
|
-
str = super
|
1821
|
-
str.sub(/>$/, " width=%d, height=%d>" % [width, height])
|
1822
|
-
end
|
1823
|
-
|
1824
|
-
def pretty_print(pp)
|
1825
|
-
str = to_s
|
1826
|
-
pp.text str.sub(/>$/, "\n width=%d,\n height=%d>" % [width, height])
|
1827
|
-
end
|
1828
|
-
end
|
1829
|
-
|
1830
|
-
class SizeF < Qt::Base
|
1831
|
-
def inspect
|
1832
|
-
str = super
|
1833
|
-
str.sub(/>$/, " width=%f, height=%f>" % [width, height])
|
1834
|
-
end
|
1835
|
-
|
1836
|
-
def pretty_print(pp)
|
1837
|
-
str = to_s
|
1838
|
-
pp.text str.sub(/>$/, "\n width=%f,\n height=%f>" % [width, height])
|
1839
|
-
end
|
1840
|
-
end
|
1841
|
-
|
1842
|
-
class SizePolicy < Qt::Base
|
1843
|
-
def inspect
|
1844
|
-
str = super
|
1845
|
-
str.sub(/>$/, " horizontalPolicy=%d, verticalPolicy=%d>" % [horizontalPolicy, verticalPolicy])
|
1846
|
-
end
|
1847
|
-
|
1848
|
-
def pretty_print(pp)
|
1849
|
-
str = to_s
|
1850
|
-
pp.text str.sub(/>$/, "\n horizontalPolicy=%d,\n verticalPolicy=%d>" % [horizontalPolicy, verticalPolicy])
|
1851
|
-
end
|
1852
|
-
end
|
1853
|
-
|
1854
|
-
class Slider < Qt::Base
|
1855
|
-
def range=(arg)
|
1856
|
-
if arg.kind_of? Range
|
1857
|
-
return super(arg.begin, arg.exclude_end? ? arg.end - 1 : arg.end)
|
1858
|
-
else
|
1859
|
-
return super(arg)
|
1860
|
-
end
|
1861
|
-
end
|
1862
|
-
end
|
1863
|
-
|
1864
|
-
class SocketNotifier < Qt::Base
|
1865
|
-
Exception = Qt::Enum.new(2, "QSocketNotifier::Type")
|
1866
|
-
|
1867
|
-
def type(*args)
|
1868
|
-
method_missing(:type, *args)
|
1869
|
-
end
|
1870
|
-
end
|
1871
|
-
|
1872
|
-
class SpinBox < Qt::Base
|
1873
|
-
def range=(arg)
|
1874
|
-
if arg.kind_of? Range
|
1875
|
-
return super(arg.begin, arg.exclude_end? ? arg.end - 1 : arg.end)
|
1876
|
-
else
|
1877
|
-
return super(arg)
|
1878
|
-
end
|
1879
|
-
end
|
1880
|
-
end
|
1881
|
-
|
1882
|
-
class SqlDatabase < Qt::Base
|
1883
|
-
def exec(*args)
|
1884
|
-
method_missing(:exec, *args)
|
1885
|
-
end
|
1886
|
-
|
1887
|
-
def open(*args)
|
1888
|
-
method_missing(:open, *args)
|
1889
|
-
end
|
1890
|
-
end
|
1891
|
-
|
1892
|
-
class SqlError < Qt::Base
|
1893
|
-
def type(*args)
|
1894
|
-
method_missing(:type, *args)
|
1895
|
-
end
|
1896
|
-
end
|
1897
|
-
|
1898
|
-
class SqlField < Qt::Base
|
1899
|
-
def name(*args)
|
1900
|
-
method_missing(:name, *args)
|
1901
|
-
end
|
1902
|
-
|
1903
|
-
def type(*args)
|
1904
|
-
method_missing(:type, *args)
|
1905
|
-
end
|
1906
|
-
end
|
1907
|
-
|
1908
|
-
class SqlIndex < Qt::Base
|
1909
|
-
def name(*args)
|
1910
|
-
method_missing(:name, *args)
|
1911
|
-
end
|
1912
|
-
end
|
1913
|
-
|
1914
|
-
class SqlQuery < Qt::Base
|
1915
|
-
def exec(*args)
|
1916
|
-
method_missing(:exec, *args)
|
1917
|
-
end
|
1918
|
-
end
|
1919
|
-
|
1920
|
-
class SqlResult < Qt::Base
|
1921
|
-
def exec(*args)
|
1922
|
-
method_missing(:exec, *args)
|
1923
|
-
end
|
1924
|
-
end
|
1925
|
-
|
1926
|
-
class SqlTableModel < Qt::Base
|
1927
|
-
def select(*k)
|
1928
|
-
method_missing(:select, *k)
|
1929
|
-
end
|
1930
|
-
end
|
1931
|
-
|
1932
|
-
class StandardItem < Qt::Base
|
1933
|
-
def inspect
|
1934
|
-
str = super
|
1935
|
-
str.sub(/>$/, " text='%s'>" % [text])
|
1936
|
-
end
|
1937
|
-
|
1938
|
-
def pretty_print(pp)
|
1939
|
-
str = to_s
|
1940
|
-
pp.text str.sub(/>$/, "\n text='%s'>" % [text])
|
1941
|
-
end
|
1942
|
-
|
1943
|
-
def type(*args)
|
1944
|
-
method_missing(:type, *args)
|
1945
|
-
end
|
1946
|
-
|
1947
|
-
def clone
|
1948
|
-
Qt::StandardItem.new(self)
|
1949
|
-
end
|
1950
|
-
end
|
1951
|
-
|
1952
|
-
class StandardItemModel < Qt::Base
|
1953
|
-
def type(*args)
|
1954
|
-
method_missing(:type, *args)
|
1955
|
-
end
|
1956
|
-
end
|
1957
|
-
|
1958
|
-
class StatusTipEvent < Qt::Base
|
1959
|
-
def type(*args)
|
1960
|
-
method_missing(:type, *args)
|
1961
|
-
end
|
1962
|
-
end
|
1963
|
-
|
1964
|
-
class StyleHintReturn < Qt::Base
|
1965
|
-
def type(*args)
|
1966
|
-
method_missing(:type, *args)
|
1967
|
-
end
|
1968
|
-
end
|
1969
|
-
|
1970
|
-
class StyleOption < Qt::Base
|
1971
|
-
def type(*args)
|
1972
|
-
method_missing(:type, *args)
|
1973
|
-
end
|
1974
|
-
end
|
1975
|
-
|
1976
|
-
class SyntaxHighlighter < Qt::Base
|
1977
|
-
def format(*args)
|
1978
|
-
method_missing(:format, *args)
|
1979
|
-
end
|
1980
|
-
end
|
1981
|
-
|
1982
|
-
class TableWidgetItem < Qt::Base
|
1983
|
-
def clone(*args)
|
1984
|
-
Qt::TableWidgetItem.new(self)
|
1985
|
-
end
|
1986
|
-
|
1987
|
-
def type(*args)
|
1988
|
-
method_missing(:type, *args)
|
1989
|
-
end
|
1990
|
-
|
1991
|
-
def inspect
|
1992
|
-
str = super
|
1993
|
-
str.sub(/>$/, " text='%s'>" % text)
|
1994
|
-
end
|
1995
|
-
|
1996
|
-
def pretty_print(pp)
|
1997
|
-
str = to_s
|
1998
|
-
pp.text str.sub(/>$/, " text='%s'>" % text)
|
1999
|
-
end
|
2000
|
-
end
|
2001
|
-
|
2002
|
-
class TemporaryFile < Qt::Base
|
2003
|
-
def open(*args)
|
2004
|
-
method_missing(:open, *args)
|
2005
|
-
end
|
2006
|
-
end
|
2007
|
-
|
2008
|
-
class TextCursor < Qt::Base
|
2009
|
-
def select(*k)
|
2010
|
-
method_missing(:select, *k)
|
2011
|
-
end
|
2012
|
-
end
|
2013
|
-
|
2014
|
-
class TextDocument < Qt::Base
|
2015
|
-
def clone(*args)
|
2016
|
-
method_missing(:clone, *args)
|
2017
|
-
end
|
2018
|
-
|
2019
|
-
def print(*args)
|
2020
|
-
method_missing(:print, *args)
|
2021
|
-
end
|
2022
|
-
end
|
2023
|
-
|
2024
|
-
class TextFormat < Qt::Base
|
2025
|
-
def type(*args)
|
2026
|
-
method_missing(:type, *args)
|
2027
|
-
end
|
2028
|
-
end
|
2029
|
-
|
2030
|
-
class TextImageFormat < Qt::Base
|
2031
|
-
def name(*args)
|
2032
|
-
method_missing(:name, *args)
|
2033
|
-
end
|
2034
|
-
end
|
2035
|
-
|
2036
|
-
class TextInlineObject < Qt::Base
|
2037
|
-
def format(*args)
|
2038
|
-
method_missing(:format, *args)
|
2039
|
-
end
|
2040
|
-
end
|
2041
|
-
|
2042
|
-
class TextLength < Qt::Base
|
2043
|
-
def type(*args)
|
2044
|
-
method_missing(:type, *args)
|
2045
|
-
end
|
2046
|
-
end
|
2047
|
-
|
2048
|
-
class TextList < Qt::Base
|
2049
|
-
def format(*args)
|
2050
|
-
method_missing(:format, *args)
|
2051
|
-
end
|
2052
|
-
end
|
2053
|
-
|
2054
|
-
class TextObject < Qt::Base
|
2055
|
-
def format(*args)
|
2056
|
-
method_missing(:format, *args)
|
2057
|
-
end
|
2058
|
-
end
|
2059
|
-
|
2060
|
-
class TextTable < Qt::Base
|
2061
|
-
def format(*args)
|
2062
|
-
method_missing(:format, *args)
|
2063
|
-
end
|
2064
|
-
end
|
2065
|
-
|
2066
|
-
class TextTableCell < Qt::Base
|
2067
|
-
def format(*args)
|
2068
|
-
method_missing(:format, *args)
|
2069
|
-
end
|
2070
|
-
end
|
2071
|
-
|
2072
|
-
class Time < Qt::Base
|
2073
|
-
def initialize(*args)
|
2074
|
-
if args.size == 1 && args[0].class.name == "Time"
|
2075
|
-
return super(args[0].hour, args[0].min, args[0].sec)
|
2076
|
-
else
|
2077
|
-
return super(*args)
|
2078
|
-
end
|
2079
|
-
end
|
2080
|
-
|
2081
|
-
def inspect
|
2082
|
-
str = super
|
2083
|
-
str.sub(/>$/, " %s>" % toString)
|
2084
|
-
end
|
2085
|
-
|
2086
|
-
def pretty_print(pp)
|
2087
|
-
str = to_s
|
2088
|
-
pp.text str.sub(/>$/, " %s>" % toString)
|
2089
|
-
end
|
2090
|
-
end
|
2091
|
-
|
2092
|
-
class TimerEvent < Qt::Base
|
2093
|
-
def type(*args)
|
2094
|
-
method_missing(:type, *args)
|
2095
|
-
end
|
2096
|
-
end
|
2097
|
-
|
2098
|
-
class TimeLine < Qt::Base
|
2099
|
-
def frameRange=(arg)
|
2100
|
-
if arg.kind_of? Range
|
2101
|
-
return super(arg.begin, arg.exclude_end? ? arg.end - 1 : arg.end)
|
2102
|
-
else
|
2103
|
-
return super(arg)
|
2104
|
-
end
|
2105
|
-
end
|
2106
|
-
end
|
2107
|
-
|
2108
|
-
class ToolButton < Qt::Base
|
2109
|
-
def setShortcut(arg)
|
2110
|
-
if arg.kind_of?(String)
|
2111
|
-
return super(Qt::KeySequence.new(arg))
|
2112
|
-
else
|
2113
|
-
return super(arg)
|
2114
|
-
end
|
2115
|
-
end
|
2116
|
-
|
2117
|
-
def shortcut=(arg)
|
2118
|
-
setShortcut(arg)
|
2119
|
-
end
|
2120
|
-
end
|
2121
|
-
|
2122
|
-
class Translator < Qt::Base
|
2123
|
-
def load(*args)
|
2124
|
-
method_missing(:load, *args)
|
2125
|
-
end
|
2126
|
-
end
|
2127
|
-
|
2128
|
-
class TreeWidget < Qt::Base
|
2129
|
-
include Enumerable
|
2130
|
-
|
2131
|
-
def each
|
2132
|
-
it = Qt::TreeWidgetItemIterator.new(self)
|
2133
|
-
while it.current
|
2134
|
-
yield it.current
|
2135
|
-
it += 1
|
2136
|
-
end
|
2137
|
-
end
|
2138
|
-
end
|
2139
|
-
|
2140
|
-
class TreeWidgetItem < Qt::Base
|
2141
|
-
include Enumerable
|
2142
|
-
|
2143
|
-
def initialize(*args)
|
2144
|
-
# There is not way to distinguish between the copy constructor
|
2145
|
-
# QTreeWidgetItem (const QTreeWidgetItem & other)
|
2146
|
-
# and
|
2147
|
-
# QTreeWidgetItem (QTreeWidgetItem * parent, const QStringList & strings, int type = Type)
|
2148
|
-
# when the latter has a single argument. So force the second variant to be called
|
2149
|
-
if args.length == 1 && args[0].kind_of?(Qt::TreeWidgetItem)
|
2150
|
-
super(args[0], Qt::TreeWidgetItem::Type)
|
2151
|
-
else
|
2152
|
-
super(*args)
|
2153
|
-
end
|
2154
|
-
end
|
2155
|
-
|
2156
|
-
def inspect
|
2157
|
-
str = super
|
2158
|
-
str.sub!(/>$/, "")
|
2159
|
-
str << " parent=%s," % parent unless parent.nil?
|
2160
|
-
for i in 0..(columnCount - 1)
|
2161
|
-
str << " text%d='%s'," % [i, self.text(i)]
|
2162
|
-
end
|
2163
|
-
str.sub!(/,?$/, ">")
|
2164
|
-
end
|
2165
|
-
|
2166
|
-
def pretty_print(pp)
|
2167
|
-
str = to_s
|
2168
|
-
str.sub!(/>$/, "")
|
2169
|
-
str << " parent=%s," % parent unless parent.nil?
|
2170
|
-
for i in 0..(columnCount - 1)
|
2171
|
-
str << " text%d='%s'," % [i, self.text(i)]
|
2172
|
-
end
|
2173
|
-
str.sub!(/,?$/, ">")
|
2174
|
-
pp.text str
|
2175
|
-
end
|
2176
|
-
|
2177
|
-
def clone(*args)
|
2178
|
-
Qt::TreeWidgetItem.new(self)
|
2179
|
-
end
|
2180
|
-
|
2181
|
-
def type(*args)
|
2182
|
-
method_missing(:type, *args)
|
2183
|
-
end
|
2184
|
-
|
2185
|
-
def each
|
2186
|
-
it = Qt::TreeWidgetItemIterator.new(self)
|
2187
|
-
while it.current
|
2188
|
-
yield it.current
|
2189
|
-
it += 1
|
2190
|
-
end
|
2191
|
-
end
|
2192
|
-
end
|
2193
|
-
|
2194
|
-
class TreeWidgetItemIterator < Qt::Base
|
2195
|
-
def current
|
2196
|
-
return send("operator*".to_sym)
|
2197
|
-
end
|
2198
|
-
end
|
2199
|
-
|
2200
|
-
class Url < Qt::Base
|
2201
|
-
def inspect
|
2202
|
-
str = super
|
2203
|
-
str.sub(/>$/, " url=%s>" % toString)
|
2204
|
-
end
|
2205
|
-
|
2206
|
-
def pretty_print(pp)
|
2207
|
-
str = to_s
|
2208
|
-
pp.text str.sub(/>$/, " url=%s>" % toString)
|
2209
|
-
end
|
2210
|
-
end
|
2211
|
-
|
2212
|
-
class UrlInfo < Qt::Base
|
2213
|
-
def name(*args)
|
2214
|
-
method_missing(:name, *args)
|
2215
|
-
end
|
2216
|
-
end
|
2217
|
-
|
2218
|
-
class Uuid < Qt::Base
|
2219
|
-
Time = Qt::Enum.new(1, "QUuid::Version")
|
2220
|
-
end
|
2221
|
-
|
2222
|
-
class Variant < Qt::Base
|
2223
|
-
String = Qt::Enum.new(10, "QVariant::Type")
|
2224
|
-
Date = Qt::Enum.new(14, "QVariant::Type")
|
2225
|
-
Time = Qt::Enum.new(15, "QVariant::Type")
|
2226
|
-
DateTime = Qt::Enum.new(16, "QVariant::Type")
|
2227
|
-
|
2228
|
-
def initialize(*args)
|
2229
|
-
if args.size == 1 && args[0].nil?
|
2230
|
-
return super()
|
2231
|
-
elsif args.size == 1 && args[0].class.name == "Date"
|
2232
|
-
return super(Qt::Date.new(args[0]))
|
2233
|
-
elsif args.size == 1 && args[0].class.name == "DateTime"
|
2234
|
-
return super(Qt::DateTime.new( Qt::Date.new(args[0].year, args[0].month, args[0].day),
|
2235
|
-
Qt::Time.new(args[0].hour, args[0].min, args[0].sec) ) )
|
2236
|
-
elsif args.size == 1 && args[0].class.name == "Time"
|
2237
|
-
return super(Qt::Time.new(args[0]))
|
2238
|
-
elsif args.size == 1 && args[0].class.name == "BigDecimal"
|
2239
|
-
return super(args[0].to_f) # we have to make do with a float
|
2240
|
-
else
|
2241
|
-
return super(*args)
|
2242
|
-
end
|
2243
|
-
end
|
2244
|
-
|
2245
|
-
def to_a
|
2246
|
-
return toStringList()
|
2247
|
-
end
|
2248
|
-
|
2249
|
-
def to_f
|
2250
|
-
return toDouble()
|
2251
|
-
end
|
2252
|
-
|
2253
|
-
def to_i
|
2254
|
-
return toInt()
|
2255
|
-
end
|
2256
|
-
|
2257
|
-
def to_int
|
2258
|
-
return toInt()
|
2259
|
-
end
|
2260
|
-
|
2261
|
-
def value
|
2262
|
-
case type()
|
2263
|
-
when Qt::Variant::Invalid
|
2264
|
-
return nil
|
2265
|
-
when Qt::Variant::Bitmap
|
2266
|
-
when Qt::Variant::Bool
|
2267
|
-
return toBool
|
2268
|
-
when Qt::Variant::Brush
|
2269
|
-
return qVariantValue(Qt::Brush, self)
|
2270
|
-
when Qt::Variant::ByteArray
|
2271
|
-
return toByteArray
|
2272
|
-
when Qt::Variant::Char
|
2273
|
-
return qVariantValue(Qt::Char, self)
|
2274
|
-
when Qt::Variant::Color
|
2275
|
-
return qVariantValue(Qt::Color, self)
|
2276
|
-
when Qt::Variant::Cursor
|
2277
|
-
return qVariantValue(Qt::Cursor, self)
|
2278
|
-
when Qt::Variant::Date
|
2279
|
-
return toDate
|
2280
|
-
when Qt::Variant::DateTime
|
2281
|
-
return toDateTime
|
2282
|
-
when Qt::Variant::Double
|
2283
|
-
return toDouble
|
2284
|
-
when Qt::Variant::Font
|
2285
|
-
return qVariantValue(Qt::Font, self)
|
2286
|
-
when Qt::Variant::Icon
|
2287
|
-
return qVariantValue(Qt::Icon, self)
|
2288
|
-
when Qt::Variant::Image
|
2289
|
-
return qVariantValue(Qt::Image, self)
|
2290
|
-
when Qt::Variant::Int
|
2291
|
-
return toInt
|
2292
|
-
when Qt::Variant::KeySequence
|
2293
|
-
return qVariantValue(Qt::KeySequence, self)
|
2294
|
-
when Qt::Variant::Line
|
2295
|
-
return toLine
|
2296
|
-
when Qt::Variant::LineF
|
2297
|
-
return toLineF
|
2298
|
-
when Qt::Variant::List
|
2299
|
-
return toList
|
2300
|
-
when Qt::Variant::Locale
|
2301
|
-
return qVariantValue(Qt::Locale, self)
|
2302
|
-
when Qt::Variant::LongLong
|
2303
|
-
return toLongLong
|
2304
|
-
when Qt::Variant::Map
|
2305
|
-
return toMap
|
2306
|
-
when Qt::Variant::Palette
|
2307
|
-
return qVariantValue(Qt::Palette, self)
|
2308
|
-
when Qt::Variant::Pen
|
2309
|
-
return qVariantValue(Qt::Pen, self)
|
2310
|
-
when Qt::Variant::Pixmap
|
2311
|
-
return qVariantValue(Qt::Pixmap, self)
|
2312
|
-
when Qt::Variant::Point
|
2313
|
-
return toPoint
|
2314
|
-
when Qt::Variant::PointF
|
2315
|
-
return toPointF
|
2316
|
-
when Qt::Variant::Polygon
|
2317
|
-
return qVariantValue(Qt::Polygon, self)
|
2318
|
-
when Qt::Variant::Rect
|
2319
|
-
return toRect
|
2320
|
-
when Qt::Variant::RectF
|
2321
|
-
return toRectF
|
2322
|
-
when Qt::Variant::RegExp
|
2323
|
-
return toRegExp
|
2324
|
-
when Qt::Variant::Region
|
2325
|
-
return qVariantValue(Qt::Region, self)
|
2326
|
-
when Qt::Variant::Size
|
2327
|
-
return toSize
|
2328
|
-
when Qt::Variant::SizeF
|
2329
|
-
return toSizeF
|
2330
|
-
when Qt::Variant::SizePolicy
|
2331
|
-
return toSizePolicy
|
2332
|
-
when Qt::Variant::String
|
2333
|
-
return toString
|
2334
|
-
when Qt::Variant::StringList
|
2335
|
-
return toStringList
|
2336
|
-
when Qt::Variant::TextFormat
|
2337
|
-
return qVariantValue(Qt::TextFormat, self)
|
2338
|
-
when Qt::Variant::TextLength
|
2339
|
-
return qVariantValue(Qt::TextLength, self)
|
2340
|
-
when Qt::Variant::Time
|
2341
|
-
return toTime
|
2342
|
-
when Qt::Variant::UInt
|
2343
|
-
return toUInt
|
2344
|
-
when Qt::Variant::ULongLong
|
2345
|
-
return toULongLong
|
2346
|
-
when Qt::Variant::Url
|
2347
|
-
return toUrl
|
2348
|
-
end
|
2349
|
-
|
2350
|
-
return qVariantValue(nil, self)
|
2351
|
-
end
|
2352
|
-
|
2353
|
-
def inspect
|
2354
|
-
str = super
|
2355
|
-
str.sub(/>$/, " typeName=%s>" % typeName)
|
2356
|
-
end
|
2357
|
-
|
2358
|
-
def pretty_print(pp)
|
2359
|
-
str = to_s
|
2360
|
-
pp.text str.sub(/>$/, " typeName=%s>" % typeName)
|
2361
|
-
end
|
2362
|
-
|
2363
|
-
def load(*args)
|
2364
|
-
method_missing(:load, *args)
|
2365
|
-
end
|
2366
|
-
|
2367
|
-
def type(*args)
|
2368
|
-
method_missing(:type, *args)
|
2369
|
-
end
|
2370
|
-
end
|
2371
|
-
|
2372
|
-
class DBusVariant < Variant
|
2373
|
-
def initialize(value)
|
2374
|
-
if value.kind_of? Qt::Variant
|
2375
|
-
super(value)
|
2376
|
-
else
|
2377
|
-
super(Qt::Variant.new(value))
|
2378
|
-
end
|
2379
|
-
end
|
2380
|
-
|
2381
|
-
def setVariant(variant)
|
2382
|
-
end
|
2383
|
-
|
2384
|
-
def variant=(variant)
|
2385
|
-
setVariant(variant)
|
2386
|
-
end
|
2387
|
-
|
2388
|
-
def variant()
|
2389
|
-
return self
|
2390
|
-
end
|
2391
|
-
end
|
2392
|
-
|
2393
|
-
class WhatsThisClickedEvent < Qt::Base
|
2394
|
-
def type(*args)
|
2395
|
-
method_missing(:type, *args)
|
2396
|
-
end
|
2397
|
-
end
|
2398
|
-
|
2399
|
-
class Widget < Qt::Base
|
2400
|
-
def raise(*args)
|
2401
|
-
method_missing(:raise, *args)
|
2402
|
-
end
|
2403
|
-
end
|
2404
|
-
|
2405
|
-
class WindowStateChangeEvent < Qt::Base
|
2406
|
-
def type(*args)
|
2407
|
-
method_missing(:type, *args)
|
2408
|
-
end
|
2409
|
-
end
|
2410
|
-
|
2411
|
-
class XmlAttributes < Qt::Base
|
2412
|
-
def type(*args)
|
2413
|
-
method_missing(:type, *args)
|
2414
|
-
end
|
2415
|
-
end
|
2416
|
-
|
2417
|
-
class SignalBlockInvocation < Qt::Object
|
2418
|
-
def initialize(parent, block, signature)
|
2419
|
-
super(parent)
|
2420
|
-
if metaObject.indexOfSlot(signature) == -1
|
2421
|
-
self.class.slots signature
|
2422
|
-
end
|
2423
|
-
@block = block
|
2424
|
-
end
|
2425
|
-
|
2426
|
-
def invoke(*args)
|
2427
|
-
@block.call(*args)
|
2428
|
-
end
|
2429
|
-
end
|
2430
|
-
|
2431
|
-
class BlockInvocation < Qt::Object
|
2432
|
-
def initialize(target, block, signature)
|
2433
|
-
super(target)
|
2434
|
-
if metaObject.indexOfSlot(signature) == -1
|
2435
|
-
self.class.slots signature
|
2436
|
-
end
|
2437
|
-
@block = block
|
2438
|
-
end
|
2439
|
-
|
2440
|
-
def invoke(*args)
|
2441
|
-
@block.call(*args)
|
2442
|
-
end
|
2443
|
-
end
|
2444
|
-
|
2445
|
-
class MethodInvocation < Qt::Object
|
2446
|
-
def initialize(target, method, signature)
|
2447
|
-
super(target)
|
2448
|
-
if metaObject.indexOfSlot(signature) == -1
|
2449
|
-
self.class.slots signature
|
2450
|
-
end
|
2451
|
-
@target = target
|
2452
|
-
method = method.intern unless method.is_a?Symbol
|
2453
|
-
@method = method
|
2454
|
-
end
|
2455
|
-
|
2456
|
-
def invoke(*args)
|
2457
|
-
@target.send @method, *args
|
2458
|
-
end
|
2459
|
-
end
|
2460
|
-
|
2461
|
-
module Internal
|
2462
|
-
@@classes = {}
|
2463
|
-
@@cpp_names = {}
|
2464
|
-
@@idclass = []
|
2465
|
-
|
2466
|
-
@@normalize_procs = []
|
2467
|
-
|
2468
|
-
class ModuleIndex
|
2469
|
-
attr_accessor :index
|
2470
|
-
|
2471
|
-
def smoke
|
2472
|
-
if ! @smoke
|
2473
|
-
return 0
|
2474
|
-
end
|
2475
|
-
return @smoke
|
2476
|
-
end
|
2477
|
-
|
2478
|
-
def initialize(smoke, index)
|
2479
|
-
@smoke = smoke
|
2480
|
-
@index = index
|
2481
|
-
end
|
2482
|
-
end
|
2483
|
-
|
2484
|
-
def self.classes
|
2485
|
-
return @@classes
|
2486
|
-
end
|
2487
|
-
|
2488
|
-
def self.cpp_names
|
2489
|
-
return @@cpp_names
|
2490
|
-
end
|
2491
|
-
|
2492
|
-
def self.idclass
|
2493
|
-
return @@idclass
|
2494
|
-
end
|
2495
|
-
|
2496
|
-
def self.add_normalize_proc(func)
|
2497
|
-
@@normalize_procs << func
|
2498
|
-
end
|
2499
|
-
|
2500
|
-
def Internal.normalize_classname(classname)
|
2501
|
-
@@normalize_procs.each do |func|
|
2502
|
-
ret = func.call(classname)
|
2503
|
-
if !ret.nil?
|
2504
|
-
return ret
|
2505
|
-
end
|
2506
|
-
end
|
2507
|
-
if classname =~ /^Q3/
|
2508
|
-
ruby_classname = classname.sub(/^Q3(?=[A-Z])/,'Qt3::')
|
2509
|
-
elsif classname =~ /^Q/
|
2510
|
-
ruby_classname = classname.sub(/^Q(?=[A-Z])/,'Qt::')
|
2511
|
-
else
|
2512
|
-
ruby_classname = classname
|
2513
|
-
end
|
2514
|
-
ruby_classname
|
2515
|
-
end
|
2516
|
-
|
2517
|
-
def Internal.init_class(c)
|
2518
|
-
if c == "WebCore" || c == "std" || c == "QGlobalSpace"
|
2519
|
-
return
|
2520
|
-
end
|
2521
|
-
classname = Qt::Internal::normalize_classname(c)
|
2522
|
-
classId = Qt::Internal.findClass(c)
|
2523
|
-
insert_pclassid(classname, classId)
|
2524
|
-
@@idclass[classId.index] = classname
|
2525
|
-
@@cpp_names[classname] = c
|
2526
|
-
klass = isQObject(c) ? create_qobject_class(classname, Qt) \
|
2527
|
-
: create_qt_class(classname, Qt)
|
2528
|
-
@@classes[classname] = klass unless klass.nil?
|
2529
|
-
end
|
2530
|
-
|
2531
|
-
def Internal.debug_level
|
2532
|
-
Qt.debug_level
|
2533
|
-
end
|
2534
|
-
|
2535
|
-
def Internal.checkarg(argtype, typename)
|
2536
|
-
puts " #{typename} (#{argtype})" if debug_level >= DebugLevel::High
|
2537
|
-
const_point = typename =~ /^const\s+/ ? -1 : 0
|
2538
|
-
if argtype == 'i'
|
2539
|
-
if typename =~ /^int&?$|^signed int&?$|^signed$|^qint32&?$/
|
2540
|
-
return 6 + const_point
|
2541
|
-
elsif typename =~ /^quint32&?$/
|
2542
|
-
return 4 + const_point
|
2543
|
-
elsif typename =~ /^(?:short|ushort|unsigned short int|unsigned short|uchar||unsigned char|uint|long|ulong|unsigned long int|unsigned|float|double|WId|Q_PID|^quint16&?$|^qint16&?$)$/
|
2544
|
-
return 4 + const_point
|
2545
|
-
elsif typename =~ /^(quint|qint|qulong|qlong|qreal)/
|
2546
|
-
return 4 + const_point
|
2547
|
-
else
|
2548
|
-
t = typename.sub(/^const\s+/, '')
|
2549
|
-
t.sub!(/[&*]$/, '')
|
2550
|
-
if isEnum(t)
|
2551
|
-
return 2
|
2552
|
-
end
|
2553
|
-
end
|
2554
|
-
elsif argtype == 'n'
|
2555
|
-
if typename =~ /^double$|^qreal$/
|
2556
|
-
return 6 + const_point
|
2557
|
-
elsif typename =~ /^float$/
|
2558
|
-
return 4 + const_point
|
2559
|
-
elsif typename =~ /^int&?$/
|
2560
|
-
return 2 + const_point
|
2561
|
-
elsif typename =~ /^(?:short|ushort|uint|long|ulong|signed|unsigned|float|double)$/
|
2562
|
-
return 2 + const_point
|
2563
|
-
else
|
2564
|
-
t = typename.sub(/^const\s+/, '')
|
2565
|
-
t.sub!(/[&*]$/, '')
|
2566
|
-
if isEnum(t)
|
2567
|
-
return 2 + const_point
|
2568
|
-
end
|
2569
|
-
end
|
2570
|
-
elsif argtype == 'B'
|
2571
|
-
if typename =~ /^(?:bool)[*&]?$/
|
2572
|
-
return 2 + const_point
|
2573
|
-
end
|
2574
|
-
elsif argtype == 's'
|
2575
|
-
if typename =~ /^(const )?((QChar)[*&]?)$/
|
2576
|
-
return 6 + const_point
|
2577
|
-
elsif typename =~ /^(?:(u(nsigned )?)?char\*)$/
|
2578
|
-
return 4 + const_point
|
2579
|
-
elsif typename =~ /^(?:const (u(nsigned )?)?char\*)$/
|
2580
|
-
return 2 + const_point
|
2581
|
-
elsif typename =~ /^(?:(?:const )?(QString)[*&]?)$/
|
2582
|
-
return 8 + const_point
|
2583
|
-
end
|
2584
|
-
elsif argtype == 'a'
|
2585
|
-
# FIXME: shouldn't be hardcoded. Installed handlers should tell what ruby type they expect.
|
2586
|
-
if typename =~ /^(?:
|
2587
|
-
const\ QCOORD\*|
|
2588
|
-
(?:const\ )?
|
2589
|
-
(?:
|
2590
|
-
QStringList[\*&]?|
|
2591
|
-
QValueList<int>[\*&]?|
|
2592
|
-
QRgb\*|
|
2593
|
-
char\*\*
|
2594
|
-
)
|
2595
|
-
)$/x
|
2596
|
-
return 2 + const_point
|
2597
|
-
end
|
2598
|
-
elsif argtype == 'u'
|
2599
|
-
# Give nil matched against string types a higher score than anything else
|
2600
|
-
if typename =~ /^(?:u?char\*|const u?char\*|(?:const )?((Q(C?)String))[*&]?)$/
|
2601
|
-
return 4 + const_point
|
2602
|
-
# Numerics will give a runtime conversion error, so they fail the match
|
2603
|
-
elsif typename =~ /^(?:short|ushort|uint|long|ulong|signed|unsigned|int)$/
|
2604
|
-
return -99
|
2605
|
-
else
|
2606
|
-
return 2 + const_point
|
2607
|
-
end
|
2608
|
-
elsif argtype == 'U'
|
2609
|
-
if typename =~ /QStringList/
|
2610
|
-
return 4 + const_point
|
2611
|
-
else
|
2612
|
-
return 2 + const_point
|
2613
|
-
end
|
2614
|
-
else
|
2615
|
-
t = typename.sub(/^const\s+/, '')
|
2616
|
-
t.sub!(/(::)?Ptr$/, '')
|
2617
|
-
t.sub!(/[&*]$/, '')
|
2618
|
-
if argtype == t
|
2619
|
-
return 4 + const_point
|
2620
|
-
elsif classIsa(argtype, t)
|
2621
|
-
return 2 + const_point
|
2622
|
-
elsif isEnum(argtype) and
|
2623
|
-
(t =~ /int|qint32|uint|quint32|long|ulong/ or isEnum(t))
|
2624
|
-
return 2 + const_point
|
2625
|
-
end
|
2626
|
-
end
|
2627
|
-
return -99
|
2628
|
-
end
|
2629
|
-
|
2630
|
-
def Internal.find_class(classname)
|
2631
|
-
@@classes[classname]
|
2632
|
-
end
|
2633
|
-
|
2634
|
-
# Runs the initializer as far as allocating the Qt C++ instance.
|
2635
|
-
# Then use a throw to jump back to here with the C++ instance
|
2636
|
-
# wrapped in a new ruby variable of type T_DATA
|
2637
|
-
def Internal.try_initialize(instance, *args)
|
2638
|
-
initializer = instance.method(:initialize)
|
2639
|
-
catch :newqt do
|
2640
|
-
initializer.call(*args)
|
2641
|
-
end
|
2642
|
-
end
|
2643
|
-
|
2644
|
-
# If a block was passed to the constructor, then
|
2645
|
-
# run that now. Either run the context of the new instance
|
2646
|
-
# if no args were passed to the block. Or otherwise,
|
2647
|
-
# run the block in the context of the arg.
|
2648
|
-
def Internal.run_initializer_block(instance, block)
|
2649
|
-
if block.arity == -1 || block.arity == 0
|
2650
|
-
instance.instance_eval(&block)
|
2651
|
-
elsif block.arity == 1
|
2652
|
-
block.call(instance)
|
2653
|
-
else
|
2654
|
-
raise ArgumentError, "Wrong number of arguments to block(#{block.arity} for 1)"
|
2655
|
-
end
|
2656
|
-
end
|
2657
|
-
|
2658
|
-
def Internal.do_method_missing(package, method, klass, this, *args)
|
2659
|
-
if klass.class == Module
|
2660
|
-
classname = klass.name
|
2661
|
-
else
|
2662
|
-
classname = @@cpp_names[klass.name]
|
2663
|
-
if classname.nil?
|
2664
|
-
if klass != Object and klass != Qt
|
2665
|
-
return do_method_missing(package, method, klass.superclass, this, *args)
|
2666
|
-
else
|
2667
|
-
return nil
|
2668
|
-
end
|
2669
|
-
end
|
2670
|
-
end
|
2671
|
-
|
2672
|
-
if method == "new"
|
2673
|
-
method = classname.dup
|
2674
|
-
method.gsub!(/^.*::/,"")
|
2675
|
-
end
|
2676
|
-
method = "operator" + method.sub("@","") if method !~ /[a-zA-Z]+/
|
2677
|
-
# Change foobar= to setFoobar()
|
2678
|
-
method = 'set' + method[0,1].upcase + method[1,method.length].sub("=", "") if method =~ /.*[^-+%\/|=]=$/ && method != 'operator='
|
2679
|
-
|
2680
|
-
methods = []
|
2681
|
-
methods << method.dup
|
2682
|
-
args.each do |arg|
|
2683
|
-
if arg.nil?
|
2684
|
-
# For each nil arg encountered, triple the number of munged method
|
2685
|
-
# templates, in order to cover all possible types that can match nil
|
2686
|
-
temp = []
|
2687
|
-
methods.collect! do |meth|
|
2688
|
-
temp << meth + '?'
|
2689
|
-
temp << meth + '#'
|
2690
|
-
meth << '$'
|
2691
|
-
end
|
2692
|
-
methods.concat(temp)
|
2693
|
-
elsif isObject(arg)
|
2694
|
-
methods.collect! { |meth| meth << '#' }
|
2695
|
-
elsif arg.kind_of? Array or arg.kind_of? Hash
|
2696
|
-
methods.collect! { |meth| meth << '?' }
|
2697
|
-
else
|
2698
|
-
methods.collect! { |meth| meth << '$' }
|
2699
|
-
end
|
2700
|
-
end
|
2701
|
-
|
2702
|
-
methodIds = []
|
2703
|
-
methods.collect { |meth| methodIds.concat( findMethod(classname, meth) ) }
|
2704
|
-
|
2705
|
-
if method =~ /._./ && methodIds.length == 0
|
2706
|
-
# If the method name contains underscores, convert to camel case
|
2707
|
-
# form and try again
|
2708
|
-
method.gsub!(/(.)_(.)/) {$1 + $2.upcase}
|
2709
|
-
return do_method_missing(package, method, klass, this, *args)
|
2710
|
-
end
|
2711
|
-
|
2712
|
-
if debug_level >= DebugLevel::High
|
2713
|
-
puts "classname == #{classname}"
|
2714
|
-
puts ":: method == #{method}"
|
2715
|
-
puts "-> methodIds == #{methodIds.inspect}"
|
2716
|
-
puts "candidate list:"
|
2717
|
-
prototypes = dumpCandidates(methodIds).split("\n")
|
2718
|
-
line_len = (prototypes.collect { |p| p.length }).max
|
2719
|
-
prototypes.zip(methodIds) {
|
2720
|
-
|prototype,id| puts "#{prototype.ljust line_len} (smoke: #{id.smoke} index: #{id.index})"
|
2721
|
-
}
|
2722
|
-
end
|
2723
|
-
|
2724
|
-
chosen = nil
|
2725
|
-
if methodIds.length > 0
|
2726
|
-
best_match = -1
|
2727
|
-
methodIds.each do
|
2728
|
-
|id|
|
2729
|
-
puts "matching => smoke: #{id.smoke} index: #{id.index}" if debug_level >= DebugLevel::High
|
2730
|
-
current_match = (isConstMethod(id) ? 1 : 0)
|
2731
|
-
(0...args.length).each do
|
2732
|
-
|i|
|
2733
|
-
current_match += checkarg(get_value_type(args[i]), get_arg_type_name(id, i))
|
2734
|
-
end
|
2735
|
-
|
2736
|
-
# Note that if current_match > best_match, then chosen must be nil
|
2737
|
-
if current_match > best_match
|
2738
|
-
best_match = current_match
|
2739
|
-
chosen = id
|
2740
|
-
# Multiple matches are an error; the equality test below _cannot_ be commented out.
|
2741
|
-
# If ambiguous matches occur the problem must be fixed be adjusting the relative
|
2742
|
-
# ranking of the arg types involved in checkarg().
|
2743
|
-
elsif current_match == best_match
|
2744
|
-
puts "multiple methods matching, this is an error" if debug_level >= DebugLevel::Minimal
|
2745
|
-
chosen = nil
|
2746
|
-
end
|
2747
|
-
puts "match => #{id.index} score: #{current_match}" if debug_level >= DebugLevel::High
|
2748
|
-
end
|
2749
|
-
|
2750
|
-
puts "Resolved to id: #{chosen.index}" if !chosen.nil? && debug_level >= DebugLevel::High
|
2751
|
-
end
|
2752
|
-
|
2753
|
-
if debug_level >= DebugLevel::Minimal && chosen.nil? && method !~ /^operator/
|
2754
|
-
id = find_pclassid(normalize_classname(klass.name))
|
2755
|
-
hash = findAllMethods(id)
|
2756
|
-
constructor_names = nil
|
2757
|
-
if method == classname
|
2758
|
-
puts "No matching constructor found, possibles:\n"
|
2759
|
-
constructor_names = hash.keys.grep(/^#{classname}/)
|
2760
|
-
else
|
2761
|
-
puts "Possible prototypes:"
|
2762
|
-
constructor_names = hash.keys
|
2763
|
-
end
|
2764
|
-
method_ids = hash.values_at(*constructor_names).flatten
|
2765
|
-
puts dumpCandidates(method_ids)
|
2766
|
-
else
|
2767
|
-
puts "setCurrentMethod(smokeList index: #{chosen.smoke}, meth index: #{chosen.index})" if debug_level >= DebugLevel::High
|
2768
|
-
end
|
2769
|
-
setCurrentMethod(chosen) if chosen
|
2770
|
-
return nil
|
2771
|
-
end
|
2772
|
-
|
2773
|
-
def Internal.init_all_classes()
|
2774
|
-
Qt::Internal::getClassList().each do |c|
|
2775
|
-
if c == "Qt"
|
2776
|
-
# Don't change Qt to Qt::t, just leave as is
|
2777
|
-
@@cpp_names["Qt"] = c
|
2778
|
-
elsif c != "QInternal" && !c.empty?
|
2779
|
-
Qt::Internal::init_class(c)
|
2780
|
-
end
|
2781
|
-
end
|
2782
|
-
|
2783
|
-
@@classes['Qt::Integer'] = Qt::Integer
|
2784
|
-
@@classes['Qt::Boolean'] = Qt::Boolean
|
2785
|
-
@@classes['Qt::Enum'] = Qt::Enum
|
2786
|
-
end
|
2787
|
-
|
2788
|
-
def Internal.get_qinteger(num)
|
2789
|
-
return num.value
|
2790
|
-
end
|
2791
|
-
|
2792
|
-
def Internal.set_qinteger(num, val)
|
2793
|
-
return num.value = val
|
2794
|
-
end
|
2795
|
-
|
2796
|
-
def Internal.create_qenum(num, enum_type)
|
2797
|
-
return Qt::Enum.new(num, enum_type)
|
2798
|
-
end
|
2799
|
-
|
2800
|
-
def Internal.get_qenum_type(e)
|
2801
|
-
return e.type
|
2802
|
-
end
|
2803
|
-
|
2804
|
-
def Internal.get_qboolean(b)
|
2805
|
-
return b.value
|
2806
|
-
end
|
2807
|
-
|
2808
|
-
def Internal.set_qboolean(b, val)
|
2809
|
-
return b.value = val
|
2810
|
-
end
|
2811
|
-
|
2812
|
-
def Internal.getAllParents(class_id, res)
|
2813
|
-
getIsa(class_id).each do |s|
|
2814
|
-
c = findClass(s)
|
2815
|
-
res << c
|
2816
|
-
getAllParents(c, res)
|
2817
|
-
end
|
2818
|
-
end
|
2819
|
-
|
2820
|
-
# Keeps a hash of strings against their corresponding offsets
|
2821
|
-
# within the qt_meta_stringdata sequence of null terminated
|
2822
|
-
# strings. Returns a proc to get an offset given a string.
|
2823
|
-
# That proc also adds new strings to the 'data' array, and updates
|
2824
|
-
# the corresponding 'pack_str' Array#pack template.
|
2825
|
-
def Internal.string_table_handler(data, pack_str)
|
2826
|
-
hsh = {}
|
2827
|
-
offset = 0
|
2828
|
-
return lambda do |str|
|
2829
|
-
if !hsh.has_key? str
|
2830
|
-
hsh[str] = offset
|
2831
|
-
data << str
|
2832
|
-
pack_str << "a*x"
|
2833
|
-
offset += str.length + 1
|
2834
|
-
end
|
2835
|
-
|
2836
|
-
return hsh[str]
|
2837
|
-
end
|
2838
|
-
end
|
2839
|
-
|
2840
|
-
def Internal.makeMetaData(classname, classinfos, dbus, signals, slots)
|
2841
|
-
# Each entry in 'stringdata' corresponds to a string in the
|
2842
|
-
# qt_meta_stringdata_<classname> structure.
|
2843
|
-
# 'pack_string' is used to convert 'stringdata' into the
|
2844
|
-
# binary sequence of null terminated strings for the metaObject
|
2845
|
-
stringdata = []
|
2846
|
-
pack_string = ""
|
2847
|
-
string_table = string_table_handler(stringdata, pack_string)
|
2848
|
-
|
2849
|
-
# This is used to create the array of uints that make up the
|
2850
|
-
# qt_meta_data_<classname> structure in the metaObject
|
2851
|
-
data = [1, # revision
|
2852
|
-
string_table.call(classname), # classname
|
2853
|
-
classinfos.length, classinfos.length > 0 ? 10 : 0, # classinfo
|
2854
|
-
signals.length + slots.length,
|
2855
|
-
10 + (2*classinfos.length), # methods
|
2856
|
-
0, 0, # properties
|
2857
|
-
0, 0] # enums/sets
|
2858
|
-
|
2859
|
-
classinfos.each do |entry|
|
2860
|
-
data.push string_table.call(entry[0]) # key
|
2861
|
-
data.push string_table.call(entry[1]) # value
|
2862
|
-
end
|
2863
|
-
|
2864
|
-
signals.each do |entry|
|
2865
|
-
data.push string_table.call(entry.full_name) # signature
|
2866
|
-
data.push string_table.call(entry.full_name.delete("^,")) # parameters
|
2867
|
-
data.push string_table.call(entry.reply_type) # type, "" means void
|
2868
|
-
data.push string_table.call("") # tag
|
2869
|
-
if dbus
|
2870
|
-
data.push MethodScriptable | MethodSignal | AccessPublic
|
2871
|
-
else
|
2872
|
-
data.push entry.access # flags, always protected for now
|
2873
|
-
end
|
2874
|
-
end
|
2875
|
-
|
2876
|
-
slots.each do |entry|
|
2877
|
-
data.push string_table.call(entry.full_name) # signature
|
2878
|
-
data.push string_table.call(entry.full_name.delete("^,")) # parameters
|
2879
|
-
data.push string_table.call(entry.reply_type) # type, "" means void
|
2880
|
-
data.push string_table.call("") # tag
|
2881
|
-
if dbus
|
2882
|
-
data.push MethodScriptable | MethodSlot | AccessPublic # flags, always public for now
|
2883
|
-
else
|
2884
|
-
data.push entry.access # flags, always public for now
|
2885
|
-
end
|
2886
|
-
end
|
2887
|
-
|
2888
|
-
data.push 0 # eod
|
2889
|
-
|
2890
|
-
return [stringdata.pack(pack_string), data]
|
2891
|
-
end
|
2892
|
-
|
2893
|
-
def Internal.getMetaObject(klass, qobject)
|
2894
|
-
if klass.nil?
|
2895
|
-
klass = qobject.class
|
2896
|
-
end
|
2897
|
-
|
2898
|
-
parentMeta = nil
|
2899
|
-
if @@cpp_names[klass.superclass.name].nil?
|
2900
|
-
parentMeta = getMetaObject(klass.superclass, qobject)
|
2901
|
-
end
|
2902
|
-
|
2903
|
-
meta = Meta[klass.name]
|
2904
|
-
if meta.nil?
|
2905
|
-
meta = Qt::MetaInfo.new(klass)
|
2906
|
-
end
|
2907
|
-
|
2908
|
-
if meta.metaobject.nil? or meta.changed
|
2909
|
-
stringdata, data = makeMetaData( qobject.class.name,
|
2910
|
-
meta.classinfos,
|
2911
|
-
meta.dbus,
|
2912
|
-
meta.signals,
|
2913
|
-
meta.slots )
|
2914
|
-
meta.metaobject = make_metaObject(qobject, parentMeta, stringdata, data)
|
2915
|
-
meta.changed = false
|
2916
|
-
end
|
2917
|
-
|
2918
|
-
meta.metaobject
|
2919
|
-
end
|
2920
|
-
|
2921
|
-
# Handles calls of the form:
|
2922
|
-
# connect(myobj, SIGNAL('mysig(int)'), mytarget) {|arg(s)| ...}
|
2923
|
-
# connect(myobj, SIGNAL('mysig(int)')) {|arg(s)| ...}
|
2924
|
-
# connect(myobj, SIGNAL(:mysig), mytarget) { ...}
|
2925
|
-
# connect(myobj, SIGNAL(:mysig)) { ...}
|
2926
|
-
def Internal.connect(src, signal, target, block)
|
2927
|
-
args = (signal =~ /\((.*)\)/) ? $1 : ""
|
2928
|
-
signature = Qt::MetaObject.normalizedSignature("invoke(%s)" % args).to_s
|
2929
|
-
return Qt::Object.connect( src,
|
2930
|
-
signal,
|
2931
|
-
Qt::BlockInvocation.new(target, block.to_proc, signature),
|
2932
|
-
SLOT(signature) )
|
2933
|
-
end
|
2934
|
-
|
2935
|
-
# Handles calls of the form:
|
2936
|
-
# connect(SIGNAL(:mysig)) { ...}
|
2937
|
-
# connect(SIGNAL('mysig(int)')) {|arg(s)| ...}
|
2938
|
-
def Internal.signal_connect(src, signal, block)
|
2939
|
-
args = (signal =~ /\((.*)\)/) ? $1 : ""
|
2940
|
-
signature = Qt::MetaObject.normalizedSignature("invoke(%s)" % args).to_s
|
2941
|
-
return Qt::Object.connect( src,
|
2942
|
-
signal,
|
2943
|
-
Qt::SignalBlockInvocation.new(src, block.to_proc, signature),
|
2944
|
-
SLOT(signature) )
|
2945
|
-
end
|
2946
|
-
|
2947
|
-
# Handles calls of the form:
|
2948
|
-
# connect(:mysig, mytarget, :mymethod))
|
2949
|
-
# connect(SIGNAL('mysignal(int)'), mytarget, :mymethod))
|
2950
|
-
def Internal.method_connect(src, signal, target, method)
|
2951
|
-
signal = SIGNAL(signal) if signal.is_a?Symbol
|
2952
|
-
args = (signal =~ /\((.*)\)/) ? $1 : ""
|
2953
|
-
signature = Qt::MetaObject.normalizedSignature("invoke(%s)" % args).to_s
|
2954
|
-
return Qt::Object.connect( src,
|
2955
|
-
signal,
|
2956
|
-
Qt::MethodInvocation.new(target, method, signature),
|
2957
|
-
SLOT(signature) )
|
2958
|
-
end
|
2959
|
-
|
2960
|
-
# Handles calls of the form:
|
2961
|
-
# Qt::Timer.singleShot(500, myobj) { ...}
|
2962
|
-
def Internal.single_shot_timer_connect(interval, target, block)
|
2963
|
-
return Qt::Timer.singleShot( interval,
|
2964
|
-
Qt::BlockInvocation.new(target, block, "invoke()"),
|
2965
|
-
SLOT("invoke()") )
|
2966
|
-
end
|
2967
|
-
end # Qt::Internal
|
2968
|
-
|
2969
|
-
Meta = {}
|
2970
|
-
|
2971
|
-
# An entry for each signal or slot
|
2972
|
-
# Example
|
2973
|
-
# int foobar(QString,bool)
|
2974
|
-
# :name is 'foobar'
|
2975
|
-
# :full_name is 'foobar(QString,bool)'
|
2976
|
-
# :arg_types is 'QString,bool'
|
2977
|
-
# :reply_type is 'int'
|
2978
|
-
QObjectMember = Struct.new :name, :full_name, :arg_types, :reply_type, :access
|
2979
|
-
|
2980
|
-
class MetaInfo
|
2981
|
-
attr_accessor :classinfos, :dbus, :signals, :slots, :metaobject, :mocargs, :changed
|
2982
|
-
|
2983
|
-
def initialize(klass)
|
2984
|
-
Meta[klass.name] = self
|
2985
|
-
@klass = klass
|
2986
|
-
@metaobject = nil
|
2987
|
-
@signals = []
|
2988
|
-
@slots = []
|
2989
|
-
@classinfos = []
|
2990
|
-
@dbus = false
|
2991
|
-
@changed = false
|
2992
|
-
Internal.addMetaObjectMethods(klass)
|
2993
|
-
end
|
2994
|
-
|
2995
|
-
def add_signals(signal_list, access)
|
2996
|
-
signal_names = []
|
2997
|
-
signal_list.each do |signal|
|
2998
|
-
if signal.kind_of? Symbol
|
2999
|
-
signal = signal.to_s + "()"
|
3000
|
-
end
|
3001
|
-
signal = Qt::MetaObject.normalizedSignature(signal).to_s
|
3002
|
-
if signal =~ /^(([\w,<>:]*)\s+)?([^\s]*)\((.*)\)/
|
3003
|
-
@signals.push QObjectMember.new( $3,
|
3004
|
-
$3 + "(" + $4 + ")",
|
3005
|
-
$4,
|
3006
|
-
($2 == 'void' || $2.nil?) ? "" : $2,
|
3007
|
-
access )
|
3008
|
-
signal_names << $3
|
3009
|
-
else
|
3010
|
-
qWarning( "#{@klass.name}: Invalid signal format: '#{signal}'" )
|
3011
|
-
end
|
3012
|
-
end
|
3013
|
-
Internal.addSignalMethods(@klass, signal_names)
|
3014
|
-
end
|
3015
|
-
|
3016
|
-
# Return a list of signals, including inherited ones
|
3017
|
-
def get_signals
|
3018
|
-
all_signals = []
|
3019
|
-
current = @klass
|
3020
|
-
while current != Qt::Base
|
3021
|
-
meta = Meta[current.name]
|
3022
|
-
if !meta.nil?
|
3023
|
-
all_signals.concat meta.signals
|
3024
|
-
end
|
3025
|
-
current = current.superclass
|
3026
|
-
end
|
3027
|
-
return all_signals
|
3028
|
-
end
|
3029
|
-
|
3030
|
-
def add_slots(slot_list, access)
|
3031
|
-
slot_list.each do |slot|
|
3032
|
-
if slot.kind_of? Symbol
|
3033
|
-
slot = slot.to_s + "()"
|
3034
|
-
end
|
3035
|
-
slot = Qt::MetaObject.normalizedSignature(slot).to_s
|
3036
|
-
if slot =~ /^(([\w,<>:]*)\s+)?([^\s]*)\((.*)\)/
|
3037
|
-
@slots.push QObjectMember.new( $3,
|
3038
|
-
$3 + "(" + $4 + ")",
|
3039
|
-
$4,
|
3040
|
-
($2 == 'void' || $2.nil?) ? "" : $2,
|
3041
|
-
access )
|
3042
|
-
else
|
3043
|
-
qWarning( "#{@klass.name}: Invalid slot format: '#{slot}'" )
|
3044
|
-
end
|
3045
|
-
end
|
3046
|
-
end
|
3047
|
-
|
3048
|
-
def add_classinfo(key, value)
|
3049
|
-
@classinfos.push [key, value]
|
3050
|
-
if key == 'D-Bus Interface'
|
3051
|
-
@dbus = true
|
3052
|
-
end
|
3053
|
-
end
|
3054
|
-
end # Qt::MetaInfo
|
3055
|
-
|
3056
|
-
# These values are from the enum WindowType in qnamespace.h.
|
3057
|
-
# Some of the names such as 'Qt::Dialog', clash with QtRuby
|
3058
|
-
# class names. So add some constants here to use instead,
|
3059
|
-
# renamed with an ending of 'Type'.
|
3060
|
-
WidgetType = 0x00000000
|
3061
|
-
WindowType = 0x00000001
|
3062
|
-
DialogType = 0x00000002 | WindowType
|
3063
|
-
SheetType = 0x00000004 | WindowType
|
3064
|
-
DrawerType = 0x00000006 | WindowType
|
3065
|
-
PopupType = 0x00000008 | WindowType
|
3066
|
-
ToolType = 0x0000000a | WindowType
|
3067
|
-
ToolTipType = 0x0000000c | WindowType
|
3068
|
-
SplashScreenType = 0x0000000e | WindowType
|
3069
|
-
DesktopType = 0x00000010 | WindowType
|
3070
|
-
SubWindowType = 0x00000012
|
3071
|
-
|
3072
|
-
end # Qt
|
3073
|
-
|
3074
|
-
class Object
|
3075
|
-
def SIGNAL(signal)
|
3076
|
-
if signal.kind_of? Symbol
|
3077
|
-
return "2" + signal.to_s + "()"
|
3078
|
-
else
|
3079
|
-
return "2" + signal
|
3080
|
-
end
|
3081
|
-
end
|
3082
|
-
|
3083
|
-
def SLOT(slot)
|
3084
|
-
if slot.kind_of? Symbol
|
3085
|
-
return "1" + slot.to_s + "()"
|
3086
|
-
else
|
3087
|
-
return "1" + slot
|
3088
|
-
end
|
3089
|
-
end
|
3090
|
-
|
3091
|
-
def emit(signal)
|
3092
|
-
return signal
|
3093
|
-
end
|
3094
|
-
|
3095
|
-
def QT_TR_NOOP(x) x end
|
3096
|
-
def QT_TRANSLATE_NOOP(scope, x) x end
|
3097
|
-
|
3098
|
-
# See the discussion here: http://eigenclass.org/hiki.rb?instance_exec
|
3099
|
-
# about implementations of the ruby 1.9 method instance_exec(). This
|
3100
|
-
# version is the one from Rails. It isn't thread safe, but that doesn't
|
3101
|
-
# matter for the intended use in invoking blocks as Qt slots.
|
3102
|
-
def instance_exec(*arguments, &block)
|
3103
|
-
block.bind(self)[*arguments]
|
3104
|
-
end unless defined? instance_exec
|
3105
|
-
end
|
3106
|
-
|
3107
|
-
class Proc
|
3108
|
-
# Part of the Rails Object#instance_exec implementation
|
3109
|
-
def bind(object)
|
3110
|
-
block, time = self, Time.now
|
3111
|
-
(class << object; self end).class_eval do
|
3112
|
-
method_name = "__bind_#{time.to_i}_#{time.usec}"
|
3113
|
-
define_method(method_name, &block)
|
3114
|
-
method = instance_method(method_name)
|
3115
|
-
remove_method(method_name)
|
3116
|
-
method
|
3117
|
-
end.bind(object)
|
3118
|
-
end
|
3119
|
-
end
|
3120
|
-
|
3121
|
-
class Module
|
3122
|
-
alias_method :_constants, :constants
|
3123
|
-
alias_method :_instance_methods, :instance_methods
|
3124
|
-
alias_method :_protected_instance_methods, :protected_instance_methods
|
3125
|
-
alias_method :_public_instance_methods, :public_instance_methods
|
3126
|
-
|
3127
|
-
private :_constants, :_instance_methods
|
3128
|
-
private :_protected_instance_methods, :_public_instance_methods
|
3129
|
-
|
3130
|
-
def constants
|
3131
|
-
qt_methods(_constants, 0x10, true)
|
3132
|
-
end
|
3133
|
-
|
3134
|
-
def instance_methods(inc_super=true)
|
3135
|
-
qt_methods(_instance_methods(inc_super), 0x0, inc_super)
|
3136
|
-
end
|
3137
|
-
|
3138
|
-
def protected_instance_methods(inc_super=true)
|
3139
|
-
qt_methods(_protected_instance_methods(inc_super), 0x80, inc_super)
|
3140
|
-
end
|
3141
|
-
|
3142
|
-
def public_instance_methods(inc_super=true)
|
3143
|
-
qt_methods(_public_instance_methods(inc_super), 0x0, inc_super)
|
3144
|
-
end
|
3145
|
-
|
3146
|
-
private
|
3147
|
-
def qt_methods(meths, flags, inc_super=true)
|
3148
|
-
if !self.kind_of? Class
|
3149
|
-
return meths
|
3150
|
-
end
|
3151
|
-
|
3152
|
-
klass = self
|
3153
|
-
classid = Qt::Internal::ModuleIndex.new(0, 0)
|
3154
|
-
loop do
|
3155
|
-
classid = Qt::Internal::find_pclassid(klass.name)
|
3156
|
-
break if classid.index
|
3157
|
-
|
3158
|
-
klass = klass.superclass
|
3159
|
-
if klass.nil?
|
3160
|
-
return meths
|
3161
|
-
end
|
3162
|
-
end
|
3163
|
-
|
3164
|
-
# These methods are all defined in Qt::Base, even if they aren't supported by a particular
|
3165
|
-
# subclass, so remove them to avoid confusion
|
3166
|
-
meths -= ["%", "&", "*", "**", "+", "-", "-@", "/", "<", "<<", "<=", ">", ">=", ">>", "|", "~", "^"]
|
3167
|
-
ids = []
|
3168
|
-
if inc_super
|
3169
|
-
Qt::Internal::getAllParents(classid, ids)
|
3170
|
-
end
|
3171
|
-
ids << classid
|
3172
|
-
ids.each { |c| Qt::Internal::findAllMethodNames(meths, c, flags) }
|
3173
|
-
return meths.uniq
|
3174
|
-
end
|
3175
|
-
end
|
3176
|
-
|
3177
|
-
# kate: space-indent false;
|