Changeset View
Changeset View
Standalone View
Standalone View
mobile/app/package/contents/ui/Thumbnails.qml
Show All 12 Lines | |||||
13 | * | 13 | * | ||
14 | * You should have received a copy of the GNU General Public | 14 | * You should have received a copy of the GNU General Public | ||
15 | * License along with this program; if not, write to the | 15 | * License along with this program; if not, write to the | ||
16 | * Free Software Foundation, Inc., | 16 | * Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | import QtQuick 2.1 | 20 | import QtQuick 2.1 | ||
21 | import QtQuick.Controls 2.0 | 21 | import QtQuick.Controls 2.0 as QQC2 | ||
22 | import org.kde.kirigami 2.0 as Kirigami | 22 | import org.kde.kirigami 2.0 as Kirigami | ||
23 | 23 | | |||
24 | ThumbnailsBase { | 24 | ThumbnailsBase { | ||
25 | id: root | 25 | id: root | ||
26 | model: documentItem.matchingPages | 26 | model: documentItem.matchingPages | ||
27 | 27 | | |||
28 | ToolBar { | 28 | QQC2.ToolBar { | ||
29 | id: toolBarContent | 29 | id: toolBarContent | ||
30 | width: root.width | 30 | width: root.width | ||
31 | height: searchField.height | 31 | height: searchField.height | ||
32 | TextField { | 32 | QQC2.TextField { | ||
33 | id: searchField | 33 | id: searchField | ||
34 | anchors.fill: parent | 34 | anchors.fill: parent | ||
35 | enabled: documentItem ? documentItem.supportsSearching : false | 35 | enabled: documentItem ? documentItem.supportsSearching : false | ||
36 | onTextChanged: { | 36 | onTextChanged: { | ||
37 | if (text.length > 2) { | 37 | if (text.length > 2) { | ||
38 | documentItem.searchText(text); | 38 | documentItem.searchText(text); | ||
39 | } else { | 39 | } else { | ||
40 | documentItem.resetSearch(); | 40 | documentItem.resetSearch(); | ||
41 | } | 41 | } | ||
42 | } | 42 | } | ||
43 | } | 43 | } | ||
44 | } | 44 | } | ||
45 | } | 45 | } |