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.
21 import "./components/styles/default" as DefaultStyles
23 import org.makneto 0.1 as Makneto
27 property variant contactLine: {};
28 property bool defined : contactLine.accountId !== undefined // true while popup is not set yet
30 // this weird code align all buttons to block... I don't know how make it better...
31 property int maxButtonWidth: Math.max(chatButton.width, Math.max(callButton.width, videoButton.width))
33 SystemPalette { id: syspal }
38 opacity: wrapper.opacity
39 color: main.useSyspal? syspal.mid :"#323235"
46 border{ color: main.useSyspal? syspal.windowText :"white"; width: 1 }
54 color: main.useSyspal? syspal.windowText :"white"
58 margins: contactId.height;
60 text: defined? contactLine.titleText: "???"
62 font.pixelSize: contactId.height * 1.3
66 color: main.useSyspal? syspal.windowText :"gray"
69 top: contactName.bottom;
73 text: defined? contactLine.contactId : "???"
78 anchors{ right: parent.right; top: contactId.bottom}
81 minimumWidth: maxButtonWidth
84 main.getSessionController().requestSession(contactLine.accountId, contactLine.contactId, Makneto.Session.SessionTypeText);
90 anchors{ right: parent.right; top: chatButton.bottom}
93 minimumWidth: maxButtonWidth
96 main.getSessionController().requestSession(contactLine.accountId, contactLine.contactId, Makneto.Session.SessionTypeAudio);
102 anchors{ right: parent.right; top: callButton.bottom}
104 text: "Start Video Call"
105 minimumWidth: maxButtonWidth
108 main.getSessionController().requestSession(contactLine.accountId, contactLine.contactId, Makneto.Session.SessionTypeVideo);
115 anchors{ top: contactId.bottom; right: videoButton.left; margins: 6}
116 height: Math.min( parent.height / 2, parent.width / 2)
118 source: defined? contactLine.iconSource :""
123 text: defined? contactLine.statusMessage: "???"
124 color: main.useSyspal? syspal.windowText :"white"
126 top: contactIcon.bottom
129 bottom: parent.bottom
133 wrapMode: Text.NoWrap
134 textFormat: Text.RichText