SlideShare una empresa de Scribd logo
1 de 36
Descargar para leer sin conexión
Introducing QtRuby


       Ynon Perek
       http://qtcollege.co.il




Friday, August 3, 12
Friday, August 3, 12
Friday, August 3, 12
sudo apt-get install lynx




Friday, August 3, 12
Friday, August 3, 12
Agenda


                       • GUI Programming
                       • Qt Framework
                       • QtRuby In Action




Friday, August 3, 12
About Me


                       • Ynon Perek
                       • ynonperek@yahoo.com
                       • http://qtcollege.co.il




Friday, August 3, 12
Desktop UI




Friday, August 3, 12
GUI Frameworks




Friday, August 3, 12
Choose Qt



                       • Easy To Start




Friday, August 3, 12
Choose Qt


                       • Easy To Start
                       • Mature and widely used




Friday, August 3, 12
Famous Qt Apps




Friday, August 3, 12
Famous Qt Apps




Friday, August 3, 12
Choose Qt


                       • Easy To Start
                       • Mature and widely used
                       • True Cross Platform




Friday, August 3, 12
Choose Qt




Friday, August 3, 12
Choose Qt

                       • Easy To Start
                       • Mature and widely used
                       • True Cross Platform
                       • Cross Language



Friday, August 3, 12
Choose Qt
                       • C++
                       • Java
                       • Ruby
                       • Perl
                       • Python
                       • And More...

Friday, August 3, 12
Q&A


Friday, August 3, 12
Hello Qt
                 require 'Qt'
                  
                 app = Qt::Application.new( ARGV )
                 w   = Qt::Label.new( "Hello World" )

                 w.set_alignment( Qt::AlignHCenter | Qt::AlignVCenter ) 
                 w.show

                 app.exec




Friday, August 3, 12
Qt Terminology


                       • a Widget is a visible
                         component

                       • Label, Button,
                         Table, List, ...




Friday, August 3, 12
Qt Terminology


                       Widget




Friday, August 3, 12
Qt Widgets




Friday, August 3, 12
Qt Widgets



        http://doc.qt.nokia.com/4.7-snapshot/gallery.html




Friday, August 3, 12
Qt Layouts

                       • A top level widget
                         may contain other
                         widgets

                       • Child widgets are
                         arranged in a
                         layout




Friday, August 3, 12
DEMO: UI Designer



Friday, August 3, 12
Qt Terminology


                       • Signal specifies a
                         semantic event




Friday, August 3, 12
Qt Terminology


                       • Signals are
                         connected to slots
                         which are the
                         handling code




Friday, August 3, 12
Designer Takeaways

                       • Drag & Drop to create UI
                       • Save as .ui file
                       • Run:
                         rbuic4 file.ui -x -o file_ui.rb

                       • Use resulting .rb file but don’t modify it



Friday, August 3, 12
Qt Actions
  require 'Qt'
  require './demo1_ui.rb'

  a = Qt::Application.new(ARGV)
  u = Ui_Form.new
  w = Qt::Widget.new
  u.setupUi(w)
  w.show

  u.btn1.connect( SIGNAL :clicked ) {
    u.list1.add_item( "Qt FTW" )
  }



  a.exec



Friday, August 3, 12
Qt Stock Dialogs


                       • Qt::MessageBox.about
                       • Qt::FileDialog.get_open_file_name
                       • Qt::FileDialog.get_save_file_name




Friday, August 3, 12
Qt Stock Dialogs
  require 'Qt'
  require './demo1_ui.rb'

  a = Qt::Application.new(ARGV)
  u = Ui_Form.new
  w = Qt::Widget.new
  u.setupUi(w)
  w.show

  u.btn1.connect( SIGNAL :clicked ) {
    filename = Qt::FileDialog.get_open_file_name;
    u.list1.add_item( filename )
  }

  a.exec




Friday, August 3, 12
Q&A


Friday, August 3, 12
QtRuby


                       • Easy UI for your programs
                       • Solid Foundations




Friday, August 3, 12
What Next

                       • Qt Developers Meetup
                       • August 7, 19:00
                       • http://meetup.com/QtEverywhere/
                         Tel-Aviv-Yafo-IL/740512/




Friday, August 3, 12
Resources

                       • Ruby Qt/KDE Guide
                         http://techbase.kde.org/Development/
                         Languages/Ruby



                       • Qt Tutorial Videos
                         http://qt-project.org/videos


Friday, August 3, 12
About Me


                       • Ynon Perek
                       • ynonperek@yahoo.com
                       • http://qtcollege.co.il




Friday, August 3, 12

Más contenido relacionado

Similar a Qtruby

Dark Silicon, Mobile Devices, and Possible Open-Source Solutions
Dark Silicon, Mobile Devices, and Possible Open-Source SolutionsDark Silicon, Mobile Devices, and Possible Open-Source Solutions
Dark Silicon, Mobile Devices, and Possible Open-Source Solutions
Koan-Sin Tan
 
Building scalable applications while scaling your infrastructure by rhommel l...
Building scalable applications while scaling your infrastructure by rhommel l...Building scalable applications while scaling your infrastructure by rhommel l...
Building scalable applications while scaling your infrastructure by rhommel l...
NETWAYS
 

Similar a Qtruby (20)

Dark Silicon, Mobile Devices, and Possible Open-Source Solutions
Dark Silicon, Mobile Devices, and Possible Open-Source SolutionsDark Silicon, Mobile Devices, and Possible Open-Source Solutions
Dark Silicon, Mobile Devices, and Possible Open-Source Solutions
 
Building scalable applications while scaling your infrastructure by rhommel l...
Building scalable applications while scaling your infrastructure by rhommel l...Building scalable applications while scaling your infrastructure by rhommel l...
Building scalable applications while scaling your infrastructure by rhommel l...
 
Building scalable applications while scaling your infrastructure by rhommel l...
Building scalable applications while scaling your infrastructure by rhommel l...Building scalable applications while scaling your infrastructure by rhommel l...
Building scalable applications while scaling your infrastructure by rhommel l...
 
Coscup 2013 : Continuous Integration on top of hadoop
Coscup 2013 : Continuous Integration on top of hadoopCoscup 2013 : Continuous Integration on top of hadoop
Coscup 2013 : Continuous Integration on top of hadoop
 
Releasing Puppet: Automating Packaging for Many Platforms or 'Make all the th...
Releasing Puppet: Automating Packaging for Many Platforms or 'Make all the th...Releasing Puppet: Automating Packaging for Many Platforms or 'Make all the th...
Releasing Puppet: Automating Packaging for Many Platforms or 'Make all the th...
 
PuppetCamp SEA @ Blk 71 - Puppet: The Year That Was
PuppetCamp SEA @ Blk 71 - Puppet: The Year That WasPuppetCamp SEA @ Blk 71 - Puppet: The Year That Was
PuppetCamp SEA @ Blk 71 - Puppet: The Year That Was
 
PuppetCamp SEA @ Blk 71 - Puppet: The Year That Was
PuppetCamp SEA @ Blk 71 - Puppet: The Year That WasPuppetCamp SEA @ Blk 71 - Puppet: The Year That Was
PuppetCamp SEA @ Blk 71 - Puppet: The Year That Was
 
Generics, the Swift ABI and you
Generics, the Swift ABI and youGenerics, the Swift ABI and you
Generics, the Swift ABI and you
 
jQuery Mobile Deep Dive
jQuery Mobile Deep DivejQuery Mobile Deep Dive
jQuery Mobile Deep Dive
 
Qt Design Patterns
Qt Design PatternsQt Design Patterns
Qt Design Patterns
 
Reef - ESUG 2010
Reef - ESUG 2010Reef - ESUG 2010
Reef - ESUG 2010
 
Contribuire al Qt Project
Contribuire al Qt ProjectContribuire al Qt Project
Contribuire al Qt Project
 
Scaling Deployment at Etsy
Scaling Deployment at EtsyScaling Deployment at Etsy
Scaling Deployment at Etsy
 
OpenStack Swift production deployments
OpenStack Swift production deploymentsOpenStack Swift production deployments
OpenStack Swift production deployments
 
Scalamen and OT
Scalamen and OTScalamen and OT
Scalamen and OT
 
State of Pyramid - Brasilia 2013
State of Pyramid - Brasilia 2013State of Pyramid - Brasilia 2013
State of Pyramid - Brasilia 2013
 
From Renamer Plugin to Polyglot IDE
From Renamer Plugin to Polyglot IDEFrom Renamer Plugin to Polyglot IDE
From Renamer Plugin to Polyglot IDE
 
Ops for Developers
Ops for DevelopersOps for Developers
Ops for Developers
 
State of Puppet
State of PuppetState of Puppet
State of Puppet
 
Red Dirt Ruby Conference
Red Dirt Ruby ConferenceRed Dirt Ruby Conference
Red Dirt Ruby Conference
 

Más de Ynon Perek

Más de Ynon Perek (20)

Regexp
RegexpRegexp
Regexp
 
Html5 intro
Html5 introHtml5 intro
Html5 intro
 
09 performance
09 performance09 performance
09 performance
 
Mobile Web Intro
Mobile Web IntroMobile Web Intro
Mobile Web Intro
 
Qt multi threads
Qt multi threadsQt multi threads
Qt multi threads
 
Vimperl
VimperlVimperl
Vimperl
 
Syllabus
SyllabusSyllabus
Syllabus
 
Network
NetworkNetwork
Network
 
Architecture app
Architecture appArchitecture app
Architecture app
 
Cryptography
CryptographyCryptography
Cryptography
 
Unit Testing JavaScript Applications
Unit Testing JavaScript ApplicationsUnit Testing JavaScript Applications
Unit Testing JavaScript Applications
 
How to write easy-to-test JavaScript
How to write easy-to-test JavaScriptHow to write easy-to-test JavaScript
How to write easy-to-test JavaScript
 
Introduction to Selenium and Ruby
Introduction to Selenium and RubyIntroduction to Selenium and Ruby
Introduction to Selenium and Ruby
 
Introduction To Web Application Testing
Introduction To Web Application TestingIntroduction To Web Application Testing
Introduction To Web Application Testing
 
Accessibility
AccessibilityAccessibility
Accessibility
 
Angularjs
AngularjsAngularjs
Angularjs
 
Js memory
Js memoryJs memory
Js memory
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application Security
 
JavaScript DOM Manipulations
JavaScript DOM ManipulationsJavaScript DOM Manipulations
JavaScript DOM Manipulations
 
Mongodb Intro
Mongodb IntroMongodb Intro
Mongodb Intro
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Último (20)

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

Qtruby

  • 1. Introducing QtRuby Ynon Perek http://qtcollege.co.il Friday, August 3, 12
  • 4. sudo apt-get install lynx Friday, August 3, 12
  • 6. Agenda • GUI Programming • Qt Framework • QtRuby In Action Friday, August 3, 12
  • 7. About Me • Ynon Perek • ynonperek@yahoo.com • http://qtcollege.co.il Friday, August 3, 12
  • 10. Choose Qt • Easy To Start Friday, August 3, 12
  • 11. Choose Qt • Easy To Start • Mature and widely used Friday, August 3, 12
  • 12. Famous Qt Apps Friday, August 3, 12
  • 13. Famous Qt Apps Friday, August 3, 12
  • 14. Choose Qt • Easy To Start • Mature and widely used • True Cross Platform Friday, August 3, 12
  • 16. Choose Qt • Easy To Start • Mature and widely used • True Cross Platform • Cross Language Friday, August 3, 12
  • 17. Choose Qt • C++ • Java • Ruby • Perl • Python • And More... Friday, August 3, 12
  • 19. Hello Qt require 'Qt'   app = Qt::Application.new( ARGV ) w   = Qt::Label.new( "Hello World" ) w.set_alignment( Qt::AlignHCenter | Qt::AlignVCenter )  w.show app.exec Friday, August 3, 12
  • 20. Qt Terminology • a Widget is a visible component • Label, Button, Table, List, ... Friday, August 3, 12
  • 21. Qt Terminology Widget Friday, August 3, 12
  • 23. Qt Widgets http://doc.qt.nokia.com/4.7-snapshot/gallery.html Friday, August 3, 12
  • 24. Qt Layouts • A top level widget may contain other widgets • Child widgets are arranged in a layout Friday, August 3, 12
  • 26. Qt Terminology • Signal specifies a semantic event Friday, August 3, 12
  • 27. Qt Terminology • Signals are connected to slots which are the handling code Friday, August 3, 12
  • 28. Designer Takeaways • Drag & Drop to create UI • Save as .ui file • Run: rbuic4 file.ui -x -o file_ui.rb • Use resulting .rb file but don’t modify it Friday, August 3, 12
  • 29. Qt Actions require 'Qt' require './demo1_ui.rb' a = Qt::Application.new(ARGV) u = Ui_Form.new w = Qt::Widget.new u.setupUi(w) w.show u.btn1.connect( SIGNAL :clicked ) {   u.list1.add_item( "Qt FTW" ) } a.exec Friday, August 3, 12
  • 30. Qt Stock Dialogs • Qt::MessageBox.about • Qt::FileDialog.get_open_file_name • Qt::FileDialog.get_save_file_name Friday, August 3, 12
  • 31. Qt Stock Dialogs require 'Qt' require './demo1_ui.rb' a = Qt::Application.new(ARGV) u = Ui_Form.new w = Qt::Widget.new u.setupUi(w) w.show u.btn1.connect( SIGNAL :clicked ) {   filename = Qt::FileDialog.get_open_file_name;   u.list1.add_item( filename ) } a.exec Friday, August 3, 12
  • 33. QtRuby • Easy UI for your programs • Solid Foundations Friday, August 3, 12
  • 34. What Next • Qt Developers Meetup • August 7, 19:00 • http://meetup.com/QtEverywhere/ Tel-Aviv-Yafo-IL/740512/ Friday, August 3, 12
  • 35. Resources • Ruby Qt/KDE Guide http://techbase.kde.org/Development/ Languages/Ruby • Qt Tutorial Videos http://qt-project.org/videos Friday, August 3, 12
  • 36. About Me • Ynon Perek • ynonperek@yahoo.com • http://qtcollege.co.il Friday, August 3, 12