Select Git revision
dringctrl.py
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
HistoryTreeItem.cpp 5.26 KiB
/***************************************************************************
* Author : Mathieu Leduc-Hamel mathieu.leduc-hamel@savoirfairelinux.com *
* Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include <QtCore/QStringList>
#include <QtGui/QGridLayout>
#include <klocale.h>
#include <kdebug.h>
#include <unistd.h>
#include "lib/sflphone_const.h"
#include "HistoryTreeItem.h"
#include "AkonadiBackend.h"
#include "lib/Contact.h"
const char * HistoryTreeItem::callStateIcons[12] = {ICON_INCOMING, ICON_RINGING, ICON_CURRENT, ICON_DIALING, ICON_HOLD, ICON_FAILURE, ICON_BUSY, ICON_TRANSFER, ICON_TRANSF_HOLD, "", "", ICON_CONFERENCE};
HistoryTreeItem::HistoryTreeItem(QWidget *parent)
: QWidget(parent), itemCall(0), init(false)
{
}
HistoryTreeItem::~HistoryTreeItem()
{
}
Call* HistoryTreeItem::call() const
{
return itemCall;
}
void HistoryTreeItem::setCall(Call *call)
{
itemCall = call;
if (itemCall->isConference()) {
labelIcon->setVisible(true);
return;
}
labelIcon = new QLabel(this);
labelPeerName = new QLabel();
labelIcon = new QLabel();
labelIcon->setMinimumSize(70,48);
labelIcon->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
labelCallNumber2 = new QLabel(itemCall->getPeerPhoneNumber());
QSpacerItem* verticalSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Expanding);
m_pTimeL = new QLabel();