Archive:Development/Tutorials/Qt4 Ruby Tutorial (zh TW): Difference between revisions

    From KDE TechBase
    No edit summary
     
    (9 intermediate revisions by one other user not shown)
    Line 4: Line 4:
    ''原文鏈接:''http://www.darshancomputing.com/qt4-qtruby-tutorial/
    ''原文鏈接:''http://www.darshancomputing.com/qt4-qtruby-tutorial/


    == Ruby Qt®4 教學 ==
    ==Qt®4 Ruby 教學==


    本教學介紹使用 [http://qt.nokia.com Qt]、[http://www.ruby-lang.org Ruby] 和 [http://rubyforge.org/projects/korundum/ qt4-qtruby] 的 GUI 程式設計。這不過是 Nokia 優秀的[http://doc.qt.nokia.com/4.2/tutorial.html Qt 教學]簡單移植。
    本教學介紹使用 [http://qt.nokia.com Qt]、[http://www.ruby-lang.org Ruby] 和 [http://rubyforge.org/projects/korundum/ qt4-qtruby] 的 GUI 程式設計。這不過是 Nokia 優秀的[http://doc.qt.nokia.com/4.2/tutorial.html Qt 教學]簡單移植。
    Line 18: Line 18:


    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 01_(zh_TW)|Hello World!]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 01_(zh_TW)|Hello World!]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 2|Calling it Quits]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 2_(zh_TW)|Calling it Quits]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 3|Family Values]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 3_(zh_TW)|Family Values]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 04|Let There Be Widgets]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 04_(zh_TW)|Let There Be Widgets]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 05|Building Blocks]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 05_(zh_TW)|Building Blocks]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 06|Building Blocks Galore!]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 06_(zh_TW)|Building Blocks Galore!]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 07|One Thing Leads to Another]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 07_(zh_TW)|One Thing Leads to Another]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 08|Preparing for Battle]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 08_(zh_TW)|Preparing for Battle]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 09|With Cannon You Can]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 09_(zh_TW)|With Cannon You Can]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 10|Smooth as Silk]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 10_(zh_TW)|Smooth as Silk]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 11|Giving It a Shot]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 11_(zh_TW)|Giving It a Shot]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 12|Hanging in the Air the Way Bricks Don't]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 12_(zh_TW)|Hanging in the Air the Way Bricks Don't]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 13|Game Over]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 13_(zh_TW)|Game Over]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 14|Facing the Wall]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 14_(zh_TW)|Facing the Wall]]


    這個小遊戲看起來並沒有那麼像一個時髦的 GUI 應用程式。雖然它使用了一些 GUI 技術,不過在你開始使用它之後,我們建議你試試這個 [http://doc.qt.nokia.com/latest/mainwindows-application.html Application] 範例,它提供了一個擁有選單、工具列、一個狀態列等等的小型 GUI 應用程式。這裡有不少很有教育意義的[http://oc.qt.nokia.com/latest/examples.html 範例]。他們都是用 C++ 寫成的,但很容易跟進。因為這一點,證明他們是 Qt 的使用說明,而不是 C++ 功能。
    這個小遊戲看起來並沒有那麼像一個時髦的 GUI 應用程式。雖然它使用了一些 GUI 技術,不過在你開始使用它之後,我們建議你試試這個 [http://doc.qt.nokia.com/latest/mainwindows-application.html Application] 範例,它提供了一個擁有選單、工具列、一個狀態列等等的小型 GUI 應用程式。這裡有不少很有教育意義的[http://oc.qt.nokia.com/latest/examples.html 範例]。他們都是用 C++ 寫成的,但很容易跟進。因為這一點,證明他們是 Qt 的使用說明,而不是 C++ 功能。


    [[Category:Ruby]]
    [[Category:Ruby]]

    Latest revision as of 15:33, 23 June 2013

    Template:I18n/Language Navigation Bar (zh TW) 作者:Darshan Ishaya, [email protected]

    原文鏈接:http://www.darshancomputing.com/qt4-qtruby-tutorial/

    Qt®4 Ruby 教學

    本教學介紹使用 QtRubyqt4-qtruby 的 GUI 程式設計。這不過是 Nokia 優秀的Qt 教學簡單移植。 因此,本段後的大多數文字直接來自他們的教學。我有必要修改,使之適合 Ruby 綁定。並重新安排或改寫一些部分,使他們(我希望)更清晰點。

    本教學並不包括一切,其重點放在傳授 GUI 程式的設計哲學,和必要的 Qt 功能介紹。一些較為一般的特色可能不會在本教學中被提及。

    第一章由最小的「Hello World」程式開頭,並於接下來的每一章介紹新的概念。到第14章,第1章的「Hello World」程式將變成448行的遊戲。

    如果您對 Qt 是完全陌生的,您可能需要閱讀如何學習 Qt。請記住,和大多數 Qt 相關的文件一樣,這是非常 C++ 導向的。

    目錄

    1. Hello World!
    2. Calling it Quits
    3. Family Values
    4. Let There Be Widgets
    5. Building Blocks
    6. Building Blocks Galore!
    7. One Thing Leads to Another
    8. Preparing for Battle
    9. With Cannon You Can
    10. Smooth as Silk
    11. Giving It a Shot
    12. Hanging in the Air the Way Bricks Don't
    13. Game Over
    14. Facing the Wall

    這個小遊戲看起來並沒有那麼像一個時髦的 GUI 應用程式。雖然它使用了一些 GUI 技術,不過在你開始使用它之後,我們建議你試試這個 Application 範例,它提供了一個擁有選單、工具列、一個狀態列等等的小型 GUI 應用程式。這裡有不少很有教育意義的範例。他們都是用 C++ 寫成的,但很容易跟進。因為這一點,證明他們是 Qt 的使用說明,而不是 C++ 功能。