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

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

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