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
|
#include <kjsembed/global.h>
#include <kjs/object.h>
#ifndef QT_ONLY
#include <tdelocale.h>
#include <kdebug.h>
#endif
#include <kjsembed/jsopaqueproxy.h>
#include <kjsembed/jsbinding.h>
#include <tqdir.h>
#include "qdir_imp.h"
/**
* Namespace containing the KJSEmbed library.
*/
namespace KJSEmbed {
namespace Bindings {
KJS::Object TQDirLoader::createBinding(KJSEmbedPart *jspart, KJS::ExecState *exec, const KJS::List &args) const
{
JSOpaqueProxy * prx;
if ( args.size() == 0 ) {
prx = new JSOpaqueProxy( new TQDir( TQDir::current() ), "TQDir" );
} else {
TQString arg0 = ( args.size() >= 1 ) ? args[ 0 ].toString( exec ).qstring() : TQString::null;
prx = new JSOpaqueProxy( new TQDir( arg0 ), "TQDir" );
}
prx->setOwner( JSProxy::JavaScript );
KJS::Object proxyObj( prx );
addBindings( jspart, exec, proxyObj );
return proxyObj;
}
void TQDirLoader::addBindings( KJSEmbedPart *jspart, KJS::ExecState *exec, KJS::Object &proxy ) const
{
TQDirImp::addBindings( exec, proxy );
}
}
TQDirImp::TQDirImp( KJS::ExecState *exec, int id )
: JSProxyImp(exec), mid(id)
{
}
TQDirImp::~TQDirImp()
{
}
void TQDirImp::addBindings( KJS::ExecState *exec, KJS::Object &object )
{
JSProxy::MethodTable methods[] = {
{ Method_setPath_7, "setPath" },
{ Method_path_8, "path" },
{ Method_absPath_9, "absPath" },
{ Method_canonicalPath_10, "canonicalPath" },
{ Method_dirName_11, "dirName" },
{ Method_filePath_12, "filePath" },
{ Method_absFilePath_13, "absFilePath" },
{ Method_cd_14, "cd" },
{ Method_cdUp_15, "cdUp" },
{ Method_nameFilter_16, "nameFilter" },
{ Method_setNameFilter_17, "setNameFilter" },
{ Method_filter_18, "filter" },
{ Method_setFilter_19, "setFilter" },
{ Method_sorting_20, "sorting" },
{ Method_setSorting_21, "setSorting" },
{ Method_matchAllDirs_22, "matchAllDirs" },
{ Method_setMatchAllDirs_23, "setMatchAllDirs" },
{ Method_count_24, "count" },
{ Method_encodedEntryList_26, "encodedEntryList" },
{ Method_encodedEntryList_27, "encodedEntryList" },
{ Method_entryList_28, "entryList" },
{ Method_entryList_29, "entryList" },
{ Method_entryInfoList_30, "entryInfoList" },
{ Method_entryInfoList_31, "entryInfoList" },
{ Method_mkdir_32, "mkdir" },
{ Method_rmdir_33, "rmdir" },
{ Method_isReadable_34, "isReadable" },
{ Method_exists_35, "exists" },
{ Method_isRoot_36, "isRoot" },
{ Method_isRelative_37, "isRelative" },
{ Method_convertToAbs_38, "convertToAbs" },
{ Method_remove_41, "remove" },
{ Method_rename_42, "rename" },
{ Method_exists_43, "exists" },
{ Method_refresh_44, "refresh" },
{ Method_convertSeparators_45, "convertSeparators" },
{ Method_drives_46, "drives" },
{ Method_separator_47, "separator" },
{ Method_setCurrent_48, "setCurrent" },
{ Method_current_49, "current" },
{ Method_home_50, "home" },
{ Method_root_51, "root" },
{ Method_currentDirPath_52, "currentDirPath" },
{ Method_homeDirPath_53, "homeDirPath" },
{ Method_rootDirPath_54, "rootDirPath" },
{ Method_match_55, "match" },
{ Method_match_56, "match" },
{ Method_cleanDirPath_57, "cleanDirPath" },
{ Method_isRelativePath_58, "isRelativePath" },
{ 0, 0 }
};
int idx = 0;
do {
TQDirImp *meth = new TQDirImp( exec, methods[idx].id );
object.put( exec , methods[idx].name, KJS::Object(meth) );
++idx;
} while( methods[idx].id );
//
// Define the enum constants
//
struct EnumValue {
const char *id;
int val;
};
EnumValue enums[] = {
// enum FilterSpec
{ "Dirs", TQDir::Dirs },
{ "Files", TQDir::Files },
{ "Drives", TQDir::Drives },
{ "NoSymLinks", TQDir::NoSymLinks },
{ "All", TQDir::All },
{ "TypeMask", TQDir::TypeMask },
{ "Readable", TQDir::Readable },
{ "Writable", TQDir::Writable },
{ "Executable", TQDir::Executable },
{ "RWEMask", TQDir::RWEMask },
{ "Modified", TQDir::Modified },
{ "Hidden", TQDir::Hidden },
{ "System", TQDir::System },
{ "AccessMask", TQDir::AccessMask },
{ "DefaultFilter", TQDir::DefaultFilter },
// enum SortSpec
{ "Name", TQDir::Name },
{ "Time", TQDir::Time },
{ "Size", TQDir::Size },
{ "Unsorted", TQDir::Unsorted },
{ "SortByMask", TQDir::SortByMask },
{ "DirsFirst", TQDir::DirsFirst },
{ "Reversed", TQDir::Reversed },
{ "IgnoreCase", TQDir::IgnoreCase },
{ "DefaultSort", TQDir::DefaultSort },
{ 0, 0 }
};
int enumidx = 0;
do {
object.put( exec, enums[enumidx].id, KJS::Number(enums[enumidx].val), KJS::ReadOnly );
++enumidx;
} while( enums[enumidx].id );
}
KJS::Value TQDirImp::call( KJS::ExecState *exec, KJS::Object &self, const KJS::List &args )
{
JSOpaqueProxy *op = JSProxy::toOpaqueProxy( self.imp() );
if ( !op ) {
kdWarning() << "TQDirImp::call() failed, not a JSOpaqueProxy" << endl;
return KJS::Value();
}
if ( op->typeName() != "TQDir" ) {
kdWarning() << "TQDirImp::call() failed, type is " << op->typeName() << endl;
return KJS::Value();
}
instance = op->toNative<TQDir>();
switch( mid ) {
case Method_setPath_7:
return setPath_7( exec, self, args );
break;
case Method_path_8:
return path_8( exec, self, args );
break;
case Method_absPath_9:
return absPath_9( exec, self, args );
break;
case Method_canonicalPath_10:
return canonicalPath_10( exec, self, args );
break;
case Method_dirName_11:
return dirName_11( exec, self, args );
break;
case Method_filePath_12:
return filePath_12( exec, self, args );
break;
case Method_absFilePath_13:
return absFilePath_13( exec, self, args );
break;
case Method_cd_14:
return cd_14( exec, self, args );
break;
case Method_cdUp_15:
return cdUp_15( exec, self, args );
break;
case Method_nameFilter_16:
return nameFilter_16( exec, self, args );
break;
case Method_setNameFilter_17:
return setNameFilter_17( exec, self, args );
break;
case Method_filter_18:
return filter_18( exec, self, args );
break;
case Method_setFilter_19:
return setFilter_19( exec, self, args );
break;
case Method_sorting_20:
return sorting_20( exec, self, args );
break;
case Method_setSorting_21:
return setSorting_21( exec, self, args );
break;
case Method_matchAllDirs_22:
return matchAllDirs_22( exec, self, args );
break;
case Method_setMatchAllDirs_23:
return setMatchAllDirs_23( exec, self, args );
break;
case Method_count_24:
return count_24( exec, self, args );
break;
case Method_encodedEntryList_26:
return encodedEntryList_26( exec, self, args );
break;
case Method_encodedEntryList_27:
return encodedEntryList_27( exec, self, args );
break;
case Method_entryList_28:
return entryList_28( exec, self, args );
break;
case Method_entryList_29:
return entryList_29( exec, self, args );
break;
case Method_entryInfoList_30:
return entryInfoList_30( exec, self, args );
break;
case Method_entryInfoList_31:
return entryInfoList_31( exec, self, args );
break;
case Method_mkdir_32:
return mkdir_32( exec, self, args );
break;
case Method_rmdir_33:
return rmdir_33( exec, self, args );
break;
case Method_isReadable_34:
return isReadable_34( exec, self, args );
break;
case Method_exists_35:
return exists_35( exec, self, args );
break;
case Method_isRoot_36:
return isRoot_36( exec, self, args );
break;
case Method_isRelative_37:
return isRelative_37( exec, self, args );
break;
case Method_convertToAbs_38:
return convertToAbs_38( exec, self, args );
break;
case Method_remove_41:
return remove_41( exec, self, args );
break;
case Method_rename_42:
return rename_42( exec, self, args );
break;
case Method_exists_43:
return exists_43( exec, self, args );
break;
case Method_refresh_44:
return refresh_44( exec, self, args );
break;
case Method_convertSeparators_45:
return convertSeparators_45( exec, self, args );
break;
case Method_drives_46:
return drives_46( exec, self, args );
break;
case Method_separator_47:
return separator_47( exec, self, args );
break;
case Method_setCurrent_48:
return setCurrent_48( exec, self, args );
break;
case Method_current_49:
return current_49( exec, self, args );
break;
case Method_home_50:
return home_50( exec, self, args );
break;
case Method_root_51:
return root_51( exec, self, args );
break;
case Method_currentDirPath_52:
return currentDirPath_52( exec, self, args );
break;
case Method_homeDirPath_53:
return homeDirPath_53( exec, self, args );
break;
case Method_rootDirPath_54:
return rootDirPath_54( exec, self, args );
break;
case Method_match_55:
return match_55( exec, self, args );
break;
case Method_match_56:
return match_56( exec, self, args );
break;
case Method_cleanDirPath_57:
return cleanDirPath_57( exec, self, args );
break;
case Method_isRelativePath_58:
return isRelativePath_58( exec, self, args );
break;
default:
break;
}
TQString msg = i18n( "TQDirImp has no method with id '%1'." ).arg( mid );
return throwError(exec, msg,KJS::ReferenceError);
}
KJS::Value TQDirImp::setPath_7( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null;
instance->setPath(
arg0 );
return KJS::Value(); // Returns void
}
KJS::Value TQDirImp::path_8( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString ret;
ret = instance->path( );
return KJS::String( ret );
}
KJS::Value TQDirImp::absPath_9( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString ret;
ret = instance->absPath( );
return KJS::String( ret );
}
KJS::Value TQDirImp::canonicalPath_10( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString ret;
ret = instance->canonicalPath( );
return KJS::String( ret );
}
KJS::Value TQDirImp::dirName_11( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString ret;
ret = instance->dirName( );
return KJS::String( ret );
}
KJS::Value TQDirImp::filePath_12( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null;
bool arg1 = (args.size() >= 2) ? args[1].toBoolean(exec) : false;
TQString ret;
ret = instance->filePath(
arg0,
arg1 );
return KJS::String( ret );
}
KJS::Value TQDirImp::absFilePath_13( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null;
bool arg1 = (args.size() >= 2) ? args[1].toBoolean(exec) : false;
TQString ret;
ret = instance->absFilePath(
arg0,
arg1 );
return KJS::String( ret );
}
KJS::Value TQDirImp::cd_14( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null;
bool arg1 = (args.size() >= 2) ? args[1].toBoolean(exec) : false;
bool ret;
ret = instance->cd(
arg0,
arg1 );
return KJS::Boolean( ret );
}
KJS::Value TQDirImp::cdUp_15( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
bool ret;
ret = instance->cdUp( );
return KJS::Boolean( ret );
}
KJS::Value TQDirImp::nameFilter_16( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString ret;
ret = instance->nameFilter( );
return KJS::String( ret );
}
KJS::Value TQDirImp::setNameFilter_17( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null;
instance->setNameFilter(
arg0 );
return KJS::Value(); // Returns void
}
KJS::Value TQDirImp::filter_18( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
instance->filter( );
return KJS::Value(); // Returns 'FilterSpec'
}
KJS::Value TQDirImp::setFilter_19( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
int arg0 = (args.size() >= 1) ? args[0].toInteger(exec) : -1;
instance->setFilter(
arg0 );
return KJS::Value(); // Returns void
}
KJS::Value TQDirImp::sorting_20( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
instance->sorting( );
return KJS::Value(); // Returns 'SortSpec'
}
KJS::Value TQDirImp::setSorting_21( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
int arg0 = (args.size() >= 1) ? args[0].toInteger(exec) : -1;
instance->setSorting(
arg0 );
return KJS::Value(); // Returns void
}
KJS::Value TQDirImp::matchAllDirs_22( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
bool ret;
ret = instance->matchAllDirs( );
return KJS::Boolean( ret );
}
KJS::Value TQDirImp::setMatchAllDirs_23( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
bool arg0 = (args.size() >= 1) ? args[0].toBoolean(exec) : false;
instance->setMatchAllDirs(
arg0 );
return KJS::Value(); // Returns void
}
KJS::Value TQDirImp::count_24( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
uint ret;
ret = instance->count( );
return KJS::Number( ret );
}
KJS::Value TQDirImp::encodedEntryList_26( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
int arg0 = (args.size() >= 1) ? args[0].toInteger(exec) : -1;
int arg1 = (args.size() >= 2) ? args[1].toInteger(exec) : -1;
instance->encodedEntryList(
arg0,
arg1 );
return KJS::Value(); // Returns 'TQStrList'
}
KJS::Value TQDirImp::encodedEntryList_27( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null;
int arg1 = (args.size() >= 2) ? args[1].toInteger(exec) : -1;
int arg2 = (args.size() >= 3) ? args[2].toInteger(exec) : -1;
instance->encodedEntryList(
arg0,
arg1,
arg2 );
return KJS::Value(); // Returns 'TQStrList'
}
KJS::Value TQDirImp::entryList_28( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
int arg0 = (args.size() >= 1) ? args[0].toInteger(exec) : -1;
int arg1 = (args.size() >= 2) ? args[1].toInteger(exec) : -1;
TQStringList ret;
ret = instance->entryList(
arg0,
arg1 );
return convertToValue( exec, ret );
}
KJS::Value TQDirImp::entryList_29( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null;
int arg1 = (args.size() >= 2) ? args[1].toInteger(exec) : -1;
int arg2 = (args.size() >= 3) ? args[2].toInteger(exec) : -1;
TQStringList ret;
ret = instance->entryList(
arg0,
arg1,
arg2 );
return convertToValue( exec, ret );
}
KJS::Value TQDirImp::entryInfoList_30( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
int arg0 = (args.size() >= 1) ? args[0].toInteger(exec) : -1;
int arg1 = (args.size() >= 2) ? args[1].toInteger(exec) : -1;
instance->entryInfoList(
arg0,
arg1 );
return KJS::Value(); // Returns 'const TQFileInfoList *'
}
KJS::Value TQDirImp::entryInfoList_31( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null;
int arg1 = (args.size() >= 2) ? args[1].toInteger(exec) : -1;
int arg2 = (args.size() >= 3) ? args[2].toInteger(exec) : -1;
instance->entryInfoList(
arg0,
arg1,
arg2 );
return KJS::Value(); // Returns 'const TQFileInfoList *'
}
KJS::Value TQDirImp::mkdir_32( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null;
bool arg1 = (args.size() >= 2) ? args[1].toBoolean(exec) : false;
bool ret;
ret = instance->mkdir(
arg0,
arg1 );
return KJS::Boolean( ret );
}
KJS::Value TQDirImp::rmdir_33( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null;
bool arg1 = (args.size() >= 2) ? args[1].toBoolean(exec) : false;
bool ret;
ret = instance->rmdir(
arg0,
arg1 );
return KJS::Boolean( ret );
}
KJS::Value TQDirImp::isReadable_34( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
bool ret;
ret = instance->isReadable( );
return KJS::Boolean( ret );
}
KJS::Value TQDirImp::exists_35( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
bool ret;
ret = instance->exists( );
return KJS::Boolean( ret );
}
KJS::Value TQDirImp::isRoot_36( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
bool ret;
ret = instance->isRoot( );
return KJS::Boolean( ret );
}
KJS::Value TQDirImp::isRelative_37( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
bool ret;
ret = instance->isRelative( );
return KJS::Boolean( ret );
}
KJS::Value TQDirImp::convertToAbs_38( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
instance->convertToAbs( );
return KJS::Value(); // Returns void
}
KJS::Value TQDirImp::remove_41( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null;
bool arg1 = (args.size() >= 2) ? args[1].toBoolean(exec) : false;
bool ret;
ret = instance->remove(
arg0,
arg1 );
return KJS::Boolean( ret );
}
KJS::Value TQDirImp::rename_42( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null;
TQString arg1 = (args.size() >= 2) ? args[1].toString(exec).qstring() : TQString::null;
bool arg2 = (args.size() >= 3) ? args[2].toBoolean(exec) : false;
bool ret;
ret = instance->rename(
arg0,
arg1,
arg2 );
return KJS::Boolean( ret );
}
KJS::Value TQDirImp::exists_43( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null;
bool arg1 = (args.size() >= 2) ? args[1].toBoolean(exec) : false;
bool ret;
ret = instance->exists(
arg0,
arg1 );
return KJS::Boolean( ret );
}
KJS::Value TQDirImp::refresh_44( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
instance->refresh( );
return KJS::Value(); // Returns void
}
KJS::Value TQDirImp::convertSeparators_45( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null;
TQString ret;
ret = instance->convertSeparators(
arg0 );
return KJS::String( ret );
}
KJS::Value TQDirImp::drives_46( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
instance->drives( );
return KJS::Value(); // Returns 'const TQFileInfoList *'
}
KJS::Value TQDirImp::separator_47( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
instance->separator( );
return KJS::Value(); // Returns 'char'
}
KJS::Value TQDirImp::setCurrent_48( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null;
bool ret;
ret = instance->setCurrent(
arg0 );
return KJS::Boolean( ret );
}
KJS::Value TQDirImp::current_49( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
instance->current( );
return KJS::Value(); // Returns 'TQDir'
}
KJS::Value TQDirImp::home_50( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
instance->home( );
return KJS::Value(); // Returns 'TQDir'
}
KJS::Value TQDirImp::root_51( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
instance->root( );
return KJS::Value(); // Returns 'TQDir'
}
KJS::Value TQDirImp::currentDirPath_52( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString ret;
ret = instance->currentDirPath( );
return KJS::String( ret );
}
KJS::Value TQDirImp::homeDirPath_53( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString ret;
ret = instance->homeDirPath( );
return KJS::String( ret );
}
KJS::Value TQDirImp::rootDirPath_54( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString ret;
ret = instance->rootDirPath( );
return KJS::String( ret );
}
KJS::Value TQDirImp::match_55( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQStringList arg0;
if ( args.size() >= 1 ) {
// TODO: populate the list
}
TQString arg1 = (args.size() >= 2) ? args[1].toString(exec).qstring() : TQString::null;
bool ret;
ret = instance->match(
arg0,
arg1 );
return KJS::Boolean( ret );
}
KJS::Value TQDirImp::match_56( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null;
TQString arg1 = (args.size() >= 2) ? args[1].toString(exec).qstring() : TQString::null;
bool ret;
ret = instance->match(
arg0,
arg1 );
return KJS::Boolean( ret );
}
KJS::Value TQDirImp::cleanDirPath_57( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null;
TQString ret;
ret = instance->cleanDirPath(
arg0 );
return KJS::String( ret );
}
KJS::Value TQDirImp::isRelativePath_58( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args )
{
TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null;
bool ret;
ret = instance->isRelativePath(
arg0 );
return KJS::Boolean( ret );
}
} // namespace KJSEmbed
|