~ubuntu-branches/ubuntu/maverick/kdeutils/maverick-proposed

« back to all changes in this revision

Viewing changes to doc/kdelirc/kcmlirc/index.docbook

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-05-28 09:49:30 UTC
  • mfrom: (1.2.44 upstream)
  • Revision ID: james.westby@ubuntu.com-20100528094930-jzynf0obv1n2v13a
Tags: 4:4.4.80-0ubuntu1~ppa1
New upstream beta release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" ?>
2
 
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
3
 
  <!ENTITY kcmlirc "<application>KDE LIRC Control Center Module</application>">
4
 
  <!ENTITY kdelirc "<application>KDE LIRC</application>">
5
 
  
6
 
  <!ENTITY % English "INCLUDE" > <!-- change language only here -->
7
 
  <!ENTITY % addindex "IGNORE">
8
 
]>
9
 
 
10
 
<book lang="&language;">
11
 
<bookinfo>
12
 
 
13
 
<title>&kde; Infrared Remote Control Configuration</title>
14
 
 
15
 
<authorgroup>
16
 
<author>
17
 
<firstname>Frank</firstname>
18
 
<surname>Scheffold</surname>
19
 
<affiliation>
20
 
        <address><email>fscheffold@googlemail.com</email></address>
21
 
</affiliation>
22
 
</author>
23
 
<author>
24
 
<firstname>Michael</firstname>
25
 
<surname>Zanetti</surname>
26
 
<affiliation>
27
 
        <address><email>michael_zanetti@gmx.net</email></address>
28
 
</affiliation>
29
 
</author>
30
 
<author>
31
 
<firstname>Gav</firstname>
32
 
<surname>Wood</surname>
33
 
<affiliation>
34
 
        <address><email>gav@kde.org</email></address>
35
 
</affiliation>
36
 
</author>
37
 
<!-- TRANS:ROLES_OF_TRANSLATORS -->
38
 
</authorgroup>
39
 
 
40
 
<date>2010-01-06</date>
41
 
<releaseinfo>2.0</releaseinfo>
42
 
 
43
 
<copyright>
44
 
<year>2004</year>
45
 
<holder>Gav Wood</holder>
46
 
</copyright>
47
 
<copyright>
48
 
<year>2010</year>
49
 
<holder>Frank Scheffold</holder>
50
 
<holder>Michael Zanetti</holder>
51
 
</copyright>
52
 
<!--
53
 
<legalnotice>&FDLNotice;</legalnotice>
54
 
-->
55
 
 
56
 
 
57
 
<abstract><para>&kdelirc; configuration: The infrastructure for the &kde;'s
58
 
Infrared Remote Control functionality.</para></abstract>
59
 
 
60
 
<keywordset>
61
 
<keyword>KDE</keyword>
62
 
<keyword>irkick</keyword>
63
 
<keyword>kdelirc</keyword>
64
 
<keyword>kcmlirc</keyword>
65
 
<keyword>lirc</keyword>
66
 
</keywordset>
67
 
 
68
 
</bookinfo>
69
 
 
70
 
<chapter id="introduction">
71
 
  <title>Introduction</title>
72
 
  <sect1 id="requirements">
73
 
    <title>Requirements</title>
74
 
    <para>
75
 
      To use the &kdelirc; framework you must have set up LIRC on your computer. If it is properly set up, the &kdelirc; icon in the system tray will light up red
76
 
      <inlinemediaobject><imageobject><imagedata fileref="irkick.png" format="PNG" /></imageobject></inlinemediaobject>. 
77
 
      If not, it will be grey and crossed out 
78
 
      <inlinemediaobject><imageobject><imagedata fileref="irkickoff.png" format="PNG"/></imageobject></inlinemediaobject>.
79
 
    </para>
80
 
 
81
 
    <para>
82
 
      For more information about LIRC and how to configure it, visit their website at <ulink url="http://www.lirc.org">http://www.lirc.org</ulink>.
83
 
    </para>
84
 
 
85
 
    <para>
86
 
      <emphasis role="strong">Note:</emphasis> When configuring LIRC it is recommended to make use of button-namespaces.
87
 
    </para>
88
 
  </sect1>
89
 
 
90
 
</chapter>
91
 
 
92
 
<chapter id="usage">
93
 
  <title>Usage</title>
94
 
 
95
 
  <para>
96
 
    There are three tabs giving you several sections of configuration and additional information. The first tab, called <guibutton>Controller Functions</guibutton> is used to configure modes and actions for all available remotes. The tab named <guibutton>Profiles Overview</guibutton> contains details about the available profiles. The <guibutton>Available Remotes</guibutton> tab shows you additional information about your remote controls. Selecting a remote gives you an overview about their buttons.
97
 
  </para>
98
 
  <sect1 id="controllerFunctions">
99
 
    <title>Controller Functions</title>
100
 
    <sect2 id="modes">
101
 
      <title>Remote Controls and Modes</title>
102
 
 
103
 
      <para>
104
 
        Each remote control can have a number of different modes. Having multiple modes allows buttons to execute different actions in different situations. Think of it as a TV/Video/Satellite/DVD multi-purpose remote control. Instead of using different remote controls for different applications, you can change the behaviour of one remote control to adapt to an application by creating different modes and switching them as needed.
105
 
      </para>
106
 
 
107
 
      <para>
108
 
        Actions defined directly to the remote control are always available, no matter in what mode the remote currently is. Actions defined in a mode are only executed if the remote is currently set to that mode. Each remote control can be only in one mode at a time. It may also be in no mode at all meaning that only always available actions are executed on button presses. You can also define a default mode, which is the mode automatically assigned on startup.
109
 
      </para>
110
 
 
111
 
      <para>
112
 
        The list on the left contains all remote controls detected on your system. Modes may be added and removed by selecting the desired remote control or mode and using the buttons directly below the list. The Edit button allows you to change existing modes.
113
 
      </para>
114
 
 
115
 
    </sect2>
116
 
 
117
 
    <sect2 id="addactions">
118
 
      <title>Assigning actions to buttons</title>
119
 
      <para>
120
 
        &kdelirc; knows two different types of actions. Mode switches and actions to be executed. Mode switches allow to switch the current remote to a different mode, while regular actions allow executing commands over &DBus;. When defining a new executable action you have two options. One is to use a template while the other requires to manually specify all possible options. Templates for actions are called profiles. While using profiles to create actions is more easy and straight forward it is not possible to access all functions with profiles. More advanced actions may be configured by manually selecting functions and their parameters.
121
 
      </para>
122
 
 
123
 
      <para>
124
 
        To add an action use the <guibutton>Add...</guibutton> button on the lower right side. A wizard will show up asking you what type of action should be created. The first option will create an action based on a profile. The second option lets you create the entire action manually. Remember that the application you would like to control must be running at the time you configure the action or it won't show up in the list of available applications. The third option allows to create a mode switch action.
125
 
        Select the desired type of action and follow the steps through the wizard.
126
 
      </para>
127
 
 
128
 
      <para>
129
 
        Actions may also be automatically populated using the <guibutton>Autopopulate...</guibutton> button. This means that &kdelirc; can attempt to match buttons to functions for you. The autopopulate dialog shows all available profiles with a flag. Depending on the color of the flag your remote control is fully, partially or not supported by that profile. Green means full support, yellow partial and red none.
130
 
      </para>
131
 
      <para>
132
 
        <emphasis role="strong">Note:</emphasis> If your remote control isn't compatible to any profile you might haven't configured lirc using namespaces.
133
 
      </para>
134
 
 
135
 
    </sect2>
136
 
 
137
 
  </sect1>
138
 
 
139
 
  <sect1 id="profiles">
140
 
    <title>Profiles Overview</title>
141
 
 
142
 
    <para>
143
 
      The <guibutton>Profiles Overview</guibutton> tab gives you information about the available profiles. By selecting a profile you can see detailed informations such as the author's details and a list of all defined actions. Each action entry contains information about additional settings, a comment and the identifier of the button to be used by the autopopulate function.
144
 
    </para>
145
 
 
146
 
    <para>
147
 
      If you would like to contribute application profiles see the <link linkend="advancedInformation">advanced information</link> chapter.
148
 
    </para>
149
 
 
150
 
  </sect1>
151
 
 
152
 
  <sect1 id="availableRemotes">
153
 
    <title>Available Remotes</title>
154
 
    <para>
155
 
      This tab gives you detailed information on your remote controls. You can check here if your remote controls were recognized correctly by the system.
156
 
    </para>
157
 
  </sect1>
158
 
 
159
 
</chapter>
160
 
 
161
 
<chapter id="advancedInformation">
162
 
  <title>Advanced Information</title>
163
 
  <para>
164
 
    This chapter will discuss some information which might be interesting for more advanced users or developers. You will learn how to create your own profiles.
165
 
  </para>
166
 
 
167
 
  <sect1 id="profileCreation">
168
 
    <title>Profile Creation</title>
169
 
 
170
 
    <sect2>
171
 
      <title>Introduction</title>
172
 
      <para>
173
 
        All &DBus; capable applications can be used with &kdelirc; without any further actions. However, to provide user friendly configuration and let the application appear in the autpopulate dialog you might want to create a profile for it.
174
 
      </para>
175
 
      <para>
176
 
        A profile tells &kdelirc; (and the user!) what the various &DBus; calls do. Essentially this is a kind of documentation for the &DBus; calls. You don't have to include all &DBus; calls - just the ones that you feel end-users would benefit the most (usually <quote>interface adjusting</quote> calls rather the <quote>information gathering</quote> calls).
177
 
      </para>
178
 
    </sect2>
179
 
 
180
 
    <sect2>
181
 
      <title>Creation</title>
182
 
      <procedure>
183
 
 
184
 
        <step>
185
 
          <title>&DBus;</title>
186
 
          <para>
187
 
            Make sure the application you want to create the profile for, provides functions over &DBus;. Basically you can check this by trying to add actions for that application using the manual method in &kdelirc;. The <quote>qdbusviewer</quote> application, which is shipped with your Qt4 installation is also a very good tool to find out about &DBus; capabilities of applications.
188
 
          </para>
189
 
        </step>
190
 
 
191
 
        <step>
192
 
          <title>Create a profile</title>
193
 
          <para>
194
 
            Once you have found the appropriate &DBus; functions you need to describe them in a <filename>appname.profile.xml</filename> document. Here is a quick guide how to create such files:
195
 
          </para>
196
 
 
197
 
          <substeps>
198
 
            <step>
199
 
              <para>
200
 
                First create a new file containing the following content. Replace <quote>myapp</quote> with the executable name of the application and <quote>My Application</quote> with a descriptive application name.
201
 
              </para>
202
 
              <programlisting>
203
 
&lt;?xml version="1.0" ?&gt;
204
 
&lt;!DOCTYPE profile SYSTEM "profile.dtd"&gt;
205
 
 
206
 
  &lt;profile id="myapp" servicename="My Application"&gt;
207
 
  &lt;/profile&gt;
208
 
              </programlisting>
209
 
            </step>
210
 
 
211
 
            <step>
212
 
              <para>
213
 
                Inside the <quote>profile</quote> tag add name and author information. The <quote>instances</quote> tag tells &kdelirc; whether the application can be executed multiple times or not. Set <quote>unique</quote> to <quote>0</quote> if you can start the application multiple times (it defaults to <quote>1</quote>). The <quote>ifmulti</quote> property specifies what &kdelirc; should do if there are multiple instances running when a button is pressed. The options are <quote>dontsend</quote> (do nothing if &gt;1 instance), <quote>sendtoone</quote> (send call to one arbitrarily chosen instance) and <quote>sendtoall</quote> (send to all instances). The default is <quote>dontsend</quote>, however, <quote>sendtoone</quote> may be the most useful in many circumstances.
214
 
              </para>
215
 
 
216
 
              <programlisting>
217
 
&lt;?xml version="1.0" ?&gt;
218
 
&lt;!DOCTYPE profile SYSTEM "profile.dtd"&gt;
219
 
 
220
 
  &lt;profile id="myapp" servicename="My Application"&gt;
221
 
    &lt;name&gt;My Application&lt;/name&gt;
222
 
    &lt;author&gt;Me&lt;/author&gt;
223
 
    &lt;instances unique="0" ifmulti="sendtoone"/&gt;
224
 
  &lt;/profile&gt;
225
 
              </programlisting>
226
 
            </step>
227
 
 
228
 
            <step>
229
 
              <para>
230
 
                Populate the profile with action tags. Each action tag should contain the &DBus; object name and the function prototype.
231
 
              </para>
232
 
 
233
 
              <para>
234
 
                &kdelirc; needs some additional attributes to know how to handle an action. The <quote>button</quote> tag is used for the autopopulate function. See <ulink url="http://api.kde.org/4.x-api/kdebase-workspace-apidocs/libs/solid/html/classSolid_1_1Control_1_1RemoteControlButton.html">the solid API docs</ulink> for a complete list of available button names. The <quote>repeat</quote> tag tells whether the action should be executed multiple times if the button on the remote is being held pressed (0 = No, 1 = Yes). The <quote>autostart</quote> tag defines whether the application should be started if not already running.
235
 
              </para>
236
 
              <programlisting>
237
 
&lt;?xml version="1.0" ?&gt;
238
 
&lt;!DOCTYPE profile SYSTEM "profile.dtd"&gt;
239
 
 
240
 
  &lt;profile id="myapp" servicename="My Application"&gt;
241
 
    &lt;name&gt;My Application&lt;/name&gt;
242
 
    &lt;author&gt;Me&lt;/author&gt;
243
 
    &lt;instances unique="0" ifmulti="sendtoone"/&gt;
244
 
    &lt;action objid="MyApp" prototype="void showint(short int)"
245
 
      button="Menu" repeat="0" autostart="0"&gt;
246
 
    &lt;/action&gt;
247
 
  &lt;/profile&gt;
248
 
              </programlisting>
249
 
            </step>
250
 
 
251
 
            <step>
252
 
              <para>
253
 
                Add a name and a comment to the action. This is shown in the &kdelirc; user interface.
254
 
              </para>
255
 
 
256
 
              <programlisting>
257
 
&lt;?xml version="1.0" ?&gt;
258
 
&lt;!DOCTYPE profile SYSTEM "profile.dtd"&gt;
259
 
 
260
 
  &lt;profile id="myapp" servicename="My Application"&gt;
261
 
    &lt;name&gt;My Application&lt;/name&gt;
262
 
    &lt;author&gt;Me&lt;/author&gt;
263
 
    &lt;instances unique="0" ifmulti="sendtoone"/&gt;
264
 
    &lt;action objid="MyApp" prototype="void showints(short int)"
265
 
        button="Menu" repeat="0" autostart="0"&gt;
266
 
      &lt;name&gt;Show Integers&lt;/name&gt;
267
 
      &lt;comment&gt;Shows a configurable integer&lt;/comment&gt;
268
 
    &lt;/action&gt;
269
 
  &lt;/profile&gt;
270
 
                </programlisting>
271
 
            </step>
272
 
 
273
 
            <step>
274
 
                <para>
275
 
                Describe each argument with a comment and type attribute. A list of valid types can be found in the <ulink url="http://websvn.kde.org/trunk/KDE/kdeutils/kdelirc/profiles/profile.dtd?view=markup">profiles description file</ulink>. You should declare a default value for each argument between the <quote>default</quote> tags:
276
 
                </para>
277
 
    
278
 
                <programlisting>
279
 
&lt;?xml version="1.0" ?&gt;
280
 
&lt;!DOCTYPE profile SYSTEM "profile.dtd"&gt;
281
 
 
282
 
  &lt;profile id="myapp" servicename="My Application"&gt;
283
 
    &lt;name&gt;My Application&lt;/name&gt;
284
 
    &lt;author&gt;Me&lt;/author&gt;
285
 
    &lt;instances unique="0" ifmulti="sendtoone"/&gt;
286
 
    &lt;action objid="MyApp" prototype="void showints(short int)"
287
 
        button="Menu" repeat="0" autostart="0"&gt;
288
 
      &lt;name&gt;Show Integers&lt;/name&gt;
289
 
      &lt;comment&gt;Shows a configurable integer&lt;/comment&gt;
290
 
      &lt;argument type="int"&gt;
291
 
        &lt;default&gt;5&lt;/default&gt;
292
 
        &lt;comment&gt;The integer to be shown&lt;/comment&gt;
293
 
      &lt;/argument&gt;
294
 
    &lt;/action&gt;
295
 
  &lt;/profile&gt;
296
 
                </programlisting>
297
 
            </step>
298
 
            </substeps>
299
 
        </step>
300
 
      </procedure>
301
 
    </sect2>
302
 
    <sect2>
303
 
      <title>Installation</title>
304
 
        <para>
305
 
            To test and use the profile you need to copy it into <filename>$(kde_datadir)/profiles</filename> and restart &kdelirc;.
306
 
        </para>
307
 
        <para>
308
 
            If you would like to contribute the profile to the &kde; SC please send it to the kdeutils team at <email>kde-utils-devel@kde.org</email>.
309
 
        </para>
310
 
      </sect2>
311
 
  </sect1>
312
 
</chapter>
313
 
 
314
 
</book>
315
 
 
316
 
<!--
317
 
Local Variables:
318
 
mode: sgml
319
 
sgml-minimize-attributes:nil
320
 
sgml-general-insert-case:lower
321
 
sgml-indent-step:0
322
 
sgml-indent-data:nil
323
 
End:
324
 
 
325
 
// vim:ts=2:sw=2:tw=78:noet
326
 
-->