Section C.5. Open-Source IDEs and Development Tools

C 5 Open Source IDEs and Development Tools

It is not practical to do object-oriented development with an ordinary text editor. Object-oriented development involves working with many classes and many more files (headers and sources). Writing code in an edit window is just a small part of the development process. A good programmers editor or IDE (integrated development environment) should support many of the following features:

  • Tree-like structured navigation to object/members in any file
  • Refactoring assistance for moving/renaming members
  • Integrated debugger
  • Context-sensitive help linked to API documentation
  • A built-in command-line shell window so you can run programs without leaving your environment
  • A project manager to help manage groups and subgroups of related files
  • Editing modes in other programming languages
  • Easy keyboard customizationthe ability to make any keystroke perform any task (cursor movement especially, but also window movement)
  • An open plug-in architecture so you can add other components
  • Integration with a version-control facility is desirable, especially in windows environments. Look for CVS,[6] Subversion,[7] or Darcs[8].

    [6] https://www.cvshome.org/

    [7] http://subversion.tigris.org/

    [8] http://darcs.net/

  • Learnable, scriptable macros
  • Easy language-aware navigation to your different files (with shortcuts such as "find declaration," "find definition," and "find references")

An open-source option for Win32 users is Dev C++[9] from Bloodshed Software, which works quite well with MinGW and cygwin.

[9] http://www.bloodshed.net/devcpp.html

KDE users can use KDevelop3,[10] a feature-rich, open-source IDE with excellent C++ and code navigation features. It has built-in support for importing Qts qmake project files. Simply select Project -> Import Existing Project from the menu and choose the .pro file you wish to work with.

[10] http://www.kdevelop.org

For all platforms, there is Eclipse,[11] a free Java-based open-source IDE. You can download plugins for C++ development,[12] as well as Qt/KDE development.[13] The latter allows you to import qmake .pro files into Eclipse as projects directly.

[11] http://www.eclipse.org

[12] http://www.eclipse.org/cdt/

[13] http://kde-eclipse.pwsp.net/index.php

Maximum Code Reuse KDevelop

An interesting thing about KDevelop is that it embeds stand-alone applications and "plugs them in" to the QMainWindow as dock widgets. If you already use KDE and some of the common *nix development tools, you will find some familiar apps already available inside the dock windows. In the case of KDevelop:

  • The debugger is a KDE front end to gdb, similar to kdbg.
  • For CVS browsing, KDevelop has integrated cervisia.
  • By default, KDevelop uses Kate[14] (the "KDE Advanced Text Editor") for editing.
  • The designer for creating widgets is a customized version of Qts Designer.
  • The command-line shell is a dockable window inside KDevelop. Its the regular KDE Konsole[15] xterminal.

Because KDevelop is built on top of KDE libraries, and KDE libraries are based on Qt, using KDevelop will unable you to become more accustomed to how various Qt widgets work. See Figure C.2.

Figure C.2. KDevelop



[14] http://kate.kde.org/

[15] http://konsole.kde.org/

C.5.1. UML Modeling Tools

For creating diagrams in this book using the Unified Modeling Language, we use two open-source tools, Umbrello[16] and Dia.[17] Each tool uses an XML dialect as its native file format.

[16] http://uml.sourceforge.net/index.php

[17] http://www.gnome.org/projects/dia/

Umbrello is the KDE UML Modeler. It can directly import C++ code, making it very easy to drag and drop imported classes into diagrams, as shown in Figure C.3.

Figure C.3. Umbrello screenshot


Dia is a more general-purpose diagram tool with some UML features. There are many plugins and utilities that let you import code and export diagrams to and from Dia to other languages and formats.

C.5.2. jEdit

jEdit[18] is a mature, open-source, programmers text editor. Because it is written entirely in Java, it works on all platforms. Its keyboard configurability is very flexibleany action can be bound to a primary and an alternate shortcut.

[18] http://www.jedit.org

To install it, first download a recent (5.0) version of the Java Development Kit (JDK) from http://java.sun.com, and then download the latest development version of jEdit.

Before using it very much, it is recommended you install some additional programs for development in C++:

  • Plugins: Navigator, Project Viewer, Optional, FastOpen, Info Viewer, Console, Code Browser, XML
  • Exuberant ctags version 5.5 or later (for use with Code Browser)
  • ToggleHeaderSource version 0.4[19] or later for (easy switching between header/source)

    [19] http://community.jedit.org/?q=filestore/browse/34

Figure C.4. jEdit screenshot


Check the keyboard configurability, Global Options -> Shortcuts. Notice that all the plugins and macros have their own shortcut-able actions. And after you have included some plugins, check out the Global Options -> Docking and dock some of the plug-ins dockables to the sides of your edit window.




Part I: Introduction to C++ and Qt 4

C++ Introduction

Classes

Introduction to Qt

Lists

Functions

Inheritance and Polymorphism

Part II: Higher-Level Programming

Libraries

Introduction to Design Patterns

QObject

Generics and Containers

Qt GUI Widgets

Concurrency

Validation and Regular Expressions

Parsing XML

Meta Objects, Properties, and Reflective Programming

More Design Patterns

Models and Views

Qt SQL Classes

Part III: C++ Language Reference

Types and Expressions

Scope and Storage Class

Statements and Control Structures

Memory Access

Chapter Summary

Inheritance in Detail

Miscellaneous Topics

Part IV: Programming Assignments

MP3 Jukebox Assignments

Part V: Appendices

MP3 Jukebox Assignments

Bibliography

MP3 Jukebox Assignments



An Introduction to Design Patterns in C++ with Qt 4
An Introduction to Design Patterns in C++ with Qt 4
ISBN: 0131879057
EAN: 2147483647
Year: 2004
Pages: 268

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net