Ubuntu Pastebin

Paste from oSoMoN at Thu, 26 Mar 2015 16:14:43 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
import QtQuick 2.0
import Qt.labs.folderlistmodel 2.1
import Ubuntu.Components 1.1
import Ubuntu.Components.ListItems 1.0 as ListItem

ListView {
    model: FolderListModel {
        folder: dataLocation +"/searchengines"
        showDirs: false
        nameFilters: ["*.xml"]
        sortField: FolderListModel.Name
    }

    delegate: ListItem.Standard {
        SearchEngine {
            id: searchEngineDelegate
            filename: model.fileBaseName
        }
        text: searchEngineDelegate.name
        onClicked: browser.searchEngine = searchEngineDelegate.filename
    }
}
Download as text