~verzegnassi-stefano/ubuntu-docviewer-app/reboot-document-last-position

« back to all changes in this revision

Viewing changes to src/app/qml/documentPage/DocumentPageDefaultHeader.qml

  • Committer: Stefano Verzegnassi
  • Date: 2015-02-13 15:30:01 UTC
  • mto: This revision was merged to the branch mainline in revision 86.
  • Revision ID: stefano92.100@gmail.com-20150213153001-qryx268e54guvleu
Basically:
 - Refactored project structure (too much QML files in the same folder)
 - Added full content-hub support
 - Uri handler support
 - In-app browser
 - Document Viewer has now rw permissions in /home/stefano/Documents

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2014-2015 Canonical, Ltd.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License as published by
 
6
 * the Free Software Foundation; version 3.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 */
 
16
 
 
17
import QtQuick 2.3
 
18
import Ubuntu.Components 1.1
 
19
import QtQuick.Layouts 1.1
 
20
import Ubuntu.Components.Popups 1.0
 
21
 
 
22
PageHeadState {
 
23
    id: rootItem
 
24
 
 
25
    property Page targetPage
 
26
    head: targetPage.head
 
27
 
 
28
    actions:  Action {
 
29
        id: switchView
 
30
        text: targetPage.useGridView ? i18n.tr("Switch to single column list") : i18n.tr("Switch to grid")
 
31
        iconName: targetPage.useGridView ? "view-list-symbolic" : "view-grid-symbolic"
 
32
        onTriggered: targetPage.useGridView = !targetPage.useGridView
 
33
 
 
34
        visible: folderModel.count !== 0
 
35
    }
 
36
}