2020-10-20 11:32:03 -04:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtGraphicalEffects 1.12
|
|
|
|
import QtQuick.Dialogs 1.3
|
2021-09-28 18:04:06 +03:00
|
|
|
|
|
|
|
import utils 1.0
|
2021-10-28 00:27:49 +03:00
|
|
|
import shared 1.0
|
2020-10-20 11:32:03 -04:00
|
|
|
|
|
|
|
StatusInputListPopup {
|
2021-12-08 23:20:43 +02:00
|
|
|
id: emojiSuggestions
|
2022-02-09 15:50:38 -05:00
|
|
|
|
2020-10-20 11:32:03 -04:00
|
|
|
property string shortname
|
2022-01-12 00:16:17 +01:00
|
|
|
property string unicode: {
|
|
|
|
if(listView.currentIndex < 0 || listView.currentIndex >= emojiSuggestions.modelList.count)
|
|
|
|
return ""
|
|
|
|
|
|
|
|
return emojiSuggestions.modelList[listView.currentIndex].unicode_alternates ||
|
|
|
|
emojiSuggestions.modelList[listView.currentIndex].unicode
|
|
|
|
}
|
2020-10-20 11:32:03 -04:00
|
|
|
|
|
|
|
getImageSource: function (modelData) {
|
2022-03-07 09:56:05 -05:00
|
|
|
return `qrc:/StatusQ/src/assets/twemoji/72x72/${modelData.unicode}.png`
|
2020-10-20 11:32:03 -04:00
|
|
|
}
|
|
|
|
getText: function (modelData) {
|
|
|
|
return modelData.shortname
|
|
|
|
}
|
2022-01-24 12:59:59 -05:00
|
|
|
getId: function (modelData) {
|
|
|
|
return modelData.unicode
|
|
|
|
}
|
2020-10-20 11:32:03 -04:00
|
|
|
|
|
|
|
function openPopup(emojisParam, shortnameParam) {
|
|
|
|
modelList = emojisParam
|
|
|
|
shortname = shortnameParam
|
|
|
|
emojiSuggestions.open()
|
|
|
|
}
|
|
|
|
}
|