2 * Copyright (C) 2011 Lukáš Karas <lukas.karas@centrum.cz>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the
16 * Free Software Foundation, Inc.,
17 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 //BorderImage { source: "img/toolbar.sci"; anchors.fill: parent }
24 //color: "transparent"
28 //anchors.horizontalCenter: parent.horizontalCenter
29 anchors{top: parent.top; left: parent.left; right: parent.right}
31 //anchors.right: crossIcon.right
33 signal requestCall(string sessionId, bool video);
34 signal requestHangup(string sessionId);
37 console.log("II [SessionControlPanel.qml]: "+msg);
40 console.log("EE [SessionControlPanel.qml]: "+msg);
43 console.log("WW [SessionControlPanel.qml]: "+msg);
46 function updateMicIcon(b){
47 //micIcon.source = b ? "img/mic-on.svg": "img/mic-off.png";
52 anchors{top: parent.top; bottom: parent.bottom}
53 anchors.horizontalCenter: parent.horizontalCenter
58 source: "img/table.svg"
59 height: parent.height * 0.8
61 anchors{ margins: parent.height*0.1; left: parent.left; top: parent.top }
66 sessionToolbar.parent.setBoard(!sessionToolbar.parent.board);
73 source: "img/call-start.png"
74 height: parent.height * 0.8
76 anchors{ margins: parent.height*0.1; left: boardIcon.right; top: parent.top }
80 if (sessionToolbar.state == "call"){
81 log("request hangup "+sessionToolbar.parent.sessionId);
82 requestHangup(sessionToolbar.parent.sessionId);
84 log("request audio call "+sessionToolbar.parent.sessionId);
85 requestCall(sessionToolbar.parent.sessionId, false);
94 height: parent.height * 0.8
97 anchors{ margins: 0; left: callIcon.right; top: parent.top }
101 log("request video call "+sessionToolbar.parent.sessionId);
102 requestCall(sessionToolbar.parent.sessionId, true);
109 source: "img/cross.svg"
110 height: parent.height * 0.8
112 anchors{ margins: parent.height*0.1; left: camIcon.right; top: parent.top}
117 sessionToolbar.parent.closeSession();
126 PropertyChanges { target: sessionToolbar; width: height*4}
127 PropertyChanges { target: callIcon; source: "img/call-start.png" }
128 PropertyChanges { target: camIcon; anchors.margins: parent.height*0.1; visible: true; width: height; }
132 PropertyChanges { target: callIcon; source: "img/call-end.png";}
133 PropertyChanges { target: sessionToolbar; width: height*3 }
134 PropertyChanges { target: camIcon; anchors.margins:0; visible: false; width: 0; }
140 from: "chat"; to: "call"
141 NumberAnimation { properties: "width,height,x,y,anchors.margins"; easing.type: Easing.InOutQuad; duration: 500 }
144 from: "call"; to: "chat"
145 NumberAnimation { properties: "width,height,x,y,anchors.margins"; easing.type: Easing.InOutQuad; duration: 500 }