File: KCmdLineArgs.html

package info (click to toggle)
pykde4 4%3A4.8.4-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 29,376 kB
  • sloc: python: 2,056; cpp: 290; makefile: 41; sh: 5
file content (1173 lines) | stat: -rw-r--r-- 41,505 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
  <title>KCmdLineArgs</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Style-Type" content="text/css" />
  <link rel="stylesheet" type="text/css" href="../common/doxygen.css" />
  <link rel="stylesheet" media="screen" type="text/css" title="KDE Colors" href="../common/kde.css" />
</head>
<body>
<div id="container">
<div id="header">
  <div id="header_top">
    <div>
      <div>
        <img alt ="" src="../common/top-kde.jpg"/>
        KDE 4.7 PyKDE API Reference
      </div>
    </div>
  </div>
  <div id="header_bottom">
    <div id="location">
      <ul>
        <li>KDE's Python API</li>
      </ul>
    </div>

    <div id="menu">
      <ul>
        <li><a href="../modules.html">Overview</a></li>
<li><a href="http://techbase.kde.org/Development/Languages/Python">PyKDE Home</a></li>
<li><a href="http://kde.org/family/">Sitemap</a></li>
<li><a href="http://kde.org/contact/">Contact Us</a></li>
</ul>
    </div>
  </div>
</div>

<div id="body_wrapper">
<div id="body">
<div id="right">
<div class="content">
<div id="main">
<div class="clearer">&nbsp;</div>

<h1>KCmdLineArgs Class Reference</h1>
<code>from PyKDE4.kdecore import *</code>
<p>



<h2>Detailed Description</h2>

<p>A class for command-line argument handling.
</p>
<p>
KCmdLineArgs provides simple access to the command-line arguments
for an application. It takes into account Qt-specific options,
KDE-specific options and application specific options.
</p>
<p>
This class is used in %main() via the static method
init().
</p>
<p>
A typical KDE application using %KCmdLineArgs should look like this:
</p>
<p>
<pre class="fragment">
  int main(int argc, char *argv[])
  {
     // Initialize command line args
     KCmdLineArgs.init(argc, argv, appName, programName, version, description);

     // Define the command line options using KCmdLineOptions
     KCmdLineOptions options;
     ....

     // Register the supported options
     KCmdLineArgs.addCmdLineOptions( options );

     // Add options from other components
     KUniqueApplication.addCmdLineOptions();

     ....

     // Create application object without passing 'argc' and 'argv' again.
     KUniqueApplication app;

     ....

     // Handle our own options/arguments
     // A KApplication will usually do this in main but this is not
     // necessary.
     // A KUniqueApplication might want to handle it in newInstance().

     KCmdLineArgs *args = KCmdLineArgs.parsedArgs();

     // A binary option (on / off)
     if (args-&gt;isSet("some-option"))
        ....

     // An option which takes an additional argument
     QString anotherOptionArg = args-&gt;getOption("another-option");

     // Arguments (e.g. files to open)
     for(int i = 0; i &lt; args-&gt;count(); i++) // Counting start at 0!
     {
        openFile( args-&gt;arg(i));
        // Or more convenient:
        // openUrl( args-&gt;url(i));

     }

     args-&gt;clear(); // Free up some memory.
     ....
  }
</pre>
</p>
<p>
The options that an application supports are configured using the
KCmdLineOptions class. An example is shown below:
</p>
<p>
<pre class="fragment">
  KCmdLineOptions options;
  options.add("a", ki18n("A short binary option"));
  options.add("b \&lt;file&gt;", ki18n("A short option which takes an argument"));
  options.add("c \&lt;speed&gt;", ki18n("As above but with a default value"), "9600");
  options.add("option1", ki18n("A long binary option, off by default"));
  options.add("nooption2", ki18n("A long binary option, on by default"));
  options.add(":", ki18n("Extra options:"));
  options.add("option3 \&lt;file&gt;", ki18n("A long option which takes an argument"));
  options.add("option4 \&lt;speed&gt;", ki18n("A long option which takes an argument, defaulting to 9600"), "9600");
  options.add("d").add("option5", ki18n("A long option which has a short option as alias"));
  options.add("e").add("nooption6", ki18n("Another long option with an alias"));
  options.add("f").add("option7 \&lt;speed&gt;", ki18n("'--option7 speed' is the same as '-f speed'"));
  options.add("!option8 \&lt;cmd&gt;", ki18n("All options following this one will be treated as arguments"));
  options.add("+file", ki18n("A required argument 'file'"));
  options.add("+[arg1]", ki18n("An optional argument 'arg1'"));
  options.add("!+command", ki18n("A required argument 'command', that can contain multiple words, even starting with '-'"));
  options.add("", ki18n("Additional help text not associated with any particular option"));
</pre>
</p>
<p>
The ki18n calls are used for translation instead of the more usual i18n
calls, because the translation needs to be delayed until after the
message catalogs have been initialized.
</p>
<p>
Note that a program should define the options before any arguments.
</p>
<p>
When a long option has a short option as an alias, a program should
only test for the long option.
</p>
<p>
With the above options a command line could look like:
<pre class="fragment">
     myapp -a -c 4800 --display localhost:0.0 --nooption5 -d /tmp/file
</pre>
</p>
<p>
Long binary options can be in the form 'option' and 'nooption'.
A command line may contain the same binary option multiple times,
the last option determines the outcome:
<pre class="fragment">
     myapp --nooption4 --option4 --nooption4
</pre>
is the same as:
<pre class="fragment">
     myapp --nooption4
</pre>
</p>
<p>
If an option value is provided multiple times, normally only the last
value is used:
<pre class="fragment">
     myapp -c 1200 -c 2400 -c 4800
</pre>
is usually the same as:
<pre class="fragment">
     myapp -c 4800
</pre>
</p>
<p>
However, an application can choose to use all values specified as well.
As an example of this, consider that you may wish to specify a
number of directories to use:
<pre class="fragment">
     myapp -I /usr/include -I /opt/kde/include -I /usr/X11/include
</pre>
When an application does this it should mention this in the description
of the option. To access these options, use getOptionList()
</p>
<p>
Tips for end-users:
</p>
<p>
<li> Single char options like "-a -b -c" may be combined into "-abc" </li>
<li> The option "--foo bar" may also be written "--foo=bar" </li>
<li> The option "-P lp1" may also be written "-P=lp1" or "-Plp1" </li>
<li> The option "--foo bar" may also be written "-foo bar" </li>
</p>
<p>

<dl class="author" compact><dt><b>Author:</b></dt><dd> Waldo Bastian </dd></dl>
<b>Version:</b> 0.0.4
</p>
<table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="#StdCmdLineArg">StdCmdLineArg</a>&nbsp;</td><td class="memItemRight" valign="bottom">{&nbsp;CmdLineArgQt, CmdLineArgKDE, CmdLineArgsMask, CmdLineArgNone, Reserved&nbsp;}</td></tr>
<tr><td colspan="2"><br><h2>Methods</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#KCmdLineArgs">__init__</a> (self, <a href="../kdecore/KCmdLineOptions.html">KCmdLineOptions</a> _options, <a href="../kdecore/KLocalizedString.html">KLocalizedString</a> _name, QByteArray _id)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#KCmdLineArgs">__init__</a> (self, <a href="../kdecore/KCmdLineArgs.html">KCmdLineArgs</a> other)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#arg">arg</a> (self, int n)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#clear">clear</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#count">count</a> (self)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#getOption">getOption</a> (self, QByteArray option)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QStringList&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#getOptionList">getOptionList</a> (self, QByteArray option)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#isSet">isSet</a> (self, QByteArray option)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../kdecore/KUrl.html">KUrl</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#url">url</a> (self, int n)</td></tr>
<tr><td colspan="2"><br><h2>Static Methods</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../kdecore/KAboutData.html">KAboutData</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aboutData">aboutData</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#addCmdLineOptions">addCmdLineOptions</a> (<a href="../kdecore/KCmdLineOptions.html">KCmdLineOptions</a> options, <a href="../kdecore/KLocalizedString.html">KLocalizedString</a> name=KLocalizedString(), QByteArray id=QByteArray(), QByteArray afterId=QByteArray())</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#addStdCmdLineOptions">addStdCmdLineOptions</a> (<a href="../kdecore/KCmdLineArgs.html">KCmdLineArgs.StdCmdLineArgs</a> stdargs=KCmdLineArgs.StdCmdLineArgs(KCmdLineArgs.CmdLineArgQt|KCmdLineArgs.CmdLineArgKDE))</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#addTempFileOption">addTempFileOption</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QStringList&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#allArguments">allArguments</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#appName">appName</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#cwd">cwd</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#enable_i18n">enable_i18n</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#init">init</a> (SIP_PYLIST argv, QByteArray appname, QByteArray catalog, <a href="../kdecore/KLocalizedString.html">KLocalizedString</a> programName, QByteArray version, <a href="../kdecore/KLocalizedString.html">KLocalizedString</a> description=KLocalizedString(), int stdargs=3)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#init">init</a> (SIP_PYLIST argv, <a href="../kdecore/KAboutData.html">KAboutData</a> about, int stdargs=3)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#init">init</a> (<a href="../kdecore/KAboutData.html">KAboutData</a> about)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#isTempFileSet">isTempFileSet</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#loadAppArgs">loadAppArgs</a> (QDataStream a0)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../kdecore/KUrl.html">KUrl</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#makeURL">makeURL</a> (QByteArray urlArg)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../kdecore/KCmdLineArgs.html">KCmdLineArgs</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#parsedArgs">parsedArgs</a> (QByteArray id=QByteArray())</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#reset">reset</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#saveAppArgs">saveAppArgs</a> (QDataStream a0)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#setCwd">setCwd</a> (QByteArray cwd)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#usage">usage</a> (QByteArray id=QByteArray())</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="#usageError">usageError</a> (QString error)</td></tr>
</table>
<hr><h2>Method Documentation</h2><a class="anchor" name="KCmdLineArgs"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">__init__</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../kdecore/KCmdLineOptions.html">KCmdLineOptions</a>&nbsp;</td>
<td class="paramname"><em>_options</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../kdecore/KLocalizedString.html">KLocalizedString</a>&nbsp;</td>
<td class="paramname"><em>_name</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QByteArray&nbsp;</td>
<td class="paramname"><em>_id</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p><dl class="internal" compact><dt><b>Internal:</b></dt><dd>
Constructor.
</dd></dl>
</p></div></div><a class="anchor" name="KCmdLineArgs"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">__init__</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../kdecore/KCmdLineArgs.html">KCmdLineArgs</a>&nbsp;</td>
<td class="paramname"><em>other</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"></div></div><a class="anchor" name="arg"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QString arg</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"><em>n</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Read out an argument.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>n</em>&nbsp;</td><td> The argument to read. 0 is the first argument.
count()-1 is the last argument.
</td></tr>
</table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> n-th argument
</dd></dl>
</p></div></div><a class="anchor" name="clear"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> clear</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Clear all options and arguments.
</p></div></div><a class="anchor" name="count"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">int count</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname"><em>self</em>&nbsp;)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Read the number of arguments that aren't options (but,
for example, filenames).
</p>
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd> The number of arguments that aren't options
</dd></dl>
</p></div></div><a class="anchor" name="getOption"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QString getOption</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QByteArray&nbsp;</td>
<td class="paramname"><em>option</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Read out a string option.
</p>
<p>
The option must have a corresponding KCmdLineOptions entry
of the form:
<pre class="fragment">
    options.add("option \&lt;argument&gt;", ki18n("Description"), "default");
</pre>
You cannot test for the presence of an alias - you must always
test for the full option.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>option</em>&nbsp;</td><td> The name of the option without '-'.
</td></tr>
</table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> The value of the option. If the option was not
present on the command line the default is returned.
If the option was present more than once, the value of the
last occurrence is used.
</dd></dl>
</p></div></div><a class="anchor" name="getOptionList"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QStringList getOptionList</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QByteArray&nbsp;</td>
<td class="paramname"><em>option</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Read out all occurrences of a string option.
</p>
<p>
The option must have a corresponding KCmdLineOptions entry
of the form:
<pre class="fragment">
    options.add("option \&lt;argument&gt;", ki18n("Description"), "default");
</pre>
You cannot test for the presence of an alias - you must always
test for the full option.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>option</em>&nbsp;</td><td> The name of the option, without '-' or '-no'.
</td></tr>
</table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> A list of all option values. If no option was present
on the command line, an empty list is returned.
</dd></dl>
</p></div></div><a class="anchor" name="isSet"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool isSet</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QByteArray&nbsp;</td>
<td class="paramname"><em>option</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Read out a boolean option or check for the presence of string option.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>option</em>&nbsp;</td><td> The name of the option without '-' or '-no'.
</td></tr>
</table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> The value of the option. It will be true if the option
was specifically turned on in the command line, or if the option
is turned on by default (in the KCmdLineOptions list) and was
not specifically turned off in the command line. Equivalently,
it will be false if the option was specifically turned off in
the command line, or if the option is turned off by default (in
the KCmdLineOptions list) and was not specifically turned on in
the command line.
</dd></dl>
</p></div></div><a class="anchor" name="url"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="../kdecore/KUrl.html">KUrl</a> url</td>
<td>(</td>
<td class="paramtype">&nbsp;<em>self</em>, </td>
<td class="paramname"></td>
</tr><tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"><em>n</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Read out an argument representing a URL.
</p>
<p>
The argument can be
<li> an absolute filename </li>
<li> a relative filename </li>
<li> a URL </li>
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>n</em>&nbsp;</td><td> The argument to read. 0 is the first argument.
count()-1 is the last argument.
</td></tr>
</table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> a URL representing the n'th argument.
</dd></dl>
</p></div></div><hr><h2>Static Method Documentation</h2><a class="anchor" name="aboutData"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="../kdecore/KAboutData.html">KAboutData</a> aboutData</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Returns the KAboutData for consumption by KComponentData
</p></div></div><a class="anchor" name="addCmdLineOptions"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> addCmdLineOptions</td>
<td>(</td>
<td class="paramtype"><a href="../kdecore/KCmdLineOptions.html">KCmdLineOptions</a>&nbsp;</td>
<td class="paramname"><em>options</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../kdecore/KLocalizedString.html">KLocalizedString</a>&nbsp;</td>
<td class="paramname"><em>name=KLocalizedString()</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QByteArray&nbsp;</td>
<td class="paramname"><em>id=QByteArray()</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QByteArray&nbsp;</td>
<td class="paramname"><em>afterId=QByteArray()</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Add options to your application.
</p>
<p>
You must make sure that all possible options have been added before
any class uses the command line arguments.
</p>
<p>
The list of options should look like this:
</p>
<p>
<pre class="fragment">
 KCmdLineOptions options;
 options.add("option1 \&lt;argument&gt;", ki18n("Description 1"), "my_extra_arg");
 options.add("o");
 options.add("option2", ki18n("Description 2"));
 options.add("nooption3", ki18n("Description 3"));
 options.add("+file", ki18n("A required argument 'file'"));
</pre>
</p>
<p>
<li> "option1" is an option that requires an additional argument, </li>
but if one is not provided, it uses "my_extra_arg".
<li> "option2" is an option that can be turned on. The default is off. </li>
<li> "option3" is an option that can be turned off. The default is on. </li>
<li> "o" does not have a description. It is an alias for the option </li>
that follows. In this case "option2".
<li> "+file" specifies an argument. The '+' is removed. If your program </li>
doesn't specify that it can use arguments your program will abort
when an argument is passed to it. Note that the reverse is not
true. If required, you must check yourself the number of arguments
specified by the user:
<pre class="fragment">
       KCmdLineArgs *args = KCmdLineArgs.parsedArgs();
       if (args-&gt;count() == 0) KCmdLineArgs.usage(i18n("No file specified"));
</pre>
</p>
<p>
In BNF:
<pre class="fragment">
 cmd = myapp [options] file
 options = (option)*
 option = --option1 \&lt;argument&gt; |
          (-o | --option2 | --nooption2) |
          ( --option3 | --nooption3 )
</pre>
</p>
<p>
Instead of "--option3" one may also use "-option3"
</p>
<p>
Usage examples:
</p>
<p>
<li> "myapp --option1 test" </li>
<li> "myapp" (same as "myapp --option1 my_extra_arg") </li>
<li> "myapp --option2" </li>
<li> "myapp --nooption2" (same as "myapp", since it is off by default) </li>
<li> "myapp -o" (same as "myapp --option2") </li>
<li> "myapp --nooption3" </li>
<li> "myapp --option3 (same as "myapp", since it is on by default) </li>
<li> "myapp --option2 --nooption2" (same as "myapp", because it </li>
option2 is off by default, and the last usage applies)
<li> "myapp /tmp/file" </li>
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>options</em>&nbsp;</td><td> A list of options that your code supplies.

<tr><td></td><td valign="top"><em>name</em>&nbsp;</td><td> the name of the option list, as displayed by
the help output. Can be empty.

<tr><td></td><td valign="top"><em>id</em>&nbsp;</td><td> A name with which these options can be identified, can be empty.

<tr><td></td><td valign="top"><em>afterId</em>&nbsp;</td><td> The options are inserted after this set of options, can be empty.
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="addStdCmdLineOptions"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> addStdCmdLineOptions</td>
<td>(</td>
<td class="paramtype"><a href="../kdecore/KCmdLineArgs.html">KCmdLineArgs.StdCmdLineArgs</a>&nbsp;</td>
<td class="paramname"><em>stdargs=KCmdLineArgs.StdCmdLineArgs(KCmdLineArgs.CmdLineArgQt|KCmdLineArgs.CmdLineArgKDE)</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>add standard Qt/KDE command-line args
</p></div></div><a class="anchor" name="addTempFileOption"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> addTempFileOption</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Add standard option --tempfile
</p></div></div><a class="anchor" name="allArguments"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QStringList allArguments</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Returns the list of command-line arguments.
<dl class="since" compact><dt><b>Since:</b></dt><dd> 4.6
</dd></dl>
</p></div></div><a class="anchor" name="appName"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QString appName</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Get the appname according to argv[0].
<dl class="return" compact><dt><b>Returns:</b></dt><dd> the name of the application
</dd></dl>
</p></div></div><a class="anchor" name="cwd"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">QString cwd</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Get the CWD (Current Working Directory) associated with the
current command line arguments.
</p>
<p>
Typically this is needed in KUniqueApplication.newInstance()
since the CWD of the process may be different from the CWD
where the user started a second instance.
<dl class="return" compact><dt><b>Returns:</b></dt><dd> the current working directory
</dd></dl>
</p></div></div><a class="anchor" name="enable_i18n"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> enable_i18n</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Enable i18n to be able to print a translated error message.
</p>
<p>
N.B.: This function leaks memory, therefore you are expected to exit
afterwards (e.g., by calling usage()).
</p></div></div><a class="anchor" name="init"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> init</td>
<td>(</td>
<td class="paramtype">SIP_PYLIST&nbsp;</td>
<td class="paramname"><em>argv</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QByteArray&nbsp;</td>
<td class="paramname"><em>appname</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QByteArray&nbsp;</td>
<td class="paramname"><em>catalog</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../kdecore/KLocalizedString.html">KLocalizedString</a>&nbsp;</td>
<td class="paramname"><em>programName</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">QByteArray&nbsp;</td>
<td class="paramname"><em>version</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../kdecore/KLocalizedString.html">KLocalizedString</a>&nbsp;</td>
<td class="paramname"><em>description=KLocalizedString()</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"><em>stdargs=3</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Initialize Class
</p>
<p>
This function should be called as the very first thing in your
application. This method will rarely be used, since it doesn't
provide any argument parsing. It does provide access to the
KAboutData information.
This method is exactly the same as calling
init(0,0, const KAboutData *about, CmdLineArgNone).
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>about</em>&nbsp;</td><td> the about data.
</td></tr> </table></dl>
<p> <dl class="see" compact><dt><b>See also:</b></dt><dd> KAboutData
</dd></dl>
</p></div></div><a class="anchor" name="init"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> init</td>
<td>(</td>
<td class="paramtype">SIP_PYLIST&nbsp;</td>
<td class="paramname"><em>argv</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype"><a href="../kdecore/KAboutData.html">KAboutData</a>&nbsp;</td>
<td class="paramname"><em>about</em>, </td>
</tr>
<tr>
<td class="memname"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"><em>stdargs=3</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Initialize Class
</p>
<p>
This function should be called as the very first thing in your
application. This method will rarely be used, since it doesn't
provide any argument parsing. It does provide access to the
KAboutData information.
This method is exactly the same as calling
init(0,0, const KAboutData *about, CmdLineArgNone).
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>about</em>&nbsp;</td><td> the about data.
</td></tr> </table></dl>
<p> <dl class="see" compact><dt><b>See also:</b></dt><dd> KAboutData
</dd></dl>
</p></div></div><a class="anchor" name="init"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> init</td>
<td>(</td>
<td class="paramtype"><a href="../kdecore/KAboutData.html">KAboutData</a>&nbsp;</td>
<td class="paramname"><em>about</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Initialize Class
</p>
<p>
This function should be called as the very first thing in your
application. This method will rarely be used, since it doesn't
provide any argument parsing. It does provide access to the
KAboutData information.
This method is exactly the same as calling
init(0,0, const KAboutData *about, CmdLineArgNone).
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>about</em>&nbsp;</td><td> the about data.
</td></tr> </table></dl>
<p> <dl class="see" compact><dt><b>See also:</b></dt><dd> KAboutData
</dd></dl>
</p></div></div><a class="anchor" name="isTempFileSet"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname">bool isTempFileSet</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> true if --tempfile was set
</dd></dl>
</p></div></div><a class="anchor" name="loadAppArgs"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> loadAppArgs</td>
<td>(</td>
<td class="paramtype">QDataStream&nbsp;</td>
<td class="paramname"><em>a0</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Load arguments from a stream.
</p></div></div><a class="anchor" name="makeURL"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="../kdecore/KUrl.html">KUrl</a> makeURL</td>
<td>(</td>
<td class="paramtype">QByteArray&nbsp;</td>
<td class="paramname"><em>urlArg</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Used by url().
Made public for apps that don't use KCmdLineArgs
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>urlArg</em>&nbsp;</td><td> the argument
</td></tr> </table></dl>
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> the url.
</dd></dl>
</p></div></div><a class="anchor" name="parsedArgs"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"><a href="../kdecore/KCmdLineArgs.html">KCmdLineArgs</a> parsedArgs</td>
<td>(</td>
<td class="paramtype">QByteArray&nbsp;</td>
<td class="paramname"><em>id=QByteArray()</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Access parsed arguments.
</p>
<p>
This function returns all command line arguments that your code
handles. If unknown command-line arguments are encountered the program
is aborted and usage information is shown.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>id</em>&nbsp;</td><td> The name of the options you are interested in, can be empty.
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="reset"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> reset</td>
<td>(</td>
<td class="paramtype">&nbsp;</td>
<td class="paramname">)</td>
<td width="100%"> </td>
</tr>
</table>
</div>
<div class="memdoc"><p>Reset all option definitions, i.e. cancel all addCmdLineOptions calls.
Note that KApplication's options are removed too, you might want to
call KApplication.addCmdLineOptions if you want them back.
</p>
<p>
You usually don't want to call this method.
</p></div></div><a class="anchor" name="saveAppArgs"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> saveAppArgs</td>
<td>(</td>
<td class="paramtype">QDataStream&nbsp;</td>
<td class="paramname"><em>a0</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p><dl class="internal" compact><dt><b>Internal:</b></dt><dd> for KUniqueApplication only:
</dd></dl> </p>
<p>
Save all but the Qt and KDE arguments to a stream.
</p></div></div><a class="anchor" name="setCwd"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> setCwd</td>
<td>(</td>
<td class="paramtype">QByteArray&nbsp;</td>
<td class="paramname"><em>cwd</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Made public for apps that don't use KCmdLineArgs
To be done before makeURL, to set the current working
directory in case makeURL needs it.
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>cwd</em>&nbsp;</td><td> the new working directory
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="usage"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> usage</td>
<td>(</td>
<td class="paramtype">QByteArray&nbsp;</td>
<td class="paramname"><em>id=QByteArray()</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Print the usage help to stdout and exit.
</p>
<p>
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>id</em>&nbsp;</td><td> if empty, print all options. If id is set, only print the
option specified by id. The id is the value set by
addCmdLineOptions().
</td></tr>
</table></dl>
<p>
</p></div></div><a class="anchor" name="usageError"></a>
<div class="memitem">
<div class="memproto">
<table class="memname"><tr>
<td class="memname"> usageError</td>
<td>(</td>
<td class="paramtype">QString&nbsp;</td>
<td class="paramname"><em>error</em></td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td>
<td></td>
<td width="100%"> </td>
</tr></table>
</div>
<div class="memdoc"><p>Print an error to stderr and the usage help to stdout and exit.
</p><dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign="top"><em>error</em>&nbsp;</td><td> the error to print
</td></tr>
</table></dl>
<p>
</p></div></div><hr><h2>Enumeration Documentation</h2><a class="anchor" name="StdCmdLineArg"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr><td class="memname">StdCmdLineArg</td>
</tr>
</table>
</div>
<div class="memdoc"><dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0"><tr><td valign="top"><em>CmdLineArgQt</em>&nbsp;=&nbsp;0x01</td><td><tr><td valign="top"><em>CmdLineArgKDE</em>&nbsp;=&nbsp;0x02</td><td><tr><td valign="top"><em>CmdLineArgsMask</em>&nbsp;=&nbsp;0x03</td><td><tr><td valign="top"><em>CmdLineArgNone</em>&nbsp;=&nbsp;0x00</td><td><tr><td valign="top"><em>Reserved</em>&nbsp;=&nbsp;0xff</td><td></table>
</dl>
</div></div><p>
</div>
</div>
</div>

<div id="left">

<div class="menu_box">
<div class="nav_list">
<ul>
<li><a href="../allclasses.html">Full Index</a></li>
</ul>
</div>

<a name="cp-menu" /><div class="menutitle"><div>
  <h2 id="cp-menu-project">Modules</h2>
</div></div>
<div class="nav_list">
<ul><li><a href="../akonadi/index.html">akonadi</a></li>
<li><a href="../dnssd/index.html">dnssd</a></li>
<li><a href="../kdecore/index.html">kdecore</a></li>
<li><a href="../kdeui/index.html">kdeui</a></li>
<li><a href="../khtml/index.html">khtml</a></li>
<li><a href="../kio/index.html">kio</a></li>
<li><a href="../knewstuff/index.html">knewstuff</a></li>
<li><a href="../kparts/index.html">kparts</a></li>
<li><a href="../kutils/index.html">kutils</a></li>
<li><a href="../nepomuk/index.html">nepomuk</a></li>
<li><a href="../phonon/index.html">phonon</a></li>
<li><a href="../plasma/index.html">plasma</a></li>
<li><a href="../polkitqt/index.html">polkitqt</a></li>
<li><a href="../solid/index.html">solid</a></li>
<li><a href="../soprano/index.html">soprano</a></li>
</ul></div></div>

</div>

</div>
  <div class="clearer"/>
</div>

<div id="end_body"></div>
</div>
<div id="footer"><div id="footer_text">
This documentation is maintained by <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;simon&#64;simonzone&#46;com">Simon Edwards</a>.<br />
        KDE<sup>&#174;</sup> and <a href="../images/kde_gear_black.png">the K Desktop Environment<sup>&#174;</sup> logo</a> are registered trademarks of <a href="http://ev.kde.org/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> |
        <a href="http://www.kde.org/contact/impressum.php">Legal</a>
    </div></div>
</body>
</html>