Changeset View
Changeset View
Standalone View
Standalone View
src/app/qml/SearchBox.qml
Show All 20 Lines | |||||
21 | 21 | | |||
22 | import QtQuick 2.2 | 22 | import QtQuick 2.2 | ||
23 | import QtQuick.Controls 1.4 as QtControls | 23 | import QtQuick.Controls 1.4 as QtControls | ||
24 | 24 | | |||
25 | import org.kde.kirigami 2.1 as Kirigami | 25 | import org.kde.kirigami 2.1 as Kirigami | ||
26 | 26 | | |||
27 | import org.kde.peruse 0.1 as Peruse | 27 | import org.kde.peruse 0.1 as Peruse | ||
28 | import "listcomponents" as ListComponents | 28 | import "listcomponents" as ListComponents | ||
29 | 29 | /** | |||
30 | * @brief A box that holds search results | ||||
31 | * | ||||
32 | * This shows up when selecting the search from | ||||
33 | * BookShelf or the WelcomePage. It draws BookTileTall | ||||
34 | * and CategoryTileTall for the entries it finds. | ||||
35 | */ | ||||
30 | Rectangle { | 36 | Rectangle { | ||
31 | id: root; | 37 | id: root; | ||
32 | property int maxHeight: parent.height; | 38 | property int maxHeight: parent.height; | ||
33 | property alias model: searchFilterProxy.sourceModel; | 39 | property alias model: searchFilterProxy.sourceModel; | ||
34 | color: Kirigami.Theme.viewBackgroundColor; | 40 | color: Kirigami.Theme.viewBackgroundColor; | ||
35 | function activate() { | 41 | function activate() { | ||
36 | searchField.forceActiveFocus(); | 42 | searchField.forceActiveFocus(); | ||
37 | Qt.inputMethod.show(); // Would be nice if this happened automatically, but... no such luck | 43 | Qt.inputMethod.show(); // Would be nice if this happened automatically, but... no such luck | ||
▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines |