| 1 |
/* Copyright (C) 2016 - 2017 Dan Chapman <[email protected]> |
| 2 |
|
| 3 |
This file is part of Dekko email client for Ubuntu devices |
| 4 |
|
| 5 |
This program is free software; you can redistribute it and/or |
| 6 |
modify it under the terms of the GNU General Public License as |
| 7 |
published by the Free Software Foundation; either version 2 of |
| 8 |
the License or (at your option) version 3 |
| 9 |
|
| 10 |
This program is distributed in the hope that it will be useful, |
| 11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
GNU General Public License for more details. |
| 14 |
|
| 15 |
You should have received a copy of the GNU General Public License |
| 16 |
along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
*/ |
| 18 |
import QtQuick 2.4 |
| 19 |
import QtQuick.Controls.Suru 2.2 |
| 20 |
import Lomiri.Components 1.3 |
| 21 |
import Dekko.Components 1.0 |
| 22 |
import Dekko.Mail.API 1.0 |
| 23 |
import QuickFlux 1.0 |
| 24 |
import Dekko.Lomiri.Constants 1.0 |
| 25 |
|
| 26 |
StyledItem { |
| 27 |
id: dekkoPage |
| 28 |
|
| 29 |
property alias pageHeader: h |
| 30 |
property alias selectedIndex: h.selectedIndex |
| 31 |
property alias isSearchMode: h.isSearchMode |
| 32 |
property alias extendHeader: h.extend |
| 33 |
|
| 34 |
default property alias content: mainContent.data |
| 35 |
|
| 36 |
signal searchActivated(string searchString) |
| 37 |
signal searchCanceled() |
| 38 |
signal multiSelectCanceled() |
| 39 |
|
| 40 |
Rectangle { |
| 41 |
anchors.fill: parent |
| 42 |
color: Suru.backgroundColor |
| 43 |
} |
| 44 |
|
| 45 |
function startMultiSelect() { |
| 46 |
h.startMultiSelect() |
| 47 |
} |
| 48 |
clip: true |
| 49 |
// anchors.fill: parent |
| 50 |
|
| 51 |
DekkoHeader { |
| 52 |
id: h |
| 53 |
anchors { |
| 54 |
left: parent.left |
| 55 |
right: parent.right |
| 56 |
top: parent.top |
| 57 |
} |
| 58 |
onSearchActivated: dekkoPage.searchActivated(searchString) |
| 59 |
onSearchCanceled: dekkoPage.searchCanceled() |
| 60 |
onMultiSelectCanceled: dekkoPage.multiSelectCanceled() |
| 61 |
onComposeNewMessage: ViewActions.openComposer() |
| 62 |
} |
| 63 |
|
| 64 |
Item { |
| 65 |
id: mainContent |
| 66 |
anchors { |
| 67 |
left: parent.left |
| 68 |
top: h.bottom |
| 69 |
right: parent.right |
| 70 |
bottom: parent.bottom |
| 71 |
// bottomMargin: bel.active && bel.item.hint.visible ? bel.item.hint.height : 0 |
| 72 |
} |
| 73 |
// MAIN CONTENT HERE |
| 74 |
} |
| 75 |
} |