KDevelop Felhasználói Kézikönyv -Fordítás alatt: Áttekintés

Tovább Vissza Tartalom

## 5. Áttekintés

Looking at KDevelop, the user interface can be described by it's logical separation: the main window, the treeview and the output window, surrounded by the menubar, toolbars and the statusbar. This section describes the purpose of each part of the interface, starting by the windows, followed by the bars and the functions they provide.

## 5.1 A Fő ablak

The main window consists of four tabulators for which the left two are for editing purpose. First comes the Header-/Resource window for headers and any other text files like the documentation SGML's, then the C/C++ window for sourcecodes. These are followed by the Documentation window displaying in HTML-format. At last is the Tools window for external programs like KIconEdit and KDbg which are embedded into the IDE. Any Tool that is registered can be accessed via the Tools-menu; whereas the registration of third-party programs can easily be done by a configuration dialog (see General Configuration). For a description of the Editor windows functionality, see chapter Working with the Editor, and for the Helpbrowser, you should look at section Using the Documentation Browser.

## 5.2 Az Osztályböngésző és a fájlnézegetők

### The Class Viewer

The Class Viewer (CV) shows the classes of your project as well as global functions and variables. Opening the tree will show all member functions and members with symbols for attributes (private, protected and public, signals and slots), so you can see the properties of members visually without switching to the header file. Selecting the class name will open the according headerfile containing the class and set the cursor to the class declaration beginning. Selecting member functions will open the implementation file and place the cursor at the function header. For elements, KDevelop will look for the header file and place the cursor at the line the element is declarated. The classviewer also provides popup-menus that offer more specified options, see The Class Browser for more detailed information.

### The Logical File Viewer

The Logical File Viewer (LFV) allows sorting files by filters in groups. Individual groups can be added by the properties entry of the project menu or by a right click on the tree items. This allows a more specialized search for files that you want to access quickly, in the first place only showing project-included files. According to their Mime-type, the files will be opened when selected. You will like the LFV for things like selecting pixmaps- this will start KIconEdit (if installed on the system) in the Tools-window and opens the chosen picture.

### The Real File Viewer

The Real File Viewer (RFV) shows the project directory tree with all files, so you can edit non-project files or files hidden by the LFV like configure.in and Makefiles. Popup-menus also provide functions like adding or removing files to the current project.

### The Documentation Tree

The Documentation Tree (DOC) displays all available HTML-based documentation that is configured as books. Selecting a book will open the first page in the Browser window. Also, a popup-menu provides personal configuration for additional HTML-based documentation packages.

## 5.3 A Kimeneti ablak

The Output window is separated as well into a messages window, a stdin/stdout window and a stderr window for the following necessities:

- messages window: displays all output of the Compiler. Clicking on error messages will change the edit widget to set the cursor to the line the Compiler found an error.
- stdout window: display for terminal based applications that send messages to the standard output of the computer. Note that Terminal applications are now started in an external console window.
- stderr window: displays all the error messages your program produces. This is useful for testing purposes. The Output window is programmed to show up each time an external process is called, such as make or a terminal application.

## 5.4 Menubar Commands

### File Management and Printing

This section covers the functions that KDevelop provides about files; accessed via the File-menu in the menubar or by the according icons in the toolbar:

- New Ctrl+N Opens the "New File" dialog, allowing to create a new file. The file can be created using different templates and the filename has to be given as well as the path where the file will be created.

- Open Ctrl+O displays the "Open File..." dialog and lets you choose a file to be opened.

- Close Ctrl+W Closes the file in the top editing window

- Save Ctrl+S Saves the file opened in the top editing window. If the file has not been saved yet, the "Save File As..." dialog will be opened to let you choose a path and filename for the file to be saved.

- Save As... Opens the "Save File As..." dialog to let you save the current file under a new filename

- Save All Saves all changed files

- Print... Ctrl+P Opens the "Print File" dialog where you can set various options for printing either using enscript or lpr

- Quit Ctrl+Q Exits KDevelop. If files are changed, you will be asked if you want to save these files.

### Editing Files

Here, the "Edit" menu and the according icons in the toolbar are covered which provide editing files. Also the editing functions are available via a context-menu in the editor.

- Undo Ctrl+Z Reverts the last editing operation

- Redo Ctrl+Y lets you do the last undo step again

- Cut Ctrl+X cuts out a selection and copies it to the system clipboard.

- Copy Ctrl+C copies a selection to the system clipboard. This also counts for selections made in the documentation browser.

- Paste Ctrl+V inserts the clipboard contents at the current cursor position.

- Indent Ctrl+I Indent moves a selection to the right

- UnIndent Ctrl+U UnIndent moves a selection to the left

- Insert File...Ctrl+Insert Lets you select a file and inserts its contents at the current cursor position

- Search... Ctrl+FOpens the Search dialog that looks for an expression in the current file. For a search across several files, "Search in files..." should be used.

- Repeat Search F3 Repeats the last search for an expression. This also counts for searches that were made across the documentation, where more than one hit was found in the same page. The next hit will be displayed by choosing "Repeat Search" or F3 and signed as marked.

- Replace... Ctrl+R Opens the "Search and Replace" dialog that allows the search for an expression and replaces the found text with a new expression.

- Search in files... Ctrl+Alt+FDisplays the "Search in files..." dialog, that handles `grep` on whole directories with wildcards. Search results are displayed with a list of the filenames, line and expression. Choosing an entry will open the file and the cursor is set to the line of the search result

- Select All Ctrl+A Selects the whole text of the file currently opened in the top editing window

- Deselect All Deselects the whole text of the current file. This is often used for multiple selections so you don't have to deselect each one separately

- Invert Selection Inverts the selection, meaning that a selection becomes deselected and text which is not selected becomes selected.

### View Configuration

The View-Menu covers closing and opening functions for windows and commands to enable/disable the tool- and statusbar as well as to jump errors in the code.

- Goto Line... Ctrl+GOpens a "Go to Line..." dialog that lets you insert a linenumber to show in the actual file. The last linenumber is remembered and marked, so you can either jump to that line again or just enter a new linenumber you want to see.

- Next Error F4Jumps to the next error KDevelop detects from the output. The output message of Make or other tools should give you a descriptive help what the problem is, so you can correct the error.

- Previous Error Shift+F4 Jumps to the previous error that was reported.

- Dialogeditor Ctrl+D Switches to the dialog editor

- Tree-View Ctrl+T en/disables the Tree window on the left side of the main view containing the Class Browser, LFV, RFV and DOC-tree.

- Output-View Ctrl+B en/disables the Output window on the bottom of the main view.

- Toolbar en/disables the toolbar.

- Browser-Toolbar en/disables the browser toolbar, containing the back, forward and search buttons for the browser

- Refresh rescans all files to rebuild the Class Browser. The scanning progress is shown in the statusbar progress display.

### Creating and Maintaining Projects

This section describes functions that are available in the "Project"-menu and are supposed to cover the creation and maintaining of projects

- New... Starts the KAppWizard and allows you to create a new project by choosing application type, name, version and other options.

- Open Shows the Open Project dialog, where you can choose a KDevelop project file to be opened. After selection, the project will be loaded.

- Open recent project... contains a submenu with the last 5 opened projects. You can open a project more easily using the recent project menu.

- CloseCloses the current project. This is mostly done automatically when you quit KDevelop, invoke the KAppWizard or open another project.

- New Class...Starts the class generator to create a new class that will be added to the current project. The class generator lets you specify classname, inheritance and filenames for the new class.

- Add existing File(s) Opens a selection dialog where you can choose the files that you want to add to the current project and the path where they will be copied to. If you choose a destination that was currently not included in the project, e.g. creating a new subdirectory, KDevelop will copy the files to add to the new subdirectory and create a new Makefile.am. After the copy process, your project will be rebuild by automake and autoconf to include the new subdirectory into the make-process.

- Add new translation file Opens a language selection dialog that lets you choose the translation file language that will be added to the project. This is mostly used by translators who can easily add their language to the project and work on the translation without having to care about the Makefile.am's

- File Properties Shift+F7 Opens the File Properties dialog showing a copy of the LFV and the project file options. Here, the properties for your files have to be set like installation path and file type.

- Make messages and merge This is intended to create the messages file for your project. The message file is the one containing all strings that are set up in the sources for internationalization and is used by translators to create the .po file for their target language.

- Make API-Doc Calls KDoc on your header files and generates a HTML output with the documentation of your project classes.

- Make User-Manual runs KSgml2Html on your manual SGML file, creating a HTML user manual. If KSgml2Html is not installed, sgml2html will be used to do this.

- Make Distribution:

  - tar.gz creates a distribution file of your current project in the project directory that is ready to ship to the end-users containing the sources of your project. The end-user has to `tar zxvf yourproject.tar.gz` to unpack it to a source directory and use the standard commands `./configure, make` and `make install`.

- Options F7 Opens the Project Options dialog that lets you change various settings for your project. This could be a new version number or the compiler options to set to -02 for a release with optimization.

### Building Projects

This section describes the Build menu that covers all actions to be done with make or actions like rebuilding the project's online help or API documentation.

- Compile file... Ctrl+F8Active, if the top editing window is the C++ Window. This only compiles the current implementation file and lets you save time in case you suspect errors.

- Make F8 Invokes the make-command to your project and builds the target.

- Rebuild All Rebuilds all object files and the target of you project.

- Clean Rebuild All Cleans the project directory from all make-created files and rebuilds the target.

- Stop Build F10 Stops the current process.

- Execute F9 Executes your target after building the program with make.

- Execute with Arguments Alt+F9 Executes your target with arguments. First, a dialog appears to let you specify the execution arguments (which are saved in the project for the next session), then your application uses the entered commandline. Mind that your application program is started from the project directory directly

- Debug... Opens KDbg in the Tools-Window to debug your application. In this case, KDbg automatically opens the file containing the main() function and executes your application.

- Distclean Removes all files that are generated by the project like object files etc. Distclean has to be done before distributing your project, so the distribution file doesn't contain any platform-specific files like those that were generated by your Compiler.

- Autoconf and automake Calls Make on the file Makefile.dist, located in your main project directory. Makefile.dist contains all commands for automake, autoconf etc. to build your project. If you added files manually or changed macros yourself, you should run Autoconf afterwards, followed by Configure to recreate all Makefiles.

- Configure Executes the configure-script generated by autoconf. If this command cannot be executed, run Autoconf and then Configure again.

### Calling Tools

The Tools-menu contains by default the entries for the following programs if installed: KDbg, KIconEdit and KTranslator. These are checked by the KDevelop installation program and inserted in the given order into the menu. Invoking a tool will open the "Tools"-window and start the selected program inside this window. The Tools menu can be edited by the Tools-entry in the Options-menu; see Configuring the Tools Menu.

### Changing KDevelop's settings

The Options-menu contains all entries for invoking configuration dialogs with which you can change KDevelop's default settings. Major settings like those for the editor or printing have their own entries; general settings of KDevelop's behavior can be made with the KDevelop Setup dialog.

- Editor... Allows the configuration of the editor's behavior like word-breaking, selections etc.

- Editor Colors... Here, you can set the color-configuration of the editor like e.g. the background.

- Editor Defaults... This sets the default display like font and fontsize for the editor

- Syntax-Highlighting This dialog lets you configure the fonts and colors for the highlighting of several programming languages, including HTML.

- Documentation Browser In this tab-dialog, you can set the fonts, sizes and colors for the internal Helpbrowser

- Configure Printer... Contains the entries for the printer configuration dialogs.

  - enscript Configures the printer for use with enscript. See Printing for more information.

- Tools... Opens the Configure Tools dialog. Here, you can configure the "Tools" menu by adding or removing programs that will be started in the Tools-window.

- KDevelop Setup Opens the KDevelop Setup dialog. The first tabulator configures general settings, followed by the key-configuration and the Documentation settings. The Documentation settings also include the generation of a new set of HTML-library documentation and the rebuilding of the search index for the Helpbrowser.

### The Window Menu

The Window menu contains a list with all currently open files. This allows a quick switch to another file you're currently working on.

### Managing Bookmarks

The Bookmarks menu is intended for adding and removing bookmarks you want to set in the current editing file. As KDevelop uses two editing windows, each one configures it's bookmarks separately.

- Set Bookmark Opens a context-menu with up to nine configurable bookmarks. This allows setting a bookmark to a certain entry in the bookmarks menu by logical reasons.

- Add Bookmark Ctrl+Alt+A Adds the line of the current cursor position to the bookmarks menu as a bookmark. Mind that this could overwrite a bookmark set with the Set Bookmark-option. If the browser is opened, a bookmark will be added to the Browser-Window bookmarks menu.

- Clear Bookmarks Ctrl+Alt+C Clears the bookmark-entries for the top editing window or the browser, e.g. if the Header-Window is visible and you call Clear Bookmarks, the entries for the Header-Window are deleted.

- Header-Window Contains the bookmark-list for the Header-Window. Selecting a bookmark will set the cursor to the selected bookmarks' line. Mind that bookmarks are only assigned to the file they are set to, so if you change to another file, the bookmarks are not deleted but choosing a bookmark won't change to the file they are assigned to as well.

- C/C++-Window Contains the bookmark-list for the C/C++-Window. The preferences are the same as for the Header-Window.
- Browser Window Contains the browser bookmarks. Selecting a bookmark will open the browser with the selected page.

### Online Help

The Help-menu contains entries for navigating in the Helpbrowser as well as entries for library and online-documentation for the most recently used cases. Accessing additional online-documentation can be achieved with the DOC-tree in the treeview automatically opened (if Autoswitch is enabled) when changing to the Documentation Browser window.

- Back Alt+ Left Arrow Opens the page opened before the actual one.

- Forward Alt+ Right Arrow Opens the next page of the browser-history, available after a "Back"-action.

- Search Marked Text F2 Scans the search-index for text currently marked in the editing windows or the browser-window. After the search, a result page is shown which lets you select the help-page to switch to. After choosing a page, the browser will highlight the found entry for the expression the search was invoked for. With the F3 key the next search result on the same page will be displayed if more than one hit was reported for the search on one page.

- Search for Help on...Opens the Search for Help on... dialog that lets you search for a specific expression you want help on.

- The User Manual to KDevelop F1 Opens the User's Manual to KDevelop index page (this handbook).

- The KDevelop Programming Handbook Opens the KDevelop Programming Handbook index page. This handbook contains a complete programming guide to KDE development.

- KDE Application Tutorials Changes to the index page of the KDE Application Tutorials handbook. This handbook explains how to build the Qt tutorial applications and introduces you to KDE programming by developing an example application.

- The KDE Library Reference Guide Changes to the index page of the KDE Library Reference Guide. This handbook contains detailed information about using the KDE/Qt libraries separated on topics such as event handling.

- The KDE 2 Developer´s Guide Changes to the index page of the KDE 2 Developer´s Guide. This Handbook contains information about the most recent KDE development and how to prepare your application to be KDE 2-ready.

- C/C++ Reference Displays the language reference index page. If the reference is not installed, an error page shows you how to get the reference and how to install it correctly.

- Tip of the Day Opens the Tip of the Day dialog to inform you about KDevelop's features.

- KDevelop Homepage Opens the KDevelop Homepage in the browser window if Internet access is provided.

- Bug Report... Opens the KDevelop Bug Report dialog, where you can send a bug-report directly to the KDevelop Team by email. See Bug Reporting

- Project-API-Doc Changes to the project's class-documentation index file.

- Project-User-Manual Opens the User manual's index file of your current project. This can be used to review the HTML-output generated by KSgml2Html

- About KDevelop... Shows the aboutbox of KDevelop containing the used version number and the authors' names and email-addresses as well as reference to the licensing of KDevelop.

## 5.5 Toolbar Items

KDevelop provides quick access to a various set of commands by it's toolbars. These are the standard and the browser toolbar; in dialog editor mode only the standard toolbar is visible. Both can be en-/disabled by the according menu entries in the "View" menu; also dragged out of the main window and replaced on each side of the working area.

### The Standard Toolbar

The standard toolbar provides quick access to the most recently used functions for file processing and editing as well as building your application. The buttons execute the following commands from left to right:

- Open Project - shows the open project dialog
- Open File - shows the open file dialog and contains a delayed popup to fast select the current project header and source files.
- Save File - saves the currently opened file to disk
- Print File - opens the printer dialog
- (separator)
- Undo - reverts the last action
- Redo - executes a reverted action again
- Cut - cuts out the current selection
- Copy - copies the current selection to the system clipboard
- Paste - pastes the current clipboard contents to the actual cursor position
- (separator)
- Compile File - compiles the file currently visible in the source file window. In Dialogeditor mode replaced by the Generate Files button.
- Make - invokes make on the project
- Rebuild All - rebuilds the project
- Debug - opens KDbg with the application binary for debugging in the Tools- window
- Execute - runs the application target binary
- Stop - cancels the current process
- (separator)
- Dialogeditor - switches to Dialogeditor mode. There, the button is replaced by a Sourcecode editor button
- Tree-View - en-/disables the treeview and works as a toggle button to display the current state
- Output-View - en-/disables the output view and works as a toggle button to display the current state
- (separator)
- What's this..? help button - changes the cursor to a question arrow and lets you get information about GUI components of KDevelop

### The Browser Toolbar

The browser toolbar is another toolbar that provides a lot of useful commands for browsing files and the documentation. The toolbar contains:

- the Class combo box - lets you select a class of the current project to browse to
- the Method combo box - lets you select a method of the current class and browses to the implementation of the method
- the Class-assistant button - on a single click will bring you to the declaration of the method currently selected. Contains a delayed popup to access the Classtools for adding Classes, Methods and Attributes as well as the browsing commands.
- Back - browses back in the documentation browser history; contains a delayed popup to select a certain page of the back history.
- Forward - browses forward in the documentation browser history; contains a delayed popup to select a certain page of the forward history.
- Stop - stops the browser from loading a documentation file request
- Reload - reloads the currently displayed page
- Home - opens the KDevelop User Manual index page in the browser
- Search Marked Text - searches the documentation index for the selected text; works with the browser and the editor windows
- Search for Help on... - opens the the Search for Help on.. dialog to let you enter a keyword to search in the documentation

## 5.6 Billentyűkombinációk

This section handles the predefined as well as the standard values for configurable keyboard commands used in the KDevelop IDE. You should see section Changing Keyboard Shortcuts for a detailed explanation how to change assigned values to commands.

### Shortcuts for Text Processing

### Cursor Movements

    one letter to the left                           Left Arrow
    one letter to the right                          Right Arrow
    one word to the left                             CTRL+Left Arrow
    one word to the right                            CTRL+Right Arrow
    one line upwards                                 Up Arrow
    one line downwards                               Down Arrow
    to the beginning of the line                     POS 1
    to the end of the line                           END
    one page up                                      PageUp
    one page down                                    PageDown
    to the beginning of the current file             CTRL+PageUp
    to the end of the current file                   CTRL+PageDown

### Text Selections

    one letter to the left                           SHIFT+Left Arrow
    one letter to the right                          SHIFT+Right Arrow
    one word to the left                             CTRL+SHIFT+Left Arrow
    one word to the right                            CTRL+SHIFT+Right Arrow
    one line upwards                                 CTRL+Up
    one line downwards                               CTRL+Down
    to the beginning of the current line             CTRL+POS 1
    to the end of the current line                   CTRL+END
    one page up                                      SHIFT+PageUp
    one page down                                    SHIFT+PageDown
    to the beginning of the current file             CTRL+SHIFT+PageUp
    to the end of the current file                   CTRL+SHIFT+PageDown

### Inserting and Copying Text, Tabulators

    en/disable insertmode                            INS
    copy selection to the clipboard                  CTRL+C, CTRL+INS
    insert text from the clipboard                   CTRL+V, SHIFT+INS
    delete current line                              CTRL+K
    insert line after current line                   END, then Enter
    insert line before current line                  POS 1, then Enter
    undo editing step                                CTRL+Z
    redo an undo step                                CTRL+Y
    tabulator                                        TAB

### Deleting Text

    delete letter left of cursor position            Backspace
    delete letter right of cursor position           Delete
    delete selected text                             Select text, then Backspace or Delete

### Searching Text within the Editor

    open Goto Line... dialog                         CTRL+G
    open Find Text dialog                            CTRL+F
    repeat last search                               F3
    open Search and Replace dialog                   CTRL+R

    open Search in Files dialog (grep)               CTRL+ALT+F
    search marked Text with Grep                     SHIFT+F2

    locate next error                                F4
    locate previous error                            SHIFT+F4

### Searching Text with the Documentation Browser

    search selected editor text in documentation     F2
    search selected browser text in documentation    F2
    display next search hit on the same page         F3

    search selected browser text within project                      SHIFT+F2

### Browser Shortcuts

    previous page                                    ALT+ Left Arrow
    next page                                        ALT+ Right Arrow

### Managing Bookmarks

    add bookmark                                     CTRL+ALT+A
    clear bookmark list                              CTRL+ALT+C

### Shortcuts for Toolbar Symbols

    Symbol "Open File"                               CTRL+O
    Symbol "Save File"                               CTRL+S
    Symbol "Print File"                              CTRL+P
    Symbol "Undo"                                    CTRL+Z
    Symbol "Redo"                                    CTRL+Y
    Symbol "Cut"                                     CTRL+X
    Symbol "Copy"                                    CTRL+C
    Symbol "Paste"                                   CTRL+V
    Symbol "Compile File"                            CTRL+F8
    Symbol "Make"                                    F8
    Symbol "Execute"                                 F9
    Symbol "Execute with Arguments"                  ALT+F9
    Symbol "Dialog Editor"                           CTRL+D
    Symbol "Back"                                    ALT+Left Arrow, if browser opened
    Symbol "Forward"                                 ALT+Right Arrow, if browser opened
    Symbol "Search Marked Text"                      F2

### Window Management

To switch to a certain window, press ALT plus the underlined letter in the window title, e.g. Tools would be Alt+T

### Shortcuts to Compilation Processes

    Compile current sourcefile                       CTRL+F8
    Build current project target                     F8
    Execute target after Build process               CTRL+F9
    Execute target with Arguments                    ALT+F9
    Stop the current process                         F10

Tovább Vissza Tartalom