mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
[#1771] Add a "Default" button in context menu to disable chosen prior account
+ changed icons + comments
This commit is contained in:
@ -20,10 +20,12 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "ActionSetAccountFirst.h"
|
||||
#include <klocale.h>
|
||||
|
||||
ActionSetAccountFirst::ActionSetAccountFirst(Account * account, QObject *parent)
|
||||
: QAction(account->getAlias(), parent)
|
||||
: QAction((account == NULL) ? i18n("Default account") : account->getAlias(), parent)
|
||||
{
|
||||
setCheckable(true);
|
||||
this->account = account;
|
||||
connect(this, SIGNAL(triggered()),
|
||||
this, SLOT(emitSetFirst()));
|
||||
|
@ -34,8 +34,10 @@ DlgAccounts::DlgAccounts(KConfigDialog *parent)
|
||||
|
||||
ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
|
||||
QStyle * style = QApplication::style();
|
||||
button_accountUp->setIcon(style->standardIcon(QStyle::SP_ArrowUp));
|
||||
button_accountDown->setIcon(style->standardIcon(QStyle::SP_ArrowDown));
|
||||
button_accountUp->setIcon(KIcon("go-up"));
|
||||
button_accountDown->setIcon(KIcon("go-down"));
|
||||
button_accountAdd->setIcon(KIcon("list-add"));
|
||||
button_accountRemove->setIcon(KIcon("list-remove"));
|
||||
loadAccountList();
|
||||
accountListHasChanged = false;
|
||||
toolButton_accountsApply->setEnabled(false);
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>603</width>
|
||||
<height>307</height>
|
||||
<height>314</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -119,12 +119,17 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Remove this account</string>
|
||||
<property name="toolTip">
|
||||
<string>This button will remove the selected account in the list below. Be sure you really don't need it anymore. If you think you might use it again later, just uncheck it.</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qrc/resources.qrc">
|
||||
<normaloff>:/images/icons/remove.png</normaloff>:/images/icons/remove.png</iconset>
|
||||
<property name="whatsThis">
|
||||
<string>Remove the selected account</string>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Backspace, Return</string>
|
||||
@ -145,17 +150,25 @@
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<property name="toolTip">
|
||||
<string>This button enables you to initialize a new account. You will then be able to edit it using the form on the right.</string>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string>Add a new account</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qrc/resources.qrc">
|
||||
<normaloff>:/images/icons/add.png</normaloff>:/images/icons/add.png</iconset>
|
||||
<property name="text">
|
||||
<string>Add</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="button_accountDown">
|
||||
<property name="toolTip">
|
||||
<string>Get this account down</string>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string>By default, when you place a call, sflphone will use the first account in this list which is "registered". Change the order of the accounts using the "Up" and "Down" arrows.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Down</string>
|
||||
</property>
|
||||
@ -163,6 +176,12 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="button_accountUp">
|
||||
<property name="toolTip">
|
||||
<string>Get this account up</string>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string>By default, when you place a call, sflphone will use the first account in this list which is "registered". Change the order of the accounts using the "Up" and "Down" arrows.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Up</string>
|
||||
</property>
|
||||
@ -227,6 +246,12 @@
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="edit1_alias">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
@ -368,10 +393,19 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="kcfg_stunServer">
|
||||
<widget class="KLineEdit" name="kcfg_stunServer">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="squeezedTextEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="clickMessage">
|
||||
<string>choose Stun server (example : stunserver.org)</string>
|
||||
</property>
|
||||
<property name="showClearButton" stdset="0">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -381,23 +415,30 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>KLineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>klineedit.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../qrc/resources.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>kcfg_enableStun</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<signal>clicked(bool)</signal>
|
||||
<receiver>kcfg_stunServer</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>75</x>
|
||||
<y>274</y>
|
||||
<x>71</x>
|
||||
<y>273</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>145</x>
|
||||
<y>274</y>
|
||||
<x>167</x>
|
||||
<y>278</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
|
@ -41,8 +41,8 @@ DlgAudio::DlgAudio(KConfigDialog *parent)
|
||||
KUrlRequester_ringtone->lineEdit()->setObjectName("kcfg_ringtone");
|
||||
|
||||
codecTableHasChanged = false;
|
||||
toolButton_codecUp->setIcon(style->standardIcon(QStyle::SP_ArrowUp));
|
||||
toolButton_codecDown->setIcon(style->standardIcon(QStyle::SP_ArrowDown));
|
||||
toolButton_codecUp->setIcon(KIcon("go-up"));
|
||||
toolButton_codecDown->setIcon(KIcon("go-down"));
|
||||
tableWidget_codecs->verticalHeader()->hide();
|
||||
tableWidget_codecs->setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||
|
||||
|
@ -36,13 +36,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="kcfg_enableRingtones">
|
||||
<property name="text">
|
||||
<string>Enable ringtones</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="KComboBox" name="kcfg_interface">
|
||||
<item>
|
||||
@ -57,6 +50,13 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="kcfg_enableRingtones">
|
||||
<property name="text">
|
||||
<string>Enable ringtones</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="KUrlRequester" name="KUrlRequester_ringtone"/>
|
||||
</item>
|
||||
|
@ -65,7 +65,14 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="kcfg_hooksSIPHeader"/>
|
||||
<widget class="QLineEdit" name="kcfg_hooksSIPHeader">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@ -103,7 +110,14 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="KLineEdit" name="kcfg_hooksCommand"/>
|
||||
<widget class="KLineEdit" name="kcfg_hooksCommand">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@ -140,7 +154,14 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="KLineEdit" name="kcfg_prepend"/>
|
||||
<widget class="KLineEdit" name="kcfg_prepend">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
@ -37,7 +37,14 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="KUrlRequester" name="KUrlRequester_destinationFolder"/>
|
||||
<widget class="KUrlRequester" name="KUrlRequester_destinationFolder">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
@ -59,6 +59,8 @@ sflphone_kdeView::sflphone_kdeView(QWidget *parent)
|
||||
{
|
||||
setupUi(this);
|
||||
|
||||
action_configureSflPhone->setIcon(KIcon("preferences-other"));
|
||||
|
||||
ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
|
||||
CallManagerInterface & callManager = CallManagerInterfaceSingleton::getInstance();
|
||||
|
||||
@ -147,10 +149,6 @@ void sflphone_kdeView::loadWindow()
|
||||
}
|
||||
|
||||
|
||||
QVector<Account *> sflphone_kdeView::registeredAccounts()
|
||||
{
|
||||
return accountList->registeredAccounts();
|
||||
}
|
||||
|
||||
Account * sflphone_kdeView::firstRegisteredAccount()
|
||||
{
|
||||
@ -308,11 +306,11 @@ void sflphone_kdeView::escape()
|
||||
int state = call->getState();
|
||||
if(state == CALL_STATE_TRANSFER || state == CALL_STATE_TRANSF_HOLD)
|
||||
{
|
||||
actionb(call, CALL_ACTION_TRANSFER);
|
||||
action(call, CALL_ACTION_TRANSFER);
|
||||
}
|
||||
else
|
||||
{
|
||||
actionb(call, CALL_ACTION_REFUSE);
|
||||
action(call, CALL_ACTION_REFUSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -352,7 +350,7 @@ void sflphone_kdeView::enter()
|
||||
int state = call->getState();
|
||||
if(state == CALL_STATE_INCOMING || state == CALL_STATE_DIALING || state == CALL_STATE_TRANSFER || state == CALL_STATE_TRANSF_HOLD)
|
||||
{
|
||||
actionb(call, CALL_ACTION_ACCEPT);
|
||||
action(call, CALL_ACTION_ACCEPT);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -383,7 +381,7 @@ void sflphone_kdeView::enter()
|
||||
call->appendItemText(pastCall->getPeerPhoneNumber());
|
||||
addCallToCallList(call);
|
||||
listWidget_callList->setCurrentRow(listWidget_callList->count() - 1);
|
||||
actionb(call, CALL_ACTION_ACCEPT);
|
||||
action(call, CALL_ACTION_ACCEPT);
|
||||
}
|
||||
}
|
||||
if(stackedWidget_screen->currentWidget() == page_addressBook)
|
||||
@ -403,29 +401,32 @@ void sflphone_kdeView::enter()
|
||||
call->appendItemText(w->getContactNumber());
|
||||
addCallToCallList(call);
|
||||
listWidget_callList->setCurrentRow(listWidget_callList->count() - 1);
|
||||
actionb(call, CALL_ACTION_ACCEPT);
|
||||
action(call, CALL_ACTION_ACCEPT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sflphone_kdeView::actionb(Call * call, call_action action)
|
||||
void sflphone_kdeView::action(Call * call, call_action action)
|
||||
{
|
||||
try
|
||||
if(! call)
|
||||
{
|
||||
call->actionPerformed(action);
|
||||
qDebug() << "Error : action " << action << "applied on null object call. Should not happen.";
|
||||
}
|
||||
catch(const char * msg)
|
||||
else
|
||||
{
|
||||
errorWindow->showMessage(QString(msg));
|
||||
try
|
||||
{
|
||||
call->actionPerformed(action);
|
||||
}
|
||||
catch(const char * msg)
|
||||
{
|
||||
errorWindow->showMessage(QString(msg));
|
||||
}
|
||||
updateCallItem(call);
|
||||
updateWindowCallState();
|
||||
}
|
||||
updateCallItem(call);
|
||||
updateWindowCallState();
|
||||
}
|
||||
|
||||
void sflphone_kdeView::action(QListWidgetItem * item, call_action action)
|
||||
{
|
||||
actionb(callList->findCallByItem(item), action);
|
||||
}
|
||||
|
||||
/*******************************************
|
||||
******** Update Display Functions **********
|
||||
@ -998,10 +999,10 @@ void sflphone_kdeView::on_listWidget_callList_itemDoubleClicked(QListWidgetItem
|
||||
switch(state)
|
||||
{
|
||||
case CALL_STATE_HOLD:
|
||||
actionb(call, CALL_ACTION_HOLD);
|
||||
action(call, CALL_ACTION_HOLD);
|
||||
break;
|
||||
case CALL_STATE_DIALING:
|
||||
actionb(call, CALL_ACTION_ACCEPT);
|
||||
action(call, CALL_ACTION_ACCEPT);
|
||||
break;
|
||||
default:
|
||||
qDebug() << "Double clicked an item with no action on double click.";
|
||||
@ -1018,7 +1019,7 @@ void sflphone_kdeView::on_listWidget_callHistory_itemDoubleClicked(QListWidgetIt
|
||||
call->appendItemText(pastCall->getPeerPhoneNumber());
|
||||
addCallToCallList(call);
|
||||
listWidget_callList->setCurrentRow(listWidget_callList->count() - 1);
|
||||
actionb(call, CALL_ACTION_ACCEPT);
|
||||
action(call, CALL_ACTION_ACCEPT);
|
||||
}
|
||||
|
||||
|
||||
@ -1032,7 +1033,7 @@ void sflphone_kdeView::on_listWidget_addressBook_itemDoubleClicked(QListWidgetIt
|
||||
call->appendItemText(w->getContactNumber());
|
||||
addCallToCallList(call);
|
||||
listWidget_callList->setCurrentRow(listWidget_callList->count() - 1);
|
||||
actionb(call, CALL_ACTION_ACCEPT);
|
||||
action(call, CALL_ACTION_ACCEPT);
|
||||
}
|
||||
|
||||
void sflphone_kdeView::on_stackedWidget_screen_currentChanged(int index)
|
||||
@ -1079,18 +1080,20 @@ void sflphone_kdeView::contextMenuEvent(QContextMenuEvent *event)
|
||||
menu.addAction(action_transfer);
|
||||
menu.addAction(action_record);
|
||||
menu.addSeparator();
|
||||
QVector<Account *> accounts = registeredAccounts();
|
||||
|
||||
QAction * action = new ActionSetAccountFirst(NULL, &menu);
|
||||
action->setChecked(priorAccountId.isEmpty());
|
||||
connect(action, SIGNAL(setFirst(Account *)),
|
||||
this , SLOT(setAccountFirst(Account *)));
|
||||
menu.addAction(action);
|
||||
|
||||
QVector<Account *> accounts = accountList->registeredAccounts();
|
||||
for (int i = 0 ; i < accounts.size() ; i++)
|
||||
{
|
||||
qDebug() << i;
|
||||
Account * account = accounts.at(i);
|
||||
QAction * action = new ActionSetAccountFirst(account, &menu);
|
||||
action->setCheckable(true);
|
||||
action->setChecked(false);
|
||||
if(account == firstRegisteredAccount())
|
||||
{
|
||||
action->setChecked(true);
|
||||
}
|
||||
action->setChecked(account->getAccountId() == priorAccountId);
|
||||
connect(action, SIGNAL(setFirst(Account *)),
|
||||
this , SLOT(setAccountFirst(Account *)));
|
||||
menu.addAction(action);
|
||||
@ -1124,6 +1127,8 @@ void sflphone_kdeView::editBeforeCall()
|
||||
number = w->getContactNumber();
|
||||
}
|
||||
}
|
||||
else
|
||||
{ return; }
|
||||
QString newNumber = QInputDialog::getText(this, i18n("Edit before call"), QString(), QLineEdit::Normal, number);
|
||||
|
||||
action_history->setChecked(false);
|
||||
@ -1133,14 +1138,21 @@ void sflphone_kdeView::editBeforeCall()
|
||||
call->appendItemText(newNumber);
|
||||
addCallToCallList(call);
|
||||
listWidget_callList->setCurrentRow(listWidget_callList->count() - 1);
|
||||
actionb(call, CALL_ACTION_ACCEPT);
|
||||
action(call, CALL_ACTION_ACCEPT);
|
||||
}
|
||||
|
||||
void sflphone_kdeView::setAccountFirst(Account * account)
|
||||
{
|
||||
qDebug() << "setAccountFirst : " << account->getAlias();
|
||||
qDebug() << "setAccountFirst : " << (account ? account->getAlias() : QString());
|
||||
// getAccountList()->setAccountFirst(account);
|
||||
priorAccountId = account->getAccountId();
|
||||
if(account)
|
||||
{
|
||||
priorAccountId = account->getAccountId();
|
||||
}
|
||||
else
|
||||
{
|
||||
priorAccountId = QString();
|
||||
}
|
||||
updateStatusMessage();
|
||||
}
|
||||
|
||||
@ -1156,19 +1168,6 @@ void sflphone_kdeView::on_listWidget_addressBook_currentItemChanged()
|
||||
updateWindowCallState();
|
||||
}
|
||||
|
||||
// void sflphone_kdeView::on_action_configureAccounts_triggered()
|
||||
// {
|
||||
// configDialog->readSettings();
|
||||
// configDialog->setPage(PAGE_ACCOUNTS);
|
||||
// configDialog->show();
|
||||
// }
|
||||
|
||||
// void sflphone_kdeView::on_action_configureAudio_triggered()
|
||||
// {
|
||||
// configDialog->readSettings();
|
||||
// configDialog->setPage(PAGE_AUDIO);
|
||||
// configDialog->show();
|
||||
// }
|
||||
|
||||
void sflphone_kdeView::on_action_configureSflPhone_triggered()
|
||||
{
|
||||
@ -1213,7 +1212,7 @@ void sflphone_kdeView::on_action_accept_triggered()
|
||||
}
|
||||
else
|
||||
{
|
||||
actionb(call, CALL_ACTION_ACCEPT);
|
||||
action(call, CALL_ACTION_ACCEPT);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1228,7 +1227,7 @@ void sflphone_kdeView::on_action_accept_triggered()
|
||||
call->appendItemText(pastCall->getPeerPhoneNumber());
|
||||
addCallToCallList(call);
|
||||
listWidget_callList->setCurrentRow(listWidget_callList->count() - 1);
|
||||
actionb(call, CALL_ACTION_ACCEPT);
|
||||
action(call, CALL_ACTION_ACCEPT);
|
||||
}
|
||||
if(stackedWidget_screen->currentWidget() == page_addressBook)
|
||||
{
|
||||
@ -1239,7 +1238,7 @@ void sflphone_kdeView::on_action_accept_triggered()
|
||||
call->appendItemText(w->getContactNumber());
|
||||
addCallToCallList(call);
|
||||
listWidget_callList->setCurrentRow(listWidget_callList->count() - 1);
|
||||
actionb(call, CALL_ACTION_ACCEPT);
|
||||
action(call, CALL_ACTION_ACCEPT);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1254,7 +1253,7 @@ void sflphone_kdeView::on_action_refuse_triggered()
|
||||
}
|
||||
else
|
||||
{
|
||||
action(item, CALL_ACTION_REFUSE);
|
||||
action(callList->findCallByItem(item), CALL_ACTION_REFUSE);
|
||||
}
|
||||
}
|
||||
if(stackedWidget_screen->currentWidget() == page_callHistory)
|
||||
@ -1276,7 +1275,7 @@ void sflphone_kdeView::on_action_hold_triggered()
|
||||
}
|
||||
else
|
||||
{
|
||||
action(item, CALL_ACTION_HOLD);
|
||||
action(callList->findCallByItem(item), CALL_ACTION_HOLD);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1289,7 +1288,7 @@ void sflphone_kdeView::on_action_transfer_triggered()
|
||||
}
|
||||
else
|
||||
{
|
||||
action(item, CALL_ACTION_TRANSFER);
|
||||
action(callList->findCallByItem(item), CALL_ACTION_TRANSFER);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1302,7 +1301,7 @@ void sflphone_kdeView::on_action_record_triggered()
|
||||
}
|
||||
else
|
||||
{
|
||||
action(item, CALL_ACTION_RECORD);
|
||||
action(callList->findCallByItem(item), CALL_ACTION_RECORD);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1345,7 +1344,7 @@ void sflphone_kdeView::on_action_mailBox_triggered()
|
||||
call->appendItemText(mailBoxNumber);
|
||||
addCallToCallList(call);
|
||||
listWidget_callList->setCurrentRow(listWidget_callList->count() - 1);
|
||||
actionb(call, CALL_ACTION_ACCEPT);
|
||||
action(call, CALL_ACTION_ACCEPT);
|
||||
}
|
||||
|
||||
void sflphone_kdeView::on1_callStateChanged(const QString &callID, const QString &state)
|
||||
|
@ -97,17 +97,13 @@ public:
|
||||
* @return the account to use if an outgoing call is placed.
|
||||
*/
|
||||
static Account * firstRegisteredAccount();
|
||||
/**
|
||||
*
|
||||
* @return the list of registered accounts in accountList
|
||||
*/
|
||||
static QVector<Account *> registeredAccounts();
|
||||
|
||||
static AccountList * getAccountList();
|
||||
QErrorMessage * getErrorWindow();
|
||||
|
||||
//Daemon getters
|
||||
/**
|
||||
* Useful to sort contacts according to their types with Kabc.
|
||||
* Used to sort contacts according to their types with Kabc.
|
||||
* @return the integer resulting to the flags of the types
|
||||
* chosen to be displayed in SFLPhone configuration.
|
||||
*/
|
||||
@ -117,26 +113,100 @@ public:
|
||||
QVector<Contact *> findContactsInKAddressBook(QString textSearched, bool & full);
|
||||
|
||||
private slots:
|
||||
void actionb(Call * call, call_action action);
|
||||
void action(QListWidgetItem * item, call_action action);
|
||||
/**
|
||||
* Performs the action action on the call call, then updates window.
|
||||
* The call object will handle the action with its "actionPerformed" method.
|
||||
* See the documentation for more details.
|
||||
* @param call the call on which to perform the action
|
||||
* @param action the code of the action to perform
|
||||
*/
|
||||
void action(Call * call, call_action action);
|
||||
|
||||
/**
|
||||
* Sets the account account to be the prior account.
|
||||
* That means it's gonna be used when the user places a call
|
||||
* if it's defined and registered, else the first registered of
|
||||
* accountList will be used.
|
||||
* @param account the account to use prior
|
||||
*/
|
||||
void setAccountFirst(Account * account);
|
||||
|
||||
//void typeChar(QChar c);
|
||||
/**
|
||||
* Handles the behaviour when the user types something with
|
||||
* the dialpad widget or his keyboard (normally it's a one char
|
||||
* string but we use a string just in case).
|
||||
* Adds str to the selected item if in the main window
|
||||
* and creates a new item if no item is selected.
|
||||
* Send DTMF if appropriate according to current item's state.
|
||||
* Adds str to the search bar if in history or address book.
|
||||
* @param str the string sent by the user
|
||||
*/
|
||||
void typeString(QString str);
|
||||
/**
|
||||
* Handles the behaviour when the user types a backspace
|
||||
* according to the current state (window, item selected...)
|
||||
*/
|
||||
void backspace();
|
||||
/**
|
||||
* Handles the behaviour when the user types escape
|
||||
* according to the current state (window, item selected...)
|
||||
*/
|
||||
void escape();
|
||||
/**
|
||||
* Handles the behaviour when the user types enter
|
||||
* according to the current state (window, item selected...)
|
||||
*/
|
||||
void enter();
|
||||
/**
|
||||
* Displays a message window with editable text of the selected
|
||||
* phone number in history or address book.
|
||||
* Once the user accepts, place a call with the chosen phone number.
|
||||
* Keeps the peer name of the contact or past call.
|
||||
*/
|
||||
void editBeforeCall();
|
||||
|
||||
/**
|
||||
* Alternates colors of the list widget with the application's palettes's
|
||||
* base and alternateBase colors.
|
||||
* @param listWidget the list widget to which we alternate colors
|
||||
*/
|
||||
void alternateColors(QListWidget * listWidget);
|
||||
|
||||
/**
|
||||
* Adds the call's item to the call-list's listwidget.
|
||||
* This function doesn't add anything to the callList object.
|
||||
* @param call the call to add to the call-list's listwidget
|
||||
*/
|
||||
void addCallToCallList(Call * call);
|
||||
/**
|
||||
* Adds the call's history-item to the call-history's listwidget.
|
||||
* This function doesn't add anything to the callList object.
|
||||
* @param call the past call to add to the call-history's listwidget
|
||||
*/
|
||||
void addCallToCallHistory(Call * call);
|
||||
/**
|
||||
* Adds the contact's item to the addressbook's listwidget.
|
||||
* @param contact the contact to add to the addressbook's listwidget
|
||||
*/
|
||||
void addContactToContactList(Contact * contact);
|
||||
|
||||
/**
|
||||
* Updates call's item according to its state.
|
||||
* (Actually it only deletes the item from the main window's
|
||||
* list widget once the call is OVER.)
|
||||
* @param call the call to which update the item
|
||||
*/
|
||||
void updateCallItem(Call * call);
|
||||
/**
|
||||
* Updates the toolbar's actions' display according to the selected
|
||||
* item's state.
|
||||
*/
|
||||
void updateWindowCallState();
|
||||
/**
|
||||
* Updates the history's search bar's display according to the current
|
||||
* text searched.
|
||||
* If empty, hide the search bar.
|
||||
*/
|
||||
void updateSearchHistory();
|
||||
void updateCallHistory();
|
||||
void updateAddressBook();
|
||||
|
@ -51,7 +51,11 @@
|
||||
<widget class="QListWidget" name="listWidget_callHistory"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_searchHistory"/>
|
||||
<widget class="KLineEdit" name="lineEdit_searchHistory">
|
||||
<property name="showClearButton" stdset="0">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@ -61,7 +65,11 @@
|
||||
<widget class="QListWidget" name="listWidget_addressBook"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_addressBook"/>
|
||||
<widget class="KLineEdit" name="lineEdit_addressBook">
|
||||
<property name="showClearButton" stdset="0">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_addressBookFull">
|
||||
@ -386,10 +394,6 @@
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_configureSflPhone">
|
||||
<property name="icon">
|
||||
<iconset resource="../qrc/resources.qrc">
|
||||
<normaloff>:/images/icons/sflphone.svg</normaloff>:/images/icons/sflphone.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Configure SFLPhone</string>
|
||||
</property>
|
||||
@ -460,6 +464,11 @@
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>KLineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>klineedit.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Dialpad</class>
|
||||
<extends>QWidget</extends>
|
||||
|
Reference in New Issue
Block a user