qtbindings 4.8.6.1-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.txt +48 -0
- data/COPYING.LIB.txt +510 -0
- data/COPYING.txt +286 -0
- data/KNOWN_ISSUES.txt +17 -0
- data/Rakefile +121 -0
- data/TODO.txt +2 -0
- data/bin/2.0/rbrcc.exe +0 -0
- data/bin/2.0/rbuic4.exe +0 -0
- data/bin/2.0/smokeapi.exe +0 -0
- data/bin/2.0/smokedeptool.exe +0 -0
- data/bin/2.1/rbrcc.exe +0 -0
- data/bin/2.1/rbuic4.exe +0 -0
- data/bin/2.1/smokeapi.exe +0 -0
- data/bin/2.1/smokedeptool.exe +0 -0
- data/bin/2.2/rbrcc.exe +0 -0
- data/bin/2.2/rbuic4.exe +0 -0
- data/bin/2.2/smokeapi.exe +0 -0
- data/bin/2.2/smokedeptool.exe +0 -0
- data/bin/rbqtapi +152 -0
- data/bin/rbrcc +14 -0
- data/bin/rbuic4 +14 -0
- data/bin/smokeapi +14 -0
- data/bin/smokedeptool +14 -0
- data/examples/designer/calculatorbuilder/calculatorbuilder.qrc +5 -0
- data/examples/designer/calculatorbuilder/calculatorform.rb +60 -0
- data/examples/designer/calculatorbuilder/calculatorform.ui +299 -0
- data/examples/designer/calculatorbuilder/main.rb +34 -0
- data/examples/designer/calculatorbuilder/makefile +2 -0
- data/examples/designer/calculatorform/calculatorform.rb +46 -0
- data/examples/designer/calculatorform/calculatorform.ui +277 -0
- data/examples/designer/calculatorform/main.rb +32 -0
- data/examples/designer/calculatorform/makefile +3 -0
- data/examples/desktop/screenshot/main.rb +32 -0
- data/examples/desktop/screenshot/screenshot.rb +157 -0
- data/examples/desktop/systray/images/bad.svg +64 -0
- data/examples/desktop/systray/images/heart.svg +55 -0
- data/examples/desktop/systray/images/trash.svg +58 -0
- data/examples/desktop/systray/main.rb +41 -0
- data/examples/desktop/systray/makefile +2 -0
- data/examples/desktop/systray/systray.qrc +7 -0
- data/examples/desktop/systray/window.rb +219 -0
- data/examples/dialogs/complexwizard/complexwizard.rb +140 -0
- data/examples/dialogs/complexwizard/licensewizard.rb +294 -0
- data/examples/dialogs/complexwizard/main.rb +31 -0
- data/examples/dialogs/configdialog/configdialog.rb +109 -0
- data/examples/dialogs/configdialog/images/config.png +0 -0
- data/examples/dialogs/configdialog/images/query.png +0 -0
- data/examples/dialogs/configdialog/images/update.png +0 -0
- data/examples/dialogs/configdialog/main.rb +31 -0
- data/examples/dialogs/configdialog/pages.rb +140 -0
- data/examples/dialogs/extension/finddialog.rb +89 -0
- data/examples/dialogs/extension/main.rb +31 -0
- data/examples/dialogs/findfiles/main.rb +32 -0
- data/examples/dialogs/findfiles/window.rb +177 -0
- data/examples/dialogs/simplewizard/classwizard.rb +374 -0
- data/examples/dialogs/simplewizard/main.rb +31 -0
- data/examples/dialogs/simplewizard/simplewizard.rb +110 -0
- data/examples/dialogs/standarddialogs/dialog.rb +340 -0
- data/examples/dialogs/standarddialogs/main.rb +31 -0
- data/examples/dialogs/tabdialog/main.rb +38 -0
- data/examples/dialogs/tabdialog/tabdialog.rb +178 -0
- data/examples/draganddrop/draggableicons/dragwidget.rb +125 -0
- data/examples/draganddrop/draggableicons/images/boat.png +0 -0
- data/examples/draganddrop/draggableicons/images/car.png +0 -0
- data/examples/draganddrop/draggableicons/images/house.png +0 -0
- data/examples/draganddrop/draggableicons/main.rb +41 -0
- data/examples/draganddrop/draggabletext/draglabel.rb +51 -0
- data/examples/draganddrop/draggabletext/dragwidget.rb +94 -0
- data/examples/draganddrop/draggabletext/main.rb +33 -0
- data/examples/draganddrop/draggabletext/words.txt +41 -0
- data/examples/draganddrop/dropsite/dropsitewidget.rb +99 -0
- data/examples/draganddrop/dropsite/dropsitewindow.rb +114 -0
- data/examples/draganddrop/dropsite/main.rb +33 -0
- data/examples/draganddrop/fridgemagnets/draglabel.rb +78 -0
- data/examples/draganddrop/fridgemagnets/dragwidget.rb +130 -0
- data/examples/draganddrop/fridgemagnets/main.rb +33 -0
- data/examples/draganddrop/fridgemagnets/words.txt +48 -0
- data/examples/draganddrop/puzzle/example.jpg +0 -0
- data/examples/draganddrop/puzzle/main.rb +33 -0
- data/examples/draganddrop/puzzle/mainwindow.rb +136 -0
- data/examples/draganddrop/puzzle/pieceslist.rb +95 -0
- data/examples/draganddrop/puzzle/puzzlewidget.rb +190 -0
- data/examples/graphicsview/collidingmice/images/cheese.jpg +0 -0
- data/examples/graphicsview/collidingmice/main.rb +53 -0
- data/examples/graphicsview/collidingmice/makefile +2 -0
- data/examples/graphicsview/collidingmice/mice.qrc +5 -0
- data/examples/graphicsview/collidingmice/mouse.rb +176 -0
- data/examples/graphicsview/dragdroprobot/coloritem.rb +86 -0
- data/examples/graphicsview/dragdroprobot/images/head.png +0 -0
- data/examples/graphicsview/dragdroprobot/main.rb +57 -0
- data/examples/graphicsview/dragdroprobot/makefile +2 -0
- data/examples/graphicsview/dragdroprobot/robot.qrc +5 -0
- data/examples/graphicsview/dragdroprobot/robot.rb +246 -0
- data/examples/itemviews/chart/chart.qrc +5 -0
- data/examples/itemviews/chart/main.rb +33 -0
- data/examples/itemviews/chart/mainwindow.rb +151 -0
- data/examples/itemviews/chart/makefile +2 -0
- data/examples/itemviews/chart/mydata.cht +8 -0
- data/examples/itemviews/chart/pieview.rb +516 -0
- data/examples/itemviews/chart/qtdata.cht +14 -0
- data/examples/itemviews/dirview/main.rb +39 -0
- data/examples/itemviews/pixelator/imagemodel.rb +51 -0
- data/examples/itemviews/pixelator/images.qrc +5 -0
- data/examples/itemviews/pixelator/images/qt.png +0 -0
- data/examples/itemviews/pixelator/main.rb +34 -0
- data/examples/itemviews/pixelator/mainwindow.rb +218 -0
- data/examples/itemviews/pixelator/makefile +3 -0
- data/examples/itemviews/pixelator/pixeldelegate.rb +67 -0
- data/examples/itemviews/puzzle/example.jpg +0 -0
- data/examples/itemviews/puzzle/main.rb +36 -0
- data/examples/itemviews/puzzle/mainwindow.rb +143 -0
- data/examples/itemviews/puzzle/piecesmodel.rb +174 -0
- data/examples/itemviews/puzzle/puzzlewidget.rb +192 -0
- data/examples/itemviews/simpledommodel/domitem.rb +62 -0
- data/examples/itemviews/simpledommodel/dommodel.rb +139 -0
- data/examples/itemviews/simpledommodel/main.rb +33 -0
- data/examples/itemviews/simpledommodel/mainwindow.rb +66 -0
- data/examples/itemviews/simpletreemodel/default.txt +40 -0
- data/examples/itemviews/simpletreemodel/main.rb +41 -0
- data/examples/itemviews/simpletreemodel/makefile +2 -0
- data/examples/itemviews/simpletreemodel/simpletreemodel.qrc +5 -0
- data/examples/itemviews/simpletreemodel/treeitem.rb +67 -0
- data/examples/itemviews/simpletreemodel/treemodel.rb +164 -0
- data/examples/itemviews/sortingmodel/default.txt +40 -0
- data/examples/itemviews/sortingmodel/main.rb +53 -0
- data/examples/itemviews/sortingmodel/treeitem.rb +73 -0
- data/examples/itemviews/sortingmodel/treemodel.rb +166 -0
- data/examples/itemviews/spinboxdelegate/main.rb +47 -0
- data/examples/itemviews/spinboxdelegate/spinboxdelegate.rb +62 -0
- data/examples/killerfilter/killerfilter.rb +55 -0
- data/examples/layouts/basiclayouts/dialog.rb +110 -0
- data/examples/layouts/basiclayouts/main.rb +31 -0
- data/examples/layouts/borderlayout/borderlayout.rb +190 -0
- data/examples/layouts/borderlayout/main.rb +32 -0
- data/examples/layouts/borderlayout/window.rb +52 -0
- data/examples/layouts/flowlayouts/flowlayout.rb +108 -0
- data/examples/layouts/flowlayouts/main.rb +32 -0
- data/examples/layouts/flowlayouts/window.rb +43 -0
- data/examples/mainwindows/application/images/copy.png +0 -0
- data/examples/mainwindows/application/images/cut.png +0 -0
- data/examples/mainwindows/application/images/new.png +0 -0
- data/examples/mainwindows/application/images/open.png +0 -0
- data/examples/mainwindows/application/images/paste.png +0 -0
- data/examples/mainwindows/application/images/save.png +0 -0
- data/examples/mainwindows/application/main.rb +32 -0
- data/examples/mainwindows/application/mainwindow.rb +285 -0
- data/examples/mainwindows/dockwidgets/images/new.png +0 -0
- data/examples/mainwindows/dockwidgets/images/print.png +0 -0
- data/examples/mainwindows/dockwidgets/images/save.png +0 -0
- data/examples/mainwindows/dockwidgets/images/undo.png +0 -0
- data/examples/mainwindows/dockwidgets/main.rb +32 -0
- data/examples/mainwindows/dockwidgets/mainwindow.rb +302 -0
- data/examples/mainwindows/mdi/images/copy.png +0 -0
- data/examples/mainwindows/mdi/images/cut.png +0 -0
- data/examples/mainwindows/mdi/images/new.png +0 -0
- data/examples/mainwindows/mdi/images/open.png +0 -0
- data/examples/mainwindows/mdi/images/paste.png +0 -0
- data/examples/mainwindows/mdi/images/save.png +0 -0
- data/examples/mainwindows/mdi/main.rb +32 -0
- data/examples/mainwindows/mdi/mainwindow.rb +363 -0
- data/examples/mainwindows/mdi/mdichild.rb +152 -0
- data/examples/mainwindows/menus/main.rb +32 -0
- data/examples/mainwindows/menus/mainwindow.rb +327 -0
- data/examples/mainwindows/recentfiles/main.rb +32 -0
- data/examples/mainwindows/recentfiles/mainwindow.rb +258 -0
- data/examples/mainwindows/sdi/images/copy.png +0 -0
- data/examples/mainwindows/sdi/images/cut.png +0 -0
- data/examples/mainwindows/sdi/images/new.png +0 -0
- data/examples/mainwindows/sdi/images/open.png +0 -0
- data/examples/mainwindows/sdi/images/paste.png +0 -0
- data/examples/mainwindows/sdi/images/save.png +0 -0
- data/examples/mainwindows/sdi/main.rb +32 -0
- data/examples/mainwindows/sdi/mainwindow.rb +335 -0
- data/examples/network/broadcastreceiver/main.rb +32 -0
- data/examples/network/broadcastreceiver/receiver.rb +64 -0
- data/examples/network/broadcastsender/main.rb +32 -0
- data/examples/network/broadcastsender/sender.rb +72 -0
- data/examples/network/fortuneclient/client.rb +149 -0
- data/examples/network/fortuneclient/main.rb +32 -0
- data/examples/network/fortuneserver/main.rb +32 -0
- data/examples/network/fortuneserver/server.rb +88 -0
- data/examples/network/ftp/ftpwindow.rb +259 -0
- data/examples/network/ftp/images/cdtoparent.png +0 -0
- data/examples/network/ftp/images/dir.png +0 -0
- data/examples/network/ftp/images/file.png +0 -0
- data/examples/network/ftp/main.rb +32 -0
- data/examples/network/http/httpwindow.rb +187 -0
- data/examples/network/http/main.rb +32 -0
- data/examples/network/loopback/dialog.rb +163 -0
- data/examples/network/loopback/main.rb +32 -0
- data/examples/opengl/grabber/glwidget.rb +265 -0
- data/examples/opengl/grabber/main.rb +32 -0
- data/examples/opengl/grabber/mainwindow.rb +189 -0
- data/examples/opengl/hellogl/glwidget.rb +226 -0
- data/examples/opengl/hellogl/main.rb +32 -0
- data/examples/opengl/hellogl/window.rb +66 -0
- data/examples/opengl/textures/glwidget.rb +151 -0
- data/examples/opengl/textures/images/side1.png +0 -0
- data/examples/opengl/textures/images/side2.png +0 -0
- data/examples/opengl/textures/images/side3.png +0 -0
- data/examples/opengl/textures/images/side4.png +0 -0
- data/examples/opengl/textures/images/side5.png +0 -0
- data/examples/opengl/textures/images/side6.png +0 -0
- data/examples/opengl/textures/main.rb +32 -0
- data/examples/opengl/textures/window.rb +77 -0
- data/examples/painting/basicdrawing/images/brick.png +0 -0
- data/examples/painting/basicdrawing/images/qt-logo.png +0 -0
- data/examples/painting/basicdrawing/main.rb +32 -0
- data/examples/painting/basicdrawing/renderarea.rb +166 -0
- data/examples/painting/basicdrawing/window.rb +215 -0
- data/examples/painting/concentriccircles/circlewidget.rb +88 -0
- data/examples/painting/concentriccircles/main.rb +32 -0
- data/examples/painting/concentriccircles/window.rb +72 -0
- data/examples/painting/fontsampler/main.rb +32 -0
- data/examples/painting/fontsampler/mainwindow.rb +369 -0
- data/examples/painting/fontsampler/mainwindowbase.ui +136 -0
- data/examples/painting/fontsampler/makefile +8 -0
- data/examples/painting/fontsampler/previewdialog.rb +257 -0
- data/examples/painting/fontsampler/previewdialogbase.ui +224 -0
- data/examples/painting/fontsampler/previewlabel.rb +43 -0
- data/examples/painting/imagecomposition/imagecomposer.rb +152 -0
- data/examples/painting/imagecomposition/imagecomposition.qrc +6 -0
- data/examples/painting/imagecomposition/images/background.png +0 -0
- data/examples/painting/imagecomposition/images/blackrectangle.png +0 -0
- data/examples/painting/imagecomposition/images/butterfly.png +0 -0
- data/examples/painting/imagecomposition/images/checker.png +0 -0
- data/examples/painting/imagecomposition/main.rb +33 -0
- data/examples/painting/imagecomposition/makefile +2 -0
- data/examples/painting/painterpaths/main.rb +32 -0
- data/examples/painting/painterpaths/renderarea.rb +97 -0
- data/examples/painting/painterpaths/window.rb +247 -0
- data/examples/painting/svgviewer/files/bubbles.svg +212 -0
- data/examples/painting/svgviewer/files/cubic.svg +77 -0
- data/examples/painting/svgviewer/files/spheres.svg +79 -0
- data/examples/painting/svgviewer/main.rb +38 -0
- data/examples/painting/svgviewer/mainwindow.rb +99 -0
- data/examples/painting/svgviewer/makefile +2 -0
- data/examples/painting/svgviewer/svgview.rb +156 -0
- data/examples/painting/svgviewer/svgviewer.qrc +6 -0
- data/examples/painting/svgviewer/svgwindow.rb +87 -0
- data/examples/painting/transformations/main.rb +32 -0
- data/examples/painting/transformations/renderarea.rb +127 -0
- data/examples/painting/transformations/window.rb +153 -0
- data/examples/passivepopup/passivepopup.rb +38 -0
- data/examples/qdbus/chat/chat.rb +146 -0
- data/examples/qdbus/chat/chat_adaptor.rb +12 -0
- data/examples/qdbus/chat/chat_interface.rb +13 -0
- data/examples/qdbus/chat/chatmainwindow.ui +184 -0
- data/examples/qdbus/chat/chatsetnickname.ui +145 -0
- data/examples/qdbus/chat/makefile +8 -0
- data/examples/qdbus/complexpingpong/complexping.rb +92 -0
- data/examples/qdbus/complexpingpong/complexpong.rb +83 -0
- data/examples/qdbus/complexpingpong/ping-common.rb +1 -0
- data/examples/qdbus/listnames/listnames.rb +69 -0
- data/examples/qdbus/pingpong/ping-common.rb +1 -0
- data/examples/qdbus/pingpong/ping.rb +52 -0
- data/examples/qdbus/pingpong/pong.rb +55 -0
- data/examples/qdbus/remotecontrolledcar/car/car.rb +151 -0
- data/examples/qdbus/remotecontrolledcar/car/main.rb +50 -0
- data/examples/qdbus/remotecontrolledcar/controller/controller.rb +66 -0
- data/examples/qdbus/remotecontrolledcar/controller/controller.ui +61 -0
- data/examples/qdbus/remotecontrolledcar/controller/main.rb +32 -0
- data/examples/qdbus/remotecontrolledcar/controller/makefile +2 -0
- data/examples/qtscribble/scribble.rb +270 -0
- data/examples/richtext/calendar/main.rb +33 -0
- data/examples/richtext/calendar/mainwindow.rb +173 -0
- data/examples/richtext/orderform/detailsdialog.rb +130 -0
- data/examples/richtext/orderform/main.rb +34 -0
- data/examples/richtext/orderform/mainwindow.rb +194 -0
- data/examples/richtext/syntaxhighlighter/examples/example +79 -0
- data/examples/richtext/syntaxhighlighter/highlighter.rb +90 -0
- data/examples/richtext/syntaxhighlighter/main.rb +34 -0
- data/examples/richtext/syntaxhighlighter/mainwindow.rb +105 -0
- data/examples/ruboids/LICENSE.txt +58 -0
- data/examples/ruboids/Manifest +26 -0
- data/examples/ruboids/README +53 -0
- data/examples/ruboids/TODO +29 -0
- data/examples/ruboids/boids.properties +33 -0
- data/examples/ruboids/generateManifest.rb +42 -0
- data/examples/ruboids/index.html +147 -0
- data/examples/ruboids/release.rb +152 -0
- data/examples/ruboids/ruboids/Boid.rb +141 -0
- data/examples/ruboids/ruboids/BoidView.rb +159 -0
- data/examples/ruboids/ruboids/Camera.rb +24 -0
- data/examples/ruboids/ruboids/CameraDialog.rb +218 -0
- data/examples/ruboids/ruboids/Canvas.rb +143 -0
- data/examples/ruboids/ruboids/Cloud.rb +61 -0
- data/examples/ruboids/ruboids/CloudView.rb +54 -0
- data/examples/ruboids/ruboids/Flock.rb +47 -0
- data/examples/ruboids/ruboids/Graphics.rb +278 -0
- data/examples/ruboids/ruboids/Params.rb +87 -0
- data/examples/ruboids/ruboids/Point.rb +153 -0
- data/examples/ruboids/ruboids/Thing.rb +34 -0
- data/examples/ruboids/ruboids/Triangle.rb +21 -0
- data/examples/ruboids/ruboids/View.rb +88 -0
- data/examples/ruboids/ruboids/World.rb +82 -0
- data/examples/ruboids/ruboids/WorldWindow.rb +52 -0
- data/examples/ruboids/ruboids/info.rb +12 -0
- data/examples/ruboids/ruboids/ruboids.rb +29 -0
- data/examples/run_all.rb +15 -0
- data/examples/threading/main_thread.rb +19 -0
- data/examples/tutorial/t1/t1.rb +10 -0
- data/examples/tutorial/t10/cannon.rb +72 -0
- data/examples/tutorial/t10/lcdrange.rb +45 -0
- data/examples/tutorial/t10/t10.rb +55 -0
- data/examples/tutorial/t11/cannon.rb +124 -0
- data/examples/tutorial/t11/lcdrange.rb +45 -0
- data/examples/tutorial/t11/t11.rb +65 -0
- data/examples/tutorial/t12/cannon.rb +158 -0
- data/examples/tutorial/t12/lcdrange.rb +59 -0
- data/examples/tutorial/t12/t12.rb +66 -0
- data/examples/tutorial/t13/cannon.rb +208 -0
- data/examples/tutorial/t13/gamebrd.rb +113 -0
- data/examples/tutorial/t13/lcdrange.rb +60 -0
- data/examples/tutorial/t13/t13.rb +11 -0
- data/examples/tutorial/t14/cannon.rb +263 -0
- data/examples/tutorial/t14/gamebrd.rb +123 -0
- data/examples/tutorial/t14/lcdrange.rb +63 -0
- data/examples/tutorial/t14/t14.rb +11 -0
- data/examples/tutorial/t2/t2.rb +16 -0
- data/examples/tutorial/t3/t3.rb +18 -0
- data/examples/tutorial/t4/t4.rb +25 -0
- data/examples/tutorial/t5/t5.rb +37 -0
- data/examples/tutorial/t6/t6.rb +52 -0
- data/examples/tutorial/t7/lcdrange.rb +32 -0
- data/examples/tutorial/t7/t7.rb +42 -0
- data/examples/tutorial/t8/cannon.rb +38 -0
- data/examples/tutorial/t8/lcdrange.rb +45 -0
- data/examples/tutorial/t8/t8.rb +43 -0
- data/examples/tutorial/t9/cannon.rb +45 -0
- data/examples/tutorial/t9/lcdrange.rb +46 -0
- data/examples/tutorial/t9/t9.rb +43 -0
- data/examples/widgets/analogclock/analogclock.rb +94 -0
- data/examples/widgets/analogclock/main.rb +9 -0
- data/examples/widgets/calculator/button.rb +45 -0
- data/examples/widgets/calculator/calculator.rb +382 -0
- data/examples/widgets/calculator/main.rb +32 -0
- data/examples/widgets/charactermap/characterwidget.rb +110 -0
- data/examples/widgets/charactermap/main.rb +32 -0
- data/examples/widgets/charactermap/mainwindow.rb +118 -0
- data/examples/widgets/digitalclock/digitalclock.rb +30 -0
- data/examples/widgets/digitalclock/main.rb +9 -0
- data/examples/widgets/groupbox/main.rb +32 -0
- data/examples/widgets/groupbox/window.rb +134 -0
- data/examples/widgets/icons/iconpreviewarea.rb +111 -0
- data/examples/widgets/icons/iconsizespinbox.rb +39 -0
- data/examples/widgets/icons/imagedelegate.rb +73 -0
- data/examples/widgets/icons/images/designer.png +0 -0
- data/examples/widgets/icons/images/find_disabled.png +0 -0
- data/examples/widgets/icons/images/find_normal.png +0 -0
- data/examples/widgets/icons/images/monkey_off_128x128.png +0 -0
- data/examples/widgets/icons/images/monkey_off_16x16.png +0 -0
- data/examples/widgets/icons/images/monkey_off_32x32.png +0 -0
- data/examples/widgets/icons/images/monkey_off_64x64.png +0 -0
- data/examples/widgets/icons/images/monkey_on_128x128.png +0 -0
- data/examples/widgets/icons/images/monkey_on_16x16.png +0 -0
- data/examples/widgets/icons/images/monkey_on_32x32.png +0 -0
- data/examples/widgets/icons/images/monkey_on_64x64.png +0 -0
- data/examples/widgets/icons/images/qtopia_16x16.png +0 -0
- data/examples/widgets/icons/images/qtopia_32x32.png +0 -0
- data/examples/widgets/icons/images/qtopia_48x48.png +0 -0
- data/examples/widgets/icons/main.rb +32 -0
- data/examples/widgets/icons/mainwindow.rb +351 -0
- data/examples/widgets/imageviewer/imageviewer.rb +219 -0
- data/examples/widgets/imageviewer/main.rb +32 -0
- data/examples/widgets/lineedits/main.rb +32 -0
- data/examples/widgets/lineedits/window.rb +199 -0
- data/examples/widgets/movie/images/open.png +0 -0
- data/examples/widgets/movie/images/pause.png +0 -0
- data/examples/widgets/movie/images/play.png +0 -0
- data/examples/widgets/movie/images/quit.png +0 -0
- data/examples/widgets/movie/images/stop.png +0 -0
- data/examples/widgets/movie/main.rb +32 -0
- data/examples/widgets/movie/movieplayer.rb +201 -0
- data/examples/widgets/movie/movies/fire.mng +0 -0
- data/examples/widgets/screenshot/main.rb +32 -0
- data/examples/widgets/screenshot/screenshot.rb +155 -0
- data/examples/widgets/scribble/main.rb +32 -0
- data/examples/widgets/scribble/mainwindow.rb +202 -0
- data/examples/widgets/scribble/scribblearea.rb +154 -0
- data/examples/widgets/sliders/main.rb +32 -0
- data/examples/widgets/sliders/slidersgroup.rb +97 -0
- data/examples/widgets/sliders/window.rb +124 -0
- data/examples/widgets/spinboxes/main.rb +32 -0
- data/examples/widgets/spinboxes/window.rb +213 -0
- data/examples/widgets/tetrix/main.rb +33 -0
- data/examples/widgets/tetrix/tetrixboard.rb +346 -0
- data/examples/widgets/tetrix/tetrixpiece.rb +135 -0
- data/examples/widgets/tetrix/tetrixwindow.rb +88 -0
- data/examples/widgets/tooltips/images/circle.png +0 -0
- data/examples/widgets/tooltips/images/square.png +0 -0
- data/examples/widgets/tooltips/images/triangle.png +0 -0
- data/examples/widgets/tooltips/main.rb +32 -0
- data/examples/widgets/tooltips/shapeitem.rb +31 -0
- data/examples/widgets/tooltips/sortingbox.rb +222 -0
- data/examples/widgets/wiggly/dialog.rb +48 -0
- data/examples/widgets/wiggly/main.rb +9 -0
- data/examples/widgets/wiggly/wigglywidget.rb +76 -0
- data/examples/widgets/windowflags/controllerwindow.rb +195 -0
- data/examples/widgets/windowflags/main.rb +32 -0
- data/examples/widgets/windowflags/previewwindow.rb +103 -0
- data/examples/xml/dombookmarks/frank.xbel +230 -0
- data/examples/xml/dombookmarks/jennifer.xbel +93 -0
- data/examples/xml/dombookmarks/main.rb +34 -0
- data/examples/xml/dombookmarks/mainwindow.rb +129 -0
- data/examples/xml/dombookmarks/xbeltree.rb +172 -0
- data/examples/xml/saxbookmarks/frank.xbel +230 -0
- data/examples/xml/saxbookmarks/jennifer.xbel +93 -0
- data/examples/xml/saxbookmarks/main.rb +34 -0
- data/examples/xml/saxbookmarks/mainwindow.rb +144 -0
- data/examples/xml/saxbookmarks/xbelgenerator.rb +95 -0
- data/examples/xml/saxbookmarks/xbelhandler.rb +122 -0
- data/extconf.rb +256 -0
- data/lib/2.0/libqtruby4shared.dll +0 -0
- data/lib/2.0/libsmokebase.dll +0 -0
- data/lib/2.0/libsmokeqtcore.dll +0 -0
- data/lib/2.0/libsmokeqtdeclarative.dll +0 -0
- data/lib/2.0/libsmokeqtgui.dll +0 -0
- data/lib/2.0/libsmokeqthelp.dll +0 -0
- data/lib/2.0/libsmokeqtmultimedia.dll +0 -0
- data/lib/2.0/libsmokeqtnetwork.dll +0 -0
- data/lib/2.0/libsmokeqtopengl.dll +0 -0
- data/lib/2.0/libsmokeqtscript.dll +0 -0
- data/lib/2.0/libsmokeqtsql.dll +0 -0
- data/lib/2.0/libsmokeqtsvg.dll +0 -0
- data/lib/2.0/libsmokeqttest.dll +0 -0
- data/lib/2.0/libsmokeqtuitools.dll +0 -0
- data/lib/2.0/libsmokeqtwebkit.dll +0 -0
- data/lib/2.0/libsmokeqtxml.dll +0 -0
- data/lib/2.0/libsmokeqtxmlpatterns.dll +0 -0
- data/lib/2.0/qtdeclarative.so +0 -0
- data/lib/2.0/qtruby4.so +0 -0
- data/lib/2.0/qtscript.so +0 -0
- data/lib/2.0/qttest.so +0 -0
- data/lib/2.0/qtuitools.so +0 -0
- data/lib/2.0/qtwebkit.so +0 -0
- data/lib/2.1/libqtruby4shared.dll +0 -0
- data/lib/2.1/libsmokebase.dll +0 -0
- data/lib/2.1/libsmokeqtcore.dll +0 -0
- data/lib/2.1/libsmokeqtdeclarative.dll +0 -0
- data/lib/2.1/libsmokeqtgui.dll +0 -0
- data/lib/2.1/libsmokeqthelp.dll +0 -0
- data/lib/2.1/libsmokeqtmultimedia.dll +0 -0
- data/lib/2.1/libsmokeqtnetwork.dll +0 -0
- data/lib/2.1/libsmokeqtopengl.dll +0 -0
- data/lib/2.1/libsmokeqtscript.dll +0 -0
- data/lib/2.1/libsmokeqtsql.dll +0 -0
- data/lib/2.1/libsmokeqtsvg.dll +0 -0
- data/lib/2.1/libsmokeqttest.dll +0 -0
- data/lib/2.1/libsmokeqtuitools.dll +0 -0
- data/lib/2.1/libsmokeqtwebkit.dll +0 -0
- data/lib/2.1/libsmokeqtxml.dll +0 -0
- data/lib/2.1/libsmokeqtxmlpatterns.dll +0 -0
- data/lib/2.1/qtdeclarative.so +0 -0
- data/lib/2.1/qtruby4.so +0 -0
- data/lib/2.1/qtscript.so +0 -0
- data/lib/2.1/qttest.so +0 -0
- data/lib/2.1/qtuitools.so +0 -0
- data/lib/2.1/qtwebkit.so +0 -0
- data/lib/2.2/libqtruby4shared.dll +0 -0
- data/lib/2.2/libsmokebase.dll +0 -0
- data/lib/2.2/libsmokeqtcore.dll +0 -0
- data/lib/2.2/libsmokeqtdeclarative.dll +0 -0
- data/lib/2.2/libsmokeqtgui.dll +0 -0
- data/lib/2.2/libsmokeqthelp.dll +0 -0
- data/lib/2.2/libsmokeqtmultimedia.dll +0 -0
- data/lib/2.2/libsmokeqtnetwork.dll +0 -0
- data/lib/2.2/libsmokeqtopengl.dll +0 -0
- data/lib/2.2/libsmokeqtscript.dll +0 -0
- data/lib/2.2/libsmokeqtsql.dll +0 -0
- data/lib/2.2/libsmokeqtsvg.dll +0 -0
- data/lib/2.2/libsmokeqttest.dll +0 -0
- data/lib/2.2/libsmokeqtuitools.dll +0 -0
- data/lib/2.2/libsmokeqtwebkit.dll +0 -0
- data/lib/2.2/libsmokeqtxml.dll +0 -0
- data/lib/2.2/libsmokeqtxmlpatterns.dll +0 -0
- data/lib/2.2/qtdeclarative.so +0 -0
- data/lib/2.2/qtruby4.so +0 -0
- data/lib/2.2/qtscript.so +0 -0
- data/lib/2.2/qttest.so +0 -0
- data/lib/2.2/qtuitools.so +0 -0
- data/lib/2.2/qtwebkit.so +0 -0
- data/lib/Qt.rb +1 -0
- data/lib/Qt/qtruby4.rb +3258 -0
- data/lib/Qt4.rb +111 -0
- data/lib/qtbindings_version.rb +2 -0
- data/lib/qtdeclarative/qtdeclarative.rb +17 -0
- data/lib/qtscript/qtscript.rb +40 -0
- data/lib/qttest/qttest.rb +166 -0
- data/lib/qtuitools/qtuitools.rb +17 -0
- data/lib/qtwebkit/qtwebkit.rb +17 -0
- data/qtbindings.gemspec +18 -0
- data/qtbindingsnative.gemspec +19 -0
- metadata +559 -0
@@ -0,0 +1,34 @@
|
|
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 'qtuitools'
|
28
|
+
require './qrc_calculatorbuilder.rb'
|
29
|
+
require './calculatorform.rb'
|
30
|
+
|
31
|
+
app = Qt::Application.new(ARGV)
|
32
|
+
calculator = CalculatorForm.new
|
33
|
+
calculator.show
|
34
|
+
app.exec
|
@@ -0,0 +1,46 @@
|
|
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 './ui_calculatorform.rb'
|
27
|
+
|
28
|
+
class CalculatorForm < Qt::Widget
|
29
|
+
|
30
|
+
slots 'on_inputSpinBox1_valueChanged(int)',
|
31
|
+
'on_inputSpinBox2_valueChanged(int)'
|
32
|
+
|
33
|
+
def initialize(parent = nil)
|
34
|
+
super(parent)
|
35
|
+
@ui = Ui_CalculatorForm.new
|
36
|
+
@ui.setupUi(self)
|
37
|
+
end
|
38
|
+
|
39
|
+
def on_inputSpinBox1_valueChanged(value)
|
40
|
+
@ui.outputWidget.text = "%d" % (value + @ui.inputSpinBox2.value)
|
41
|
+
end
|
42
|
+
|
43
|
+
def on_inputSpinBox2_valueChanged(value)
|
44
|
+
@ui.outputWidget.text = "%d" % (value + @ui.inputSpinBox1.value)
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,277 @@
|
|
1
|
+
<ui version="4.0" >
|
2
|
+
<class>CalculatorForm</class>
|
3
|
+
<widget class="QWidget" name="CalculatorForm" >
|
4
|
+
<property name="objectName" >
|
5
|
+
<string notr="true" >CalculatorForm</string>
|
6
|
+
</property>
|
7
|
+
<property name="geometry" >
|
8
|
+
<rect>
|
9
|
+
<x>0</x>
|
10
|
+
<y>0</y>
|
11
|
+
<width>400</width>
|
12
|
+
<height>300</height>
|
13
|
+
</rect>
|
14
|
+
</property>
|
15
|
+
<property name="sizePolicy" >
|
16
|
+
<sizepolicy>
|
17
|
+
<hsizetype>5</hsizetype>
|
18
|
+
<vsizetype>5</vsizetype>
|
19
|
+
<horstretch>0</horstretch>
|
20
|
+
<verstretch>0</verstretch>
|
21
|
+
</sizepolicy>
|
22
|
+
</property>
|
23
|
+
<layout class="QGridLayout" >
|
24
|
+
<property name="objectName" >
|
25
|
+
<string notr="true" />
|
26
|
+
</property>
|
27
|
+
<property name="margin" >
|
28
|
+
<number>9</number>
|
29
|
+
</property>
|
30
|
+
<property name="spacing" >
|
31
|
+
<number>6</number>
|
32
|
+
</property>
|
33
|
+
<item row="0" column="6" >
|
34
|
+
<spacer>
|
35
|
+
<property name="objectName" >
|
36
|
+
<string notr="true" >horizontalSpacer</string>
|
37
|
+
</property>
|
38
|
+
<property name="geometry" >
|
39
|
+
<rect>
|
40
|
+
<x>239</x>
|
41
|
+
<y>9</y>
|
42
|
+
<width>152</width>
|
43
|
+
<height>52</height>
|
44
|
+
</rect>
|
45
|
+
</property>
|
46
|
+
<property name="orientation" >
|
47
|
+
<enum>Qt::Horizontal</enum>
|
48
|
+
</property>
|
49
|
+
<property name="sizeHint" >
|
50
|
+
<size>
|
51
|
+
<width>40</width>
|
52
|
+
<height>20</height>
|
53
|
+
</size>
|
54
|
+
</property>
|
55
|
+
</spacer>
|
56
|
+
</item>
|
57
|
+
<item row="0" column="4" >
|
58
|
+
<widget class="QLabel" name="label_3_2" >
|
59
|
+
<property name="objectName" >
|
60
|
+
<string notr="true" >label_3_2</string>
|
61
|
+
</property>
|
62
|
+
<property name="geometry" >
|
63
|
+
<rect>
|
64
|
+
<x>169</x>
|
65
|
+
<y>9</y>
|
66
|
+
<width>20</width>
|
67
|
+
<height>52</height>
|
68
|
+
</rect>
|
69
|
+
</property>
|
70
|
+
<property name="text" >
|
71
|
+
<string>=</string>
|
72
|
+
</property>
|
73
|
+
<property name="alignment" >
|
74
|
+
<set>Qt::AlignCenter</set>
|
75
|
+
</property>
|
76
|
+
</widget>
|
77
|
+
</item>
|
78
|
+
<item row="0" column="5" >
|
79
|
+
<layout class="QVBoxLayout" >
|
80
|
+
<property name="objectName" >
|
81
|
+
<string notr="true" />
|
82
|
+
</property>
|
83
|
+
<property name="margin" >
|
84
|
+
<number>1</number>
|
85
|
+
</property>
|
86
|
+
<property name="spacing" >
|
87
|
+
<number>6</number>
|
88
|
+
</property>
|
89
|
+
<item>
|
90
|
+
<widget class="QLabel" name="label_2_2_2" >
|
91
|
+
<property name="objectName" >
|
92
|
+
<string notr="true" >label_2_2_2</string>
|
93
|
+
</property>
|
94
|
+
<property name="geometry" >
|
95
|
+
<rect>
|
96
|
+
<x>1</x>
|
97
|
+
<y>1</y>
|
98
|
+
<width>36</width>
|
99
|
+
<height>17</height>
|
100
|
+
</rect>
|
101
|
+
</property>
|
102
|
+
<property name="text" >
|
103
|
+
<string>Output</string>
|
104
|
+
</property>
|
105
|
+
</widget>
|
106
|
+
</item>
|
107
|
+
<item>
|
108
|
+
<widget class="QLabel" name="outputWidget" >
|
109
|
+
<property name="objectName" >
|
110
|
+
<string notr="true" >outputWidget</string>
|
111
|
+
</property>
|
112
|
+
<property name="geometry" >
|
113
|
+
<rect>
|
114
|
+
<x>1</x>
|
115
|
+
<y>24</y>
|
116
|
+
<width>36</width>
|
117
|
+
<height>27</height>
|
118
|
+
</rect>
|
119
|
+
</property>
|
120
|
+
<property name="frameShape" >
|
121
|
+
<enum>QFrame::Box</enum>
|
122
|
+
</property>
|
123
|
+
<property name="frameShadow" >
|
124
|
+
<enum>QFrame::Sunken</enum>
|
125
|
+
</property>
|
126
|
+
<property name="text" >
|
127
|
+
<string>0</string>
|
128
|
+
</property>
|
129
|
+
<property name="alignment" >
|
130
|
+
<set>Qt::AlignAbsolute|Qt::AlignBottom|Qt::AlignCenter|Qt::AlignHCenter|Qt::AlignHorizontal_Mask|Qt::AlignJustify|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing|Qt::AlignVCenter|Qt::AlignVertical_Mask</set>
|
131
|
+
</property>
|
132
|
+
</widget>
|
133
|
+
</item>
|
134
|
+
</layout>
|
135
|
+
</item>
|
136
|
+
<item row="1" column="2" >
|
137
|
+
<spacer>
|
138
|
+
<property name="objectName" >
|
139
|
+
<string notr="true" >verticalSpacer</string>
|
140
|
+
</property>
|
141
|
+
<property name="geometry" >
|
142
|
+
<rect>
|
143
|
+
<x>89</x>
|
144
|
+
<y>67</y>
|
145
|
+
<width>20</width>
|
146
|
+
<height>224</height>
|
147
|
+
</rect>
|
148
|
+
</property>
|
149
|
+
<property name="orientation" >
|
150
|
+
<enum>Qt::Vertical</enum>
|
151
|
+
</property>
|
152
|
+
<property name="sizeHint" >
|
153
|
+
<size>
|
154
|
+
<width>20</width>
|
155
|
+
<height>40</height>
|
156
|
+
</size>
|
157
|
+
</property>
|
158
|
+
</spacer>
|
159
|
+
</item>
|
160
|
+
<item row="0" column="3" >
|
161
|
+
<layout class="QVBoxLayout" >
|
162
|
+
<property name="objectName" >
|
163
|
+
<string notr="true" />
|
164
|
+
</property>
|
165
|
+
<property name="margin" >
|
166
|
+
<number>1</number>
|
167
|
+
</property>
|
168
|
+
<property name="spacing" >
|
169
|
+
<number>6</number>
|
170
|
+
</property>
|
171
|
+
<item>
|
172
|
+
<widget class="QLabel" name="label_2" >
|
173
|
+
<property name="objectName" >
|
174
|
+
<string notr="true" >label_2</string>
|
175
|
+
</property>
|
176
|
+
<property name="geometry" >
|
177
|
+
<rect>
|
178
|
+
<x>1</x>
|
179
|
+
<y>1</y>
|
180
|
+
<width>46</width>
|
181
|
+
<height>19</height>
|
182
|
+
</rect>
|
183
|
+
</property>
|
184
|
+
<property name="text" >
|
185
|
+
<string>Input 2</string>
|
186
|
+
</property>
|
187
|
+
</widget>
|
188
|
+
</item>
|
189
|
+
<item>
|
190
|
+
<widget class="QSpinBox" name="inputSpinBox2" >
|
191
|
+
<property name="objectName" >
|
192
|
+
<string notr="true" >inputSpinBox2</string>
|
193
|
+
</property>
|
194
|
+
<property name="geometry" >
|
195
|
+
<rect>
|
196
|
+
<x>1</x>
|
197
|
+
<y>26</y>
|
198
|
+
<width>46</width>
|
199
|
+
<height>25</height>
|
200
|
+
</rect>
|
201
|
+
</property>
|
202
|
+
</widget>
|
203
|
+
</item>
|
204
|
+
</layout>
|
205
|
+
</item>
|
206
|
+
<item row="0" column="1" >
|
207
|
+
<widget class="QLabel" name="label_3" >
|
208
|
+
<property name="objectName" >
|
209
|
+
<string notr="true" >label_3</string>
|
210
|
+
</property>
|
211
|
+
<property name="geometry" >
|
212
|
+
<rect>
|
213
|
+
<x>63</x>
|
214
|
+
<y>9</y>
|
215
|
+
<width>20</width>
|
216
|
+
<height>52</height>
|
217
|
+
</rect>
|
218
|
+
</property>
|
219
|
+
<property name="text" >
|
220
|
+
<string>+</string>
|
221
|
+
</property>
|
222
|
+
<property name="alignment" >
|
223
|
+
<set>Qt::AlignCenter</set>
|
224
|
+
</property>
|
225
|
+
</widget>
|
226
|
+
</item>
|
227
|
+
<item row="0" column="0" >
|
228
|
+
<layout class="QVBoxLayout" >
|
229
|
+
<property name="objectName" >
|
230
|
+
<string notr="true" />
|
231
|
+
</property>
|
232
|
+
<property name="margin" >
|
233
|
+
<number>1</number>
|
234
|
+
</property>
|
235
|
+
<property name="spacing" >
|
236
|
+
<number>6</number>
|
237
|
+
</property>
|
238
|
+
<item>
|
239
|
+
<widget class="QLabel" name="label" >
|
240
|
+
<property name="objectName" >
|
241
|
+
<string notr="true" >label</string>
|
242
|
+
</property>
|
243
|
+
<property name="geometry" >
|
244
|
+
<rect>
|
245
|
+
<x>1</x>
|
246
|
+
<y>1</y>
|
247
|
+
<width>46</width>
|
248
|
+
<height>19</height>
|
249
|
+
</rect>
|
250
|
+
</property>
|
251
|
+
<property name="text" >
|
252
|
+
<string>Input 1</string>
|
253
|
+
</property>
|
254
|
+
</widget>
|
255
|
+
</item>
|
256
|
+
<item>
|
257
|
+
<widget class="QSpinBox" name="inputSpinBox1" >
|
258
|
+
<property name="objectName" >
|
259
|
+
<string notr="true" >inputSpinBox1</string>
|
260
|
+
</property>
|
261
|
+
<property name="geometry" >
|
262
|
+
<rect>
|
263
|
+
<x>1</x>
|
264
|
+
<y>26</y>
|
265
|
+
<width>46</width>
|
266
|
+
<height>25</height>
|
267
|
+
</rect>
|
268
|
+
</property>
|
269
|
+
</widget>
|
270
|
+
</item>
|
271
|
+
</layout>
|
272
|
+
</item>
|
273
|
+
</layout>
|
274
|
+
</widget>
|
275
|
+
<resources/>
|
276
|
+
<connections/>
|
277
|
+
</ui>
|
@@ -0,0 +1,32 @@
|
|
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 './calculatorform.rb'
|
28
|
+
|
29
|
+
app = Qt::Application.new(ARGV)
|
30
|
+
calculator = CalculatorForm.new
|
31
|
+
calculator.show
|
32
|
+
app.exec
|
@@ -0,0 +1,32 @@
|
|
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 './screenshot.rb'
|
28
|
+
|
29
|
+
app = Qt::Application.new(ARGV)
|
30
|
+
screenshot = Screenshot.new
|
31
|
+
screenshot.show
|
32
|
+
app.exec
|
@@ -0,0 +1,157 @@
|
|
1
|
+
=begin
|
2
|
+
**
|
3
|
+
** Copyright (C) 2004-2006 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
|
+
class Screenshot < Qt::Widget
|
27
|
+
|
28
|
+
slots :newScreenshot,
|
29
|
+
:saveScreenshot,
|
30
|
+
:shootScreen,
|
31
|
+
:updateCheckBox
|
32
|
+
|
33
|
+
def initialize(parent = nil)
|
34
|
+
super(parent)
|
35
|
+
@screenshotLabel = Qt::Label.new
|
36
|
+
@screenshotLabel.setSizePolicy(Qt::SizePolicy::Expanding,
|
37
|
+
Qt::SizePolicy::Expanding)
|
38
|
+
@screenshotLabel.alignment = Qt::AlignCenter
|
39
|
+
@screenshotLabel.setMinimumSize(240, 160)
|
40
|
+
|
41
|
+
createOptionsGroupBox()
|
42
|
+
createButtonsLayout()
|
43
|
+
|
44
|
+
self.layout = Qt::VBoxLayout.new do |m|
|
45
|
+
m.addWidget(@screenshotLabel)
|
46
|
+
m.addWidget(@optionsGroupBox)
|
47
|
+
m.addLayout(@buttonsLayout)
|
48
|
+
end
|
49
|
+
|
50
|
+
shootScreen()
|
51
|
+
@delaySpinBox.value = 5
|
52
|
+
|
53
|
+
setWindowTitle(tr("Screenshot"))
|
54
|
+
resize(300, 200)
|
55
|
+
end
|
56
|
+
|
57
|
+
def resizeEvent(event)
|
58
|
+
scaledSize = @originalPixmap.size()
|
59
|
+
scaledSize.scale(@screenshotLabel.size(), Qt::KeepAspectRatio)
|
60
|
+
if @screenshotLabel.pixmap.nil? ||
|
61
|
+
scaledSize != @screenshotLabel.pixmap.size
|
62
|
+
updateScreenshotLabel()
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
def newScreenshot()
|
67
|
+
if @hideThisWindowCheckBox.checked?
|
68
|
+
hide()
|
69
|
+
end
|
70
|
+
@newScreenshotButton.disabled = true
|
71
|
+
|
72
|
+
Qt::Timer.singleShot(@delaySpinBox.value() * 1000, self, SLOT(:shootScreen))
|
73
|
+
end
|
74
|
+
|
75
|
+
def saveScreenshot()
|
76
|
+
format = "png"
|
77
|
+
initialPath = Qt::Dir.currentPath() + tr("/untitled.") + format
|
78
|
+
|
79
|
+
fileName = Qt::FileDialog.getSaveFileName(self, tr("Save As"),
|
80
|
+
initialPath,
|
81
|
+
tr("%s Files (*.%s);;All Files (*)" % [format.upcase, format]))
|
82
|
+
if !fileName.nil?
|
83
|
+
@originalPixmap.save(fileName, format)
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
def shootScreen()
|
88
|
+
if @delaySpinBox.value() != 0
|
89
|
+
$qApp.beep
|
90
|
+
end
|
91
|
+
Qt::Application.processEvents()
|
92
|
+
@originalPixmap = Qt::Pixmap.grabWindow(Qt::Application.desktop.winId)
|
93
|
+
updateScreenshotLabel()
|
94
|
+
|
95
|
+
@newScreenshotButton.disabled = false
|
96
|
+
if @hideThisWindowCheckBox.checked?
|
97
|
+
show()
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
def updateCheckBox()
|
102
|
+
if @delaySpinBox.value() == 0
|
103
|
+
@hideThisWindowCheckBox.disabled = true
|
104
|
+
else
|
105
|
+
@hideThisWindowCheckBox.disabled = false
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
def createOptionsGroupBox()
|
110
|
+
@optionsGroupBox = Qt::GroupBox.new(tr("Options"))
|
111
|
+
|
112
|
+
@delaySpinBox = Qt::SpinBox.new do |s|
|
113
|
+
s.suffix = tr(" s")
|
114
|
+
s.maximum = 60
|
115
|
+
end
|
116
|
+
connect(@delaySpinBox, SIGNAL('valueChanged(int)'), self, SLOT(:updateCheckBox))
|
117
|
+
|
118
|
+
@delaySpinBoxLabel = Qt::Label.new(tr("Screenshot Delay:"))
|
119
|
+
|
120
|
+
@hideThisWindowCheckBox = Qt::CheckBox.new(tr("Hide This Window"))
|
121
|
+
|
122
|
+
@optionsGroupBox.layout = Qt::GridLayout.new do |g|
|
123
|
+
g.addWidget(@delaySpinBoxLabel, 0, 0)
|
124
|
+
g.addWidget(@delaySpinBox, 0, 1)
|
125
|
+
g.addWidget(@hideThisWindowCheckBox, 1, 0, 1, 2)
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
def createButtonsLayout()
|
130
|
+
@newScreenshotButton = createButton(tr("New Screenshot"),
|
131
|
+
self, SLOT(:newScreenshot))
|
132
|
+
|
133
|
+
@saveScreenshotButton = createButton(tr("Save Screenshot"),
|
134
|
+
self, SLOT(:saveScreenshot))
|
135
|
+
|
136
|
+
@quitScreenshotButton = createButton(tr("Quit"), self, SLOT(:close))
|
137
|
+
|
138
|
+
@buttonsLayout = Qt::HBoxLayout.new do |b|
|
139
|
+
b.addStretch()
|
140
|
+
b.addWidget(@newScreenshotButton)
|
141
|
+
b.addWidget(@saveScreenshotButton)
|
142
|
+
b.addWidget(@quitScreenshotButton)
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
def createButton(text, receiver, member)
|
147
|
+
button = Qt::PushButton.new(text)
|
148
|
+
button.connect(button, SIGNAL(:clicked), receiver, member)
|
149
|
+
return button
|
150
|
+
end
|
151
|
+
|
152
|
+
def updateScreenshotLabel()
|
153
|
+
@screenshotLabel.pixmap = @originalPixmap.scaled(@screenshotLabel.size,
|
154
|
+
Qt::KeepAspectRatio,
|
155
|
+
Qt::SmoothTransformation)
|
156
|
+
end
|
157
|
+
end
|