Skip to content

Commit

Permalink
add categories
Browse files Browse the repository at this point in the history
Contributes-To: #40
  • Loading branch information
nephros authored and Peter G. (nephros) committed May 23, 2023
1 parent e039a71 commit c01b1d1
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 1 deletion.
28 changes: 28 additions & 0 deletions qml/components/CatSelect.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright (c) 2023 Peter G. (nephros)
// SPDX-License-Identifier: Apache-2.0

import QtQuick 2.6
import Sailfish.Silica 1.0
import "../config/meta.js" as Meta

Column {
width: parent.width
property var catData: Meta.data.categories

property alias currentIndex: cbox.currentIndex
property alias value: cbox.value
ContextMenu { id: catmenu
Repeater {
model: catData
delegate: MenuItem { text: modelData.displayName }
}
}
ComboBox {id: cbox
width: parent.width
label: qsTr("Category")
description: qsTr("Type of bug/classification")
currentIndex: -1
menu: catmenu
}
}
// vim: expandtab ts=4 st=4 sw=4 filetype=javascript
24 changes: 24 additions & 0 deletions qml/config/meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.pragma library
var data = {
"categories": [
{ "id": 0, "name": "none", "displayName": "Not specified", "desc": ""},
{ "id": 0, "name": "android_app_support", "displayName": "Android App Support", "desc": ""},
{ "id": 0, "name": "backup", "displayName": "Backup", "desc": ""},
{ "id": 0, "name": "bluetooth", "displayName": "Bluetooth", "desc": ""},
{ "id": 0, "name": "browser", "displayName": "Browser", "desc": ""},
{ "id": 0, "name": "calendar", "displayName": "Calendar", "desc": ""},
{ "id": 0, "name": "contacts", "displayName": "Contacts", "desc": ""},
{ "id": 0, "name": "exchange", "displayName": "Exchange/Office365", "desc": ""},
{ "id": 0, "name": "fingerprint", "displayName": "Fingerprint", "desc": ""},
{ "id": 0, "name": "mail", "displayName": "EMail", "desc": ""},
{ "id": 0, "name": "media_tracker", "displayName": "Media Indexing", "desc": ""},
{ "id": 0, "name": "mobile_data", "displayName": "Mobile Data", "desc": ""},
{ "id": 0, "name": "mpris", "displayName": "MPRIS", "desc": ""},
{ "id": 0, "name": "native app", "displayName": "SFOS App", "desc": ""},
{ "id": 0, "name": "network", "displayName": "Networking", "desc": ""},
{ "id": 0, "name": "ngfd", "displayName": "UI Feedback", "desc": ""},
{ "id": 0, "name": "oom_killer", "displayName": "OOM", "desc": ""},
{ "id": 0, "name": "positioning", "displayName": "Positionig", "desc": ""},
]
}
// vim: ft=javascript expandtab ts=4 sw=4 st=4
3 changes: 2 additions & 1 deletion qml/pages/MainPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Apache License 2.0
Copyright (c) 2022 Peter G. (nephros)
Copyright (c) 2022,2023 Peter G. (nephros)
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License.
Expand Down Expand Up @@ -330,6 +330,7 @@ Page {
}
Separator { color: Theme.primaryColor; horizontalAlignment: Qt.AlignHCenter; width: page.width}
SectionHeader { text: qsTr("Additional Information") }
CatSelect { id: metacat }
TextArea{id: text_add;
width: parent.width; height: Math.max(implicitHeight, Theme.itemSizeLarge);
label: qsTr("Add any other information")
Expand Down

0 comments on commit c01b1d1

Please sign in to comment.