Commit 254851a5 authored by Emmanuel Lepage Vallee's avatar Emmanuel Lepage Vallee
Browse files

[ #13801 ] Fix indentation, beautify the code, add comment

parent 62b69203
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* Copyright (C) 2009-2012 by Savoir-Faire Linux * * Copyright (C) 2009-2012 by Savoir-Faire Linux *
* Author : Jérémy Quentin <jeremy.quentin@savoirfairelinux.com> * * Author : Jérémy Quentin <jeremy.quentin@savoirfairelinux.com> *
* Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>* * Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>*
* ^^ Refuse any liability for this code *
* * * *
* This program is free software; you can redistribute it and/or modify * * 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 * * it under the terms of the GNU General Public License as published by *
......
...@@ -36,13 +36,10 @@ class AccountWizard : public QWizard ...@@ -36,13 +36,10 @@ class AccountWizard : public QWizard
Q_OBJECT Q_OBJECT
public: public:
enum { Page_Intro, Page_AutoMan, Page_Type, Page_Email, Page_SIPForm, Page_IAXForm, Page_Stun, Page_Conclusion }; enum { Page_Intro, Page_AutoMan, Page_Type, Page_Email, Page_SIPForm, Page_IAXForm, Page_Stun, Page_Conclusion };
AccountWizard(QWidget * parent = 0); AccountWizard(QWidget * parent = 0);
~AccountWizard(); ~AccountWizard();
void accept(); void accept();
}; };
/*************************************************************************** /***************************************************************************
......
...@@ -69,7 +69,6 @@ CallTreeItemDelegate(CallView* widget) ...@@ -69,7 +69,6 @@ CallTreeItemDelegate(CallView* widget)
if (index.parent().isValid() && !index.parent().child(index.row()+1,0).isValid()) if (index.parent().isValid() && !index.parent().child(index.row()+1,0).isValid())
sh.rheight() += 15; sh.rheight() += 15;
} }
return sh; return sh;
...@@ -113,7 +112,6 @@ CallTreeItemDelegate(CallView* widget) ...@@ -113,7 +112,6 @@ CallTreeItemDelegate(CallView* widget)
for (int i =0;i < childCount;i++) { for (int i =0;i < childCount;i++) {
r.setHeight(r.height() + sizeHint(option,index).height()); r.setHeight(r.height() + sizeHint(option,index).height());
} }
// qDebug() << "\n\nFINAL SIZE" << r;
} }
r.setTop(r.top() + m_ConferenceDrawer.leftMargin()); r.setTop(r.top() + m_ConferenceDrawer.leftMargin());
...@@ -180,13 +178,13 @@ CallTreeItemDelegate(CallView* widget) ...@@ -180,13 +178,13 @@ CallTreeItemDelegate(CallView* widget)
widget->setMaximumSize((m_tree->viewport()->width() - m_ConferenceDrawer.leftMargin() - m_ConferenceDrawer.rightMargin())-m_ConferenceDrawer.leftMargin(),max); widget->setMaximumSize((m_tree->viewport()->width() - m_ConferenceDrawer.leftMargin() - m_ConferenceDrawer.rightMargin())-m_ConferenceDrawer.leftMargin(),max);
} }
} }
if (index.parent().isValid() && !index.parent().child(index.row()+1,0).isValid()) { if (index.parent().isValid() && !index.parent().child(index.row()+1,0).isValid()) {
m_ConferenceDrawer.drawBoxBottom(index, 0, option, painter); m_ConferenceDrawer.drawBoxBottom(index, 0, option, painter);
} }
} }
private: private:
CallView* m_tree; CallView* m_tree;
ConferenceBox m_ConferenceDrawer; ConferenceBox m_ConferenceDrawer;
......
...@@ -18,10 +18,13 @@ ...@@ -18,10 +18,13 @@
#ifndef CALL_VIEW #ifndef CALL_VIEW
#define CALL_VIEW #define CALL_VIEW
//Qt
#include <QtGui/QTreeWidget> #include <QtGui/QTreeWidget>
#include <QtGui/QPainter> #include <QtGui/QPainter>
#include <QtGui/QStyledItemDelegate> #include <QtGui/QStyledItemDelegate>
#include <QtCore/QTimer> #include <QtCore/QTimer>
//SFLPhone
#include "lib/CallModel.h" #include "lib/CallModel.h"
//Qt //Qt
......
...@@ -252,35 +252,37 @@ void SFLPhone::setupActions() ...@@ -252,35 +252,37 @@ void SFLPhone::setupActions()
action_configureSflPhone = KStandardAction::preferences(m_pView, SLOT(configureSflPhone()), this); action_configureSflPhone = KStandardAction::preferences(m_pView, SLOT(configureSflPhone()), this);
action_configureSflPhone->setText(i18n("Configure SFLphone")); action_configureSflPhone->setText(i18n("Configure SFLphone"));
action_displayDialpad = new KAction(KIcon(QIcon(ICON_DISPLAY_DIALPAD)), i18n("Display dialpad"), this); action_displayDialpad = new KAction(KIcon(QIcon(ICON_DISPLAY_DIALPAD)), i18n("Display dialpad") , this);
action_displayMessageBox = new KAction(KIcon("mail-message-new"), i18n("Display text message box") , this);
action_displayVolumeControls = new KAction(KIcon(QIcon(ICON_DISPLAY_VOLUME_CONSTROLS)), i18n("Display volume controls"), this);
action_pastenumber = new KAction(KIcon("edit-paste"), i18n("Paste") , this);
action_showContactDock = new KAction(KIcon("edit-find-user") , i18n("Display Contact") , this);
action_showHistoryDock = new KAction(KIcon("view-history") , i18n("Display history") , this);
action_showBookmarkDock = new KAction(KIcon("bookmark-new-list"), i18n("Display bookmark") , this);
action_accountCreationWizard = new KAction(i18n("Account creation wizard") , this);
action_displayDialpad->setCheckable( true ); action_displayDialpad->setCheckable( true );
action_displayDialpad->setChecked ( ConfigurationSkeleton::displayDialpad() ); action_displayDialpad->setChecked ( ConfigurationSkeleton::displayDialpad() );
action_configureSflPhone->setText(i18n("Configure SFLphone")); action_configureSflPhone->setText(i18n("Configure SFLphone"));
action_displayMessageBox = new KAction(KIcon("mail-message-new"), i18n("Display text message box"), this);
action_displayMessageBox->setCheckable( true ); action_displayMessageBox->setCheckable( true );
action_displayMessageBox->setChecked ( ConfigurationSkeleton::displayMessageBox() ); action_displayMessageBox->setChecked ( ConfigurationSkeleton::displayMessageBox() );
action_displayVolumeControls = new KAction(KIcon(QIcon(ICON_DISPLAY_VOLUME_CONSTROLS)), i18n("Display volume controls"), this);
action_displayVolumeControls->setCheckable( true ); action_displayVolumeControls->setCheckable( true );
action_displayVolumeControls->setChecked ( ConfigurationSkeleton::displayVolume() ); action_displayVolumeControls->setChecked ( ConfigurationSkeleton::displayVolume() );
action_pastenumber = new KAction(KIcon("edit-paste"), i18n("Paste"), this);
action_pastenumber->setShortcut ( Qt::CTRL + Qt::Key_V ); action_pastenumber->setShortcut ( Qt::CTRL + Qt::Key_V );
action_showContactDock = new KAction(KIcon("edit-find-user") , i18n("Display Contact") , this);
action_showContactDock->setCheckable( true ); action_showContactDock->setCheckable( true );
action_showContactDock->setChecked(ConfigurationSkeleton::displayContactDock()); action_showContactDock->setChecked(ConfigurationSkeleton::displayContactDock());
action_showHistoryDock = new KAction(KIcon("view-history") , i18n("Display history") , this);
action_showHistoryDock->setCheckable( true ); action_showHistoryDock->setCheckable( true );
action_showHistoryDock->setChecked(ConfigurationSkeleton::displayHistoryDock()); action_showHistoryDock->setChecked(ConfigurationSkeleton::displayHistoryDock());
action_showBookmarkDock = new KAction(KIcon("bookmark-new-list"), i18n("Display bookmark"), this);
action_showBookmarkDock->setCheckable( true ); action_showBookmarkDock->setCheckable( true );
action_showBookmarkDock->setChecked(ConfigurationSkeleton::displayBookmarkDock()); action_showBookmarkDock->setChecked(ConfigurationSkeleton::displayBookmarkDock());
action_accountCreationWizard = new KAction(i18n("Account creation wizard"), this);
action_configureShortcut = new KAction(KIcon(KIcon("configure-shortcuts")), i18n("Configure Shortcut"), this); action_configureShortcut = new KAction(KIcon(KIcon("configure-shortcuts")), i18n("Configure Shortcut"), this);
......
...@@ -28,18 +28,18 @@ SFLPhoneAccessibility* SFLPhoneAccessibility::m_pInstance=nullptr; ...@@ -28,18 +28,18 @@ SFLPhoneAccessibility* SFLPhoneAccessibility::m_pInstance=nullptr;
SFLPhoneAccessibility::SFLPhoneAccessibility() : QObject(0),QList<KAction*>() SFLPhoneAccessibility::SFLPhoneAccessibility() : QObject(0),QList<KAction*>()
{ {
KAction* action = new KAction(0); KAction* action = new KAction(0);
action->setObjectName("listCall"); action->setObjectName ( "listCall" );
action->setShortcut( Qt::CTRL + Qt::Key_L ); action->setShortcut ( Qt::CTRL + Qt::Key_L );
action->setText("List all current calls"); action->setText ( "List all current calls" );
action->setIcon(KIcon("text-speak")); action->setIcon ( KIcon("text-speak") );
*this << action; *this << action;
connect(action,SIGNAL(triggered(bool)),this,SLOT(listCall())); connect(action,SIGNAL(triggered(bool)),this,SLOT(listCall()));
action = new KAction(0); action = new KAction(0);
action->setObjectName("currentCallDetails"); action->setObjectName ( "currentCallDetails" );
action->setShortcut( Qt::CTRL + Qt::Key_I ); action->setShortcut ( Qt::CTRL + Qt::Key_I );
action->setText("Get current call details"); action->setText ( "Get current call details" );
action->setIcon(KIcon("text-speak")); action->setIcon ( KIcon("text-speak") );
*this << action; *this << action;
connect(action,SIGNAL(triggered(bool)),this,SLOT(currentCallDetails())); connect(action,SIGNAL(triggered(bool)),this,SLOT(currentCallDetails()));
} }
...@@ -92,7 +92,7 @@ void SFLPhoneAccessibility::currentCallDetails() ...@@ -92,7 +92,7 @@ void SFLPhoneAccessibility::currentCallDetails()
toSay += i18n(", the peer phone number is %1 ",numberToDigit(call->getPeerPhoneNumber()) ); toSay += i18n(", the peer phone number is %1 ",numberToDigit(call->getPeerPhoneNumber()) );
else if (!call->getCallNumber().isEmpty()) else if (!call->getCallNumber().isEmpty())
toSay += i18n(", the phone number is %1 ",numberToDigit(call->getCallNumber())); toSay += i18n(", the phone number is %1 ",numberToDigit(call->getCallNumber()));
int nSec = QDateTime::fromTime_t(call->getStartTimeStamp().toInt()).time().secsTo( QTime::currentTime() ); int nSec = QDateTime::fromTime_t(call->getStartTimeStamp().toInt()).time().secsTo( QTime::currentTime() );
if (nSec>0) if (nSec>0)
toSay += i18n(" and you have been talking since %1 seconds",nSec ); toSay += i18n(" and you have been talking since %1 seconds",nSec );
......
...@@ -26,10 +26,14 @@ class SFLPhoneAccessibility : public QObject, public QList<KAction*> ...@@ -26,10 +26,14 @@ class SFLPhoneAccessibility : public QObject, public QList<KAction*>
{ {
Q_OBJECT Q_OBJECT
public: public:
//Singleton
static SFLPhoneAccessibility* getInstance(); static SFLPhoneAccessibility* getInstance();
private: private:
//Constructor
SFLPhoneAccessibility(); SFLPhoneAccessibility();
QString numberToDigit(QString number); QString numberToDigit(QString number);
//Static attributes
static SFLPhoneAccessibility* m_pInstance; static SFLPhoneAccessibility* m_pInstance;
public slots: public slots:
......
...@@ -414,15 +414,18 @@ void SFLPhoneView::updateWindowCallState() ...@@ -414,15 +414,18 @@ void SFLPhoneView::updateWindowCallState()
actionTexts [ SFLPhone::Refuse ] = ACTION_LABEL_REFUSE ; actionTexts [ SFLPhone::Refuse ] = ACTION_LABEL_REFUSE ;
m_pMessageBoxW->setVisible(false || IM_ACTIVE) ; m_pMessageBoxW->setVisible(false || IM_ACTIVE) ;
break; break;
case CALL_STATE_RINGING: case CALL_STATE_RINGING:
enabledActions [ SFLPhone::Hold ] = false ; enabledActions [ SFLPhone::Hold ] = false ;
enabledActions [ SFLPhone::Transfer ] = false ; enabledActions [ SFLPhone::Transfer ] = false ;
m_pMessageBoxW->setVisible(false) ; m_pMessageBoxW->setVisible(false) ;
break; break;
case CALL_STATE_CURRENT: case CALL_STATE_CURRENT:
buttonIconFiles [ SFLPhone::Record ] = ICON_REC_DEL_ON ; buttonIconFiles [ SFLPhone::Record ] = ICON_REC_DEL_ON ;
m_pMessageBoxW->setVisible((true && ConfigurationSkeleton::displayMessageBox()) || IM_ACTIVE); m_pMessageBoxW->setVisible((true && ConfigurationSkeleton::displayMessageBox()) || IM_ACTIVE);
break; break;
case CALL_STATE_DIALING: case CALL_STATE_DIALING:
enabledActions [ SFLPhone::Hold ] = false ; enabledActions [ SFLPhone::Hold ] = false ;
enabledActions [ SFLPhone::Transfer ] = false ; enabledActions [ SFLPhone::Transfer ] = false ;
...@@ -431,11 +434,13 @@ void SFLPhoneView::updateWindowCallState() ...@@ -431,11 +434,13 @@ void SFLPhoneView::updateWindowCallState()
buttonIconFiles [ SFLPhone::Accept ] = ICON_ACCEPT ; buttonIconFiles [ SFLPhone::Accept ] = ICON_ACCEPT ;
m_pMessageBoxW->setVisible(false) ; m_pMessageBoxW->setVisible(false) ;
break; break;
case CALL_STATE_HOLD: case CALL_STATE_HOLD:
buttonIconFiles [ SFLPhone::Hold ] = ICON_UNHOLD ; buttonIconFiles [ SFLPhone::Hold ] = ICON_UNHOLD ;
actionTexts [ SFLPhone::Hold ] = ACTION_LABEL_UNHOLD ; actionTexts [ SFLPhone::Hold ] = ACTION_LABEL_UNHOLD ;
m_pMessageBoxW->setVisible(false) ; m_pMessageBoxW->setVisible(false) ;
break; break;
case CALL_STATE_FAILURE: case CALL_STATE_FAILURE:
enabledActions [ SFLPhone::Accept ] = false ; enabledActions [ SFLPhone::Accept ] = false ;
enabledActions [ SFLPhone::Hold ] = false ; enabledActions [ SFLPhone::Hold ] = false ;
...@@ -443,6 +448,7 @@ void SFLPhoneView::updateWindowCallState() ...@@ -443,6 +448,7 @@ void SFLPhoneView::updateWindowCallState()
enabledActions [ SFLPhone::Record ] = false ; enabledActions [ SFLPhone::Record ] = false ;
m_pMessageBoxW->setVisible(false) ; m_pMessageBoxW->setVisible(false) ;
break; break;
case CALL_STATE_BUSY: case CALL_STATE_BUSY:
enabledActions [ SFLPhone::Accept ] = false ; enabledActions [ SFLPhone::Accept ] = false ;
enabledActions [ SFLPhone::Hold ] = false ; enabledActions [ SFLPhone::Hold ] = false ;
...@@ -450,6 +456,7 @@ void SFLPhoneView::updateWindowCallState() ...@@ -450,6 +456,7 @@ void SFLPhoneView::updateWindowCallState()
enabledActions [ SFLPhone::Record ] = false ; enabledActions [ SFLPhone::Record ] = false ;
m_pMessageBoxW->setVisible(false) ; m_pMessageBoxW->setVisible(false) ;
break; break;
case CALL_STATE_TRANSFERRED: case CALL_STATE_TRANSFERRED:
buttonIconFiles [ SFLPhone::Accept ] = ICON_EXEC_TRANSF ; buttonIconFiles [ SFLPhone::Accept ] = ICON_EXEC_TRANSF ;
actionTexts [ SFLPhone::Transfer ] = ACTION_LABEL_GIVE_UP_TRANSF ; actionTexts [ SFLPhone::Transfer ] = ACTION_LABEL_GIVE_UP_TRANSF ;
...@@ -457,6 +464,7 @@ void SFLPhoneView::updateWindowCallState() ...@@ -457,6 +464,7 @@ void SFLPhoneView::updateWindowCallState()
m_pMessageBoxW->setVisible(false || IM_ACTIVE) ; m_pMessageBoxW->setVisible(false || IM_ACTIVE) ;
transfer = true; transfer = true;
break; break;
case CALL_STATE_TRANSF_HOLD: case CALL_STATE_TRANSF_HOLD:
buttonIconFiles [ SFLPhone::Accept ] = ICON_EXEC_TRANSF ; buttonIconFiles [ SFLPhone::Accept ] = ICON_EXEC_TRANSF ;
buttonIconFiles [ SFLPhone::Hold ] = ICON_UNHOLD ; buttonIconFiles [ SFLPhone::Hold ] = ICON_UNHOLD ;
...@@ -465,25 +473,31 @@ void SFLPhoneView::updateWindowCallState() ...@@ -465,25 +473,31 @@ void SFLPhoneView::updateWindowCallState()
m_pMessageBoxW->setVisible(false) ; m_pMessageBoxW->setVisible(false) ;
transfer = true; transfer = true;
break; break;
case CALL_STATE_OVER: case CALL_STATE_OVER:
kDebug() << "Error : Reached CALL_STATE_OVER with call " << call->getCallId() << "!"; kDebug() << "Error : Reached CALL_STATE_OVER with call " << call->getCallId() << "!";
m_pMessageBoxW->setVisible(false) ; m_pMessageBoxW->setVisible(false) ;
break; break;
case CALL_STATE_ERROR: case CALL_STATE_ERROR:
kDebug() << "Error : Reached CALL_STATE_ERROR with call " << call->getCallId() << "!"; kDebug() << "Error : Reached CALL_STATE_ERROR with call " << call->getCallId() << "!";
m_pMessageBoxW->setVisible(false) ; m_pMessageBoxW->setVisible(false) ;
break; break;
case CALL_STATE_CONFERENCE: case CALL_STATE_CONFERENCE:
enabledActions [ SFLPhone::Transfer ] = false ; enabledActions [ SFLPhone::Transfer ] = false ;
m_pMessageBoxW->setVisible(false || IM_ACTIVE) ; m_pMessageBoxW->setVisible(false || IM_ACTIVE) ;
break; break;
case CALL_STATE_CONFERENCE_HOLD: case CALL_STATE_CONFERENCE_HOLD:
enabledActions [ SFLPhone::Transfer ] = false ; enabledActions [ SFLPhone::Transfer ] = false ;
m_pMessageBoxW->setVisible(false) ; m_pMessageBoxW->setVisible(false) ;
break; break;
default: default:
kDebug() << "Error : Reached unexisting state for call " << call->getCallId() << "(" << call->toHumanStateName() << "!"; kDebug() << "Error : Reached unexisting state for call " << call->getCallId() << "(" << call->toHumanStateName() << "!";
break; break;
} }
} }
......
...@@ -82,7 +82,7 @@ int main(int argc, char **argv) ...@@ -82,7 +82,7 @@ int main(int argc, char **argv)
//configuration dbus //configuration dbus
TreeWidgetCallModel::init(); TreeWidgetCallModel::init();
SFLPhone* sflphoneWindow_ = new SFLPhone(); SFLPhone* sflphoneWindow_ = new SFLPhone();
if( ! sflphoneWindow_->initialize() ) { if( ! sflphoneWindow_->initialize() ) {
exit(1); exit(1);
...@@ -96,13 +96,13 @@ int main(int argc, char **argv) ...@@ -96,13 +96,13 @@ int main(int argc, char **argv)
sflphoneWindow_->show(); sflphoneWindow_->show();
else else
sflphoneWindow_->hide(); sflphoneWindow_->hide();
int retVal = app->exec(); int retVal = app->exec();
delete sflphoneWindow_; delete sflphoneWindow_;
ConfigurationSkeleton::self()->writeConfig(); ConfigurationSkeleton::self()->writeConfig();
delete app; delete app;
return retVal; return retVal;
} }
......
/*************************************************************************** /***************************************************************************
* Copyright (C) 2009-2012 by Savoir-Faire Linux * * Copyright (C) 2009-2012 by Savoir-Faire Linux *
* Author : Emmanuel Lepage Valle <emmanuel.lepage@savoirfairelinux.com >* * Author : Emmanuel Lepage Valle <emmanuel.lepage@savoirfairelinux.com >*
* Nokia *
* * * *
* This program is free software; you can redistribute it and/or modify * * 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 * * it under the terms of the GNU General Public License as published by *
...@@ -26,9 +27,9 @@ ...@@ -26,9 +27,9 @@
#include <QtGui/QImage> #include <QtGui/QImage>
#include <QtCore/QPropertyAnimation> #include <QtCore/QPropertyAnimation>
static const qreal FACE_SIZE = 0.4; static const qreal FACE_SIZE = 0.4;
static const qreal speeds[] = { 1.8f, 2.4f, 3.6f }; static const qreal speeds[] = { 1.8f, 2.4f, 3.6f };
static const qreal amplitudes[] = { 2.0f, 2.5f, 3.0f }; static const qreal amplitudes[] = { 2.0f, 2.5f, 3.0f };
static inline void qSetColor(float colorVec[], QColor c) static inline void qSetColor(float colorVec[], QColor c)
......
/*************************************************************************** /***************************************************************************
* Copyright (C) 2009-2012 by Savoir-Faire Linux * * Copyright (C) 2009-2012 by Savoir-Faire Linux *
* Author : Emmanuel Lepage Valle <emmanuel.lepage@savoirfairelinux.com >* * Author : Emmanuel Lepage Valle <emmanuel.lepage@savoirfairelinux.com >*
* Nokia *
* * * *
* This program is free software; you can redistribute it and/or modify * * 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 * * it under the terms of the GNU General Public License as published by *
......
...@@ -69,26 +69,26 @@ BookmarkDock::BookmarkDock(QWidget* parent) : QDockWidget(parent) ...@@ -69,26 +69,26 @@ BookmarkDock::BookmarkDock(QWidget* parent) : QDockWidget(parent)
setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum); setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum);
setMinimumSize(250,0); setMinimumSize(250,0);
m_pFilterLE = new KLineEdit(this); m_pFilterLE = new KLineEdit ( this );
m_pSplitter = new QSplitter(Qt::Vertical,this); m_pSplitter = new QSplitter ( Qt::Vertical,this );
m_pItemView = new CategorizedTreeWidget(this); m_pItemView = new CategorizedTreeWidget( this );
m_pMostUsedCK = new QCheckBox(this); m_pMostUsedCK = new QCheckBox ( this );
QWidget* mainWidget = new QWidget ( this );
QVBoxLayout* mainLayout = new QVBoxLayout ( mainWidget );
m_pFilterLE->setPlaceholderText(i18n("Filter")); m_pFilterLE->setPlaceholderText(i18n("Filter"));
m_pMostUsedCK->setChecked(ConfigurationSkeleton::displayContactCallHistory()); m_pMostUsedCK->setChecked(ConfigurationSkeleton::displayContactCallHistory());
QWidget* mainWidget = new QWidget(this);
setWidget(mainWidget); setWidget(mainWidget);
m_pMostUsedCK->setText(i18n("Show most called contacts")); m_pMostUsedCK->setText(i18n("Show most called contacts"));
QVBoxLayout* mainLayout = new QVBoxLayout(mainWidget);
mainLayout->addWidget(m_pMostUsedCK); mainLayout->addWidget ( m_pMostUsedCK );
mainLayout->addWidget(m_pSplitter); mainLayout->addWidget ( m_pSplitter );
m_pSplitter->addWidget(m_pItemView); m_pSplitter->addWidget( m_pItemView );
mainLayout->addWidget(m_pFilterLE); mainLayout->addWidget ( m_pFilterLE );
m_pSplitter->setChildrenCollapsible(true); m_pSplitter->setChildrenCollapsible(true);
m_pSplitter->setStretchFactor(0,7); m_pSplitter->setStretchFactor(0,7);
......
...@@ -194,12 +194,14 @@ void CallTreeItem::setCall(Call *call) ...@@ -194,12 +194,14 @@ void CallTreeItem::setCall(Call *call)
baseColor.setRed (baseColor.red() + (textColor.red() -baseColor.red()) *0.6); baseColor.setRed (baseColor.red() + (textColor.red() -baseColor.red()) *0.6);
baseColor.setGreen(baseColor.green()+ (textColor.green()-baseColor.green())*0.6); baseColor.setGreen(baseColor.green()+ (textColor.green()-baseColor.green())*0.6);
m_pHistoryPeerL = new QLabel(i18n("<b>Conference</b>"),this); m_pHistoryPeerL = new QLabel( i18n("<b>Conference</b>"),this );
m_pHistoryPeerL->setStyleSheet("color:"+baseColor.name()); m_pIconL = new QLabel( " ",this );
m_pIconL = new QLabel(" ",this);
QHBoxLayout* mainLayout = new QHBoxLayout(); QHBoxLayout* mainLayout = new QHBoxLayout();
mainLayout->addWidget(m_pIconL); m_pHistoryPeerL->setStyleSheet("color:"+baseColor.name());
mainLayout->addWidget(m_pHistoryPeerL);
mainLayout->addWidget( m_pIconL );
mainLayout->addWidget( m_pHistoryPeerL );
setLayout(mainLayout); setLayout(mainLayout);
m_Init = true; m_Init = true;
} }
...@@ -213,35 +215,34 @@ void CallTreeItem::setCall(Call *call) ...@@ -213,35 +215,34 @@ void CallTreeItem::setCall(Call *call)
m_pTransferNumberL = new QLabel(" "); m_pTransferNumberL = new QLabel(" ");
m_pElapsedL = new QLabel(" "); m_pElapsedL = new QLabel(" ");
QSpacerItem* verticalSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Expanding); QSpacerItem* verticalSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Expanding);
m_pTransferPrefixL->setVisible(false); m_pTransferPrefixL->setVisible(false);
m_pTransferNumberL->setVisible(false); m_pTransferNumberL->setVisible(false);
QHBoxLayout* mainLayout = new QHBoxLayout(); QHBoxLayout* mainLayout = new QHBoxLayout();
mainLayout->setContentsMargins ( 3, 1, 2, 1); mainLayout->setContentsMargins ( 3, 1, 2, 1);
m_pBtnConf = new TranslucentButtons(this); m_pBtnConf = new TranslucentButtons(this);
m_pBtnConf->setVisible(false); m_pBtnConf->setVisible(false);
m_pBtnConf->setParent(this); m_pBtnConf->setParent(this);
m_pBtnConf->setText(i18n("Conference")); m_pBtnConf->setText(i18n("Conference"));
m_pBtnConf->setPixmap(new QImage(KStandardDirs::locate("data","sflphone-client-kde/confBlackWhite.png"))); m_pBtnConf->setPixmap(new QImage(KStandardDirs::locate("data","sflphone-client-kde/confBlackWhite.png")));
connect(m_pBtnConf,SIGNAL(dataDropped(QMimeData*)),this,SLOT(conversationEvent(QMimeData*))); connect(m_pBtnConf,SIGNAL(dataDropped(QMimeData*)),this,SLOT(conversationEvent(QMimeData*)));
m_pBtnTrans = new TranslucentButtons(this); m_pBtnTrans = new TranslucentButtons(this);
m_pBtnTrans->setText(i18n("Transfer")); m_pBtnTrans->setText(i18n("Transfer"));
m_pBtnTrans->setVisible(false); m_pBtnTrans->setVisible(false);
m_pBtnTrans->setPixmap(new QImage(KStandardDirs::locate("data","sflphone-client-kde/transferarraw.png"))); m_pBtnTrans->setPixmap(new QImage(KStandardDirs::locate("data","sflphone-client-kde/transferarraw.png")));
connect(m_pBtnTrans,SIGNAL(dataDropped(QMimeData*)),this,SLOT(transferEvent(QMimeData*))); connect(m_pBtnTrans,SIGNAL(dataDropped(QMimeData*)),this,SLOT(transferEvent(QMimeData*)));
m_pElapsedL->setStyleSheet("margin-right:5px;");