content/hifi-content/caitlyn/dev/alphaDsChat/AQUI_chat_v133.qml
2022-02-13 22:19:19 +01:00

871 lines
No EOL
24 KiB
QML

import QtQuick 2.5
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import QtQuick.Layouts 1.0
Rectangle {
property string apiUrl: "https://metaverse.highfidelity.com/api/v1/users?status=online";
property int defaultMargins: 20;
width: parent.width;
height: parent.height-defaultMargins;
focus:true;
FontLoader {
id: niceFont
source: "http://hifi-content.s3.amazonaws.com/caitlyn/production/alphaDsChat/fontawesome-webfont.ttf"
}
ListModel{
id: incomingMsgModel
ListElement { fullPkg: "LOCAL CHAT" }
}
Component{
id: incomingMsgDelegate
Row{
spacing: 20
Text {
text: fullPkg;
textFormat: Text.RichText;
font.family: niceFont.name;
width: parent.width;
color: "#151515";
font.pixelSize: 16;
wrapMode: Text.WordWrap;
onLinkActivated: Qt.openUrlExternally(link);
}
width: parent.width;
height: fullPkg.contentHeight;
Component.onCompleted: incomingMsgLV.positionViewAtEnd();
}
}
Rectangle{
id: incomingMsgContainer
width:parent.width*(2/3);
height:544-txtMsgContainer.height-(defaultMargins*2);
x: parent.width/3;
y: defaultMargins;
Rectangle{
id: incomingMsgWrapper
height: incomingMsgModel.contentHeight + defaultMargins
width: parent.width - defaultMargins;
anchors.fill: parent
gradient: Gradient {
GradientStop { position: 0.0; color: "#e3e3e3" }
GradientStop { position: 1.0; color: "#e3e3e3" }
}
ListView{
id: incomingMsgLV
anchors.fill: parent
model: incomingMsgModel
delegate: incomingMsgDelegate
}
}
}
Rectangle{
id: txtMsgContainer
width: parent.width*(2/3)
height: txtMsgBox.contentHeight+defaultMargins
color: "#e3e3e3"
border.color: "black"
border.width: 2
radius: 4
x: parent.width/3
y: parent.height-(2*defaultMargins)
TextInput {
id: txtMsgBox;
color: "#151515"; selectionColor: "cyan"
font.pixelSize: 16;
width: parent.width-16;
wrapMode: TextInput.WordWrap
text: "To local chat:";
maximumLength: 1920;
anchors.verticalCenter: parent.verticalCenter;
anchors.topMargin: (defaultMargins/2);
anchors.leftMargin: (defaultMargins/4);
onAccepted: processPkg();
}
MouseArea {
anchors.fill: parent
onClicked: {
txtMsgBox.selectAll();
txtMsgBox.forceActiveFocus();
}
}
}
function getIcon(fromInput){
var Icon = [
{aquismile: "\uf601"},
{fivehundredpx: "\uf26e"},
{adjust: "\uf042"},
{adn: "\uf170"},
{aligncenter: "\uf037"},
{alignjustify: "\uf039"},
{alignleft: "\uf036"},
{alignright: "\uf038"},
{amazon: "\uf270"},
{ambulance: "\uf0f9"},
{anchor: "\uf13d"},
{android: "\uf17b"},
{angellist: "\uf209"},
{angledoubledown: "\uf103"},
{angledoubleleft: "\uf100"},
{angledoubleright: "\uf101"},
{angledoubleup: "\uf102"},
{angledown: "\uf107"},
{angleleft: "\uf104"},
{angleright: "\uf105"},
{angleup: "\uf106"},
{apple: "\uf179"},
{archive: "\uf187"},
{areachart: "\uf1fe"},
{arrowcircledown: "\uf0ab"},
{arrowcircleleft: "\uf0a8"},
{arrowcircleodown: "\uf01a"},
{arrowcircleoleft: "\uf190"},
{arrowcircleoright: "\uf18e"},
{arrowcircleoup: "\uf01b"},
{arrowcircleup: "\uf0aa"},
{arrowdown: "\uf063"},
{arrowleft: "\uf060"},
{arrowright: "\uf061"},
{arrows: "\uf047"},
{arrowsalt: "\uf0b2"},
{arrowsh: "\uf07e"},
{arrowsv: "\uf07d"},
{arrowup: "\uf062"},
{asterisk: "\uf069"},
{at: "\uf1fa"},
{automobile: "\uf1b9"},
{backward: "\uf04a"},
{balancescale: "\uf24e"},
{ban: "\uf05e"},
{bank: "\uf19c"},
{barchart: "\uf080"},
{barcharto: "\uf080"},
{barcode: "\uf02a"},
{bars: "\uf0c9"},
{battery0: "\uf244"},
{battery1: "\uf243"},
{battery2: "\uf242"},
{battery3: "\uf241"},
{battery4: "\uf240"},
{batteryempty: "\uf244"},
{batteryfull: "\uf240"},
{batteryhalf: "\uf242"},
{batteryquarter: "\uf243"},
{batterythreequarters: "\uf241"},
{bed: "\uf236"},
{beer: "\uf0fc"},
{behance: "\uf1b4"},
{behancesquare: "\uf1b5"},
{bell: "\uf0f3"},
{bello: "\uf0a2"},
{bellslash: "\uf1f6"},
{bellslasho: "\uf1f7"},
{bicycle: "\uf206"},
{binoculars: "\uf1e5"},
{birthdaycake: "\uf1fd"},
{bitbucket: "\uf171"},
{bitbucketsquare: "\uf172"},
{bitcoin: "\uf15a"},
{blacktie: "\uf27e"},
{bluetooth: "\uf293"},
{bluetoothb: "\uf294"},
{bold: "\uf032"},
{bolt: "\uf0e7"},
{bomb: "\uf1e2"},
{bookmark: "\uf02e"},
{bookmarko: "\uf097"},
{briefcase: "\uf0b1"},
{btc: "\uf15a"},
{bug: "\uf188"},
{building: "\uf1ad"},
{buildingo: "\uf0f7"},
{bullhorn: "\uf0a1"},
{bullseye: "\uf140"},
{bus: "\uf207"},
{buysellads: "\uf20d"},
{cab: "\uf1ba"},
{calculator: "\uf1ec"},
{calendar: "\uf073"},
{calendarchecko: "\uf274"},
{calendarminuso: "\uf272"},
{calendaro: "\uf133"},
{calendarpluso: "\uf271"},
{calendartimeso: "\uf273"},
{camera: "\uf030"},
{cameraretro: "\uf083"},
{car: "\uf1b9"},
{caretdown: "\uf0d7"},
{caretleft: "\uf0d9"},
{caretright: "\uf0da"},
{caretsquareodown: "\uf150"},
{caretsquareoleft: "\uf191"},
{caretsquareoright: "\uf152"},
{caretsquareoup: "\uf151"},
{caretup: "\uf0d8"},
{cartarrowdown: "\uf218"},
{cartplus: "\uf217"},
{cc: "\uf20a"},
{ccamex: "\uf1f3"},
{ccdinersclub: "\uf24c"},
{ccdiscover: "\uf1f2"},
{ccjcb: "\uf24b"},
{ccmastercard: "\uf1f1"},
{ccpaypal: "\uf1f4"},
{ccstripe: "\uf1f5"},
{ccvisa: "\uf1f0"},
{certificate: "\uf0a3"},
{chain: "\uf0c1"},
{chainbroken: "\uf127"},
{check: "\uf00c"},
{checkcircle: "\uf058"},
{checkcircleo: "\uf05d"},
{checksquare: "\uf14a"},
{checksquareo: "\uf046"},
{chevroncircledown: "\uf13a"},
{chevroncircleleft: "\uf137"},
{chevroncircleright: "\uf138"},
{chevroncircleup: "\uf139"},
{chevrondown: "\uf078"},
{chevronleft: "\uf053"},
{chevronright: "\uf054"},
{chevronup: "\uf077"},
{child: "\uf1ae"},
{chrome: "\uf268"},
{circle: "\uf111"},
{circleo: "\uf10c"},
{circleonotch: "\uf1ce"},
{circlethin: "\uf1db"},
{clipboard: "\uf0ea"},
{clocko: "\uf017"},
{clone: "\uf24d"},
{close: "\uf00d"},
{clouddownload: "\uf0ed"},
{cloudupload: "\uf0ee"},
{cny: "\uf157"},
{code: "\uf121"},
{codefork: "\uf126"},
{codepen: "\uf1cb"},
{codiepie: "\uf284"},
{coffee: "\uf0f4"},
{cog: "\uf013"},
{cogs: "\uf085"},
{columns: "\uf0db"},
{comment: "\uf075"},
{commenting: "\uf27a"},
{commentingo: "\uf27b"},
{commento: "\uf0e5"},
{commentsalt: "\uf086"},
{commentso: "\uf0e6"},
{compass: "\uf14e"},
{compress: "\uf066"},
{connectdevelop: "\uf20e"},
{contao: "\uf26d"},
{copy: "\uf0c5"},
{copyright: "\uf1f9"},
{creativecommons: "\uf25e"},
{creditcard: "\uf09d"},
{creditcardalt: "\uf283"},
{crop: "\uf125"},
{crosshairs: "\uf05b"},
{css3: "\uf13c"},
{cube: "\uf1b2"},
{cubes: "\uf1b3"},
{cut: "\uf0c4"},
{cutlery: "\uf0f5"},
{dashboard: "\uf0e4"},
{dashcube: "\uf210"},
{database: "\uf1c0"},
{dedent: "\uf03b"},
{delicious: "\uf1a5"},
{desktop: "\uf108"},
{deviantart: "\uf1bd"},
{diamond: "\uf219"},
{digg: "\uf1a6"},
{dollar: "\uf155"},
{dotcircleo: "\uf192"},
{download: "\uf019"},
{dribble: "\uf17d"},
{dropbox: "\uf16b"},
{drupal: "\uf1a9"},
{edge: "\uf282"},
{edit: "\uf044"},
{eject: "\uf052"},
{ellipsish: "\uf141"},
{ellipsisv: "\uf142"},
{empire: "\uf1d1"},
{envelopeo: "\uf003"},
{envelopesquare: "\uf199"},
{eraser: "\uf12d"},
{eur: "\uf153"},
{euro: "\uf153"},
{exchange: "\uf0ec"},
{exclaimationcircle: "\uf06a"},
{exclamation: "\uf12a"},
{exclamationtriangle: "\uf071"},
{expand: "\uf065"},
{expeditedssl: "\uf23e"},
{externallink: "\uf08e"},
{externallinksquare: "\uf14c"},
{eye: "\uf06e"},
{eyedropper: "\uf1fb"},
{eyeslash: "\uf070"},
{facebook: "\uf09a"},
{facebookf: "\uf09a"},
{facebookoffical: "\uf230"},
{facebooksquare: "\uf082"},
{fastbackward: "\uf049"},
{fastforward: "\uf050"},
{fax: "\uf1ac"},
{feed: "\uf09e"},
{femal: "\uf182"},
{fighterjet: "\uf0fb"},
{file: "\uf15b"},
{filearchiveo: "\uf1c6"},
{fileaudioo: "\uf1c7"},
{filecodeo: "\uf1c9"},
{fileexcelo: "\uf1c3"},
{fileimageo: "\uf1c5"},
{filemovieo: "\uf1c8"},
{fileo: "\uf016"},
{filepdfo: "\uf1c1"},
{filephotoo: "\uf1c5"},
{filepictureo: "\uf1c5"},
{filepowerpointo: "\uf1c4"},
{fileso: "\uf0c5"},
{filesoundo: "\uf1c7"},
{filetext: "\uf15c"},
{filetexto: "\uf0f6"},
{filevideoo: "\uf1c8"},
{filewordo: "\uf1c2"},
{filezipo: "\uf1c6"},
{film: "\uf008"},
{filter: "\uf0b0"},
{fire: "\uf06d"},
{fireextinguisher: "\uf134"},
{firefox: "\uf269"},
{flag: "\uf024"},
{flagcheckered: "\uf11e"},
{flago: "\uf11d"},
{flash: "\uf0e7"},
{flask: "\uf0c3"},
{flickr: "\uf16e"},
{floppyo: "\uf0c7"},
{folder: "\uf07b"},
{foldero: "\uf114"},
{folderopen: "\uf07c"},
{folderopeno: "\uf115"},
{font: "\uf031"},
{fonticons: "\uf280"},
{fortawesome: "\uf286"},
{forumbee: "\uf211"},
{forward: "\uf04e"},
{foursquare: "\uf180"},
{frowno: "\uf119"},
{futbolo: "\uf1e3"},
{gamepad: "\uf11b"},
{gavel: "\uf0e3"},
{gbp: "\uf154"},
{ge: "\uf1d1"},
{gear: "\uf013"},
{gears: "\uf085"},
{genderless: "\uf22d"},
{getpocket: "\uf265"},
{gg: "\uf260"},
{ggcircle: "\uf261"},
{gift: "\uf06b"},
{git: "\uf1d3"},
{github: "\uf09b"},
{githubalt: "\uf113"},
{githubsquare: "\uf092"},
{gitsquare: "\uf1d2"},
{gittip: "\uf184"},
{glass: "\uf000"},
{globe: "\uf0ac"},
{google: "\uf1a0"},
{googleplus: "\uf0d5"},
{googleplussquare: "\uf0d4"},
{googlewallet: "\uf1ee"},
{graduationcap: "\uf19d"},
{gratipay: "\uf184"},
{group: "\uf0c0"},
{hackernews: "\uf1d4"},
{handgrabo: "\uf255"},
{handlizardo: "\uf258"},
{handodown: "\uf0a7"},
{handoleft: "\uf0a5"},
{handoright: "\uf0a4"},
{handoup: "\uf0a6"},
{handpapero: "\uf256"},
{handpeaceo: "\uf25b"},
{handpointero: "\uf25a"},
{handrocko: "\uf255"},
{handscissorso: "\uf257"},
{handspocko: "\uf259"},
{handstopo: "\uf256"},
{hashtag: "\uf292"},
{hddo: "\uf0a0"},
{header: "\uf1dc"},
{headphones: "\uf025"},
{heart: "\uf004"},
{heartbeat: "\uf21e"},
{hearto: "\uf08a"},
{history: "\uf1da"},
{home: "\uf015"},
{hospitalo: "\uf0f8"},
{hotel: "\uf236"},
{hourglass: "\uf254"},
{hourglass1: "\uf251"},
{hourglass2: "\uf252"},
{hourglass3: "\uf253"},
{hourglassend: "\uf253"},
{hourglasshalf: "\uf252"},
{hourglasso: "\uf250"},
{hourglassstart: "\uf251"},
{houzz: "\uf27c"},
{hsquare: "\uf0fd"},
{html5: "\uf13b"},
{icursor: "\uf246"},
{ils: "\uf20b"},
{image: "\uf03e"},
{inbox: "\uf01c"},
{indent: "\uf03c"},
{industry: "\uf275"},
{info: "\uf129"},
{infocircle: "\uf05a"},
{inr: "\uf156"},
{instagram: "\uf16d"},
{institution: "\uf19c"},
{internetexplorer: "\uf26b"},
{intersex: "\uf224"},
{italic: "\uf033"},
{joomia: "\uf1aa"},
{jpy: "\uf157"},
{jsfiddle: "\uf1cc"},
{key: "\uf084"},
{keyboardo: "\uf11c"},
{krw: "\uf159"},
{language: "\uf1ab"},
{laptop: "\uf109"},
{lastfm: "\uf202"},
{lastfmsquare: "\uf203"},
{leaf: "\uf06c"},
{leanpub: "\uf212"},
{legal: "\uf0e3"},
{lemono: "\uf094"},
{leveldown: "\uf149"},
{levelup: "\uf148"},
{lifebouy: "\uf1cd"},
{lifebuoy: "\uf1cd"},
{lifering: "\uf1cd"},
{lifesaver: "\uf1cd"},
{lightbulbo: "\uf0eb"},
{linechart: "\uf201"},
{link: "\uf0c1"},
{linkedin: "\uf0e1"},
{linkedinsquare: "\uf08c"},
{linux: "\uf17c"},
{list: "\uf03a"},
{listalt: "\uf022"},
{listol: "\uf0cb"},
{listul: "\uf0ca"},
{locationarrow: "\uf124"},
{lock: "\uf023"},
{longarrowdown: "\uf175"},
{longarrowleft: "\uf177"},
{longarrowright: "\uf178"},
{longarrowup: "\uf176"},
{loxhost: "\uf208"},
{magic: "\uf0d0"},
{magnet: "\uf076"},
{mailforward: "\uf064"},
{mailreply: "\uf112"},
{mailreplyall: "\uf122"},
{male: "\uf183"},
{mapmarker: "\uf041"},
{mapo: "\uf278"},
{mappin: "\uf276"},
{mapsigns: "\uf277"},
{mars: "\uf222"},
{marsdouble: "\uf227"},
{marsstroke: "\uf229"},
{marsstrokeh: "\uf22b"},
{marsstrokev: "\uf22a"},
{maxcdn: "\uf136"},
{meanpath: "\uf20c"},
{medium: "\uf23a"},
{medkit: "\uf0fa"},
{meho: "\uf11a"},
{mercury: "\uf223"},
{microphone: "\uf136"},
{microphoneslash: "\uf131"},
{minus: "\uf068"},
{minuscircle: "\uf056"},
{minussquare: "\uf146"},
{minussquareo: "\uf147"},
{mixcloud: "\uf289"},
{mobile: "\uf10b"},
{mobilephone: "\uf10b"},
{modx: "\uf285"},
{money: "\uf0d6"},
{moono: "\uf186"},
{mortarboard: "\uf19d"},
{motorcycle: "\uf21c"},
{mousepointer: "\uf245"},
{music: "\uf001"},
{navicon: "\uf0c9"},
{neuter: "\uf22c"},
{newspapero: "\uf1ea"},
{objectgroup: "\uf247"},
{objectungroup: "\uf248"},
{odnoklassniki: "\uf263"},
{odnoklassnikisquare: "\uf264"},
{opencart: "\uf23d"},
{openid: "\uf19b"},
{opera: "\uf26a"},
{optinmonster: "\uf23c"},
{outdent: "\uf03b"},
{pagelines: "\uf18c"},
{paintbrush: "\uf1fc"},
{paperclip: "\uf0c6"},
{paperplane: "\uf1d8"},
{paperplaneo: "\uf1d9"},
{paragraph: "\uf1dd"},
{paste: "\uf0ea"},
{pause: "\uf04c"},
{pausecircle: "\uf28b"},
{pausecircleo: "\uf28c"},
{paw: "\uf1b0"},
{paypal: "\uf1ed"},
{pencil: "\uf040"},
{pencilsquare: "\uf14b"},
{pencilsquareo: "\uf044"},
{percent: "\uf295"},
{phone: "\uf095"},
{phonesquare: "\uf098"},
{photo: "\uf03e"},
{pictureo: "\uf03e"},
{piechart: "\uf200"},
{piedpiper: "\uf1a7"},
{piedpiperalt: "\uf1a8"},
{pinterest: "\uf0d2"},
{pinterestp: "\uf231"},
{pinterestsquare: "\uf0d3"},
{plane: "\uf072"},
{play: "\uf04b"},
{playcircle: "\uf144"},
{playcircleo: "\uf01d"},
{plug: "\uf1e6"},
{plus: "\uf067"},
{pluscircle: "\uf055"},
{plussquare: "\uf0fe"},
{plussquareo: "\uf196"},
{poweroff: "\uf011"},
{print: "\uf02f"},
{producthunt: "\uf288"},
{puzzlepiece: "\uf12e"},
{qq: "\uf1d6"},
{qrcode: "\uf029"},
{questioncircle: "\uf059"},
{questioon: "\uf128"},
{quoteleft: "\uf10d"},
{quoteright: "\uf10e"},
{ra: "\uf1d0"},
{random: "\uf074"},
{rebel: "\uf1d0"},
{recycle: "\uf1b8"},
{reddit: "\uf1a1"},
{redditalien: "\uf281"},
{redditsquare: "\uf1a2"},
{refresh: "\uf021"},
{registered: "\uf25d"},
{remove: "\uf00d"},
{renren: "\uf18b"},
{reorder: "\uf0c9"},
{repeat: "\uf01e"},
{reply: "\uf112"},
{replyall: "\uf122"},
{retweet: "\uf079"},
{rmb: "\uf157"},
{road: "\uf018"},
{rocket: "\uf135"},
{rotateleft: "\uf0e2"},
{rotateright: "\uf01e"},
{rouble: "\uf158"},
{rss: "\uf09e"},
{rsssquare: "\uf143"},
{rub: "\uf158"},
{ruble: "\uf158"},
{rupee: "\uf156"},
{safari: "\uf267"},
{save: "\uf0c7"},
{scissors: "\uf0c4"},
{scribd: "\uf28a"},
{search: "\uf002"},
{searchminus: "\uf010"},
{searchplus: "\uf00e"},
{sellsy: "\uf213"},
{send: "\uf1d8"},
{sendo: "\uf1d9"},
{server: "\uf233"},
{share: "\uf064"},
{sharealt: "\uf1e0"},
{sharealtsquare: "\uf1e1"},
{sharesquare: "\uf14d"},
{sharesquareo: "\uf045"},
{shekel: "\uf20b"},
{sheqel: "\uf20b"},
{shield: "\uf132"},
{ship: "\uf21a"},
{shirtsinbulk: "\uf214"},
{shoppingbag: "\uf290"},
{shoppingbasket: "\uf291"},
{shoppingcart: "\uf07a"},
{signal: "\uf012"},
{signin: "\uf090"},
{signout: "\uf08b"},
{simplybuilt: "\uf215"},
{sitemap: "\uf0e8"},
{skyatlas: "\uf216"},
{skype: "\uf17e"},
{slack: "\uf198"},
{sliders: "\uf1de"},
{slideshare: "\uf1e7"},
{smileo: "\uf118"},
{soccorballo: "\uf1e3"},
{sort: "\uf0dc"},
{sortalphaasc: "\uf15d"},
{sortalphadesc: "\uf15e"},
{sortamountasc: "\uf160"},
{sortamountdesc: "\uf161"},
{sortasc: "\uf0de"},
{sortdesc: "\uf0dd"},
{sortdown: "\uf0dd"},
{sortnumericasc: "\uf162"},
{sortnumericdesc: "\uf163"},
{sortup: "\uf0de"},
{soundcloud: "\uf1be"},
{spaceshuttle: "\uf197"},
{spinner: "\uf110"},
{spoon: "\uf1b1"},
{spotify: "\uf1bc"},
{square: "\uf0c8"},
{squareo: "\uf096"},
{stackexchange: "\uf18d"},
{stackoverflow: "\uf16c"},
{star: "\uf005"},
{starhalf: "\uf089"},
{starhalfempty: "\uf123"},
{starhalffull: "\uf123"},
{starhalfo: "\uf123"},
{staro: "\uf006"},
{steam: "\uf1b6"},
{steamsquare: "\uf1b7"},
{stepbackward: "\uf048"},
{stepforward: "\uf051"},
{stethoscope: "\uf0f1"},
{stickynote: "\uf249"},
{stickynoteo: "\uf24a"},
{stop: "\uf04d"},
{stopcircle: "\uf28d"},
{stopcircleo: "\uf28e"},
{streetview: "\uf21d"},
{strikethrough: "\uf0cc"},
{stumbleupon: "\uf1a4"},
{stumbleuponcircle: "\uf1a3"},
{subscript: "\uf12c"},
{subway: "\uf239"},
{suitcase: "\uf0f2"},
{suno: "\uf185"},
{superscript: "\uf12b"},
{support: "\uf1cd"},
{table: "\uf0ce"},
{tablet: "\uf10a"},
{tachometer: "\uf0e4"},
{tag: "\uf02b"},
{tags: "\uf02c"},
{tasks: "\uf0ae"},
{taxi: "\uf1ba"},
{television: "\uf26c"},
{tencentweibo: "\uf1d5"},
{terminal: "\uf120"},
{textheight: "\uf034"},
{textwidth: "\uf035"},
{th: "\uf00a"},
{thlarge: "\uf009"},
{thlist: "\uf00b"},
{thumbsdown: "\uf165"},
{thumbsodown: "\uf088"},
{thumbsoup: "\uf087"},
{thumbsup: "\uf164"},
{thumbtack: "\uf08d"},
{ticket: "\uf145"},
{times: "\uf00d"},
{timescircle: "\uf057"},
{timescircleo: "\uf05c"},
{tint: "\uf043"},
{toggledown: "\uf150"},
{toggleleft: "\uf191"},
{toggleoff: "\uf204"},
{toggleon: "\uf205"},
{toggleright: "\uf152"},
{toggleup: "\uf151"},
{trademark: "\uf25c"},
{train: "\uf238"},
{transgender: "\uf224"},
{transgenderalt: "\uf225"},
{trash: "\uf1f8"},
{trasho: "\uf014"},
{tree: "\uf1bb"},
{trello: "\uf181"},
{tripadvisor: "\uf262"},
{trophy: "\uf091"},
{truck: "\uf0d1"},
{try: "\uf195"},
{tty: "\uf1e4"},
{tumblr: "\uf173"},
{tumblrsquare: "\uf174"},
{turkishlira: "\uf195"},
{tv: "\uf26c"},
{twitch: "\uf1e8"},
{twitter: "\uf099"},
{twittersquare: "\uf081"},
{umberlla: "\uf0e9"},
{underline: "\uf0cd"},
{undo: "\uf0e2"},
{university: "\uf19c"},
{unlink: "\uf127"},
{unlock: "\uf09c"},
{unlockalt: "\uf13e"},
{unsorted: "\uf0dc"},
{upload: "\uf093"},
{usb: "\uf287"},
{usd: "\uf155"},
{user: "\uf007"},
{usermd: "\uf0f0"},
{userplus: "\uf234"},
{users: "\uf0c0"},
{usersecret: "\uf21b"},
{usertimes: "\uf235"},
{venus: "\uf221"},
{venusdouble: "\uf226"},
{venusmars: "\uf228"},
{viacoin: "\uf237"},
{videocamera: "\uf03d"},
{vimeo: "\uf27d"},
{vimeosquare: "\uf194"},
{vine: "\uf1ca"},
{vk: "\uf189"},
{volumedown: "\uf027"},
{volumeoff: "\uf026"},
{volumeup: "\uf028"},
{warning: "\uf071"},
{webchat: "\uf1d7"},
{weibo: "\uf18a"},
{weixin: "\uf1d7"},
{whatsapp: "\uf232"},
{wheelchair: "\uf193"},
{wifi: "\uf1eb"},
{wikipediaw: "\uf266"},
{windows: "\uf17a"},
{won: "\uf159"},
{wordpress: "\uf19a"},
{wrench: "\uf0ad"},
{xing: "\uf168"},
{xingsquare: "\uf169"},
{yahoo: "\uf19e"},
{yc: "\uf23b"},
{ycombinator: "\uf23b"},
{ycombinatorsquare: "\uf1d4"},
{ycsquare: "\uf1d4"},
{yelp: "\uf1e9"},
{yen: "\uf157"},
{youtube: "\uf167"},
{youtubeplay: "\uf16a"},
{youtubesquare: "\uf166"}
];
var currentEmoObj;
var dairyCounter = 0;
var freshBatch = fromInput;
for(dairyCounter=0; dairyCounter<Icon.length; dairyCounter++)
{
currentEmoObj = Icon[dairyCounter];
var loc_theKey = Object.keys(currentEmoObj)[0].toString();
var loc_RegEx = new RegExp("{{"+loc_theKey+"}}","g");
freshBatch = freshBatch.replace(loc_RegEx, currentEmoObj[loc_theKey]);
}
return freshBatch;
}
function getEncodedURI(fromInput){
var msgSplit = fromInput;
var Protocols = ["http:/","https:/","atp:/","hifi:/"];
var protocolString = "";
var FoundProtos = [];
var dairyCounter = -1;
Protocols.forEach(function(protocolString) {
while ((dairyCounter = msgSplit.indexOf(protocolString, dairyCounter+1)) != -1){
var injectNewProto = {protocolType:protocolString, atLocation:dairyCounter, fullLink:""};
FoundProtos.push(injectNewProto);
}
});
FoundProtos.forEach(function(protoTarget){
var startAt = protoTarget.atLocation;
var endAt = msgSplit.indexOf(" ",startAt);
if(endAt==-1){endAt = msgSplit.length;}
protoTarget.fullLink = msgSplit.substring(startAt, endAt);
var urlForProto = '<html><a href=\"'+protoTarget.fullLink+'\">'+protoTarget.fullLink+'</a></html>';
var loc_RegEx = new RegExp(protoTarget.fullLink,"g");
fromInput = msgSplit.replace(loc_RegEx, urlForProto);
});
var freshBatch = fromInput;
return freshBatch;
}
function processPkg()
{
//console.log("inside processPkg");
//console.log(Qt.fontFamilies());
sendToScript(txtMsgBox.text);
txtMsgBox.text = "To local chat:";
txtMsgBox.height = txtMsgBox.contentHeight;
txtMsgBox.selectAll();
txtMsgBox.forceActiveFocus();
}
function fromScript(msgpkg) {
//print("inside fromScript");
var loc_pkg_time = Qt.formatDateTime(new Date(), "hh:mm:ss ap")
var loc_pkg_uname = msgpkg[2].toString();
var loc_pkg_txtMsg = msgpkg[1].toString();
loc_pkg_txtMsg = getIcon(loc_pkg_txtMsg);
loc_pkg_txtMsg = getEncodedURI(loc_pkg_txtMsg);
var loc_full_pkg = "["+loc_pkg_time+"] "+loc_pkg_uname+": "+loc_pkg_txtMsg;
incomingMsgModel.append({"fullPkg": loc_full_pkg});
}
signal sendToScript(string message);
}