KDE users program KDE to create a personalized desktop environment. KDE 2.0 Development covers programming the newest release of KDE. Topics include: KDE UI Compliance, KDE Style Reference, The Qt Toolkit, Responsive User Interface, Complex-Function KDE Widgets, Multimedia, DCOP, KParts, Creating Documentation, Packaging Code, CVS and CVSUP, and KDevelop: the Integrated Development Environment for KDE.
Sprache
Verlagsort
Verlagsgruppe
Zielgruppe
Für höhere Schule und Studium
Maße
Höhe: 231 mm
Breite: 187 mm
Dicke: 30 mm
Gewicht
ISBN-13
978-0-672-31891-7 (9780672318917)
Copyright in bibliographic data and cover images is held by Nielsen Book Services Limited or by the publishers or by their respective licensors: all rights reserved.
Schweitzer Klassifikation
David Sweet created and maintains kspell, the KDE spellchecker, and maintains kghostview, the KDE postscript viewer. He also created the KDE Developer's mini-HOWTO, and the Chaos Classes, a set of C++ classes. David is published in Linux Journal, and is currently developing a KDE plotting widget, kplotw, and the application that utilizes it, kplot.
Introduction.
I. FUNDAMENTALS OF KDE APPLICATION PROGRAMMING.
1. The K Desktop Environment Background.
Motivation for a Free Desktop. Why Develop with KDE? KDE Organization and Resources. System Requirements. Obtaining and Installing KDE.
Installing Binary Packages. Installing Source Packages.
Licenses and Legalities. Let's Code, Already!
2. A Simple KDE Application.
The Linux/UNIX Programmer's Desktop.
Necessities for Editing Code. Debuggers Available for Linux.
Compiling a KDE Program.
Using make.
KDE Application Structure.
KApplication. KTMainWindow. A Typical main() Function.
GUI Elements.
The Menubar. The Toolbar. The Status Line.
Programming Conventions.
Naming Conventions. Class Documentation.
Summary. Exercises.
3. The Qt Toolkit.
What It Is For (Look and Feel). Inside the Qt Toolkit.
QObject. QWidget. QPainter. QPushButton.
Signals and Slots.
Creating a Slot. Emitting a Signal. Connecting a Slot to a Signal. Signals and Slots with Parameters. Slots in Temporary Classes.
Meta Object Compiler (moc).
Using the moc Tool. Sample Use of the moc.
The Utility Classes.
Templates. Standard Template Library (STL). QList-A Qt Template Class.
Special Features (ImageIO, OpenGL, Mesa).
ImageIO. OpenGL, Mesa.
Summary. Exercises.
4. Creating Custom KDE Widgets.
Widget Basics.
Understanding the QWidget Base Class. Widget Attributes. Signals and Slots. Sample Widget Class Declaration. Documentation.
Painting Widgets.
When Painting Occurs. Repainting Efficiently. Painting Your Widget with QPainter. Recording Drawing Commands with QPicture. A Simple Widget.
Using Child Widgets.
Geometry Management. Playing the Game.
Handling User Input.
Mouse Presses. Keystrokes.
Summary. Exercises.
5. KDE User Interface Compliance.
The KDE Document-Centric Interface.
The Menubar and the Toolbar. Creating and Manipulating Actions. The Statusbar. Content Area.
Helping the User Use Your Application.
ToolTips, What's This?, and More.
Standard Dialog Boxes. Summary. Exercises.
6. KDE Style Reference.
Accessing the Standard Actions. Session Management. The Standard KDE Icons. Internationalization. Playing Sounds. User Notifications. Executing Other Programs. Network Transparency. User Friendliness. Summary. Exercises.
II. ADVANCED KDE WIDGETS AND UI DESIGN TECHNIQUES.
7. Further KDE Compliance.
Drag and Drop.
Responding to Drop Events. Starting a Drag.
Application Configuration Information.
Accessing Configuration Files.
Session Management. Application Resources.
Standard Resource Locations. Application Resources. Creating .desktop Files.
Network Transparency.
Programming Example.
Summary. Exercises.
8. Using Dialog Boxes.
Getting Started with the Dialog Widgets. Dialog Layout the Simple Way. Dialog Modality-Modal or Modeless Dialogs.
Removal of Modeless Dialogs.
KDE User-Interface Library (kdeui).
Ready-to-Use Dialogs. Building Blocks (Manager Widgets).
Dialog Style and KDialogBase. A Larger Example: The Option Dialog in KEdit. User Interface Design Rules for Dialogs. Summary. Exercises.
9. Constructing A Responsive User Interface.
The Importance of Responsiveness. Speeding Up Window Updates.
Experimenting with KQuickDraw. Flicker-free Updates.
Performing Long Jobs.
Using QTimer to Perform Long Jobs. Enabling/Disabling Application Functions. Speed Issues. An Alternative to QTimer.
Summary. Exercises.
10. Complex-Function KDE Widgets.
Rendering HTML Files.
A Simple Web Browser.
Manipulating Images.
Comparison of QImage and QPixmap. An Image Viewer/Converter.
Checking Spelling.
Using KSpell in an Application. Modal Spell Checking. Configuring KSpell.
Accessing the Address Book.
Selecting a Contact.
Summary. Exercises.
11. Alternative Application Types.
Dialog-Based Applications.
Creating the Dialog-Based Application.
Single-Instance Applications. Panel Applets. Summary. Exercises.
III. APPLICATION INTERACTION AND INTEGRATION.
12. Creating and Using Components (KParts).
The Difference Between Components and Widgets. The KDE Component Framework. Describing User Interface in XML. Read-Only and Read/Write Parts.
Read-Only Parts. Read-Write Parts.
Creating a Part. Making a Part Available Using Shared Libraries. Creating a KParts Application. Embedding More Than One Part in the Same Window. Creating a KParts Plug-in. Summary.
13. DCOP-Desktop Communication Protocol.
Motivation. History. Underlying Technologies.
ICE-The Inter-Client Exchange Mechanism. Data Streaming.
Architecture. Description of DCOP's Programming Interface.
Starting it All. Using send(), call(), process(), and Friends. Automated Elegance-dcopIDL. Makefile Magic.
Developer Concerns and Tools in DCOP.
Stay Informed. Referencing DCOP Objects. Signals and Slots Through the DCOP Server. DCOP with an Embedded KPart. Performance and Overhead.
DCOP Use in KDE 2.0-A Few Examples.
KUniqueApplication. KNotify. Little Jewels: dcop and kdcop. Neighbors in Visit-dcopc, XMLRPC, and Bindings.
Summary.
14. Multimedia .
Introducing aRts/MCOP.
Overview of This Chapter.
A First Glance at Writing Modules. Step 1-Write an Interface Definition in the IDL Language. Step 2-Pass That Definition Through mcopidl. Step 3-Write an Implementation for the Interfaces You've Declared. Step 4-Register That Implementation with REGISTER_ IMPLEMENTATION. Step 5-Maybe Write a .mcopclass File. How to Use the New Module
MCOP.
The IDL Language. Invoking the IDL Compiler. Reference Counting. Initial Object References. Accessing Streams. Module Initialization. Synchronous Versus Asynchronous Streams. Connecting Objects.
Standard Interfaces.
The SimpleSoundServer Interface. The KMedia2 Interfaces. Stereo Effects/Effectstacks.
Implementing a StereoEffect.
IDL Again. The Code. Using the Effect.
KDE Multimedia Besides MCOP.
KNotify API and KAudioPlayer. LibKMid. aKtion.
The Future of MCOP.
Composition/RAD GUIs. Scripting. More Media Types.
Summary. Exercises.
IV. DEVELOPER TOOLS AND SUPPORT.
15. Creating Documentation.
Documenting Source Code.
Obtaining and Installing KDOC. Using KDOC. Library Documentation. Class Documentation. Method Documentation. Class and Method Documentation.
Documenting Applications.
Obtaining and Installing KDE DocBook Tools. Processing DocBook Documentation. Writing DocBook Documentation for KDE.
Summary.
16. Packaging and Distributing Code.
The Structure of a Package. Administrative Files.
Configuring the Top-Level Directory. Configuring the Subdirectories. Updating Administration Files. Creating Shared Libraries. Using Test Results. Make Targets.
Distributing Your Application.
Informative Text Files. Cleaning Up. Uploading and Announcing Software.
Summary.
17. Managing Source Code with CVS.
What Is CVS?
The Role of CVS in the KDE Project.
CVS Organization.
Module Names. Branches.
Accessing Source Code in CVS.
Snapshots. The WWW Interface to CVS. CVSup. CVS Accounts.
Installing and Using CVSup. Installing and Using cvs.
Frequently Used Commands.
Summary.
18. The KDevelop IDE: The Integrated Development Environment for KDE.
General Issues.
Be User Friendly-Be Developer Friendly.
Creating KDE 2.0 Applications.
Available Templates for KDE 2.0 Projects. Editing Your Project.
Getting Started with the KDE 2.0 API.
How to Search for Information.
The Classbrowser and Your Project. The File Viewers-The Windows to Your Project Files.
The Logical File Viewer (LFV). The Real File Viewer (RFV).
The KDevelop Debugger.
Setting the Debugger Options. How to Enable Debugging Information. Running a Debugging Session.
KDevelop 2.0-A Preview. Summary.
19. Licensing Issues.
What Are the "Issues?".
What Licenses Are Involved? How Do the Licenses Affect Me?
License Usage by KDE.
Library GNU Public License (LGPL). The GNU Public License (GPL). The GPL Versus Qt "War".
The License Usage by Qt.
The FreeQt License. The Q Public License (QPL).
The KDE/Qt License History.
The Genesis of the QPL. The Evolution of the QPL.
Summary.
V. APPENDIXES.
Appendix A. KDE-Related Licenses
GNU Library General Public License (LGPL). GNU General Public License.
Appendix B. KDE Class Reference.
Appendix C. Answers.
Index.