by Charles Samuels
The KDE libraries and services are able to provide icons, translations, sounds, data, and network files. It's important to use these resources, rather than your own implementations, because even internal happenings, such as receiving a file from the Internet, may have a system-provided progress bar.
KDE is not just a few applications; it is more a set of libraries that allow users to feel that they are in an environment, not just using the same widget toolkit.
6.1. Accessing the Standard ActionsA new feature of KDE 2.0 is the Kaction class. In a standard toolbar you have standard events. Most applications share toolbars and menu items; rather than sharing those items, they are in fact sharing the KActions. For these events, there is the KStdAction class. Each KStdAction is created in the following form:
At the time this chapter was written, KDE provided the following actions that applications may share:
The standard actions provide their own icons, and the user can select those icons; the settings are set system-wide. Some special actions also exist, such as openRecent (which returns a KRecentFilesAction) rather than a KAction, showMenubar, showToolbar, and showStatusbar, which return KToggleAction. These actions are automatically placed into the correct positions in the menus: File
Edit
View
Go
Bookmarks
Tools
Settings
Help
Keep in mind that KDE differentiates between "Options" and "Configuration." Options are preferences only for this instance of the application. They are lost when the window is closed. Save Options makes them the default (and causes all other instances to inherit the options immediately). The configuration is relayed through all instances immediately and saved to disk when the OK button is pressed in the dialog. The application name is all in lowercase; it's recommended that you use the same name you used as the first argument to the KAboutData constructor, as described in Chapter 5, "KDE User Interface Compliance." The settings are checkable—toggled on and off with a check mark. |