1 QFileDialog : QObject {
2 *qtClass { ^'QcFileDialog' }
4 *new { arg okFunc, cancelFunc, fileMode, acceptMode, stripResult = false;
6 var me = super.new( [fileMode, acceptMode] );
9 me.connectFunction( 'accepted(VariantList)', {
12 { okFunc.performList(\value, result) }
13 { okFunc.value(result) }
17 if( cancelFunc.notNil ) {
18 me.connectFunction( 'rejected()', { cancelFunc.value() } );
21 me.invokeMethod('show', synchronous:false);
28 *implementsClass {^'Dialog'}
30 *getPaths { arg okFunc, cancelFunc, allowsMultiple=true;
32 if( allowsMultiple ) { fileMode = 3 } { fileMode = 1 };
33 ^QFileDialog.new( okFunc, cancelFunc, fileMode, 0 );
36 *openPanel { arg okFunc, cancelFunc, multipleSelection=false;
38 if( multipleSelection ) { fileMode = 3 } { fileMode = 1 };
39 ^QFileDialog.new( okFunc, cancelFunc, fileMode, 0, stripResult:multipleSelection.not );
42 *savePanel { arg okFunc, cancelFunc;
43 ^QFileDialog.new( okFunc, cancelFunc, 0, 1, stripResult:true );