~verzegnassi-stefano/+junk/docviewer-tmp-001

« back to all changes in this revision

Viewing changes to src/app/qml/ubuntu-docviewer-app.qml

  • Committer: Tarmac
  • Author(s): David Planella, Daniel Holbach, Fabio Colella, Stefano Verzegnassi, Arto Jalkanen
  • Date: 2014-10-29 07:39:08 UTC
  • mfrom: (31.1.22 add-plugin)
  • Revision ID: tarmac-20141029073908-8s6r18syexjo37ga
Adds the file plugin to the source tree.

Approved by Stefano Verzegnassi, Ubuntu Phone Apps Jenkins Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import QtQuick 2.3
 
2
import Ubuntu.Components 1.1
 
3
import Ubuntu.Components.Popups 1.0
 
4
import Ubuntu.Components.ListItems 1.0 as ListItem
 
5
import com.ubuntu.fileqmlplugin 1.0
 
6
 
 
7
import "loadComponent.js" as LoadComponent
 
8
 
 
9
MainView {
 
10
    id: mainView
 
11
    objectName: "docviewer"
 
12
 
 
13
    applicationName: "com.ubuntu.docviewer"
 
14
    useDeprecatedToolbar: false
 
15
    
 
16
    width: units.gu(50)
 
17
    height: units.gu(75)
 
18
 
 
19
    property string minetype: "none"
 
20
 
 
21
   Arguments {
 
22
        id: args
 
23
 
 
24
        defaultArgument.help: "Path of the document"
 
25
        defaultArgument.valueNames: ["path"]
 
26
    }
 
27
 
 
28
    File {
 
29
        objectName: "fileObject"
 
30
        id: file
 
31
        path: args.defaultArgument.at(0)
 
32
 
 
33
        onMimetypeChanged: mainView.minetype = LoadComponent.load(file.mimetype);
 
34
    }
 
35
 
 
36
    PageStack {
 
37
        id: pageStack
 
38
 
 
39
        Component {
 
40
            DetailsPage {
 
41
                objectName: "TabDetails"
 
42
                id: tabDetails;
 
43
 
 
44
            }
 
45
        }
 
46
    }
 
47
 
 
48
    Component {
 
49
        id: unknownTypeDialog
 
50
        UnknownTypeDialog {}
 
51
    }
 
52
 
 
53
    function runUnknownTypeDialog()
 
54
    {
 
55
        PopupUtils.open(unknownTypeDialog);
 
56
    }
 
57
}