https://techbase.kde.org/api.php?action=feedcontributions&user=Deblocking&feedformat=atomKDE TechBase - User contributions [en]2024-03-29T13:39:46ZUser contributionsMediaWiki 1.40.2https://techbase.kde.org/index.php?title=Development/Tutorials/First_program_(ja)&diff=62950Development/Tutorials/First program (ja)2011-07-16T17:15:41Z<p>Deblocking: Created page with "{{Template:I18n/Language Navigation Bar|Development/Tutorials/First_program}} {{TutorialBrowser| series=Beginner Tutorial| name=Hello World| pre=[http://mindview.net/Books/TIC..."</p>
<hr />
<div>{{Template:I18n/Language Navigation Bar|Development/Tutorials/First_program}}<br />
{{TutorialBrowser|<br />
<br />
series=Beginner Tutorial|<br />
<br />
name=Hello World|<br />
<br />
pre=[http://mindview.net/Books/TICPP/ThinkingInCPP2e.html C++], [http://qt.nokia.com Qt], [[Getting_Started/Build|Building KDE]]|<br />
<br />
next=[[Development/Tutorials/Using_KXmlGuiWindow|Tutorial 2 - KXmlGuiWindow]]| <br />
<br />
reading=[[Development/Tutorials/CMake|CMake]]<br />
}}<br />
<br />
==要約==<br />
あなたの最初のプログラムは、世界に向かって親しみやすく、「こんにちは、世界」と挨拶しましょう、いいですか? そのために、わたしたちは{{class|KMessageBox}}を使って、ボタンの一つを、カスタマイズします。<br />
[[image:introtokdetutorial1.png|frame|center]]<br />
<br />
{{tip|あなたが出会ったどれかのクラスについて多くの情報を得るためには、Konqueror が短時間での近道になります。KMessageBox についての知識を探す時は、"kde:kmessagebox" と Konqueror に入力すれば、あなたはドキュメントに移動できます}}<br />
<br />
{{tip|<br />
You might want to use KDevelop for your projects, which does many nice things like code completion, easy access to API documentation or debugging support.<br />
<br />
Read [[Getting_Started/Set_up_KDE_4_for_development#KDevelop|this tutorial]] to set up KDevelop correctly for this task. You probably want to check if the setup is working by testing opening an existing KDE 4 application with KDevelop first.<br />
<br />
You still need to edit the CMake files by hand though.<br />
}}<br />
<br />
{{tip|<br />
あなたは、コード補完、API ドキュメントの簡単な利用、バグ修正の操作など、たくさんのよい働きをする KDevelop を使いたいかもしれません。 <br />
<br />
KDevelop をこの作業のために適切に準備するためには、[[Getting_Started/Set_up_KDE_4_for_development#KDevelop|this tutorial]] を読んでください。 You probably want to check if the setup is working by testing opening an existing KDE 4 application with KDevelop first.<br />
<br />
You still need to edit the CMake files by hand though.<br />
}}<br />
<br />
==The Code==<br />
All the code we need will be in one file, <tt>main.cpp</tt>. Create that file with the code below:<br />
<syntaxhighlight lang="cpp-qt"><br />
#include <KApplication><br />
#include <KAboutData><br />
#include <KCmdLineArgs><br />
#include <KMessageBox><br />
#include <KLocale><br />
<br />
int main (int argc, char *argv[])<br />
{<br />
KAboutData aboutData(<br />
// The program name used internally.<br />
"tutorial1",<br />
// The message catalog name<br />
// If null, program name is used instead.<br />
0,<br />
// A displayable program name string.<br />
ki18n("Tutorial 1"),<br />
// The program version string.<br />
"1.0",<br />
// Short description of what the app does.<br />
ki18n("Displays a KMessageBox popup"),<br />
// The license this code is released under<br />
KAboutData::License_GPL,<br />
// Copyright Statement<br />
ki18n("(c) 2007"),<br />
// Optional text shown in the About box.<br />
// Can contain any information desired.<br />
ki18n("Some text..."),<br />
// The program homepage string.<br />
"http://example.com/",<br />
// The bug report email address<br />
"submit@bugs.kde.org");<br />
<br />
KCmdLineArgs::init( argc, argv, &aboutData );<br />
KApplication app;<br />
KGuiItem yesButton( i18n( "Hello" ), QString(),<br />
i18n( "This is a tooltip" ),<br />
i18n( "This is a WhatsThis help text." ) );<br />
KMessageBox::questionYesNo( 0, i18n( "Hello World" ),<br />
i18n( "Hello" ), yesButton );<br />
return 0;<br />
}<br />
</syntaxhighlight><br />
The first KDE specific code we come across in this program is {{class|KAboutData}}. This is the class used to store information about the program such as a short description, authors or license information. Pretty much every KDE application should use this class.<br />
<br />
Then we come to {{class|KCmdLineArgs}}. This is the class one would use to specify command line switches to, for example, open the program with a specific file. However, in this tutorial, we simply initialise it with the {{class|KAboutData}} object we created so we can use the <tt>--version</tt> or <tt>--author</tt> switches.<br />
<br />
Then we create a {{class|KApplication}} object. This needs to be done exactly once in each program since it is needed for things such as [[Development/Tutorials/Localization/i18n|i18n]].<br />
<br />
Now we've done all the necessary KDE setup, we can move on to doing interesting things with our application. We're going to create a popup box but we're going to customise one of the buttons. To do this customisation, we need to use a {{class|KGuiItem}} object. The first argument in the {{class|KGuiItem}} constructor is the text that will appear on the item (in our case, a button). Then we have an option of setting an icon for the button but we don't want one so we just give it <tt>QString()</tt>. We then set the tooltip (what appears when you hover over an item) and finally the "What's This?" (accessed through right-clicking or Shift-F1) text.<br />
<br />
Now we have our item, we can create our popup. We call the <tt>{{class|KMessageBox}}::questionYesNo()</tt> function which, by default, creates a message box with a "Yes" and a "No" button. The second argument is the text that will appear in the message box above the buttons. The third is the caption the window will have and finally we set the KGuiItem for (what would normally be) the "Yes" button to the <tt>KGuiItem yesButton</tt> we created.<br />
<br />
Note that all user-visible text is passed through the i18n() function; this is necessary for the UI to be translatable. More information on localization can be found in the [[Development/Tutorials/Localization/i18n|localization tutorial]].<br />
<br />
We're all done as far as the code is concerned. Now to build it and try it out.<br />
<br />
== Build ==<br />
You want to [[Development/Tutorials/CMake|use CMake]] for your build environment. You provide a file CMakeLists.txt, cmake uses this file to generate all Makefiles out of it.<br />
<br />
=== CMakeLists.txt ===<br />
Create a file named CMakeLists.txt in the same directory as main.cpp with this content:<br />
<syntaxhighlight lang="cmake"><br />
project (tutorial1)<br />
find_package(KDE4 REQUIRED)<br />
include (KDE4Defaults)<br />
include_directories(${KDE4_INCLUDES})<br />
set(tutorial1_SRCS main.cpp)<br />
kde4_add_executable(tutorial1 ${tutorial1_SRCS})<br />
target_link_libraries(tutorial1 ${KDE4_KDEUI_LIBS})<br />
install(TARGETS tutorial1 ${INSTALL_TARGETS_DEFAULT_ARGS})<br />
</syntaxhighlight><br />
The <tt>find_package()</tt> function locates the package that you ask it for (in this case KDE4) and sets some variables describing the location of the package's headers and libraries. In this case we will use the <tt>KDE4_INCLUDES</tt> variable which contains the path to the KDE4 header files.<br />
<br />
In order to allow the compiler to find these files, we pass that variable to the <tt>include_directories()</tt> function which adds the KDE4 headers to the header search path.<br />
<br />
Next we create a variable called <tt>tutorial1_SRCS</tt> using the <tt>set()</tt> function. In this case we simply set it to the name of our only source file.<br />
<br />
Then we use <tt>kde4_add_executable()</tt> to create an executable called <tt>tutorial1</tt> from the source files listed in our <tt>tutorial1_SRCS</tt> variable. Afterwards, we link our executable to the KDE4 kdeui library using <tt>target_link_libraries()</tt> and the <tt>KDE4_KDEUI_LIBS</tt> variable which was set by the <tt>find_package()</tt> function. The line starting with <tt>install</tt> writes a default "install" target into the Makefile.<br />
<br />
=== Make And Run ===<br />
You can invoke CMake and make manually:<br />
<syntaxhighlight lang="bash"><br />
mkdir build && cd build<br />
cmake .. # Note the two dots - this is no ellipsis, but "parent directory".<br />
make<br />
</syntaxhighlight><br />
Or, if you set up your environment as described in [[Getting_Started/Build/Environment|Getting Started/Build/Environemnt]], you can compile this code with:<br />
<syntaxhighlight lang="bash"><br />
cmakekde<br />
</syntaxhighlight><br />
<br />
And launch it with:<br />
<syntaxhighlight lang="bash"><br />
./tutorial1<br />
</syntaxhighlight><br />
<br />
==Moving On==<br />
Now you can move on to [[Development/Tutorials/Using_KXmlGuiWindow|using KXmlGuiWindow]].<br />
<br />
[[Category:C++]]</div>Deblockinghttps://techbase.kde.org/index.php?title=Development/Tutorials_(ja)&diff=62948Development/Tutorials (ja)2011-07-16T11:08:51Z<p>Deblocking: Created page with "{{Template:I18n/Language Navigation Bar|Development/Tutorials}} このチュートリアルは、あなたが KDE をどのように使えばいいのかを見つける最速の..."</p>
<hr />
<div>{{Template:I18n/Language Navigation Bar|Development/Tutorials}}<br />
<br />
このチュートリアルは、あなたが KDE をどのように使えばいいのかを見つける最速の手段です。ここで利用可能なチュートリアルの一覧は'''KDE4 について''' です。KDE3とKDE2については、このページの一番下から利用可能です。<br />
<br />
== KDE 4 プログラミングの導入 ==<br />
あなたは KDE 4 のアプリケーションを書くことに興味をお持ちですか?<br />
このチュートリアル集は、はじめての KDE プログラミングを作ることを目指しています。<br />
<br />
;[[Development/Tutorials/First program|Hello World]]<br />
:''予備的な導入 - KDE4 プログラミングの基本''<br />
<br />
;[[Development/Tutorials/Using KXmlGuiWindow|Creating the Main Window]]<br />
:''このチュートリアルであなたにお見せするのは、アプリケーションの最も重要な魔法 Main Window です''<br />
<br />
;[[Development/Tutorials/Using KActions|Using KActions]]<br />
:''メニューとツールバーにアクションを追加するためにはどうすればいいか''<br />
<br />
;[[Development/Tutorials/Saving and loading|Saving and Loading]]<br />
:''KIO ライブラリの紹介。アプリケーションに、ロードとセーブの操作を追加する例です''<br />
<br />
;[[Development/Tutorials/KCmdLineArgs|Command line arguments]]<br />
:''コマンドラインからファイル名を指定して、テキストエディタでファイルを開く機能を追加する例です''<br />
<br />
== Basics ==<br />
;[[Development/Tutorials/KDE4 Porting Guide|Porting Your Application]]<br />
:''Help Porting Applications from Qt3/KDE3 to Qt4/KDE4''<br />
:''''<br />
<br />
;[[Development/Tutorials/CMake|Introduction to CMake]]<br />
:''How to use the CMake build system used by KDE4.''<br />
:''''<br />
<br />
;[[Development/Tutorials/Common Programming Mistakes|Common Programming Mistakes]]<br />
:''Various common mistakes made while developing Qt and KDE applications and how to avoid them.''<br />
:''''<br />
<br />
;[[Development/Tutorials/Debugging Linker Errors|Debugging Linker Errors]]<br />
:'How to understand and debug errors from the linker, at compile time.''<br />
:''''<br />
<br />
;[[Development/Tutorials/Using Qt Designer|Using Qt Designer to build user interfaces]]<br />
:''How to create UI files with designer, and how to integrate them into a KDE program.''<br />
:''''<br />
<br />
;[[Development/Tutorials/Using Qt Creator|Using Qt Creator to develop your KDE program]]<br />
:''How to integrate Qt Creator use into KDE development.''<br />
:''''<br />
<br />
;[[Development/Tutorials/Creating Libraries|Creating Libraries to share code]]<br />
:''How to add the library to the buildsystem and how to prepare the source code.''<br />
:''''<br />
<br />
;[[Development/Tutorials/Session_Management|Session Management]]<br />
:''Make your application aware of X sessions''<br />
:''''<br />
<br />
== Testing And Debugging ==<br />
<br />
;[[Development/Tutorials/Debugging|Debugging your application]]<br />
:''Tips, tools and techniques to apply when debugging your KDE application''<br />
:''''<br />
<br />
;[[Development/Tutorials/Unittests|Writing Unittests for Qt4 and KDE4 with QTestLib]] ([http://developer.kde.org/documentation/tutorials/writingunittests/writingunittests.html Original link])<br />
:''Tutorial by [mailto:bradh@frogmouth.net Brad Hards] that describes how to write unit tests using the QTestLib framework. It is presented as an example based tutorial, and is still under development.''<br />
:''''<br />
<br />
;[[Development/Tutorials/Code_Checking|Semi-automatic ways to detect code errors]]<br />
:''Techniques you can use to detect errors in KDE code''<br />
:''''<br />
<br />
== Managing Configuration Data With KConfig ==<br />
;[[Development/Tutorials/KConfig|Introduction To KConfig]]<br />
:''An overview of the KConfig classes and how to use them in your application code''<br />
:''''<br />
<br />
;[[Development/Tutorials/Using KConfig XT|Using KConfig XT]]<br />
:''Tutorial on how to efficiently use the KConfig XT framework.''<br />
:''''<br />
<br />
;[[Development/Tutorials/Updating KConfig Files|Updating KConfig Files]]<br />
:''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''<br />
:''''<br />
<br />
== Services: Applications and Plugins ==<br />
;[[Development/Tutorials/Services/Introduction|Introduction to the Services Framework]]<br />
:''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.''<br />
:''''<br />
<br />
;[[Development/Tutorials/Services/Traders|Finding Services Using Trader Queries]]<br />
:''How to find services, such as plugins or mimetypes, that are indexed in the SyCoCa using Trader Query Syntax''<br />
:''''<br />
<br />
;[[Development/Tutorials/Services/Plugins|Creating and Loading Plugins Using KService]]<br />
:''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.''<br />
:''''<br />
<br />
== Localization ==<br />
See also [[Localization|Localization portal]].<br />
<br />
;[[Development/Tutorials/Localization/Unicode|Introduction To Unicode]]<br />
:''An introduction to what Unicode is as well as how to handle Unicode data in KDE applications.''<br />
:''''<br />
<br />
; [[Development/Tutorials/Localization/i18n|Writing Applications With Localization In Mind]]<br />
:''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.''<br />
:''''<br />
<br />
; [[Development/Tutorials/Localization/i18n Mistakes|Avoiding Common Localization Pitfalls]]<br />
:''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.''<br />
:''''<br />
<br />
; [[Development/Tutorials/Localization/Building KDE's l10n Module|Building KDE's Localization Module]]<br />
:''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.''<br />
:''''<br />
<br />
; [[Development/Tutorials/Localization/i18n Build Systems|Incorporating i18n Into the Build System]]<br />
:''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.''<br />
:''''<br />
<br />
; [[Development/Tutorials/Localization/i18n Challenges|Common i18n Challenges and Solutions]]<br />
:''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.''<br />
:''''<br />
<br />
; [[Development/Tutorials/Localization/i18n_Semantics|Semantic Markup of Messages]]<br />
:''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.''<br />
:''''<br />
<br />
; [[Development/Tutorials/Localization/i18n Krazy|Automated i18n Code Checking]]<br />
:''The Krazy code checker scans KDE's code and reports common i18n mistakes.''<br />
:''''<br />
<br />
== Documentation ==<br />
<br />
;[[Development/Tutorials/API_Documentation|API Documentation]]<br />
:''This tutorial explains how to document your APIs properly.''<br />
:''''<br />
<br />
;[[Development/Tutorials/Man_Pages|Man Pages]]<br />
:''Writing and Generating Reference Manual Pages.''<br />
:''''<br />
<br />
;Source Code<br />
: http://websvn.kde.org<br />
<br />
== Accessibility ==<br />
<br />
;[[Development/Tutorials/Accessibility|Accessibility]]<br />
:''This tutorial will explain how to make your application accessible.''<br />
:''''<br />
<br />
;[[Development/Tutorials/Text-To-Speech|Text-To-Speech]]<br />
:''How to utilize Jovie text-to-speech service in your application.''<br />
:''''<br />
<br />
== Application Automation and Scripting ==<br />
<br />
=== D-Bus ===<br />
; [[Development/Tutorials/D-Bus/Introduction|Introduction to D-Bus]]<br />
:''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.''<br />
:''''<br />
; [[Development/Tutorials/D-Bus/Accessing Interfaces|Accessing D-Bus Interfaces]]<br />
:''A step-by-step guide to calling D-Bus methods and connecting to D-Bus signals using QtDBus.''<br />
:''''<br />
; [[Development/Tutorials/D-Bus/Intermediate_D-Bus|Intermediate D-Bus]]<br />
:''Tips to make use of QtDBus when faced with problematic real-world interfaces.''<br />
:''''<br />
; [[Development/Tutorials/D-Bus/Creating Interfaces|Creating D-Bus Interfaces]]<br />
:''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.''<br />
:''''<br />
; [[Development/Tutorials/D-Bus/CustomTypes|Using Custom Types with D-Bus]]: ''Learn how to use your own types in classes exported on D-Bus. Covers marhaling and unmarshaling of objects, the integration of custom types into XML descriptions and registering the custom types with the Qt Meta Object system.''<br />
:''''<br />
; [[Development/Tutorials/D-Bus/Autostart Services|D-Bus Autostart Services]]<br />
:''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.''<br />
:''''<br />
; [[Development/Tutorials/Porting_to_D-Bus|Porting from DCOP to D-Bus]]<br />
: ''Port your applications from DCOP to D-Bus with this handy guide.''<br />
:''''<br />
<br />
=== Konqueror ===<br />
; [[Development/Tutorials/Creating Konqueror Service Menus|Creating Konqueror Service Menus]]<br />
:''This tutorial shows you how to create mimetype-specific actions in Konqueror's context menu (aka "servicemenus").''<br />
:''''<br />
<br />
=== Kross ===<br />
; [[Development/Tutorials/Kross/Introduction|Introduction to Kross]]<br />
:''An introduction to the Kross Scripting Framework.''<br />
:''''<br />
<br />
; [[Development/Tutorials/Kross/Hello_World|Hello World]]<br />
:''A first application with working kross code.''<br />
:''''<br />
<br />
; [[Development/Tutorials/Kross/Call_Functions_in_Kross|Calling Functions in Kross]]<br />
:''Simple demonstration of calling scripting functions''<br />
:''''<br />
<br />
; [[Development/Tutorials/Kross/Connecting_Signals_and_slots_in_Kross|Connecting Signals and Slots in Kross]]<br />
:''Simple demonstration of connecting object signals with script slots''<br />
:''''<br />
<br />
; [[Development/Tutorials/Kross/Scripts-as-Plugins|Scripts as Plugins with Kross]]<br />
:''This tutorial provides a step-by-step introduction how to integrate scripts as plugins into a KDE application.''<br />
:''''<br />
<br />
; [[Development/Tutorials/Kross/Script-Actions|Placing script actions in your application menus ]]<br />
:''Simple demonstration on how to extend you application menus to execute script files.''<br />
:''''<br />
<br />
; [[Development/Tutorials/Kross/ActionCollections|How to use an ActionCollection ]]<br />
:''A small Tutorial on How to use Kross::ActionCollections.''<br />
:''''<br />
{{:KOffice/Plugin Tutorials}}<br />
<br />
=== SuperKaramba ===<br />
; [[Development/Tutorials/SuperKaramba|SuperKaramba Tutorial]]<br />
:''This tutorial provides an overview of SuperKaramba, theme files and scripting with Python, Ruby and JavaScript.''<br />
:''''<br />
<br />
=== System Activity ===<br />
<br />
: [[Development/Tutorials/SystemActivity/Scripting|Writing script actions for the process's context menu]]<br />
:''This tutorial shows how to add a context menu action to show custom information about a process.<br />
:''''<br />
<br />
== Plugins and KParts ==<br />
<br />
; [[Development/Tutorials/Writing kontact plugins|Writing kontact plugins]]:''Kontact plugins are KParts. This tutorial describes how you can write one.''<br />
:''''<br />
<br />
; [[Development/Tutorials/Using KParts|Using KParts]]:''Learn how to load a KPart into an application window.''<br />
:''''<br />
<br />
; [[Development/Tutorials/Writing Qt Designer Plugins|Writing Qt Designer Plugins]]:''Add your widgets to Qt Designer and thus make them usable in UI files.''<br />
:''''<br />
<br />
== Search and Metadata ==<br />
<br />
=== Strigi ===<br />
<br />
; [[Development/Tutorials/Writing file analyzers|Writing file analyzers]]<br />
:''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.''<br />
:''''<br />
<br />
=== [http://nepomuk.kde.org Nepomuk] ===<br />
<br />
See [[Development/Tutorials/Metadata/Nepomuk|Nepomuk tutorials]].<br />
<br />
<br />
== Hardware Awareness (Solid) ==<br />
<br />
;[[Development/Tutorials/Solid_Tutorials|Introduction to Solid]]<br />
:''An introduction to using the Solid hardware discovery and interaction system in KDE applications.''<br />
:''''<br />
<br />
;[[Development/Tutorials/Solid_Network_Tutorial|Accessing Network Information]]<br />
:''How to use the Solid system to get information about the network''<br />
:''''<br />
<br />
;[[Development/Tutorials/Solid_Device_Actions|Creating a Device Action]]<br />
:''When your application is interested in registering actions with the system for removable hardware''<br />
:''''<br />
<br />
== Authorization and Privilege escalation (KAuth) ==<br />
; [[Development/Tutorials/KAuth/KAuth_Basics|KAuth Basics]]<br />
:''An overview of concepts and basic knowledge required to understand and use KAuth effectively''<br />
:''''<br />
; [[Development/Tutorials/KAuth/KAuth_Actions|Using KAuth actions in your application]]<br />
:''How to execute KAuth actions in your application, and how to integrate them tightly into your UI''<br />
:''''<br />
; [[Development/Tutorials/KAuth/Helper_HowTo|Creating a KAuth helper to perform a privileged action]]<br />
:''You will learn how to use KAuth's helpers and escalation facilities, and how to seamlessly make a privileged and non privileged portion of your application interact''<br />
:''''<br />
; [[Development/Tutorials/KAuth/KCM_HowTo|Creating a KCM requiring authorization upon saving]]<br />
:''Learn how to use the high level KCModule API to create KCModules handling authorization, and its UI integration, on their own''<br />
:''''<br />
<br />
== Multimedia (Phonon) ==<br />
<br />
;[[Development/Tutorials/Phonon/Introduction|Phonon]]<br />
:''How to start with the multimedia API''<br />
:''''<br />
<br />
:''How to compile and use Phonon and its GStreamer backend on Linux using Qt 4.3.x''<br />
:''''<br />
::''This article gives you a quick brief of how you can use checkout, compile Phonon and its GStreamer backend on GNU/Linux with just Qt 4.3.x. Towards the end, the article also describes how a developer can make use of Phonon to create simple audio and video players. You can read the article [http://www.vcreatelogic.com/oss/docs/CompilingPhononOnLinux.pdf here]. You can download the editable OpenDocumentText file from [http://www.prashanthudupa.com/phonon/CompilingPhononOnLinux.odt here].''<br />
:''''<br />
<br />
;[[Development/Tutorials/Phonon/Backends|Writing Backends]]<br />
:''How to start creating a new backend for the multimedia API''<br />
:''''<br />
<br />
;Resources<br />
:''Please have a look at the [http://api.kde.org/kdesupport-api/kdesupport-apidocs/phonon-git/html/ online documentation] for information on the Phonon API. If you prefer using Qt Assistant or Qt Creator you can also use our [http://mts.ms/phonon-4.4.2.qch offline documentation].''<br />
:''''<br />
<br />
== Plasma ==<br />
<br />
See [[Development/Tutorials/Plasma|Plasma tutorials]].<br />
<br />
<br />
<br />
== Personal Information Management (Akonadi) ==<br />
<br />
;[[Development/Tutorials/Akonadi/Application|Using Akonadi in Applications]]<br />
:''Displaying and modifying data provided by Akonadi''<br />
:''''<br />
<br />
;[[Development/Tutorials/Akonadi/Resources|Developing Akonadi Resources]]<br />
:''Akonadi Resources are agent programs which transport PIM data between Akonadi and a backend (files, servers, etc)''<br />
:''''<br />
<br />
;[[Development/Tutorials/Akonadi/SerializerPlugin|Using custom data types with Akonadi]]<br />
:''Akonadi can handle arbitrary data as item payloads through the use of a plugin based serialization framework''<br />
:''''<br />
<br />
;[[Development/AkonadiPorting|Porting Applications which use KResource API]]<br />
:''Applications using KDE's now deprecated KResource APIs, e.g. KABC or KCal, need to be ported to use their Akonadi equivalents''<br />
:''''<br />
<br />
== Kate / Kwrite ==<br />
<br />
;[[Development/Tutorials/Kate/KTextEditor Plugins|Getting started with KTextEditor plugins]]<br />
:''Creating your first KTextEditor plugin''<br />
:''''<br />
<br />
;[[Development/Tutorials/Kate/KTextEditor_Plugins_Advanced|Developing a plugin with configuration dialog]]<br />
:''Adding a configuration dialog to the Time & Date example''<br />
:''''<br />
<br />
;[[Development/Tutorials/Kate/KTextEditor_Example|A small Editor]]<br />
:''Create a small application using KTextEditor''<br />
:''''<br />
<br />
== KDevelop ==<br />
<br />
;[[Development/KDevelop-PG-Qt_Introduction|KDevelop-PG-Qt Introduction]]<br />
:''Information on the KDevelop parser generator, useful for language plugins.''<br />
:''''<br />
<br />
==Printing==<br />
<br />
KDE mostly uses the [http://doc.qt.nokia.com/latest/printing.html Qt Printing infrastructure].<br />
<br />
;[[Development/Tutorials/Printing Hello World|Hello World]]<br />
:''Introduction to the KDE printing system''<br />
:''''<br />
<br />
;[[Development/Tutorials/Printing Print Dialog|Print Dialog]]<br />
:''Using the KDE print dialog''<br />
:''''<br />
<br />
== kioslaves ==<br />
* [[Development/Tutorials/KIO Slaves/Using KIO Slaves in your Program|Using kioslaves in your Program]]<br />
* [[Development/Tutorials/KIO Slaves/Hello World|Creating a Hello-World kioslave]]<br />
<br />
== Collaboration ==<br />
<br />
=== Open Collaboration Services (libattica) ===<br />
<br />
;[[Development/Tutorials/Collaboration/Attica/Introduction|Introduction to Attica]]<br />
:''In this tutorial a simple widget showing information about a Person on the server is created.''<br />
:''''<br />
<br />
=== Get Hot New Stuff ===<br />
<br />
;[[Development/Tutorials/Collaboration/HotNewStuff/Introduction|Get Hot New Stuff 3 - Download]] <br />
:''How to use KHotNewStuff3 in your application.''<br><br />
:''''<br />
<br />
;[[Development/Tutorials/Collaboration/HotNewStuff/Updates|Get Hot New Stuff 3 - Checking for Updates]] <br />
:''How to check if updates for installed stuff are available without showing the dialog/widget.''<br><br />
:''''<br />
<br />
;[[Development/Tutorials/Collaboration/HotNewStuff/Upload|Get Hot New Stuff 3 - Upload]] <br />
:''How to add an upload dialog to your application.''<br><br />
:''''<br />
<br />
Old links for KNS2 and KNS1 content:<br><br />
<br />
;[[Development/Tutorials/K Hot New Stuff2|Introduction to Get Hot New Stuff 2]] <br />
:''A short tutorial about how to use KHotNewStuff2 in your application. Deprecated, use version 3'' <br />
:''''<br />
;[[Development/Tutorials/Introduction to Get Hot New Stuff|Introduction to Get Hot New Stuff]] <br />
:''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.''<br />
:''''<br />
<br />
;[[Development/Tutorials/KNewStuffSecure|KNewStuff Secure]] ([http://developer.kde.org/documentation/tutorials/knewstuffsecure/index.html Original Link]) <br />
:''Tutorial showing how to share resources in a secured way (KDE 3.4 and later).'' By András Mantia &lt;amantia@kde.org&gt;.<br />
:''''<br />
<br />
== Goya ==<br />
; [[Development/Tutorials/Introduction to Goya usage|Introduction to Goya usage]]<br />
:''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.''<br />
:''''<br />
<br />
; [[Development/Tutorials/Introduction to Goya usage 2|Introduction to Goya usage (part 2)]]<br />
:''The second part of the tutorial, with a slightly more complex example than the first part.''<br />
:''''<br />
<br />
== Other programming languages ==<br />
<br />
=== Python ===<br />
<br />
;[http://www.learningpython.com/2008/09/20/an-introduction-to-pyqt/ An Introduction to PyQt]<br />
:''Starting off''<br />
:''''<br />
<br />
;[http://lateral.netmanagers.com.ar/stories/BBS47.html PyQt by Example]<br />
:''Another introduction to PyQt''<br />
:''''<br />
<br />
;[[Development/Languages/Python/PyKDE_WebKit_Tutorial|PyKDE WebKit Tutorial]]<br />
:''A simple web browser application in PyKDE''<br />
:''''<br />
<br />
;[[Development/Tutorials/Python introduction to signals and slots|101 Introduction to signals and slots]]<br />
:''A simple introduction to Qt's signal and slot architecture.''<br />
<br />
;[[Development/Languages/Python/PyKDE_DBus_Tutorial|PyKDE DBus Tutorial]]<br />
:''An introduction to DBus communication using PyKDE''<br />
:''''<br />
<br />
;[[Development/Languages/Python/PyKDE_Knotify_Tutorial|PyKDE KNotify Tutorial]]<br />
:''An introduction to Knotify (Notifications and KJobs) using PyKDE''<br />
:''''<br />
<br />
=== Ruby ===<br />
<br />
;[http://developer.kde.org/language-bindings/ruby/kde3tutorial/index.html KDE Ruby Korundum tutorial]<br />
:''A ruby version of Antonio Larrosa Jim&eacute;nez's KDE tutorial by Richard Dale. See the [[Development/Languages/Ruby|Ruby Developers Corner]] for Qt tutorials and other info.''<br />
:''''<br />
<br />
;[[Development/Tutorials/Qt4_Ruby_Tutorial|Qt4 Ruby Tutorial]]<br />
:''Nokia's fabulous introductory tutorial to Qt, translated to Ruby.''<br />
:''''<br />
<br />
;[[Development/Tutorials/Plasma/RubyApplet|Creating a Plasma Widget in Ruby]]<br />
:''Tutorial that shows how to create your first Plasma Applet using the Ruby language.''<br />
:''''<br />
<br />
;[[Development/Tutorials/Developing_Qt4_Applications_using_Qt_Designer_and_Ruby_on_Kubuntu|Developing Qt4 Applications using Qt Designer and Ruby on Kubuntu]]<br />
:''Tutorial that shows how to design a simple User Interface in Qt Designer and then use the resulting widget in a Qt Ruby application we build from scratch.''<br />
:''''<br />
<br />
;[[Development/Languages/Ruby/Ruby-Qt/KDE_Book|Ruby-Qt/KDE Book]]<br />
:''There is also an approach to create an Ruby-Qt/KDE Book under a free license. The content will be created in this wiki.''<br />
:''''<br />
<br />
=== Shell ===<br />
<br />
;[[Development/Tutorials/Shell_Scripting_with_KDE_Dialogs|Shell Scripting with KDE dialogs]] ([http://developer.kde.org/documentation/tutorials/kdialog/t1.html Original Link]) <br />
:''Tutorial by [mailto:bradh@frogmouth.net Brad Hards] that describes how to use KDE dialogs in shell scripts with kdialog. It is presented as an example based tutorial.''<br />
:''''<br />
<br />
== Graphics Programming ==<br />
<br />
;[[Development/Tutorials/Graphics/Performance|QPainter Perfomance]]<br />
:''Hints on avoiding common mistakes leading to poor performance when using QPainter''<br />
:''''<br />
<br />
== Using the KDE Games Libraries ==<br />
;[[Development/Tutorials/Games/KStandardGameAction| KStandardGameAction]]<br />
:''Using libkdegames to make your game fit the kdegames standard''<br />
:''''<br />
;[[Development/Tutorials/Games/Highscores| Highscores]]<br />
:''Implementing a simple highscore table into your game''<br />
:''''<br />
;[[Development/Tutorials/Games/Theme Selector| Theme Selector]]<br />
:''Using the libkdegames theme selection dialog''<br />
:''''<br />
;[[Development/Tutorials/Games/Palapeli Patterns| Palapeli Slicers]]<br />
:''Creating a slicer plugin for Palapeli''<br />
:''''<br />
<br />
=== KGLEngine ===<br />
;[[Development/Tutorials/Games/kglengine/kglengine-simpleBox| installation and your first KGLItem]]<br />
:''start your first kglengine application''<br />
:''''<br />
;[[Development/Tutorials/Games/KGLEngine2d| kglpong]]<br />
:''Now use our knowledge to make a pong''<br />
:''''<br />
<br />
=== KALEngine ===<br />
;[[Development/Tutorials/Games/KALEngine| Play hello word sound]]<br />
:''Using KALEngine for games sound development using openAL''<br />
:''''<br />
;[[Development/Tutorials/Games/KALEngine-music| Play music]]<br />
:''Using KALEngine to play music in a stream''<br />
:''''<br />
<br />
== Using the KDE PIM Libraries ==<br />
;[[Development/Tutorials/PIM/ical| iCalendar functionality]]<br />
:''Using kcal to manage iCalendar files''<br />
:''''<br />
<br />
== Other tutorials ==<br />
<br />
=== 2D Plotting (KPlotWidget) ===<br />
;[[Development/Tutorials/KPlotWidget|Using the KDE data-plotting widget]]<br />
:''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).''<br />
:''''<br />
<br />
=== Spelling and Grammar Checking (Sonnet) ===<br />
;[[Development/Tutorials/Sonnet/SonnetTutorial|Adding spell-checking or grammar-checking to KDE applications]]<br />
:''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.''<br />
:''''<br />
<br />
=== Pixmap cache (KPixmapCache) ===<br />
;[[Development/Tutorials/KPixmapCache|Using the KDE pixmap cache]]<br />
:''This tutorial shows how to use KPixmapCache to cache e.g. pixmaps generated from SVGs or some data.''<br />
:''''<br />
<br />
=== Using MarbleWidget (Marble) ===<br />
;[[Development/Tutorials/MarbleWidget|Using MarbleWidget]]<br />
:''This short tutorial describes how to use the MarbleWidget in your project''<br />
:''''<br />
<br />
=== Using local SCM for KDE development ===<br />
;[[Development/Git|Using Git to develop for KDE]]<br />
:''Here you find how to use Git to develop for KDE''<br />
:''''<br />
<br />
=== Kwin effect tutorial (blog) ===<br />
;[http://blog.martin-graesslin.com/blog/?p=258 blog by Martin Graesslin]<br />
:''This tutorial guides you through the development of a simple KWin effect''<br />
:''''<br />
<br />
=== Implementing KSysGuard sensors and adding them ===<br />
;[[Development/Tutorials/Sensors]]<br />
:''This tutorial shows how to write and KSysGuard sensor and connect it to the systray.''<br />
Runners<br />
:''''<br />
<br />
=== Porting an application from KSystemTrayIcon to KStatusNotifierItem ===<br />
;[[Development/Tutorials/PortToKStatusNotifierItem]]<br />
:''This tutorials shows how to port an application using KSystemTrayIcon to KStatusNotifierItem''<br />
:''''<br />
<br />
=== Using the KDE Wallet API for safe storage ===<br />
;[[Development/Tutorials/KWallet]]<br />
:"Brief introduction to the KWallet API which can be used for storing all kinds of sensitive information."<br />
:''''<br />
<br />
===How to edit a wiki with Libmediawiki ===<br />
;[[Development/Tutorials/Libmediawiki]]<br />
:''This tutorial present how to edit a wiki with Libmediawiki.''<br />
:''''<br />
<br />
== KDE2 and KDE3 Materials ==<br />
<br />
;[[Development/Tutorials/KDE3|KDE3 Tutorials]]<br />
:''These tutorials cover topics related to KDE3.''<br />
:''''<br />
<br />
;[[Development/Tutorials/KDE2|KDE2 Tutorials]]<br />
:''These tutorials cover topics related to KDE2.''<br />
:''''<br />
<br />
[[Category:KDE4]]</div>Deblocking