diff --git a/src/AccountList.cpp b/src/AccountList.cpp index 2464ec0a77e73fb276b54de7168adbcd7d24043c..9519faf9cabb433a1693685f8fe8bedfaa5388ef 100644 --- a/src/AccountList.cpp +++ b/src/AccountList.cpp @@ -73,29 +73,6 @@ void AccountList::updateAccounts() emit accountListUpdated(); } -//void AccountList::upAccount(int index) -//{ -// if(index <= 0 || index >= size()) { -// qDebug() << "Error : index or future index out of range in upAccount."; -// return; -// } -// Account* account = getAccountAt(index); -// accounts->remove(index); -// accounts->insert(index - 1, account); -//} - -//void AccountList::downAccount(int index) -//{ -// if(index < 0 || index >= size() - 1) { -// qDebug() << "Error : index or future index out of range in upAccount."; -// return; -// } -// Account* account = getAccountAt(index); -// accounts->remove(index); -// accounts->insert(index + 1, account); -//} - - QString AccountList::getOrderedList() const { QString order; diff --git a/src/Call.cpp b/src/Call.cpp index 5437f16324757a6168188e7f3072dbe5a6c7c5d3..3cc6d16ca3007a5a0c3ab226805e4a005ced0511 100644 --- a/src/Call.cpp +++ b/src/Call.cpp @@ -17,7 +17,7 @@ * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ + **************************************************************************/ #include "Call.h" #include "CallModel.h" @@ -94,46 +94,6 @@ const function Call::stateChangedFunctionMap[11][6] = const char * Call::historyIcons[3] = {ICON_HISTORY_INCOMING, ICON_HISTORY_OUTGOING, ICON_HISTORY_MISSED}; -/*void Call::initCallItemWidget() -{ - itemWidget = new QWidget(); - labelIcon = new QLabel(); - labelCallNumber = new QLabel(peerPhoneNumber); - labelTransferPrefix = new QLabel(i18n("Transfer to : ")); - labelTransferNumber = new QLabel(); - QSpacerItem * horizontalSpacer = new QSpacerItem(16777215, 20, QSizePolicy::Preferred, QSizePolicy::Minimum); - - QHBoxLayout * mainLayout = new QHBoxLayout(); - mainLayout->setContentsMargins ( 3, 1, 2, 1); - mainLayout->setSpacing(4); - QVBoxLayout * descr = new QVBoxLayout(); - descr->setMargin(1); - descr->setSpacing(1); - QHBoxLayout * transfer = new QHBoxLayout(); - transfer->setMargin(0); - transfer->setSpacing(0); - mainLayout->addWidget(labelIcon); - if(! peerName.isEmpty()) - { - labelPeerName = new QLabel(peerName); - descr->addWidget(labelPeerName); - } - descr->addWidget(labelCallNumber); - transfer->addWidget(labelTransferPrefix); - transfer->addWidget(labelTransferNumber); - descr->addLayout(transfer); - mainLayout->addLayout(descr); - mainLayout->addItem(horizontalSpacer); - - itemWidget->setLayout(mainLayout); -}*/ - - /*void Call::setItemIcon(const QString pixmap) -{ - labelIcon->setPixmap(QPixmap(pixmap)); - }*/ - - Call::Call(call_state startState, QString callId, QString peerName, QString peerNumber, QString account) : conference(false) { @@ -304,11 +264,6 @@ daemon_call_state Call::toDaemonCallState(const QString & stateName) return DAEMON_CALL_STATE_FAILURE; } -/*QWidget * Call::getItemWidget() -{ - return itemWidget; - }*/ - QString Call::getStopTimeStamp() const { if (stopTime == NULL) @@ -343,41 +298,6 @@ void Call::setCallNumber(QString number) callNumber = number; emit changed(); } - - -/*QWidget * Call::getHistoryItemWidget() -{ - historyItemWidget = new QWidget(); - labelHistoryIcon = new QLabel(); - labelHistoryIcon->setPixmap(QPixmap(historyIcons[historyState])); - labelHistoryCallNumber = new QLabel(peerPhoneNumber); - if(startTime) - labelHistoryTime = new QLabel(startTime->toString(Qt::LocaleDate)); - else - labelHistoryTime = new QLabel(); - QSpacerItem * horizontalSpacer = new QSpacerItem(16777215, 20, QSizePolicy::Preferred, QSizePolicy::Minimum); - - QHBoxLayout * mainLayout = new QHBoxLayout(); - mainLayout->setContentsMargins ( 3, 1, 2, 1); - mainLayout->setSpacing(4); - QVBoxLayout * descr = new QVBoxLayout(); - descr->setMargin(1); - descr->setSpacing(1); - descr->setMargin(0); - descr->setSpacing(1); - mainLayout->addWidget(labelHistoryIcon); - if(! peerName.isEmpty()) - { - labelHistoryPeerName = new QLabel(peerName); - descr->addWidget(labelHistoryPeerName); - } - descr->addWidget(labelHistoryCallNumber); - descr->addWidget(labelHistoryTime); - mainLayout->addLayout(descr); - mainLayout->addItem(horizontalSpacer); - historyItemWidget->setLayout(mainLayout); - return historyItemWidget; - }*/ call_state Call::getState() const { @@ -548,7 +468,7 @@ void Call::call() callManager.placeCall(account, callId, callNumber); this->account = account; this->peerPhoneNumber = callNumber; -// Contact * contact = findContactForNumberInKAddressBook(peerPhoneNumber); +// Contact * contact = findContactForNumberInKAddressBook(peerPhoneNumber); //TODO port // if(contact) this->peerName = contact->getNickName(); this->startTime = new QDateTime(QDateTime::currentDateTime()); this->historyState = OUTGOING; diff --git a/src/CallModel.hpp b/src/CallModel.hpp index 56c625c094044cb0baa495b94bdbaefa2adb7a40..a04ec7407a0b3218c448a6b67aba8cebd7b2972b 100644 --- a/src/CallModel.hpp +++ b/src/CallModel.hpp @@ -7,8 +7,6 @@ template <typename CallWidget, typename Index> bool CallModel<CallWidget,Index> template <typename CallWidget, typename Index> QHash<QString, Call*> CallModel<CallWidget,Index>::activeCalls; template <typename CallWidget, typename Index> QHash<QString, Call*> CallModel<CallWidget,Index>::historyCalls; -// template <typename CallWidget, typename Index> QHash<Call*, InternalCallModelStruct* > CallModel<CallWidget,Index>::privateCallList_call; -// template <typename CallWidget, typename Index> QHash<QString, InternalCallModelStruct* > CallModel<CallWidget,Index>::privateCallList_callId;/* template <typename CallWidget, typename Index> typename CallModel<CallWidget,Index>::InternalCall CallModel<CallWidget,Index>::privateCallList_call; template <typename CallWidget, typename Index> typename CallModel<CallWidget,Index>::InternalCallId CallModel<CallWidget,Index>::privateCallList_callId; template <typename CallWidget, typename Index> typename CallModel<CallWidget,Index>::InternalIndex CallModel<CallWidget,Index>::privateCallList_index; @@ -90,12 +88,6 @@ template<typename CallWidget, typename Index> bool CallModel<CallWidget,Index>:: historyCalls[time_start] = Call::buildHistoryCall(callID, time_start.toUInt(), time_stop.toUInt(), accountID, peer_name, peer_number, history_state); addCall(historyCalls[time_start]); } - -// QString type2 = param[0]; -// QString number = param[1]; -// QString name = param[2]; -// uint stopTimeStamp = param[3].toUInt(); -// QString account = param[4]; } } historyInit = true; diff --git a/src/Contact.cpp b/src/Contact.cpp index 21d18d14fedecbec5639fcc7e8cedd3927a3d4b1..768da13b001f49c85b8bbc869442ef3ed88de6c9 100644 --- a/src/Contact.cpp +++ b/src/Contact.cpp @@ -27,19 +27,6 @@ Contact::Contact() { -// this->firstName = addressee.name(); -// this->secondName = addressee.familyName(); -// this->nickName = addressee.nickName(); -// this->phoneNumber = number.number(); -// this->type = number.type(); -// this->displayPhoto = displayPhoto; -// if(displayPhoto) { -// this->photo = new Picture(addressee.photo()); -// } -// else { -// this->photo = NULL; -// } - initItem(); }