57     property Item rootItem: null
    73     readonly 
property bool empty: _popups.length == 0
    85     function showDialog(config, result) {
    86         if(config.type === 
"msgbox")
    87             return createMsgBox(config, result)
    88         else if(config.type === 
"input")
    89             return createInput(config, result)
    90         else if(config.type === 
"file")
    91             return createFile(config, result)
    92         else if(config.type === 
"color")
    93             return createColor(config, result)
    94         else if(config.type === 
"progress")
    95             return createProgress(config, result)
   109     function closeAction() {
   110         if(_popups.length > 0) {
   111             if(typeof _popups[_popups.length - 1].closeAction == 
"function") {
   112                 if(_popups[_popups.length - 1].closeAction())
   115             _popups[_popups.length - 1].reject();
   122     property var _popups: []
   124     property Component _msgBoxComponent: MsgBox {
   128             var index = _popups.indexOf(__msgBox);
   131                 _dialogPresenter._popups.splice(index, 1);
   135         Component.onCompleted: {
   136             _popups.push(__msgBox)
   142     property Component _inputComponent: InputDialog {
   146             var index = _popups.indexOf(__input);
   149                 _dialogPresenter._popups.splice(index, 1);
   153         Component.onCompleted: {
   154             _popups.push(__input)
   160     property Component _fileComponent: 
FileDialog {
   164             var index = _popups.indexOf(__file);
   167                 _dialogPresenter._popups.splice(index, 1);
   171         Component.onCompleted: {
   182             var index = _popups.indexOf(__folder);
   185                 _dialogPresenter._popups.splice(index, 1);
   189         Component.onCompleted: {
   190             _popups.push(__folder)
   196     property Component _progressComponent: ProgressDialog {
   200             var index = _popups.indexOf(__progress);
   202                 __progress.destroy();
   203                 _dialogPresenter._popups.splice(index, 1);
   207         Component.onCompleted: {
   208             _popups.push(__progress)
   225     function createMsgBox(config, result) {
   226         var props = config.viewProperties;
   227         props[
"msgConfig"] = config;
   228         props[
"msgResult"] = result;
   229         var incubator = _msgBoxComponent.incubateObject(rootItem, props, 
Qt.Synchronous);
   230         return incubator.status !== Component.Error;
   245     function createInput(config, result) {
   246         var props = config.viewProperties;
   247         props[
"msgConfig"] = config;
   248         props[
"msgResult"] = result;
   249         var incubator = _inputComponent.incubateObject(rootItem, props, 
Qt.Synchronous);
   250         return incubator.status !== Component.Error;
   265     function createFile(config, result) {
   266         var props = config.viewProperties;
   267         props[
"msgConfig"] = config;
   268         props[
"msgResult"] = result;
   269         var incubator = null;
   270         if(config.subType === 
"folder")
   271             incubator = _folderComponent.incubateObject(rootItem, props, 
Qt.Synchronous);
   273             incubator = _fileComponent.incubateObject(rootItem, props, 
Qt.Synchronous);
   274         return incubator.status !== Component.Error;
   289     function createColor(config, result) {
   290         config.viewProperties[
"alpha"] = (config.subType === 
"argb");
   291         config.type = 
"input";
   292         config.subType = 
"QColor";
   293         return createInput(config, result);
   308     function createProgress(config, result) {
   309         var props = config.viewProperties;
   310         props[
"msgConfig"] = config;
   311         props[
"msgResult"] = result;
   312         var incubator = _progressComponent.incubateObject(rootItem, props, 
Qt.Synchronous);
   313         return incubator.status !== Component.Error;
 
The QML import for the QtMvvmCore QML module. 
 
The QML import for the QtMvvmQuick QML module. 
 
void open()
Opens the file chooser by sending the show intent. 
 
A folder dialog implementation based on the labs folder dialog. 
 
A file dialog implementation based on the labs file dialog.