K Desktop Environment

Capítulo 11. El editor de diálogos

The KDevelop integrated dialog editor allows the easy construction of widgets and dialogs your application uses all by graphical means. You see the direct appearance of your dialog as it will be presented to the user. Using the dialog editor is usually the first step you would take after creating a new project with the KAppWizard to create your main view, the user interaction dialogs and, after finishing the graphical work, the code generation. This way, your project will contain all the usually considered "difficult" parts that normally would take a long time to implement. Then, the "rest" of your work is implementing the functionality in the generated code. This chapter deals with how to use the dialog editor to create your project widgets as well as what to do in case you see your widgets need corrections or additions during the further development process.

You can switch to the dialog editor either by selecting "Dialog Editor" from the "View "-menu or by the according toolbar icon. To switch back to the Project Editor, select "KDevelop" from the dialog editor 's "View "-menu or by the icon in the toolbar.

What else does the dialog editor 's interface offer you ? Mainly, that its appearance is almost the same as the project editor in term of the main view separation as well as the menu- and toolbars. This allows you to make yourself accustomed with the dialog editor very quickly and, as he completely interacts with the project management, stay in the dialog editor if you want to control your build-process. Actions that require to switch back to KDevelop will do that automatically for you, like accessing the documentation browser. Just select the menu commands, and KDevelop reacts to your will.

The following chapters give you an overview of the dialog editor interface, how to create a new dialog initially and how set up the properties of the child widgets that your dialog contains.

11.1. The Dialog Editor View

11.1.1. The Mainview

The dialog editor 's view is logically separated by:

  • The Widgets Tabulator, containing the "Widgets", "Dialogs" and "Items" tabs. These are described in Adding Widgets.

  • The Widget-Editor, representing the editing view for creating your dialog. See The Widget Editor

  • The Properties window, containing a list of properties and their values, dependent on the currently selected widget in the widget editor. See Setting Properties for information how to specialize the widget's behavior and look.

11.1.2. Menubar , Toolbar and Statusbar differences to KDevelop

In Dialogeditor mode, KDevelop changes the menubar, toolbar and statusbar slightly to provide the functionality you need for creating widgets . These are:

11.1.2.1. Menubar

"File"-menu : . "Open" allows to open a dialog definition file.

"View"-menu : replaces "Tree-View" with "Widgets-View", en/disabling the Widgets-View tabulators; adds "Properties-View" to en/disable the Properties-View and "Grid Size" to let you specify the grid size in pixels for horizontal and vertical values.

"Build"-menu : replaces "Compile File " with "Generate Sources". This lets you actually generate the sources for your dialog.

11.1.2.2. Toolbar

The toolbar contains a new icon for "New Dialog" as well as a replacement for "Compile File " by "Generate Sources".

11.1.2.3. Statusbar

The statusbar is providing you information about the currently selected widget, especially displaying the values for X and Y size in the coordinate system. For Statusbar help, you are provided the same functionality than in Project-editing mode.

While changing widget size, the statusbar shows the current values for width and height of the selected widget.