~popey/+junk/docviewer_build

« back to all changes in this revision

Viewing changes to build-armhf/src/app/qml/documentPage/SortSettingsDialog.qml

  • Committer: Alan Pope
  • Date: 2015-09-28 11:45:22 UTC
  • Revision ID: popey@ubuntu.com-20150928114522-5c4svn3p9khb42uz
merge lo and get libs

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  Copyright (C) 2013-2015 Stefano Verzegnassi
 
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 3 as published by
 
6
  the Free Software Foundation, either version 3 of the License, or
 
7
  (at your option) any later version.
 
8
 
 
9
    This program is distributed in the hope that it will be useful,
 
10
  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
12
  GNU General Public License for more details.
 
13
 
 
14
    You should have received a copy of the GNU General Public License
 
15
  along with this program. If not, see http://www.gnu.org/licenses/.
 
16
*/
 
17
 
 
18
import QtQuick 2.0
 
19
import Ubuntu.Components 1.1
 
20
import Ubuntu.Components.Popups 1.0
 
21
import QtQuick.Layouts 1.1
 
22
 
 
23
Dialog {
 
24
    id: sortSettingsDialog
 
25
 
 
26
    title: i18n.tr("Sorting settings")
 
27
 
 
28
    OptionSelector {
 
29
        expanded: true
 
30
        model: [
 
31
            i18n.tr("Sort by date (Latest first)"),
 
32
            i18n.tr("Sort by name (A-Z)"),
 
33
            i18n.tr("Sort by size (Smaller first)")
 
34
        ]
 
35
 
 
36
        Component.onCompleted: selectedIndex = sortSettings.sortMode
 
37
        onSelectedIndexChanged: sortSettings.sortMode = selectedIndex
 
38
    }
 
39
 
 
40
    RowLayout {
 
41
        CheckBox {
 
42
            Component.onCompleted: checked = sortSettings.reverseOrder
 
43
            onCheckedChanged: sortSettings.reverseOrder = checked
 
44
        }
 
45
 
 
46
        Label {
 
47
            text: i18n.tr("Reverse order")
 
48
            Layout.fillWidth: true
 
49
        }
 
50
    }
 
51
 
 
52
    Button {
 
53
        text: i18n.tr("Close")
 
54
        onClicked: PopupUtils.close(sortSettingsDialog)
 
55
    }
 
56
}
 
57