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 *getPaths { arg okFunc, cancelFunc, allowsMultiple=true;
30 if( allowsMultiple ) { fileMode = 3 } { fileMode = 1 };
31 ^QFileDialog.new( okFunc, cancelFunc, fileMode, 0 );
34 *openPanel { arg okFunc, cancelFunc, multipleSelection=false;
36 if( multipleSelection ) { fileMode = 3 } { fileMode = 1 };
37 ^QFileDialog.new( okFunc, cancelFunc, fileMode, 0, stripResult:true );
40 *savePanel { arg okFunc, cancelFunc;
41 ^QFileDialog.new( okFunc, cancelFunc, 0, 1, stripResult:true );