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 //height: main.toolbarHeight
30 //anchors.horizontalCenter: parent.horizontalCenter
31 anchors{top: parent.top; left: parent.left; right: parent.right}
33 //anchors.right: crossIcon.right
35 signal requestCall(string sessionId, bool video);
36 signal requestHangup(string sessionId);
39 console.log("II [SessionControlPanel.qml]: "+msg);
42 console.log("EE [SessionControlPanel.qml]: "+msg);
45 console.log("WW [SessionControlPanel.qml]: "+msg);
48 function updateMicIcon(b){
49 //micIcon.source = b ? "img/mic-on.svg": "img/mic-off.png";
54 anchors{top: parent.top; bottom: parent.bottom}
55 anchors.horizontalCenter: parent.horizontalCenter
60 source: "img/table.svg"
61 height: parent.height * 0.8
63 anchors{ margins: parent.height*0.1; left: parent.left; top: parent.top }
68 sessionToolbar.parent.setBoard(!sessionToolbar.parent.board);
75 source: "img/call-start.png"
76 height: parent.height * 0.8
78 anchors{ margins: parent.height*0.1; left: boardIcon.right; top: parent.top;
79 leftMargin:parent.height *.5; }
84 if (sessionToolbar.state == "call"){
85 log("request hangup "+sessionToolbar.parent.sessionId);
86 requestHangup(sessionToolbar.parent.sessionId);
88 log("request audio call "+sessionToolbar.parent.sessionId);
89 requestCall(sessionToolbar.parent.sessionId, false);
98 height: parent.height * 0.8
101 anchors{ margins: 0; left: callIcon.right; top: parent.top; leftMargin:parent.height *.5}
105 log("request video call "+sessionToolbar.parent.sessionId);
106 requestCall(sessionToolbar.parent.sessionId, true);
115 source: "img/cross.png"
116 height: parent.height * 0.8
118 anchors{ margins: parent.height*0.1; right: parent.right; top: parent.top}
123 sessionToolbar.parent.closeSession();
131 //PropertyChanges { target: sessionToolbar; width: height*4}
132 PropertyChanges { target: callIcon; source: "img/call-start.png" }
133 PropertyChanges { target: camIcon; anchors.margins: parent.height*0.1; visible: true; width: height; }
137 PropertyChanges { target: callIcon; source: "img/call-end.png";}
138 //PropertyChanges { target: sessionToolbar; width: height*2.5 }
139 PropertyChanges { target: camIcon; anchors.margins:0; width: 0; } // visible: false;
145 from: "chat"; to: "call"
146 NumberAnimation { properties: "width,height,x,y,anchors.margins"; easing.type: Easing.InOutQuad; duration: 500 }
149 from: "call"; to: "chat"
150 NumberAnimation { properties: "width,height,x,y,anchors.margins"; easing.type: Easing.InOutQuad; duration: 500 }