21 import org.kde.okular 0.1 as Okular
22 import org.kde.plasma.components 0.1 as PlasmaComponents
23 import org.kde.plasma.core 0.1 as PlasmaCore
24 import org.kde.plasma.extras 0.1 as PlasmaExtras
25 import org.kde.plasma.mobilecomponents 0.1 as MobileComponents
27 PlasmaComponents.Page {
29 property alias contentY: resultsGrid.contentY
30 property alias contentHeight: resultsGrid.contentHeight
31 property alias model: resultsGrid.model
32 signal pageClicked(
int pageNumber)
33 property Item view: resultsGrid
37 PlasmaExtras.ScrollArea {
44 cellWidth: theme.defaultFont.mSize.width * 14
45 cellHeight: theme.defaultFont.mSize.height * 12
48 width: resultsGrid.cellWidth
49 height: resultsGrid.cellHeight
50 property bool current: documentItem.currentPage == modelData
53 resultsGrid.currentIndex = index
56 PlasmaCore.FrameSvgItem {
57 anchors.centerIn: parent
58 imagePath:
"widgets/media-delegate"
60 width: thumbnail.width + margins.left + margins.right
62 height: thumbnail.height + margins.top + margins.bottom
63 Okular.ThumbnailItem {
65 x: parent.margins.left
67 document: documentItem
69 width: theme.defaultFont.mSize.width * 10
71 height: Math.round(theme.defaultFont.mSize.width * 10 / (implicitWidth/implicitHeight))
73 width: childrenRect.width
74 height: childrenRect.height
75 color: theme.backgroundColor
82 PlasmaComponents.Label {
90 resultsGrid.currentIndex = index
91 pageArea.delegate.pageNumber = modelData
92 documentItem.currentPage = modelData
94 resourceBrowser.open =
false
95 root.pageClicked(modelData)
100 highlight: PlasmaComponents.Highlight {}