1 / 30

Cross Platform Development Focusing on Trolltech QT

Cross Platform Development Focusing on Trolltech QT. By: Gabriel Johnson. Overview. Why do Cross Platform Development? Advantages and Disadvantages Design Issues Tools QT Overview QT Features Signals and Slots Class Library Designer. Cross Platform Development Focusing on Trolltech QT.

jared
Download Presentation

Cross Platform Development Focusing on Trolltech QT

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Cross Platform DevelopmentFocusing on Trolltech QT By: Gabriel Johnson

  2. Overview • Why do Cross Platform Development? • Advantages and Disadvantages • Design Issues • Tools • QT Overview • QT Features • Signals and Slots • Class Library • Designer Cross Platform DevelopmentFocusing on Trolltech QT By: Gabriel Johnson Cross Platform Development

  3. Overview • Why do Cross Platform Development? • Advantages and Disadvantages • Design Issues • Tools • QT Overview • QT Features • Signals and Slots • Class Library • Designer Cross Platform Development

  4. Why Cross Platform? • The computing world is becoming increasingly diverse • With the right tools it can be painless • Open up product to new markets • Open up product to new users Cross Platform Development

  5. Overview • Why do Cross Platform Development? • Advantages and Disadvantages • Design Issues • Tools • QT Overview • QT Features • Signals and Slots • Class Library • Designer Cross Platform Development

  6. Advantages • New Target Market • Support Existing Customers • Choice • Code Quality • Financial Reasons • It’s Cool and Gives Warm Fuzzies Cross Platform Development

  7. Disadvantages • Cost of Training • Cost of Purchasing • Testing Time • Managing Multiple Releases • Dependent on Tools Cross Platform Development

  8. Overview • Why do Cross Platform Development? • Advantages and Disadvantages • Design Considerations • Design Issues • Tools • QT Overview • QT Features • Signals and Slots • Class Library • Designer Cross Platform Development

  9. Design Considerations • Language • Use Standards-Based Persistent Storage • Make Business Logic Abstract • Closer to the User Means Less Portability • Use XML for Standardized, Interoperable Communications between Subsystems • Avoid Hiding The Power of a Specific Platform in the Name of Portability Cross Platform Development

  10. Overview • Why do Cross Platform Development? • Advantages and Disadvantages • Design Considerations • Design Issues • Tools • QT Overview • QT Features • Signals and Slots • Class Library • Designer Cross Platform Development

  11. Design Issues • Individual Compilers • Follow language Standards • Avoid Compiler Macros or Functions • Individual Platforms • Platform Specific Libraries are Necessary Cross Platform Development

  12. Example MyCreateDialogBox() { if (this is a Windows machine) { call the Windows library CreateDialog() function; } else if (this is a Mac) { call the Mac library's dialog creation function; } else if (this is a UNIX box) { call the X Window System's dialog creation function; } } Cross Platform Development

  13. Design Issues • Individual Compilers • Follow language Standards • Avoid Compiler Macros or Functions • Individual Platforms • Platform Specific Libraries are Necessary • Platform Idiosyncrasies Cross Platform Development

  14. Overview • Why do Cross Platform Development? • Advantages and Disadvantages • Design Considerations • Design Issues • Tools • QT Overview • QT Features • Signals and Slots • Class Library • Designer Cross Platform Development

  15. Tools • WxWidgets • Java • Python • MONO • QT Cross Platform Development

  16. Overview • Why do Cross Platform Development? • Advantages and Disadvantages • Design Considerations • Design Issues • Tools • QT Overview • QT Features • Signals and Slots • Class Library • Designer Cross Platform Development

  17. QT Overview • Qt is a complete C++ application development framework, including • A comprehensive C++ class library • RAD GUI development tool • Internationalization tool Cross Platform Development

  18. QT Overview • QT is Cross Platform • The Qt API and tools are consistent across all supported platforms • Consequence for users and customers • OS Choices Include • Windows® 95 through Server 2003 • Mac OS® X • Linux and embedded Linux • AIX, BSD/OS, FreeBSD, HP-UX, IRIX, NetBSD, OpenBSD, Solaris, Tru64 UNIX Cross Platform Development

  19. Overview • Why do Cross Platform Development? • Advantages and Disadvantages • Design Considerations • Design Issues • Tools • QT Overview • QT Features • Signals and Slots • Class Library • Designer Cross Platform Development

  20. Application Application Application Qt/X11 lib Qt/Windows lib Qt/Mac lib Unix or Linux MS Windows MacOS QT Features • Qt provides a platform-independent encapsulation of the local window system and operating system • The Qt API is identical on every platform, applications are compiled to native executables • Result: Write once, compile everywhere Cross Platform Development

  21. Overview • Why do Cross Platform Development? • Advantages and Disadvantages • Design Considerations • Design Issues • Tools • QT Overview • QT Features • Signals and Slots • Class Library • Designer Cross Platform Development

  22. Signals and Slots • Unique inter-object communication mechanism, provides • Type-safe callback between objects • Facilitates loose coupling / encapsulation • Sender and receiver does not ”know about” each other • 1-to-many, many-to-1 communication between objects • Fully Object-oriented Cross Platform Development

  23. Signals and Slots Cross Platform Development

  24. Signals and Slots class Foo : public QObject { Q_OBJECT public: Foo(); int value() const { return val; } public slots: void setValue( int ); signals: void valueChanged( int ); private: int val; }; Cross Platform Development

  25. Signals and Slots void Foo::setValue( int v ) { if ( v != val ) { val = v; emit valueChanged(v); } } Cross Platform Development

  26. Signals and Slots Foo a, b; connect(&a,SIGNAL(valueChanged(int)), &b, SLOT(setValue(int))); b.setValue( 11 ); a.setValue( 79 ); b.value(); Cross Platform Development

  27. Overview • Why do Cross Platform Development? • Advantages and Disadvantages • Design Considerations • Design Issues • Tools • QT Overview • QT Features • Signals and Slots • Class Library • Designer Cross Platform Development

  28. Class Library • GUI Toolkit Classes • Full API to easily create the GUI • Complete set of GUI controls • Native look & feel • OS encapsulation Classes • File & directory handling • Date & time • Registry / preferences • Networking • Process handling • Threading • Dynamic library loading Cross Platform Development

  29. Class Library • SQL Database Classes • Database operations • Database-independent API • DB-aware widgets • Utility Classes • String and regular expressions • Text and binary I/O • Collections • XML I/O • Integration and Migration Classes • OpenGL • ActiveX • Netscape Plugins Cross Platform Development

  30. Overview • Why do Cross Platform Development? • Advantages and Disadvantages • Design Considerations • Design Issues • Tools • QT Overview • QT Features • Signals and Slots • Class Library • Designer Cross Platform Development

More Related