Archive:Development/Tutorials (zh CN)

From KDE TechBase
Revision as of 05:40, 14 February 2009 by Hualiang.miao (talk | contribs) (构建KDE本地化模块;将i18n合并到构建系统中)

Template:I18n/Language Navigation Bar (zh CN)

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

KDE4编程介绍

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

Hello World
本教程介绍了KDE4编程的最基本的知识
创建主窗口
本教程将向你展示关于应用程序最重要的部分──主窗口──的魔术。
使用KActions
如何向菜单和工具栏中添加动作。
保存与载入
Introduces the KIO library while adding loading and saving support to our application.
命令行参数
Adds the ability to specify which file to open from the command line to our text editor.

'

基础知识

移植你的程序
帮助你将应用程序从Qt3/KDE3移植到Qt4/KDE4
CMake介绍
介绍如何使用KDE4的构建系统CMake。
常见编程错误
介绍各种在开发Qt和KDE应用程序时常见的错误,以及如何避免它们。
使用Qt Designer构建用户界面
如何使用designer创建UI文件,以及如何将它们集成到KDE程序中。

测试与调试

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

使用KConfig管理配置数据

KConfig介绍
概要介绍了KConfig相关的类,以及如何在你的应用程序代码中使用它们
使用KConfig XT
关于如何有效使用KConfig XT框架的教程
更新KConfig文件
关于如何编写一个更新脚本,以保证你程序的配置文件格式与用户已使用的现有配置文件一致的教程

服务:应用程序和插件

服务框架介绍
关于KDE中的服务框架,以及它们向开发人员提供了哪些功能的概述。覆盖了对系统配置文件缓存(SyCoCa)、源数据文件以及用索引信息可以做哪些事情的介绍
使用Trader查询来查找服务
如何使用Trader查询语法来查找那些在SyCoCa中被索引了的服务,如插件或者mime类型等
使用KService创建和载入模块
学习如何使用KService,以一种方便且易于扩展方式来完成诸如定义自定义插件类型、查找已安装的插件(包括第三方插件)、以及载入插件等任务。

本地化

Unicode介绍
对Unicode和如何在KDE应用程序中处理Unicode的一个简要说明。
编写考虑到本地化需要的应用程序
这篇教程内容涵盖了什么是本地化、为什么本地化很重要和如何确定您的应用程序已经为本地化做好准备。这是一份所有应用程序开发者的必读说明。
避免常见的本地化陷阱
通常有许多普遍易犯的错误阻碍应用程序被正确地本地化。这篇教程阐述了什么是错误的方式,并告诉您如何简单地避免这些错误。
构建KDE本地化模块
对那些开发KDE主应用库的人来说,联编和安装支持KDE的本地化的语言( l10n )模块是一个好主意。这样做可以让您测试您的应用程序在另一种语言并且迅速发现什么地方出问题了。本教程告诉我们如何做到这一点。

将i18n合并到构建系统中
一旦您已准备好进行本地化工作,下一步是确保翻译文件是自动创建并且是不断更新的。本教程涵盖了必要CMakeFiles.txt流程 以及您的应用程序中所产生的信息在发布时的流程。

常见的i18n挑战和解决方案
本教程涵盖你所可能遇到的各种挑战,诸如陷入如翻译手册时存在源代码以外的资料,合并和处理独立PO文件,处理冻结的文件,处理英语以外的语言和创建独立发布版本或者在KDE模块间转移一些应用。

消息的语义标记
为了应用程序中保证一贯的表述,并使得消息更有意义,用于标示语义标记翻译可使用KUIT系统。此教程说明本系统如何工作的。

自动化i18n代码检查
Krazy代码检查器扫描KDE的代码并报告常见的i18n错误。

文档

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.

Plugins and KParts

Writing kontact plugins
Kontact plugins are KParts. This tutorial describes how you can write one.
Using KParts
Learn how to load a KPart into an application window.

搜索与元数据

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 Quickstart
How to use Nepomuk resources in a quick and painless way without much fuss.
RDF and Ontologies in Nepomuk
An introduction to RDF and the usage of ontologies in Nepomuk.
Handling Resources with Nepomuk
Nepomuk is the KDE library which provides easy access to metadata in the Nepomuk system. Learn how to make your application create and read metadata using the Nepomuk system.
Using the Nepomuk Resource Generator
Nepomuk includes a resource generator which creates convenience classes for handling metadata.

硬件发现(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

Communication (Decibel)

Getting started with Decibel
This tutorial describes how to set up Decibel.
Handling TextChannels
This tutorial introduces the basics of handling incoming TextChannels by guiding you through building a simple text chat application.

Personal Information Management (Akonadi)

Developing Akonadi Resources
Akonadi Resources are agent programs which transport PIM data between Akonadi and a backend (files, servers, etc)

Kate / Kwrite

KTextEditor插件入门
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]>.

Goya

Introduction to Goya usage
An introduction for the Goya subsystem usage, which allows you to easily add widgets to your itemviews and connect their signals to your code, as they were real widgets.
Introduction to Goya usage (part 2)
The second part of the tutorial, with a slightly more complex example than the first part.

快速应用程序开发(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.

Graphics Programming

QPainter Perfomance
Hints on avoiding common mistakes leading to poor performance when using QPainter

使用KDE游戏库

KStandardGameAction
Using libkdegames to make your game fit the kdegames standard
Highscores
Implementing a simple highscore table into your game
Theme Selector
Using the libkdegames theme selection dialog
Palapeli Patterns
Creating a pattern for Palapeli

其它教程

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.

Using MarbleWidget (Marble)

Using MarbleWidget
This short tutorial describes how to use the MarbleWidget in your project

Using local SCM for KDE development

Using Git to develop for KDE
This tutorial shows how to use Git to develop for KDE

KDE2和KDE3相关材料

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