7 property real detailsOpacity : 0
8 id: wrapper; width: wrapper.ListView.view.width; height: if(txt.height > 60){txt.height+10}else{60} //50+5+5
9 function handleLink(link){
10 if(link.slice(0,3) == 'app'){
11 screen.setUser(link.slice(7));
12 }else if(link.slice(0,4) == 'http'){
13 Qt.openUrlExternally(link);
16 function addTags(str){
17 var ret = str.replace(/@[a-zA-Z0-9_]+/g, '<a href="app://$&">$&</a>');//click to jump to user?
18 var ret2 = ret.replace(/http:\/\/[^ \n\t]+/g, '<a href="$&">$&</a>');//surrounds http links with html link tags
22 // Strip away paranthesis
23 function userName(str) {
24 var user = str.replace(/\([\S|\s]*\)/gi, "");
31 wrapper.state = 'Details';
32 loader.sourceComponent = webViewPage;
37 id: moveMe; height: parent.height
40 color: "black"; opacity: wrapper.ListView.index % 2 ? 0.2 : 0.3; height: wrapper.height-2; width: wrapper.width; y: 1
44 //x: 2; y: 2; width: parent.width - x*2; height: parent.height - y*2
45 // opacity: wrapper.ListView.index % 2 ? 0.2 : 0.3;
46 height: wrapper.height-2; width: wrapper.width; y: 1
62 id: image; x: 6; width: 48; height: 48; smooth: true
63 //anchors.verticalCenter: parent.verticalCenter
65 Loading { x: 1; y: 1; width: 48; height: 48; visible: realImage.status != Image.Ready }
69 source: userImage == "" ? "qOp48.png" : userImage
76 if(status==Image.Ready)
78 if(status==Image.Error)
79 realImage.source="qOp48.png"
84 PropertyChanges { target: realImage ; opacity:1 }
86 transitions: Transition { NumberAnimation { target: realImage; property: "opacity"; duration: 200 } }
89 Text { id:innerTxt ; text: name; opacity: 0 }
90 Text { id:txt; y:4; x: 56
91 text: '<html><style type="text/css">a:link {color:"#ffffff"}; a:visited {color:"#336633"}</style>'
92 + '<a href="app://@'+userName(name)+'"><b>'+userName(name) + '</b></a><br /><b style="font-size:small">' + statusText + "</b></html>";
93 textFormat: Qt.RichText
94 color: "#cccccc"; style: Text.Raised; styleColor: "black"; wrapMode: Text.WordWrap
95 anchors.left: image.right; anchors.right: blackRect.right; anchors.leftMargin: 6; anchors.rightMargin: 6
96 onLinkActivated: wrapper.handleLink(link)
102 x: 0; width: parent.width // - 20
103 anchors { top: parent.top; topMargin: 0; bottom: parent.bottom; bottomMargin: 0 }
104 opacity: wrapper.detailsOpacity
110 height: parent.height;
116 width: pages.width; height: pages.height;
131 anchors.horizontalCenter: parent.horizontalCenter
132 anchors.verticalCenter: parent.verticalCenter
133 width: 32; height: 32; visible: webView.progress != 1
136 ParseModel { id: parseModel }
139 rows: 5; columns: 5; spacing: 10 */
141 Repeater { model: parseModel
146 contentWidth: Math.max(flickable.width,webView.width)
147 contentHeight: Math.max(flickable.height,webView.height)
152 transformOrigin: Item.TopLeft
155 preferredHeight: pages.height
158 //height: pages.height
159 newWindowComponent: webViewPage
160 newWindowParent: pages
161 html: "<div style=\"background-color:white\">"+article+"</div>"
163 // console.log('Loaded');
164 details.state="loaded";
180 PropertyChanges { target: details ; opacity:wrapper.detailsOpacity }
182 transitions: Transition { NumberAnimation { target: details; property: "opacity"; duration: 200 } }
185 // A button to close the detailed view, i.e. set the state back to default ('').
188 anchors { right: wrapper.right; bottom: wrapper.bottom ;rightMargin: 10 }
189 opacity: wrapper.detailsOpacity
199 /* } /* ********** */
205 // PropertyChanges { target: blackRect; color: "#c0c0c0" }
206 //PropertyChanges { target: recipeImage; width: 130; height: 130 } // Make picture bigger
207 PropertyChanges { target: wrapper; detailsOpacity: 1; x: 0 } // Make details visible
208 PropertyChanges { target: wrapper; height: wrapper.ListView.view.height } //lstRC.height } // Fill the entire list area with the detailed view
210 // Move the list so that this item is at the top.
211 PropertyChanges { target: wrapper.ListView.view; explicit: true; contentY: wrapper.y }
213 // Disallow flicking while we're in detailed view
214 PropertyChanges { target: wrapper.ListView.view; interactive: false }
217 transitions: Transition {
218 // Make the state changes smooth
220 //ColorAnimation { property: "color"; duration: 500 }
221 NumberAnimation { duration: 300; properties: "detailsOpacity,x,contentY,height,width" }