Less bugs, cleaner code, more little features

parent 6217daa9
......@@ -36,7 +36,7 @@
</Menu>
</MenuBar>
<ToolBar name="mainToolBar" position="Top" noMerge="1" fullWidth="true" newline="true" >
<ToolBar name="mainToolBar" iconText="icononly" position="Top" noMerge="1" fullWidth="false" newline="true" >
<Action name="action_accept" />
<Action name="action_mailBox" />
<Action name="action_refuse" />
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -160,7 +160,7 @@ Call::Call(QString confId, QString account)
this->confId = confId;
this->account = account;
}
#include <unistd.h>
Call * Call::buildExistingCall(QString callId)
{
CallManagerInterface & callManager = CallManagerInterfaceSingleton::getInstance();
......@@ -711,4 +711,10 @@ QString Call::getConfId() const {
void Call::setConfId(QString value) {
confId = value;
}
QString Call::getCurrentCodecName() {
CallManagerInterface & callManager = CallManagerInterfaceSingleton::getInstance();
qDebug() << "Codec name: " << callManager.getCurrentCodecName(callId); sleep(5);
return callManager.getCurrentCodecName(callId);
}
\ No newline at end of file
......@@ -258,6 +258,7 @@ public:
bool isHistory() const;
QString getStopTimeStamp() const;
QString getStartTimeStamp() const;
QString getCurrentCodecName();
bool isConference() const;
void setConference(bool value);
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
This diff is collapsed.
......@@ -33,7 +33,7 @@
/** Note from the author: It was previously done by a QAbstractModel + QTreeView, but the sip-call use case is incompatible
* with the MVC model. The MVC never got to a point were it was bug-free and the code was getting dirty. The QTreeWidget
* solution may be less "clean" than MVC, but is 3 time smaller and easier to improve.
* solution may be less "clean" than MVC, but is 3 time smaller and easier to improve (in fact, possible to improve).
*
* This model is the view itself (private inheritance) so drag and drop can interact directly with the model without cross
* layer hack. This call merge the content of 4 previous classes (CallTreeModel, CallTreeView, CallList and most of the
......@@ -55,8 +55,8 @@ struct InternalCallModelStruct;
class CallTreeItemDelegate : public QItemDelegate
{
public:
CallTreeItemDelegate() { }
QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index ) const { return QSize(0,60); }
CallTreeItemDelegate() { }
QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index ) const { return QSize(0,60); }
};
......@@ -91,6 +91,7 @@ class CallModel : private QTreeWidget {
bool addParticipant(Call* call2, Call* conference);
bool detachParticipant(Call* call);
void conferenceChanged(const QString &confId, const QString &state);
void conferenceRemoved(const QString &confId);
MapStringString getHistoryMap();
......
......@@ -25,6 +25,7 @@
#include <klocale.h>
#include <kdebug.h>
#include <unistd.h>
#include "sflphone_const.h"
#include "CallTreeItem.h"
......@@ -32,7 +33,7 @@
const char * CallTreeItem::callStateIcons[12] = {ICON_INCOMING, ICON_RINGING, ICON_CURRENT, ICON_DIALING, ICON_HOLD, ICON_FAILURE, ICON_BUSY, ICON_TRANSFER, ICON_TRANSF_HOLD, "", "", ICON_CONFERENCE};
CallTreeItem::CallTreeItem(QWidget *parent)
: itemCall(0), QWidget(parent)
: itemCall(0), QWidget(parent), init(false)
{
}
......@@ -50,6 +51,22 @@ Call* CallTreeItem::call() const
void CallTreeItem::setCall(Call *call)
{
itemCall = call;
if (itemCall->isConference()) {
if (!init) {
labelHistoryPeerName = new QLabel("Conference",this);
labelIcon = new QLabel("Icn",this);
QHBoxLayout* mainLayout = new QHBoxLayout();
mainLayout->addWidget(labelIcon);
mainLayout->addWidget(labelHistoryPeerName);
setLayout(mainLayout);
init = true;
}
labelIcon->setPixmap(QPixmap(ICON_CONFERENCE));
labelIcon->setVisible(true);
labelHistoryPeerName->setVisible(true);
return;
}
labelIcon = new QLabel();
labelCallNumber2 = new QLabel(itemCall->getPeerPhoneNumber());
......@@ -60,6 +77,9 @@ void CallTreeItem::setCall(Call *call)
QHBoxLayout * mainLayout = new QHBoxLayout();
mainLayout->setContentsMargins ( 3, 1, 2, 1);
labelCodec = new QLabel(this);
labelCodec->setText("Codec: "+itemCall->getCurrentCodecName());
mainLayout->setSpacing(4);
QVBoxLayout * descr = new QVBoxLayout();
descr->setMargin(1);
......@@ -75,6 +95,7 @@ void CallTreeItem::setCall(Call *call)
}
descr->addWidget(labelCallNumber2);
descr->addWidget(labelCodec);
transfer->addWidget(labelTransferPrefix);
transfer->addWidget(labelTransferNumber);
descr->addLayout(transfer);
......@@ -92,9 +113,6 @@ void CallTreeItem::setCall(Call *call)
void CallTreeItem::updated()
{
if (itemCall->isConference())
return;
call_state state = itemCall->getState();
bool recording = itemCall->getRecording();
if(state != CALL_STATE_OVER) {
......@@ -122,10 +140,14 @@ void CallTreeItem::updated()
else {
qDebug() << "Updating item of call of state OVER. Doing nothing.";
}
}
void CallTreeItem::setConference(bool value) {
conference = value;
labelIcon->setPixmap(QPixmap(ICON_CONFERENCE));
//labelTransferNumber->setVisible(false);
//labelTransferPrefix->setVisible(false);
}
bool CallTreeItem::isConference() {
......
......@@ -62,14 +62,15 @@ class CallTreeItem : public QWidget
QLabel* labelCallNumber2;
QLabel* labelTransferPrefix;
QLabel* labelTransferNumber;
QLabel* labelCodec;
QWidget* historyItemWidget;
QLabel* labelHistoryIcon;
QLabel* labelHistoryPeerName;
QLabel* labelHistoryCallNumber;
QLabel* labelHistoryTime;
friend class CallTreeItem;
bool conference;
bool init;
public slots:
void updated();
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -119,6 +119,8 @@ SFLPhoneView::SFLPhoneView(QWidget *parent)
this, SLOT(on1_incomingConference(const QString &)));
connect(&callManager, SIGNAL(conferenceChanged(const QString &, const QString &)),
this, SLOT(on1_changingConference(const QString &, const QString &)));
connect(&callManager, SIGNAL(conferenceRemoved(const QString &)),
this, SLOT(on1_conferenceRemoved(const QString &)));
connect(&callManager, SIGNAL(incomingMessage(const QString &, const QString &)),
this, SLOT(on1_incomingMessage(const QString &, const QString &)));
connect(&callManager, SIGNAL(voiceMailNotify(const QString &, int)),
......@@ -1294,6 +1296,10 @@ void SFLPhoneView::on1_changingConference(const QString &confID, const QString &
callTreeModel.conferenceChanged(confID, state);
}
void SFLPhoneView::on1_conferenceRemoved(const QString &confId) {
callTreeModel.conferenceRemoved(confId);
}
void SFLPhoneView::on1_incomingMessage(const QString &accountID, const QString &message)
{
qDebug() << "Signal : Incoming Message for account " << accountID << " ! \nMessage : " << message;
......
......@@ -323,13 +323,13 @@ public slots:
void on_slider_recVol_valueChanged(int value);
void on_slider_sndVol_valueChanged(int value);
void on_slider_recVol_2_valueChanged(int value);
void on_slider_sndVol_2_valueChanged(int value);
void on_slider_recVol_2_valueChanged(int value);
void on_slider_sndVol_2_valueChanged(int value);
void on_toolButton_recVol_clicked(bool checked);
void on_toolButton_sndVol_clicked(bool checked);
void on_toolButton_recVol_2_clicked(bool checked);
void on_toolButton_sndVol_2_clicked(bool checked);
void on_toolButton_recVol_2_clicked(bool checked);
void on_toolButton_sndVol_2_clicked(bool checked);
void on_callTree_currentItemChanged();
void on_callTree_itemChanged();
......@@ -352,6 +352,7 @@ public slots:
void on1_audioManagerChanged();
void on1_incomingConference(const QString &confID);
void on1_changingConference(const QString &confID, const QString &state);
void on1_conferenceRemoved(const QString &confId);
void changeScreen(int screen);
signals:
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
<RCC>
<qresource prefix="images" >
<qresource prefix="images">
<file>../icons/user-group-properties.svgz</file>
<file>../icons/document-encrypt.svgz</file>
<file>../icons/sflphone.svg</file>
<file>../icons/sflphone-kde3.svg</file>
<file>../icons/sflphone_notif.svg</file>
......
......@@ -63,7 +63,7 @@
#define ICON_BUSY ":/images/icons/busy.svg"
#define ICON_TRANSFER ":/images/icons/transfert.svg"
#define ICON_TRANSF_HOLD ":/images/icons/transfert.svg"
#define ICON_CONFERENCE ":/images/icons/user-group-properties.svg"
#define ICON_CONFERENCE ":/images/icons/user-group-properties.svgz"
#define ICON_CALL ":/images/icons/call.svg"
#define ICON_HANGUP ":/images/icons/hang_up.svg"
......@@ -280,4 +280,7 @@
#define ZRTP "1"
#define SDES "2"
/** MIME API */
#define MIME_CALLID "text/sflphone.call.id"
#define MIME_PLAIN_TEXT "text/plain"
#endif
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment