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

    From KDE TechBase
    No edit summary
    No edit summary
    (4 intermediate revisions by the same user not shown)
    Line 1: Line 1:
    {{Template:I18n/Language Navigation Bar_(zh_CN)|Development/Tutorials/Qt4 Ruby Tutorial}}
    {{Template:I18n/Language Navigation Bar_(zh_CN)|Development/Tutorials/Qt4 Ruby Tutorial}}
    ''作者:''[mailto:[email protected] Darshan Ishaya, [email protected]]
    ''作者:''[mailto:[email protected] Darshan Ishaya, [email protected]]
    ''原文链接:''http://www.darshancomputing.com/qt4-qtruby-tutorial/


    == Ruby Qt®4 教学  ==
    == Ruby Qt®4 教学  ==
    本教学介绍使用 [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 教学]简单移植。
    因此,本段后的大多数文字直接来自他们的教学。我有必要修改,使之适合 Ruby 绑定。并重新安排或改写一些部分,使他们(我希望)更清晰点。
    因此,本段后的大多数文字直接来自他们的教学。我有必要修改,使之适合 Ruby 绑定。并重新安排或改写一些部分,使他们(我希望)更清晰点。
    Line 15: Line 16:
    ==目录==
    ==目录==


    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 01|Hello World!]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 01_(zh_CN)|Hello World!]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 2|Calling it Quits]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 2_(zh_CN)|Calling it Quits]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 3|Family Values]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 3_(zh_CN)|Family Values]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 04|Let There Be Widgets]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 04_(zh_CN)|Let There Be Widgets]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 05|Building Blocks]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 05_(zh_CN)|Building Blocks]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 06|Building Blocks Galore!]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 06_(zh_CN)|Building Blocks Galore!]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 07|One Thing Leads to Another]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 07_(zh_CN)|One Thing Leads to Another]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 08|Preparing for Battle]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 08_(zh_CN)|Preparing for Battle]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 09|With Cannon You Can]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 09_(zh_CN)|With Cannon You Can]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 10|Smooth as Silk]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 10_(zh_CN)|Smooth as Silk]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 11|Giving It a Shot]] (unfinished)
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 11_(zh_CN)|Giving It a Shot]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 12|Hanging in the Air the Way Bricks Don't]] (unfinished)
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 12_(zh_CN)|Hanging in the Air the Way Bricks Don't]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 13|Game Over]] (unfinished)
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 13_(zh_CN)|Game Over]]
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 14|Facing the Wall]] (unfinished)
    #[[Development/Tutorials/Qt4 Ruby Tutorial/Chapter 14_(zh_CN)|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++ 功能。
    Right now this tutorial is hosted on my site.  I am going to be bringing it over here over the next week or so.
    You can currently access this tutorial at the following address:
    http://www.darshancomputing.com/qt4-qtruby-tutorial/
    until it is fully transferred over to this wiki.


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

    Revision as of 14:34, 16 January 2010

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

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

    Ruby Qt®4 教学

    本教学介绍使用 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++ 功能。