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
|
//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;
import org.kde.qt.Qt;
import org.kde.qt.TQColor;
import org.kde.qt.TQRect;
import org.kde.qt.TQFont;
import org.kde.qt.TQMetaObject;
import org.kde.qt.QtSupport;
import org.kde.qt.TQPoint;
import java.util.Calendar;
import org.kde.qt.TQSize;
import java.util.ArrayList;
import org.kde.qt.TQVariant;
import org.kde.qt.TQObject;
/**
This class forms the base for all %KDE configuration. It is an
abstract base class, meaning that you cannot directly instantiate
objects of this class. Either use TDEConfig (for usual %KDE
configuration) or KSimpleConfig (for special needs as in ksamba), or
even TDESharedConfig (stores values in shared memory).
All configuration entries are key, value pairs. Each entry also
belongs to a specific group of related entries. All configuration
entries that do not explicitly specify which group they are in are
in a special group called the default group.
If there is a $ character in an entry, TDEConfigBase tries to expand
environment variable and uses its value instead of its name. You
can avoid this feature by having two consecutive $ characters in
your config file which get expanded to one.
<b>Note:<> the '=' char is not allowed in keys and the ']' char is not allowed in
a group name.
@author Kalle Dalheimer <kalle@kde.org>, Preston Brown <pbrown@kde.org>
@short KDE Configuration Management abstract base class.
@see TDEGlobal#config
@see TDEConfig
@see KSimpleConfig
@see TDESharedConfig
*/
public class TDEConfigBase extends TQObject {
protected TDEConfigBase(Class dummy){super((Class) null);}
/**
Possible return values for getConfigState().
@short Possible return values for getConfigState().
@see #getConfigState
*/
public static final int NoAccess = 0;
public static final int ReadOnly = 1;
public static final int ReadWrite = 2;
public native TQMetaObject metaObject();
public native String className();
/**
Construct a TDEConfigBase object.
@short Construct a TDEConfigBase object.
*/
/**
Specifies the group in which keys will be read and written.
Subsequent
calls to readEntry() and writeEntry() will be applied only in the
activated group.
Switch back to the default group by passing a null string.
@param group The name of the new group.
@short Specifies the group in which keys will be read and written.
*/
public native void setGroup(String group);
/**
Sets the group to the "Desktop Entry" group used for
desktop configuration files for applications, mime types, etc.
@short Sets the group to the "Desktop Entry" group used for desktop configuration files for applications, mime types, etc.
*/
public native void setDesktopGroup();
/**
Returns the name of the group in which we are
searching for keys and from which we are retrieving entries.
@return The current group.
@short Returns the name of the group in which we are searching for keys and from which we are retrieving entries.
*/
public native String group();
/**
Returns true if the specified group is known about.
@param group The group to search for.
@return true if the group exists.
@short Returns true if the specified group is known about.
*/
public native boolean hasGroup(String group);
/**
Returns a list of groups that are known about.
@return The list of groups.
@short Returns a list of groups that are known about.
*/
public native ArrayList groupList();
/**
Returns a the current locale.
@return A string representing the current locale.
@short Returns a the current locale.
*/
public native String locale();
/**
Reads the value of an entry specified by <code>pKey</code> in the current group.
If you want to read a path, please use readPathEntry().
@param pKey The key to search for.
@param aDefault A default value returned if the key was not found.
@return The value for this key. Can be null if aDefault is null.
@short Reads the value of an entry specified by <code>pKey</code> in the current group.
*/
public native String readEntry(String pKey, String aDefault);
public native String readEntry(String pKey);
/**
Reads the value of an entry specified by <code>pKey</code> in the current group.
The value is treated as if it is of the type of the given default value.
Note that only the following TQVariant types are allowed : String,
StringList, List, Font, Point, Rect, Size, Color, Int, UInt, Bool,
Double, DateTime and Date.
@param pKey The key to search for.
@param aDefault A default value returned if the key was not found or
if the read value cannot be converted to the TQVariant.Type.
@return The value for the key or the default value if the key was not
found.
@short Reads the value of an entry specified by <code>pKey</code> in the current group.
*/
public native TQVariant readPropertyEntry(String pKey, TQVariant aDefault);
/**
Reads a list of strings.
@param pKey The key to search for.
@param sep The list separator (default is ",").
@return The list. Empty if the entry does not exist.
@short Reads a list of strings.
*/
public native ArrayList readListEntry(String pKey, char sep);
public native ArrayList readListEntry(String pKey);
/**
Reads a list of strings, but returns a default if the key
did not exist.
@param pKey The key to search for.
@param aDefault The default value to use if the key does not exist.
@param sep The list separator (default is ",").
@return The list. Contains <code>aDefault</code> if the Key does not exist.
@short Reads a list of strings, but returns a default if the key did not exist.
*/
public native ArrayList readListEntry(String pKey, String[] aDefault, char sep);
public native ArrayList readListEntry(String pKey, String[] aDefault);
/**
Reads a list of Integers.
@param pKey The key to search for.
@return The list. Empty if the entry does not exist.
@short Reads a list of Integers.
*/
public native int[] readIntListEntry(String pKey);
/**
Reads a path.
Read the value of an entry specified by <code>pKey</code> in the current group
and interpret it as a path. This means, dollar expansion is activated
for this value, so that e.g. $HOME gets expanded.
@param pKey The key to search for.
@param aDefault A default value returned if the key was not found.
@return The value for this key. Can be null if aDefault is null.
@short Reads a path.
*/
public native String readPathEntry(String pKey, String aDefault);
public native String readPathEntry(String pKey);
/**
Reads a list of string paths.
Read the value of an entry specified by <code>pKey</code> in the current group
and interpret it as a list of paths. This means, dollar expansion is activated
for this value, so that e.g. $HOME gets expanded.
@param pKey The key to search for.
@param sep The list separator (default is ",").
@return The list. Empty if the entry does not exist.
@short Reads a list of string paths.
*/
public native ArrayList readPathListEntry(String pKey, char sep);
public native ArrayList readPathListEntry(String pKey);
/**
Reads a numerical value.
Read the value of an entry specified by <code>pKey</code> in the current group
and interpret it numerically.
@param pKey The key to search for.
@param nDefault A default value returned if the key was not found or if
the read value cannot be interpreted.
@return The value for this key.
@short Reads a numerical value.
*/
public native int readNumEntry(String pKey, int nDefault);
public native int readNumEntry(String pKey);
/**
Reads an unsigned numerical value.
Read the value of an entry specified by <code>pKey</code> in the current group
and interpret it numerically.
@param pKey The key to search for.
@param nDefault A default value returned if the key was not found or if
the read value cannot be interpreted.
@return The value for this key.
@short Reads an unsigned numerical value.
*/
public native int readUnsignedNumEntry(String pKey, int nDefault);
public native int readUnsignedNumEntry(String pKey);
/**
Reads a numerical value.
Read the value of an entry specified by <code>pKey</code> in the current group
and interpret it numerically.
@param pKey The key to search for.
@param nDefault A default value returned if the key was not found or if
the read value cannot be interpreted.
@return The value for this key.
@short Reads a numerical value.
*/
public native long readLongNumEntry(String pKey, long nDefault);
public native long readLongNumEntry(String pKey);
/**
Read an unsigned numerical value.
Read the value of an entry specified by <code>pKey</code> in the current group
and interpret it numerically.
@param pKey The key to search for.
@param nDefault A default value returned if the key was not found or if
the read value cannot be interpreted.
@return The value for this key.
@short Read an unsigned numerical value.
*/
public native long readUnsignedLongNumEntry(String pKey, long nDefault);
public native long readUnsignedLongNumEntry(String pKey);
/**
Reads a 64-bit numerical value.
Read the value of an entry specified by <code>pKey</code> in the current group
and interpret it numerically.
@param pKey The key to search for.
@param nDefault A default value returned if the key was not found or if
the read value cannot be interpreted.
@return The value for this key.
@short Reads a 64-bit numerical value.
*/
public native long readNum64Entry(String pKey, long nDefault);
public native long readNum64Entry(String pKey);
/**
Read an 64-bit unsigned numerical value.
Read the value of an entry specified by <code>pKey</code> in the current group
and interpret it numerically.
@param pKey The key to search for.
@param nDefault A default value returned if the key was not found or if
the read value cannot be interpreted.
@return The value for this key.
@short Read an 64-bit unsigned numerical value.
*/
public native long readUnsignedNum64Entry(String pKey, long nDefault);
public native long readUnsignedNum64Entry(String pKey);
/**
Reads a floating point value.
Read the value of an entry specified by <code>pKey</code> in the current group
and interpret it numerically.
@param pKey The key to search for.
@param nDefault A default value returned if the key was not found or if
the read value cannot be interpreted.
@return The value for this key.
@short Reads a floating point value.
*/
public native double readDoubleNumEntry(String pKey, double nDefault);
public native double readDoubleNumEntry(String pKey);
/**
Reads a TQFont value.
Read the value of an entry specified by <code>pKey</code> in the current group
and interpret it as a font object.
@param pKey The key to search for.
@param pDefault A default value (null TQFont by default) returned if the
key was not found or if the read value cannot be interpreted.
@return The value for this key.
@short Reads a TQFont value.
*/
public native TQFont readFontEntry(String pKey, TQFont pDefault);
public native TQFont readFontEntry(String pKey);
/**
Reads a booleanean entry.
Read the value of an entry specified by <code>pKey</code> in the current group
and interpret it as a booleanean value. Currently "on" and "true" are
accepted as true, everything else if false.
@param pKey The key to search for
@param bDefault A default value returned if the key was not found.
@return The value for this key.
@short Reads a boolean entry.
*/
public native boolean readBoolEntry(String pKey, boolean bDefault);
public native boolean readBoolEntry(String pKey);
/**
Reads a TQRect entry.
Read the value of an entry specified by pKey in the current group
and interpret it as a TQRect object.
@param pKey The key to search for
@param pDefault A default value (null TQRect by default) returned if the
key was not found or if the read value cannot be interpreted.
@return The value for this key.
@short Reads a TQRect entry.
*/
public native TQRect readRectEntry(String pKey, TQRect pDefault);
public native TQRect readRectEntry(String pKey);
/**
Reads a TQPoint entry.
Read the value of an entry specified by <code>pKey</code> in the current group
and interpret it as a TQPoint object.
@param pKey The key to search for
@param pDefault A default value (null TQPoint by default) returned if the
key was not found or if the read value cannot be interpreted.
@return The value for this key.
@short Reads a TQPoint entry.
*/
public native TQPoint readPointEntry(String pKey, TQPoint pDefault);
public native TQPoint readPointEntry(String pKey);
/**
Reads a TQSize entry.
Read the value of an entry specified by <code>pKey</code> in the current group
and interpret it as a TQSize object.
@param pKey The key to search for
@param pDefault A default value (null TQSize by default) returned if the
key was not found or if the read value cannot be interpreted.
@return The value for this key.
@short Reads a TQSize entry.
*/
public native TQSize readSizeEntry(String pKey, TQSize pDefault);
public native TQSize readSizeEntry(String pKey);
/**
Reads a TQColor entry.
Read the value of an entry specified by <code>pKey</code> in the current group
and interpret it as a color.
@param pKey The key to search for.
@param pDefault A default value (null TQColor by default) returned if the
key was not found or if the value cannot be interpreted.
@return The value for this key.
@short Reads a TQColor entry.
*/
public native TQColor readColorEntry(String pKey, TQColor pDefault);
public native TQColor readColorEntry(String pKey);
/**
Reads a Calendar entry.
Read the value of an entry specified by <code>pKey</code> in the current group
and interpret it as a date and time.
@param pKey The key to search for.
@param pDefault A default value ( currentDateTime() by default)
returned if the key was not found or if the read value cannot be
interpreted.
@return The value for this key.
@short Reads a TQDateTime entry.
*/
public native Calendar readDateTimeEntry(String pKey, Calendar pDefault);
public native Calendar readDateTimeEntry(String pKey);
/**
Reads the value of an entry specified by <code>pKey</code> in the current group.
The untranslated entry is returned, you normally do not need this.
@param pKey The key to search for.
@param aDefault A default value returned if the key was not found.
@return The value for this key.
@short Reads the value of an entry specified by <code>pKey</code> in the current group.
*/
public native String readEntryUntranslated(String pKey, String aDefault);
public native String readEntryUntranslated(String pKey);
/**
Writes a key/value pair.
This is stored in the most specific config file when destroying the
config object or when calling sync().
If you want to write a path, please use writePathEntry().
@param pKey The key to write.
@param pValue The value to write.
@param bPersistent If <code>bPersistent</code> is false, the entry's dirty
flag will not be set and thus the entry will
not be written to disk at deletion time.
@param bGlobal If <code>bGlobal</code> is true, the pair is not saved to the
application specific config file, but to the
global KDE config file.
@param bNLS If <code>bNLS</code> is true, the locale tag is added to the key
when writing it back.
@short Writes a key/value pair.
*/
public native void writeEntry(String pKey, String pValue, boolean bPersistent, boolean bGlobal, boolean bNLS);
public native void writeEntry(String pKey, String pValue, boolean bPersistent, boolean bGlobal);
public native void writeEntry(String pKey, String pValue, boolean bPersistent);
public native void writeEntry(String pKey, String pValue);
/**
writeEntry() Overridden to accept a property.
Note: Unlike the other writeEntry() functions, the old value is
_not_ returned here!
@param pKey The key to write
@param rValue The property to write
@param bPersistent If <code>bPersistent</code> is false, the entry's dirty flag
will not be set and thus the entry will not be
written to disk at deletion time.
@param bGlobal If <code>bGlobal</code> is true, the pair is not saved to the
application specific config file, but to the
global KDE config file.
@param bNLS If <code>bNLS</code> is true, the locale tag is added to the key
when writing it back.
@short writeEntry() Overridden to accept a property.
@see #writeEntry
*/
public native void writeEntry(String pKey, TQVariant rValue, boolean bPersistent, boolean bGlobal, boolean bNLS);
public native void writeEntry(String pKey, TQVariant rValue, boolean bPersistent, boolean bGlobal);
public native void writeEntry(String pKey, TQVariant rValue, boolean bPersistent);
public native void writeEntry(String pKey, TQVariant rValue);
/**
writeEntry() overridden to accept a list of strings.
Note: Unlike the other writeEntry() functions, the old value is
_not_ returned here!
@param pKey The key to write
@param rValue The list to write
@param sep The list separator (default is ",").
@param bPersistent If <code>bPersistent</code> is false, the entry's dirty flag
will not be set and thus the entry will not be
written to disk at deletion time.
@param bGlobal If <code>bGlobal</code> is true, the pair is not saved to the
application specific config file, but to the
global KDE config file.
@param bNLS If <code>bNLS</code> is true, the locale tag is added to the key
when writing it back.
@short writeEntry() overridden to accept a list of strings.
@see #writeEntry
*/
public native void writeEntry(String pKey, String[] rValue, char sep, boolean bPersistent, boolean bGlobal, boolean bNLS);
public native void writeEntry(String pKey, String[] rValue, char sep, boolean bPersistent, boolean bGlobal);
public native void writeEntry(String pKey, String[] rValue, char sep, boolean bPersistent);
public native void writeEntry(String pKey, String[] rValue, char sep);
public native void writeEntry(String pKey, String[] rValue);
/**
writeEntry() overridden to accept a list of Integers.
Note: Unlike the other writeEntry() functions, the old value is
_not_ returned here!
@param pKey The key to write
@param rValue The list to write
@param bPersistent If <code>bPersistent</code> is false, the entry's dirty flag
will not be set and thus the entry will not be
written to disk at deletion time.
@param bGlobal If <code>bGlobal</code> is true, the pair is not saved to the
application specific config file, but to the
global KDE config file.
@param bNLS If <code>bNLS</code> is true, the locale tag is added to the key
when writing it back.
@short writeEntry() overridden to accept a list of Integers.
@see #writeEntry
*/
public native void writeEntry(String pKey, int[] rValue, boolean bPersistent, boolean bGlobal, boolean bNLS);
public native void writeEntry(String pKey, int[] rValue, boolean bPersistent, boolean bGlobal);
public native void writeEntry(String pKey, int[] rValue, boolean bPersistent);
public native void writeEntry(String pKey, int[] rValue);
/**
Write a (key/value) pair.
Same as above, but writes a numerical value.
@param pKey The key to write.
@param nValue The value to write.
@param bPersistent If <code>bPersistent</code> is false, the entry's dirty
flag will not be set and thus the entry will not be written to
disk at deletion time.
@param bGlobal If <code>bGlobal</code> is true, the pair is not saved to the
application specific config file, but to the
global KDE config file.
@param bNLS If <code>bNLS</code> is true, the locale tag is added to the key
when writing it back.
@short Write a (key/value) pair.
*/
public native void writeEntry(String pKey, int nValue, boolean bPersistent, boolean bGlobal, boolean bNLS);
public native void writeEntry(String pKey, int nValue, boolean bPersistent, boolean bGlobal);
public native void writeEntry(String pKey, int nValue, boolean bPersistent);
public native void writeEntry(String pKey, int nValue);
/**
Writes a (key/value) pair.
Same as above, but write a long numerical value.
@param pKey The key to write.
@param nValue The value to write.
@param bPersistent If <code>bPersistent</code> is false, the entry's dirty
flag will not be set and thus the entry will not be written to
disk at deletion time.
@param bGlobal If <code>bGlobal</code> is true, the pair is not saved to the
application specific config file, but to the global KDE config file.
@param bNLS If <code>bNLS</code> is true, the locale tag is added to the key
when writing it back.
@short Writes a (key/value) pair.
*/
public native void writeEntry(String pKey, long nValue, boolean bPersistent, boolean bGlobal, boolean bNLS);
public native void writeEntry(String pKey, long nValue, boolean bPersistent, boolean bGlobal);
public native void writeEntry(String pKey, long nValue, boolean bPersistent);
public native void writeEntry(String pKey, long nValue);
/**
Writes a (key/value) pair.
Same as above, but writes a floating-point value.
@param pKey The key to write.
@param nValue The value to write.
@param bPersistent If <code>bPersistent</code> is false, the entry's dirty
flag will not be set and thus the entry will not be written to
disk at deletion time.
@param bGlobal If <code>bGlobal</code> is true, the pair is not saved to the
application specific config file, but to the global KDE config file.
@param format <code>format</code> determines the format to which the value
is converted. Default is 'g'.
@param precision <code>precision</code> sets the precision with which the
value is converted. Default is 6 as in String.
@param bNLS If <code>bNLS</code> is true, the locale tag is added to the key
when writing it back.
@short Writes a (key/value) pair.
*/
public native void writeEntry(String pKey, double nValue, boolean bPersistent, boolean bGlobal, char format, int precision, boolean bNLS);
public native void writeEntry(String pKey, double nValue, boolean bPersistent, boolean bGlobal, char format, int precision);
public native void writeEntry(String pKey, double nValue, boolean bPersistent, boolean bGlobal, char format);
public native void writeEntry(String pKey, double nValue, boolean bPersistent, boolean bGlobal);
public native void writeEntry(String pKey, double nValue, boolean bPersistent);
public native void writeEntry(String pKey, double nValue);
/**
Writes a (key/value) pair.
Same as above, but writes a booleanean value.
@param pKey The key to write.
@param bValue The value to write.
@param bPersistent If <code>bPersistent</code> is false, the entry's dirty
flag will not be set and thus the entry will not be written to
disk at deletion time.
@param bGlobal If <code>bGlobal</code> is true, the pair is not saved to the
application specific config file, but to the global KDE config file.
@param bNLS If <code>bNLS</code> is true, the locale tag is added to the key
when writing it back.
@short Writes a (key/value) pair.
*/
public native void writeEntry(String pKey, boolean bValue, boolean bPersistent, boolean bGlobal, boolean bNLS);
public native void writeEntry(String pKey, boolean bValue, boolean bPersistent, boolean bGlobal);
public native void writeEntry(String pKey, boolean bValue, boolean bPersistent);
public native void writeEntry(String pKey, boolean bValue);
/**
Writes a (key/value) pair.
Same as above, but writes a font value.
@param pKey The key to write.
@param rFont The font value to write.
@param bPersistent If <code>bPersistent</code> is false, the entry's dirty
flag will not be set and thus the entry will not be written to
disk at deletion time.
@param bGlobal If <code>bGlobal</code> is true, the pair is not saved to the
application specific config file, but to the global KDE config file.
@param bNLS If <code>bNLS</code> is true, the locale tag is added to the key
when writing it back.
@short Writes a (key/value) pair.
*/
public native void writeEntry(String pKey, TQFont rFont, boolean bPersistent, boolean bGlobal, boolean bNLS);
public native void writeEntry(String pKey, TQFont rFont, boolean bPersistent, boolean bGlobal);
public native void writeEntry(String pKey, TQFont rFont, boolean bPersistent);
public native void writeEntry(String pKey, TQFont rFont);
/**
Writes a (key/value) pair.
Same as above, but write a color entry.
Note: Unlike the other writeEntry() functions, the old value is
_not_ returned here!
@param pKey The key to write.
@param rColor The color value to write.
@param bPersistent If <code>bPersistent</code> is false, the entry's dirty
flag will not be set and thus the entry will not be written to
disk at deletion time.
@param bGlobal If <code>bGlobal</code> is true, the pair is not saved to the
application specific config file, but to the global KDE config file.
@param bNLS If <code>bNLS</code> is true, the locale tag is added to the key
when writing it back.
@short Writes a (key/value) pair.
*/
public native void writeEntry(String pKey, TQColor rColor, boolean bPersistent, boolean bGlobal, boolean bNLS);
public native void writeEntry(String pKey, TQColor rColor, boolean bPersistent, boolean bGlobal);
public native void writeEntry(String pKey, TQColor rColor, boolean bPersistent);
public native void writeEntry(String pKey, TQColor rColor);
/**
Writes a (key/value) pair.
Same as above, but writes a date and time entry.
Note: Unlike the other writeEntry() functions, the old value is
<b>not</b> returned here!
@param pKey The key to write.
@param rDateTime The date and time value to write.
@param bPersistent If <code>bPersistent</code> is false, the entry's dirty
flag will not be set and thus the entry will not be written to
disk at deletion time.
@param bGlobal If <code>bGlobal</code> is true, the pair is not saved to the
application specific config file, but to the global KDE config file.
@param bNLS If <code>bNLS</code> is true, the locale tag is added to the key
when writing it back.
@short Writes a (key/value) pair.
*/
public native void writeEntry(String pKey, Calendar rDateTime, boolean bPersistent, boolean bGlobal, boolean bNLS);
public native void writeEntry(String pKey, Calendar rDateTime, boolean bPersistent, boolean bGlobal);
public native void writeEntry(String pKey, Calendar rDateTime, boolean bPersistent);
public native void writeEntry(String pKey, Calendar rDateTime);
/**
Writes a (key/value) pair.
Same as above, but writes a rectangle.
Note: Unlike the other writeEntry() functions, the old value is
_not_ returned here!
@param pKey The key to write.
@param rValue The rectangle value to write.
@param bPersistent If <code>bPersistent</code> is false, the entry's dirty
flag will not be set and thus the entry will not be written to
disk at deletion time.
@param bGlobal If <code>bGlobal</code> is true, the pair is not saved to the
application specific config file, but to the global KDE config file.
@param bNLS If <code>bNLS</code> is true, the locale tag is added to the key
when writing it back.
@short Writes a (key/value) pair.
*/
public native void writeEntry(String pKey, TQRect rValue, boolean bPersistent, boolean bGlobal, boolean bNLS);
public native void writeEntry(String pKey, TQRect rValue, boolean bPersistent, boolean bGlobal);
public native void writeEntry(String pKey, TQRect rValue, boolean bPersistent);
public native void writeEntry(String pKey, TQRect rValue);
/**
Writes a (key/value) pair.
Same as above, but writes a point.
Note: Unlike the other writeEntry() functions, the old value is
_not_ returned here!
@param pKey The key to write.
@param rValue The point value to write.
@param bPersistent If <code>bPersistent</code> is false, the entry's dirty
flag will not be set and thus the entry will not be written to
disk at deletion time.
@param bGlobal If <code>bGlobal</code> is true, the pair is not saved to the
application specific config file, but to the global KDE config file.
@param bNLS If <code>bNLS</code> is true, the locale tag is added to the key
when writing it back.
@short Writes a (key/value) pair.
*/
public native void writeEntry(String pKey, TQPoint rValue, boolean bPersistent, boolean bGlobal, boolean bNLS);
public native void writeEntry(String pKey, TQPoint rValue, boolean bPersistent, boolean bGlobal);
public native void writeEntry(String pKey, TQPoint rValue, boolean bPersistent);
public native void writeEntry(String pKey, TQPoint rValue);
/**
Writes a (key/value) pair.
Same as above, but writes a size.
Note: Unlike the other writeEntry() functions, the old value is
_not_ returned here!
@param pKey The key to write.
@param rValue The size value to write.
@param bPersistent If <code>bPersistent</code> is false, the entry's dirty
flag will not be set and thus the entry will not be written to
disk at deletion time.
@param bGlobal If <code>bGlobal</code> is true, the pair is not saved to the
application specific config file, but to the global KDE config file.
@param bNLS If <code>bNLS</code> is true, the locale tag is added to the key
when writing it back.
@short Writes a (key/value) pair.
*/
public native void writeEntry(String pKey, TQSize rValue, boolean bPersistent, boolean bGlobal, boolean bNLS);
public native void writeEntry(String pKey, TQSize rValue, boolean bPersistent, boolean bGlobal);
public native void writeEntry(String pKey, TQSize rValue, boolean bPersistent);
public native void writeEntry(String pKey, TQSize rValue);
/**
Writes a file path.
It is checked whether the path is located under $HOME. If so the
path is written out with the user's home-directory replaced with
$HOME. The path should be read back with readPathEntry()
@param pKey The key to write.
@param path The path to write.
@param bPersistent If <code>bPersistent</code> is false, the entry's dirty
flag will not be set and thus the entry will not be written to
disk at deletion time.
@param bGlobal If <code>bGlobal</code> is true, the pair is not saved to the
application specific config file, but to the global KDE config file.
@param bNLS If <code>bNLS</code> is true, the locale tag is added to the key
when writing it back.
@short Writes a file path.
*/
public native void writePathEntry(String pKey, String path, boolean bPersistent, boolean bGlobal, boolean bNLS);
public native void writePathEntry(String pKey, String path, boolean bPersistent, boolean bGlobal);
public native void writePathEntry(String pKey, String path, boolean bPersistent);
public native void writePathEntry(String pKey, String path);
/**
writePathEntry() overridden to accept a list of paths (strings).
It is checked whether the paths are located under $HOME. If so each of
the paths are written out with the user's home-directory replaced with
$HOME. The paths should be read back with readPathListEntry()
@param pKey The key to write
@param rValue The list to write
@param sep The list separator (default is ",").
@param bPersistent If <code>bPersistent</code> is false, the entry's dirty flag
will not be set and thus the entry will not be
written to disk at deletion time.
@param bGlobal If <code>bGlobal</code> is true, the pair is not saved to the
application specific config file, but to the
global KDE config file.
@param bNLS If <code>bNLS</code> is true, the locale tag is added to the key
when writing it back.
@short writePathEntry() overridden to accept a list of paths (strings).
@see #writePathEntry
@see #readPathListEntry
*/
public native void writePathEntry(String pKey, String[] rValue, char sep, boolean bPersistent, boolean bGlobal, boolean bNLS);
public native void writePathEntry(String pKey, String[] rValue, char sep, boolean bPersistent, boolean bGlobal);
public native void writePathEntry(String pKey, String[] rValue, char sep, boolean bPersistent);
public native void writePathEntry(String pKey, String[] rValue, char sep);
public native void writePathEntry(String pKey, String[] rValue);
/**
Deletes the entry specified by <code>pKey</code> in the current group.
@param pKey The key to delete.
@param bGlobal If <code>bGlobal</code> is true, the pair is not removed from the
application specific config file, but to the global KDE config file.
@param bNLS If <code>bNLS</code> is true, the key with the locale tag is removed.
@short Deletes the entry specified by <code>pKey</code> in the current group.
*/
public native void deleteEntry(String pKey, boolean bNLS, boolean bGlobal);
public native void deleteEntry(String pKey, boolean bNLS);
public native void deleteEntry(String pKey);
/**
Deletes a configuration entry group
If the group is not empty and bDeep is false, nothing gets
deleted and false is returned.
If this group is the current group and it is deleted, the
current group is undefined and should be set with setGroup()
before the next operation on the configuration object.
@param group The name of the group
@param bDeep Specify whether non-empty groups should be completely
deleted (including their entries).
@param bGlobal If <code>bGlobal</code> is true, the group is not removed from the
application specific config file, but from the global KDE config file.
@return If the group is not empty and bDeep is false,
deleteGroup returns false.
@short Deletes a configuration entry group
*/
public native boolean deleteGroup(String group, boolean bDeep, boolean bGlobal);
public native boolean deleteGroup(String group, boolean bDeep);
public native boolean deleteGroup(String group);
/**
Turns on or off "dollar expansion" (see TDEConfigBase introduction)
when reading config entries.
Dollar sign expansion is initially OFF.
@param _bExpand Tf true, dollar expansion is turned on.
@short Turns on or off "dollar expansion" (see TDEConfigBase introduction) when reading config entries.
*/
public native void setDollarExpansion(boolean _bExpand);
public native void setDollarExpansion();
/**
Returns whether dollar expansion is on or off. It is initially OFF.
@return true if dollar expansion is on.
@short Returns whether dollar expansion is on or off.
*/
public native boolean isDollarExpansion();
/**
Mark the config object as "clean," i.e. don't write dirty entries
at destruction time. If <code>bDeep</code> is false, only the global dirty
flag of the TDEConfig object gets cleared. If you then call
writeEntry() again, the global dirty flag is set again and all
dirty entries will be written at a subsequent sync() call.
Classes that derive from TDEConfigBase should override this
method and implement storage-specific behavior, as well as
calling the TDEConfigBase.rollback() explicitly in the initializer.
@param bDeep If true, the dirty flags of all entries are cleared,
as well as the global dirty flag.
@short Mark the config object as "clean," i.
*/
public native void rollback(boolean bDeep);
public native void rollback();
/**
Flushes all changes that currently reside only in memory
back to disk / permanent storage. Dirty configuration entries are
written to the most specific file available.
Asks the back end to flush out all pending writes, and then calls
rollback(). No changes are made if the object has <code>readOnly</code>
status.
You should call this from your destructor in derivative classes.
@short Flushes all changes that currently reside only in memory back to disk / permanent storage.
@see #rollback
@see #isReadOnly
*/
public native void sync();
/**
Checks whether the config file has any dirty (modified) entries.
@return true if the config file has any dirty (modified) entries.
@short Checks whether the config file has any dirty (modified) entries.
*/
public native boolean isDirty();
/**
Sets the config object's read-only status.
@param _ro If true, the config object will not write out any
changes to disk even if it is destroyed or sync() is called.
@short Sets the config object's read-only status.
*/
public native void setReadOnly(boolean _ro);
/**
Returns the read-only status of the config object.
@return The read-only status.
@short Returns the read-only status of the config object.
*/
public native boolean isReadOnly();
/**
Checks whether the key has an entry in the currently active group.
Use this to determine whether a key is not specified for the current
group (hasKey() returns false). Keys with null data are considered
nonexistent.
@param key The key to search for.
@return If true, the key is available.
@short Checks whether the key has an entry in the currently active group.
*/
public native boolean hasKey(String key);
/**
Returns a map (tree) of entries for all entries in a particular
group. Only the actual entry string is returned, none of the
other internal data should be included.
@param group A group to get keys from.
@return A map of entries in the group specified, indexed by key.
The returned map may be empty if the group is not found.
@short Returns a map (tree) of entries for all entries in a particular group.
@see org.kde.qt.TQMap
*/
// TQMap<TQString, TQString> entryMap(const TQString& arg1); >>>> NOT CONVERTED
/**
Reparses all configuration files. This is useful for programs
that use stand alone graphical configuration tools. The base
method implemented here only clears the group list and then
appends the default group.
Derivative classes should clear any internal data structures and
then simply call parseConfigFiles() when implementing this
method.
@short Reparses all configuration files.
@see #parseConfigFiles
*/
public native void reparseConfiguration();
/**
Checks whether this configuration file can be modified.
@return whether changes may be made to this configuration file.
@short Checks whether this configuration file can be modified.
*/
public native boolean isImmutable();
/**
Checks whether it is possible to change the given group.
@param group the group to check
@return whether changes may be made to <code>group</code> in this configuration
file.
@short Checks whether it is possible to change the given group.
*/
public native boolean groupIsImmutable(String group);
/**
Checks whether it is possible to change the given entry.
@param key the key to check
@return whether the entry <code>key</code> may be changed in the current group
in this configuration file.
@short Checks whether it is possible to change the given entry.
*/
public native boolean entryIsImmutable(String key);
/**
Returns the state of the app-config object.
Possible return values
are NoAccess (the application-specific config file could not be
opened neither read-write nor read-only), ReadOnly (the
application-specific config file is opened read-only, but not
read-write) and ReadWrite (the application-specific config
file is opened read-write).
@return the state of the app-config object
@short Returns the state of the app-config object.
@see ConfigState
*/
public native int getConfigState();
/**
Check whether the config files are writable.
@param warnUser Warn the user if the configuration files are not writable.
@return Indicates that all of the configuration files used are writable.
@short Check whether the config files are writable.
*/
public native boolean checkConfigFilesWritable(boolean warnUser);
/**
When set, all readEntry and readXXXEntry calls return the system
wide (default) values instead of the user's preference.
This is off by default.
@short When set, all readEntry and readXXXEntry calls return the system wide (default) values instead of the user's preference.
*/
public native void setReadDefaults(boolean b);
/**
@return true if all readEntry and readXXXEntry calls return the system
wide (default) values instead of the user's preference.
@short
*/
public native boolean readDefaults();
/**
Reverts the entry with key <code>key</code> in the current group in the
application specific config file to either the system wide (default)
value or the value specified in the global KDE config file.
To revert entries in the global KDE config file, the global KDE config
file should be opened explicitly in a separate config object.
@param key The key of the entry to revert.
@short Reverts the entry with key <code>key</code> in the current group in the application specific config file to either the system wide (default) value or the value specified in the global KDE config file.
*/
public native void revertToDefault(String key);
/**
Returns whether a default is specified for an entry in either the
system wide configuration file or the global KDE config file.
If an application computes a default value at runtime for
a certain entry, e.g. like:
<pre>
TQColor computedDefault = kapp.palette().color(TQPalette.Active, TQColorGroup.Text)
TQColor color = config.readEntry(key, computedDefault);
\encode
Then it may wish to make the following check before
writing back changes:
<pre>
if ( (value == computedDefault) && !config.hasDefault(key) )
config.revertToDefault(key)
else
config.writeEntry(key, value)
</pre>
This ensures that as long as the entry is not modified to differ from
the computed default, the application will keep using the computed default
and will follow changes the computed default makes over time.
@param key The key of the entry to check.
@short Returns whether a default is specified for an entry in either the system wide configuration file or the global KDE config file.
*/
public native boolean hasDefault(String key);
}
|