Archive:Development/Tutorials (zh CN)

From KDE TechBase
Revision as of 09:32, 24 September 2007 by Roy (talk | contribs) (→‎KOffice)

Template:I18n/Language Navigation Bar (zh CN)

教程是学习KDE,发现KDE都能为你做哪些事以及如何做的捷径。下面是当前可用的KDE4教程列表。关于KDE3和KDE2的材料可以在本页的底部找到。

KDE4编程介绍

你是否对用KDE4写程序感兴趣呢?这个系列教程的目的是让那些对KDE编程没有任何概念的新手能够入门。

Hello World
本教程介绍了KDE4编程的最基本的知识
创建主窗口
本教程将向你展示关于应用程序最重要的部分──主窗口──的魔术。
使用KActions
如何向菜单和工具栏中添加动作。

基础知识

移植你的程序
帮助你将应用程序从Qt3/KDE3移植到Qt4/KDE4
CMake介绍
介绍如何使用KDE4的构建系统CMake。
常见编程错误
介绍各种在开发Qt和KDE应用程序时常见的错误,以及如何避免它们。
使用Qt Designer构建用户界面
如何使用designer创建UI文件,以及如何将它们集成到KDE程序中。
使用命令行选项
使用KDE的命令行参数类来简化对命令行参数的处理与访问

测试与调试

调试你的应用程序
介绍在你调试KDE应用程序时可以采用的工具、技术和技巧。
使用QTestLib为Qt4与KDE4编写单元测试 (原始出处)
Brad Hards的教程,介绍了如何使用QTestLib编写单元测试。它是一个基于例子的教程,仍在开发中。
检测错误代码的半自动方法
介绍了一些在KDE代码中检测错误代码的技术

使用KConfig管理配置数据

KConfig介绍
An overview of the KConfig classes and how to use them in your application code
使用KConfig XT
Tutorial on how to efficiently use the KConfig XT framework.
更新KConfig文件
Tutorial on how to write an update script to keep changes in your application's config file format in sync with the user's already existing config file

服务:应用程序和插件

服务框架介绍
An overview of the services framework in KDE and what it provides the application developer. Covers the system configuration cache (SyCoCa), the source data files and what the indexed information can be used for.
使用Trader查询来发现服务
How to find services, such as plugins or mimetypes, that are indexed in the SyCoCa using Trader Query Syntax
使用KService创建和载入模块
Learn how to define custom plugin types, find installed plugins (including 3rd party plugins) and load them in an easy and portable fashion using KService.

本地化

Unicode介绍
An introduction to what Unicode is as well as how to handle Unicode data in KDE applications.
Writing Applications With Localization In Mind
This tutorial covers what localization is, why it's important and how to ensure your application is ready to be localized. A must read for all application developers.
避免常见的本地化陷阱
There are several common mistakes that prevent applications from being properly localized. Find out what they are and how to easily avoid them in this tutorial.
构建KDE本地化模块
Building and installing language support from KDE's localization (l10n) module is a good idea for those working on applications in the main KDE repository. Doing so will allow you to test your application in another language and spot problem areas. Learn how to do just that in this tutorial.
将i18n合并到构建系统中
Once your application is ready to be localized, the next step is to ensure that translation files are built automatically and kept up to date. This tutorial covers the necessary CMakeFiles.txt additions as well the process of distributing the resulting message catalogs with your application.
常见的i18n挑战和解决方案
This tutorial covers challenges that you may eventually run into such as translating handbooks and other data that exists outside of the source code, merging and handling obsolete .po files, dealing with freezes, coding in languages other than English and creating independent releases of or moving applications between KDE modules.
消息的语义标记
To ensure consistent presentation and more meaningful representations of messages in applications, semantic markup can be applied to messages marked for translation using the KUIT system. This tutorial describes how this system works.
自动化i18n代码检查
The Krazy code checker scans KDE's code and reports common i18n mistakes.

文档

API文档
This tutorial explains how to document your APIs properly.

应用程序自动化及脚本

D-Bus

D-Bus介绍
A straight-forward introduction to the core concepts in D-Bus from an application developer's perspective, this tutorial covers what D-Bus is and how it can be used by applications.
访问D-Bus接口
A step-by-step guide to calling D-Bus methods and connecting to D-Bus signals using QtDBus.
中级D-Bus编程
Tips to make use of QtDBus when faced with problematic real-world interfaces.
创建D-Bus接口
Learn how to expose functionality in your application by creating and using custom D-Bus interfaces. Covers generating the XML descriptions, instantiating interfaces at run time and setting up the build system with CMake.
D-Bus自动启动服务
Turn your application into a D-Bus autostart service with this tutorial. This D-Bus feature, also known as "D-Bus service activation", will ensure that even when your application isn't running that D-Bus calls made to it will work by relying on the D-Bus daemon itself to start your app if and when needed.
Porting from DCOP to D-Bus
Port your applications from DCOP to D-Bus with this handy guide.

Konqueror

创建Konqueror服务菜单
This tutorial shows you how to create mimetype-specific actions in Konqueror's context menu (aka "servicemenus").

Kross

Kross介绍
An introduction to the Kross Scripting Framework.
使用Kross脚本编写插件
This tutorial provides a step-by-step introduction how to integrate scripts as plugins into a KDE application.

KOffice

KOffice概览
This document shows an overview of the different KOffice plugin types and tells you what each of their purpose and strengths are. If you are new with KOffice plugins, this is the place to start.
创建KOffice Flake插件
This tutorial shows you how you can build a plugin for KOffice applications to allow you embed content in ODF documents using Flake.
编写KWord脚本
This tutorial shows how to script KWord with Python, Ruby or JavaScript using Kross.
编写KSpread脚本
This tutorial shows how to script KSpread with Python, Ruby or JavaScript using Kross.
编写Krita脚本
This tutorial shows how to script Krita with Python, Ruby or JavaScript using Kross.

SuperKaramba

SuperKaramba教程
This tutorial provides an overview of SuperKaramba, theme files and scripting with Python, Ruby and JavaScript.

搜索与元数据

Strigi

编写文件分析器
File analyzers extract data from files to display in the file dialogs and file managers. The data gathered this way is also used to search for files. KDE4 allows the use of multiple analyzers per file type. This tutorial describes how you can write new analyzers.

Nepomuk

Nepomuk初步
Nepomuk is the KDE library which provides easy access to metadata in the Nepomuk-KDE system. Learn how to make your application create and read metadata using the Nepomuk system.

硬件发现(Solid)

Solid介绍
An introduction to using the Solid hardware discovery and interaction system in KDE applications.
访问网络信息
How to use the Solid system to get information about the network

多媒体(Phonon)

Phonon
How to start with the multimedia API

Plasma

Plasmoids入门
Creating your first plasmoid in C++ with SVG background, icon and text


Kate / Kwrite

Kate插件入门
Creating your first plugin

打印

Hello World
Introduction to the KDE printing system
TODO 打印对话框
Using the KDE print dialog

获取热点新材料

获取热点新材料入门
An introduction to the developer-friendly network update system that allows KDE applications to fetch new application data at runtime in a user friendly manner.
KNewStuff安全项 (原文链接)
Tutorial showing how to share resources in a secured way (KDE 3.4 and later). By András Mantia <[email protected]>.

快速应用程序开发(RAD)

Python

101 signals 与slots介绍
A simple introduction to Qt's signal and slot architecture.

Ruby

KDE Ruby Korundum教程
A ruby version of Antonio Larrosa Jiménez's KDE tutorial by Richard Dale. See the Ruby Developers Corner for Qt tutorials and other info.
Qt4 Ruby教程
Trolltech's fabulous introductory tutorial to Qt, translated to Ruby.

Shell

使用KDE对话框进行脚本编程 (原文链接)
Tutorial by Brad Hards that describes how to use KDE dialogs in shell scripts with kdialog. It is presented as an example based tutorial.

其它教程

使用KDE游戏库

KStandardGameAction
Using libkdegames to make your game fit the kdegames standard
Highscores
Implementing a simple highscore table into your game
主题选择器
Using the libkdegames theme selection dialog

2D绘图(KPlotWidget)

使用KDE数据绘制widget
This tutorial introduces KPlotWidget, which is used for 2-D data plotting. It includes information on simple usage of the widget (including adding and modifying data sets, and customizing the plot axes and labels), and advanced customization (including extending the widget through sub-classing).

拼写与语法检查

在KDE应用程序中添加拼写或语法检查
This tutorial introduces Sonnet and how one may use it to add language correction to your KDE application. Sonnet's auxiliary features shall be described in a separate tutorial.

像素图缓存(KPixmapCache)

使用KDE像素图缓存
This tutorial shows how to use KPixmapCache to cache e.g. pixmaps generated from SVGs or some data.

KDE2和KDE3相关材料

KDE3教程
These tutorials cover topics related to KDE3.
KDE2教程
These tutorials cover topics related to KDE2.