From 44291122779fe67b5845585b76b6da4e9c94dbd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Quentin?= <jquentin@jquentin-laptop-kub2.(none)> Date: Tue, 28 Apr 2009 16:57:39 -0400 Subject: [PATCH] #1219 : Add address book configuration page #1266 : Handle address book options #1206 : phoneNumberTypeDisplayed #1208 : Display the phone number type in address book #1217 : Improve items display in call list, history and address book #1186 : Pressing escape when transfering should cause back to "Current" status instead of "Over" #1185 : Change action texts when status change --- sflphone_kde/Call.cpp | 5 +- sflphone_kde/ConfigDialog.ui | 919 +++++++++++++------------- sflphone_kde/Contact.cpp | 26 +- sflphone_kde/Contact.h | 7 +- sflphone_kde/ContactItemWidget.cpp | 42 +- sflphone_kde/ContactItemWidget.h | 3 +- sflphone_kde/sflphone_const.h | 1 + sflphone_kde/sflphone_kdeview.cpp | 52 +- sflphone_kde/sflphone_kdeview.h | 5 +- sflphone_kde/sflphone_kdeview_base.ui | 9 +- 10 files changed, 564 insertions(+), 505 deletions(-) diff --git a/sflphone_kde/Call.cpp b/sflphone_kde/Call.cpp index 003e86d4bb..a9b3a11907 100644 --- a/sflphone_kde/Call.cpp +++ b/sflphone_kde/Call.cpp @@ -247,6 +247,9 @@ daemon_call_state Call::toDaemonCallState(const QString & stateName) Contact * Call::findContactForNumberInKAddressBook(QString number) { + ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); + MapStringInt addressBookSettings = configurationManager.getAddressbookSettings().value(); + bool displayPhoto = addressBookSettings[ADDRESSBOOK_DISPLAY_CONTACT_PHOTO]; AddressBook * ab = KABC::StdAddressBook::self(); QVector<Contact *> results = QVector<Contact *>(); AddressBook::Iterator it; @@ -255,7 +258,7 @@ Contact * Call::findContactForNumberInKAddressBook(QString number) { if(it->phoneNumbers().at(i) == number) { - return new Contact( *it, it->phoneNumbers().at(i).number() ); + return new Contact( *it, it->phoneNumbers().at(i), displayPhoto ); } } } diff --git a/sflphone_kde/ConfigDialog.ui b/sflphone_kde/ConfigDialog.ui index ca04689727..4c84ebd8b6 100644 --- a/sflphone_kde/ConfigDialog.ui +++ b/sflphone_kde/ConfigDialog.ui @@ -1,8 +1,9 @@ -<ui version="4.0" > +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> <author>Jérémy Quentin</author> <class>ConfigurationDialog</class> - <widget class="QDialog" name="ConfigurationDialog" > - <property name="geometry" > + <widget class="QDialog" name="ConfigurationDialog"> + <property name="geometry"> <rect> <x>0</x> <y>0</y> @@ -10,230 +11,230 @@ <height>449</height> </rect> </property> - <property name="minimumSize" > + <property name="minimumSize"> <size> <width>0</width> <height>0</height> </size> </property> - <property name="windowTitle" > + <property name="windowTitle"> <string>Configuration Dialog</string> </property> - <layout class="QVBoxLayout" name="verticalLayout" > - <property name="margin" > + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="margin"> <number>1</number> </property> <item> - <layout class="QHBoxLayout" name="horizontalLayoutDialog" > - <property name="sizeConstraint" > + <layout class="QHBoxLayout" name="horizontalLayoutDialog"> + <property name="sizeConstraint"> <enum>QLayout::SetDefaultConstraint</enum> </property> <item> - <widget class="QListWidget" name="list_options" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Expanding" hsizetype="Preferred" > + <widget class="QListWidget" name="list_options"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize" > + <property name="minimumSize"> <size> <width>100</width> <height>300</height> </size> </property> - <property name="maximumSize" > + <property name="maximumSize"> <size> <width>100</width> <height>16777215</height> </size> </property> - <property name="sizeIncrement" > + <property name="sizeIncrement"> <size> <width>0</width> <height>0</height> </size> </property> - <property name="mouseTracking" > + <property name="mouseTracking"> <bool>false</bool> </property> - <property name="contextMenuPolicy" > + <property name="contextMenuPolicy"> <enum>Qt::DefaultContextMenu</enum> </property> - <property name="acceptDrops" > + <property name="acceptDrops"> <bool>false</bool> </property> - <property name="layoutDirection" > + <property name="layoutDirection"> <enum>Qt::LeftToRight</enum> </property> - <property name="autoFillBackground" > + <property name="autoFillBackground"> <bool>true</bool> </property> - <property name="autoScrollMargin" > + <property name="autoScrollMargin"> <number>16</number> </property> - <property name="editTriggers" > + <property name="editTriggers"> <set>QAbstractItemView::AllEditTriggers</set> </property> - <property name="dragEnabled" > + <property name="dragEnabled"> <bool>true</bool> </property> - <property name="iconSize" > + <property name="iconSize"> <size> <width>200</width> <height>200</height> </size> </property> - <property name="textElideMode" > + <property name="textElideMode"> <enum>Qt::ElideMiddle</enum> </property> - <property name="verticalScrollMode" > + <property name="verticalScrollMode"> <enum>QAbstractItemView::ScrollPerItem</enum> </property> - <property name="horizontalScrollMode" > + <property name="horizontalScrollMode"> <enum>QAbstractItemView::ScrollPerItem</enum> </property> - <property name="movement" > + <property name="movement"> <enum>QListView::Static</enum> </property> - <property name="flow" > + <property name="flow"> <enum>QListView::TopToBottom</enum> </property> - <property name="resizeMode" > + <property name="resizeMode"> <enum>QListView::Adjust</enum> </property> - <property name="layoutMode" > + <property name="layoutMode"> <enum>QListView::SinglePass</enum> </property> - <property name="viewMode" > + <property name="viewMode"> <enum>QListView::IconMode</enum> </property> - <property name="modelColumn" > + <property name="modelColumn"> <number>0</number> </property> - <property name="uniformItemSizes" > + <property name="uniformItemSizes"> <bool>false</bool> </property> - <property name="wordWrap" > + <property name="wordWrap"> <bool>false</bool> </property> - <property name="sortingEnabled" > + <property name="sortingEnabled"> <bool>false</bool> </property> <item> - <property name="text" > + <property name="text"> <string>General</string> </property> </item> <item> - <property name="text" > + <property name="text"> <string>Display</string> </property> </item> <item> - <property name="text" > + <property name="text"> <string>Accounts</string> </property> </item> <item> - <property name="text" > + <property name="text"> <string>Audio</string> </property> </item> <item> - <property name="text" > + <property name="text"> <string>Record</string> </property> </item> <item> - <property name="text" > + <property name="text"> <string>Address Book</string> </property> </item> </widget> </item> <item> - <widget class="Line" name="line_ConfigGeneral_2" > - <property name="orientation" > + <widget class="Line" name="line_ConfigGeneral_2"> + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> </widget> </item> <item> - <widget class="Line" name="line_options" > - <property name="orientation" > + <widget class="Line" name="line_options"> + <property name="orientation"> <enum>Qt::Vertical</enum> </property> </widget> </item> <item> - <widget class="QStackedWidget" name="stackedWidget_options" > - <property name="currentIndex" > + <widget class="QStackedWidget" name="stackedWidget_options"> + <property name="currentIndex"> <number>5</number> </property> - <widget class="QWidget" name="page_general" > - <layout class="QVBoxLayout" name="verticalLayout_18" > - <property name="leftMargin" > + <widget class="QWidget" name="page_general"> + <layout class="QVBoxLayout" name="verticalLayout_18"> + <property name="leftMargin"> <number>4</number> </property> <item> - <widget class="QLabel" name="label_configGeneral" > - <property name="text" > + <widget class="QLabel" name="label_configGeneral"> + <property name="text"> <string>Configure general settings</string> </property> </widget> </item> <item> - <widget class="Line" name="line_configGeneral" > - <property name="orientation" > + <widget class="Line" name="line_configGeneral"> + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> </widget> </item> <item> - <widget class="QGroupBox" name="groupBox1_history" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Fixed" hsizetype="Preferred" > + <widget class="QGroupBox" name="groupBox1_history"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="title" > + <property name="title"> <string>Call history</string> </property> - <layout class="QVBoxLayout" name="verticalLayout_19" > + <layout class="QVBoxLayout" name="verticalLayout_19"> <item> - <widget class="QWidget" native="1" name="widget_historyCapacity" > - <layout class="QHBoxLayout" name="horizontalLayout_10" > + <widget class="QWidget" name="widget_historyCapacity" native="true"> + <layout class="QHBoxLayout" name="horizontalLayout_10"> <item> - <widget class="QLabel" name="label_historyCapacity" > - <property name="text" > + <widget class="QLabel" name="label_historyCapacity"> + <property name="text"> <string>&Capacity</string> </property> - <property name="buddy" > + <property name="buddy"> <cstring>horizontalSlider_historyCapacity</cstring> </property> </widget> </item> <item> - <widget class="QSlider" name="horizontalSlider_historyCapacity" > - <property name="maximum" > + <widget class="QSlider" name="horizontalSlider_historyCapacity"> + <property name="maximum"> <number>100</number> </property> - <property name="orientation" > + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> </widget> </item> <item> - <widget class="QSpinBox" name="spinBox_historyCapacity" /> + <widget class="QSpinBox" name="spinBox_historyCapacity"/> </item> </layout> </widget> </item> <item> - <widget class="QToolButton" name="toolButton_historyClear" > - <property name="text" > + <widget class="QToolButton" name="toolButton_historyClear"> + <property name="text"> <string>C&lear history</string> </property> </widget> @@ -242,64 +243,64 @@ </widget> </item> <item> - <widget class="QGroupBox" name="groupBox2_connection" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Fixed" hsizetype="Preferred" > + <widget class="QGroupBox" name="groupBox2_connection"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="title" > + <property name="title"> <string>Connection</string> </property> - <layout class="QFormLayout" name="formLayout_12" > - <property name="fieldGrowthPolicy" > + <layout class="QFormLayout" name="formLayout_12"> + <property name="fieldGrowthPolicy"> <enum>QFormLayout::ExpandingFieldsGrow</enum> </property> - <item row="0" column="0" > - <widget class="QLabel" name="label_SIPPort" > - <property name="text" > + <item row="0" column="0"> + <widget class="QLabel" name="label_SIPPort"> + <property name="text"> <string>SIP &Port</string> </property> - <property name="buddy" > + <property name="buddy"> <cstring>spinBox_SIPPort</cstring> </property> </widget> </item> - <item row="0" column="1" > - <widget class="QWidget" native="1" name="widget_SIPPort" > - <property name="minimumSize" > + <item row="0" column="1"> + <widget class="QWidget" name="widget_SIPPort" native="true"> + <property name="minimumSize"> <size> <width>50</width> <height>0</height> </size> </property> - <layout class="QHBoxLayout" name="horizontalLayout" > - <property name="margin" > + <layout class="QHBoxLayout" name="horizontalLayout"> + <property name="margin"> <number>0</number> </property> <item> - <widget class="QSpinBox" name="spinBox_SIPPort" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Preferred" hsizetype="Preferred" > + <widget class="QSpinBox" name="spinBox_SIPPort"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimum" > + <property name="minimum"> <number>1025</number> </property> - <property name="maximum" > + <property name="maximum"> <number>65536</number> </property> </widget> </item> <item> - <widget class="QLabel" name="label_WarningSIP" > - <property name="enabled" > + <widget class="QLabel" name="label_WarningSIP"> + <property name="enabled"> <bool>false</bool> </property> - <property name="text" > + <property name="text"> <string>Attention </string> </property> </widget> @@ -311,11 +312,11 @@ </widget> </item> <item> - <spacer name="verticalSpacer_configGeneral" > - <property name="orientation" > + <spacer name="verticalSpacer_configGeneral"> + <property name="orientation"> <enum>Qt::Vertical</enum> </property> - <property name="sizeHint" stdset="0" > + <property name="sizeHint" stdset="0"> <size> <width>20</width> <height>16777215</height> @@ -325,75 +326,75 @@ </item> </layout> </widget> - <widget class="QWidget" name="page_display" > - <layout class="QVBoxLayout" name="verticalLayout_9" > + <widget class="QWidget" name="page_display"> + <layout class="QVBoxLayout" name="verticalLayout_9"> <item> - <widget class="QLabel" name="label_configDisplay" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Fixed" hsizetype="Preferred" > + <widget class="QLabel" name="label_configDisplay"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="text" > + <property name="text"> <string>Configure display</string> </property> </widget> </item> <item> - <widget class="Line" name="line_configDisplay" > - <property name="orientation" > + <widget class="Line" name="line_configDisplay"> + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> </widget> </item> <item> - <widget class="QFrame" name="frame_display" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Preferred" hsizetype="Preferred" > + <widget class="QFrame" name="frame_display"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="frameShape" > + <property name="frameShape"> <enum>QFrame::StyledPanel</enum> </property> - <property name="frameShadow" > + <property name="frameShadow"> <enum>QFrame::Raised</enum> </property> - <layout class="QVBoxLayout" name="verticalLayout_8" > + <layout class="QVBoxLayout" name="verticalLayout_8"> <item> - <widget class="QLabel" name="label1_notifications" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Fixed" hsizetype="Preferred" > + <widget class="QLabel" name="label1_notifications"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="text" > + <property name="text"> <string>Enable notifications</string> </property> </widget> </item> <item> - <widget class="QWidget" native="1" name="widget1_notifications" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Fixed" hsizetype="Preferred" > + <widget class="QWidget" name="widget1_notifications" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <layout class="QHBoxLayout" name="horizontalLayout_5" > + <layout class="QHBoxLayout" name="horizontalLayout_5"> <item> - <widget class="QCheckBox" name="checkBox1_notifOnCalls" > - <property name="text" > + <widget class="QCheckBox" name="checkBox1_notifOnCalls"> + <property name="text"> <string>On incoming &calls</string> </property> </widget> </item> <item> - <widget class="QCheckBox" name="checkBox2_notifOnMessages" > - <property name="text" > + <widget class="QCheckBox" name="checkBox2_notifOnMessages"> + <property name="text"> <string>On &messages</string> </property> </widget> @@ -402,37 +403,37 @@ </widget> </item> <item> - <widget class="QLabel" name="label2_displayMainWindow" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Fixed" hsizetype="Preferred" > + <widget class="QLabel" name="label2_displayMainWindow"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="text" > + <property name="text"> <string>Show main window</string> </property> </widget> </item> <item> - <widget class="QWidget" native="1" name="widget_displayMainWindow" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Fixed" hsizetype="Preferred" > + <widget class="QWidget" name="widget_displayMainWindow" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <layout class="QHBoxLayout" name="horizontalLayout_6" > + <layout class="QHBoxLayout" name="horizontalLayout_6"> <item> - <widget class="QCheckBox" name="checkBox1_displayOnStart" > - <property name="text" > + <widget class="QCheckBox" name="checkBox1_displayOnStart"> + <property name="text"> <string>On &start</string> </property> </widget> </item> <item> - <widget class="QCheckBox" name="checkBox2_displayOnCalls" > - <property name="text" > + <widget class="QCheckBox" name="checkBox2_displayOnCalls"> + <property name="text"> <string>On &incoming calls</string> </property> </widget> @@ -441,11 +442,11 @@ </widget> </item> <item> - <spacer name="verticalSpacer_configDisplay" > - <property name="orientation" > + <spacer name="verticalSpacer_configDisplay"> + <property name="orientation"> <enum>Qt::Vertical</enum> </property> - <property name="sizeHint" stdset="0" > + <property name="sizeHint" stdset="0"> <size> <width>20</width> <height>16777215</height> @@ -458,194 +459,194 @@ </item> </layout> </widget> - <widget class="QWidget" name="page_accounts" > - <layout class="QVBoxLayout" name="verticalLayout_2" > + <widget class="QWidget" name="page_accounts"> + <layout class="QVBoxLayout" name="verticalLayout_2"> <item> - <widget class="QLabel" name="label_configAccounts" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Preferred" hsizetype="Preferred" > + <widget class="QLabel" name="label_configAccounts"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="text" > + <property name="text"> <string>Configure user accounts</string> </property> </widget> </item> <item> - <widget class="Line" name="line_configAccounts" > - <property name="orientation" > + <widget class="Line" name="line_configAccounts"> + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> </widget> </item> <item> - <widget class="QWidget" native="1" name="widget1_configAccounts" > - <property name="autoFillBackground" > + <widget class="QWidget" name="widget1_configAccounts" native="true"> + <property name="autoFillBackground"> <bool>false</bool> </property> - <layout class="QHBoxLayout" name="horizontalLayout_3" > - <property name="sizeConstraint" > + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <property name="sizeConstraint"> <enum>QLayout::SetDefaultConstraint</enum> </property> - <property name="leftMargin" > + <property name="leftMargin"> <number>0</number> </property> - <property name="topMargin" > + <property name="topMargin"> <number>0</number> </property> - <property name="bottomMargin" > + <property name="bottomMargin"> <number>0</number> </property> <item> - <widget class="QFrame" name="frame1_accountList" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Preferred" hsizetype="Preferred" > + <widget class="QFrame" name="frame1_accountList"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>1</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize" > + <property name="minimumSize"> <size> <width>0</width> <height>0</height> </size> </property> - <property name="maximumSize" > + <property name="maximumSize"> <size> <width>16777215</width> <height>16777215</height> </size> </property> - <property name="frameShape" > + <property name="frameShape"> <enum>QFrame::StyledPanel</enum> </property> - <property name="frameShadow" > + <property name="frameShadow"> <enum>QFrame::Raised</enum> </property> - <layout class="QVBoxLayout" name="verticalLayout_6" > + <layout class="QVBoxLayout" name="verticalLayout_6"> <item> - <widget class="QListWidget" name="listWidget_accountList" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Expanding" hsizetype="Expanding" > + <widget class="QListWidget" name="listWidget_accountList"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize" > + <property name="minimumSize"> <size> <width>150</width> <height>0</height> </size> </property> - <property name="maximumSize" > + <property name="maximumSize"> <size> <width>16777215</width> <height>16777215</height> </size> </property> - <property name="dragEnabled" > + <property name="dragEnabled"> <bool>true</bool> </property> </widget> </item> <item> - <widget class="QGroupBox" name="groupBox_accountListHandle" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Preferred" hsizetype="Preferred" > + <widget class="QGroupBox" name="groupBox_accountListHandle"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize" > + <property name="maximumSize"> <size> <width>16777215</width> <height>16777215</height> </size> </property> - <property name="layoutDirection" > + <property name="layoutDirection"> <enum>Qt::RightToLeft</enum> </property> - <property name="title" > + <property name="title"> <string/> </property> - <property name="alignment" > + <property name="alignment"> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> </property> - <layout class="QHBoxLayout" name="horizontalLayout_2" > - <property name="spacing" > + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <property name="spacing"> <number>0</number> </property> - <property name="sizeConstraint" > + <property name="sizeConstraint"> <enum>QLayout::SetNoConstraint</enum> </property> - <property name="margin" > + <property name="margin"> <number>0</number> </property> <item> - <widget class="QToolButton" name="button_accountRemove" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Fixed" hsizetype="Fixed" > + <widget class="QToolButton" name="button_accountRemove"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="text" > + <property name="text"> <string>Remove this account</string> </property> - <property name="icon" > - <iconset resource="resources.qrc" > + <property name="icon"> + <iconset resource="resources.qrc"> <normaloff>:/images/icons/remove.png</normaloff>:/images/icons/remove.png</iconset> </property> - <property name="shortcut" > + <property name="shortcut"> <string>+</string> </property> </widget> </item> <item> - <widget class="QToolButton" name="button_accountAdd" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Fixed" hsizetype="Fixed" > + <widget class="QToolButton" name="button_accountAdd"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="sizeIncrement" > + <property name="sizeIncrement"> <size> <width>0</width> <height>0</height> </size> </property> - <property name="text" > + <property name="text"> <string>Add a new account</string> </property> - <property name="icon" > - <iconset resource="resources.qrc" > + <property name="icon"> + <iconset resource="resources.qrc"> <normaloff>:/images/icons/add.png</normaloff>:/images/icons/add.png</iconset> </property> </widget> </item> <item> - <widget class="QToolButton" name="button_accountDown" > - <property name="text" > + <widget class="QToolButton" name="button_accountDown"> + <property name="text"> <string>Down</string> </property> </widget> </item> <item> - <widget class="QToolButton" name="button_accountUp" > - <property name="text" > + <widget class="QToolButton" name="button_accountUp"> + <property name="text"> <string>Up</string> </property> </widget> </item> <item> - <spacer name="horizontalSpacer" > - <property name="orientation" > + <spacer name="horizontalSpacer"> + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> - <property name="sizeHint" stdset="0" > + <property name="sizeHint" stdset="0"> <size> <width>0</width> <height>0</height> @@ -654,8 +655,8 @@ </spacer> </item> <item> - <widget class="QToolButton" name="toolButton_accountsApply" > - <property name="text" > + <widget class="QToolButton" name="toolButton_accountsApply"> + <property name="text"> <string>Apply</string> </property> </widget> @@ -667,36 +668,36 @@ </widget> </item> <item> - <widget class="QFrame" name="frame2_editAccounts" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Expanding" hsizetype="Expanding" > + <widget class="QFrame" name="frame2_editAccounts"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <horstretch>1</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="frameShape" > + <property name="frameShape"> <enum>QFrame::StyledPanel</enum> </property> - <property name="frameShadow" > + <property name="frameShadow"> <enum>QFrame::Raised</enum> </property> - <layout class="QFormLayout" name="formLayout_2" > - <property name="fieldGrowthPolicy" > + <layout class="QFormLayout" name="formLayout_2"> + <property name="fieldGrowthPolicy"> <enum>QFormLayout::ExpandingFieldsGrow</enum> </property> - <item row="0" column="0" > - <widget class="QLabel" name="label1_alias" > - <property name="text" > + <item row="0" column="0"> + <widget class="QLabel" name="label1_alias"> + <property name="text"> <string>&Alias</string> </property> - <property name="buddy" > + <property name="buddy"> <cstring>edit1_alias</cstring> </property> </widget> </item> - <item row="0" column="1" > - <widget class="QLineEdit" name="edit1_alias" > - <property name="minimumSize" > + <item row="0" column="1"> + <widget class="QLineEdit" name="edit1_alias"> + <property name="minimumSize"> <size> <width>0</width> <height>0</height> @@ -704,43 +705,43 @@ </property> </widget> </item> - <item row="1" column="0" > - <widget class="QLabel" name="label2_protocol" > - <property name="text" > + <item row="1" column="0"> + <widget class="QLabel" name="label2_protocol"> + <property name="text"> <string>&Protocol</string> </property> - <property name="buddy" > + <property name="buddy"> <cstring>edit2_protocol</cstring> </property> </widget> </item> - <item row="1" column="1" > - <widget class="QComboBox" name="edit2_protocol" > + <item row="1" column="1"> + <widget class="QComboBox" name="edit2_protocol"> <item> - <property name="text" > + <property name="text"> <string>SIP</string> </property> </item> <item> - <property name="text" > + <property name="text"> <string>IAX</string> </property> </item> </widget> </item> - <item row="2" column="0" > - <widget class="QLabel" name="label3_server" > - <property name="text" > + <item row="2" column="0"> + <widget class="QLabel" name="label3_server"> + <property name="text"> <string>&Server</string> </property> - <property name="buddy" > + <property name="buddy"> <cstring>edit3_server</cstring> </property> </widget> </item> - <item row="2" column="1" > - <widget class="QLineEdit" name="edit3_server" > - <property name="minimumSize" > + <item row="2" column="1"> + <widget class="QLineEdit" name="edit3_server"> + <property name="minimumSize"> <size> <width>0</width> <height>0</height> @@ -748,59 +749,59 @@ </property> </widget> </item> - <item row="3" column="0" > - <widget class="QLabel" name="label4_user" > - <property name="text" > + <item row="3" column="0"> + <widget class="QLabel" name="label4_user"> + <property name="text"> <string>&User</string> </property> - <property name="buddy" > + <property name="buddy"> <cstring>edit4_user</cstring> </property> </widget> </item> - <item row="3" column="1" > - <widget class="QLineEdit" name="edit4_user" /> + <item row="3" column="1"> + <widget class="QLineEdit" name="edit4_user"/> </item> - <item row="4" column="0" > - <widget class="QLabel" name="label5_password" > - <property name="text" > + <item row="4" column="0"> + <widget class="QLabel" name="label5_password"> + <property name="text"> <string>Pass&word</string> </property> - <property name="buddy" > + <property name="buddy"> <cstring>edit5_password</cstring> </property> </widget> </item> - <item row="4" column="1" > - <widget class="QLineEdit" name="edit5_password" > - <property name="echoMode" > + <item row="4" column="1"> + <widget class="QLineEdit" name="edit5_password"> + <property name="echoMode"> <enum>QLineEdit::PasswordEchoOnEdit</enum> </property> </widget> </item> - <item row="5" column="0" > - <widget class="QLabel" name="label6_mailbox" > - <property name="text" > + <item row="5" column="0"> + <widget class="QLabel" name="label6_mailbox"> + <property name="text"> <string>&Mailbox</string> </property> - <property name="buddy" > + <property name="buddy"> <cstring>edit6_mailbox</cstring> </property> </widget> </item> - <item row="5" column="1" > - <widget class="QLineEdit" name="edit6_mailbox" /> + <item row="5" column="1"> + <widget class="QLineEdit" name="edit6_mailbox"/> </item> - <item row="6" column="0" > - <widget class="QLabel" name="label7_state" > - <property name="text" > + <item row="6" column="0"> + <widget class="QLabel" name="label7_state"> + <property name="text"> <string>State</string> </property> </widget> </item> - <item row="6" column="1" > - <widget class="QLabel" name="edit7_state" > - <property name="text" > + <item row="6" column="1"> + <widget class="QLabel" name="edit7_state"> + <property name="text"> <string/> </property> </widget> @@ -812,33 +813,33 @@ </widget> </item> <item> - <widget class="QGroupBox" name="groupBox_commonSettings" > - <property name="title" > + <widget class="QGroupBox" name="groupBox_commonSettings"> + <property name="title"> <string/> </property> - <layout class="QVBoxLayout" name="verticalLayout_10" > + <layout class="QVBoxLayout" name="verticalLayout_10"> <item> - <widget class="QLabel" name="label_commonSettings" > - <property name="text" > + <widget class="QLabel" name="label_commonSettings"> + <property name="text"> <string>Stun settings will be applied on each account</string> </property> </widget> </item> <item> - <layout class="QFormLayout" name="formLayout_commonSettings" > - <property name="fieldGrowthPolicy" > + <layout class="QFormLayout" name="formLayout_commonSettings"> + <property name="fieldGrowthPolicy"> <enum>QFormLayout::ExpandingFieldsGrow</enum> </property> - <item row="0" column="0" > - <widget class="QCheckBox" name="checkBox_stun" > - <property name="text" > + <item row="0" column="0"> + <widget class="QCheckBox" name="checkBox_stun"> + <property name="text"> <string>&Enable Stun</string> </property> </widget> </item> - <item row="0" column="1" > - <widget class="QLineEdit" name="lineEdit_stun" > - <property name="enabled" > + <item row="0" column="1"> + <widget class="QLineEdit" name="lineEdit_stun"> + <property name="enabled"> <bool>false</bool> </property> </widget> @@ -850,173 +851,173 @@ </item> </layout> </widget> - <widget class="QWidget" name="page_audio" > - <layout class="QVBoxLayout" name="verticalLayout_5" > + <widget class="QWidget" name="page_audio"> + <layout class="QVBoxLayout" name="verticalLayout_5"> <item> - <widget class="QLabel" name="label_configAudio" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Fixed" hsizetype="Preferred" > + <widget class="QLabel" name="label_configAudio"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="text" > + <property name="text"> <string>Configure audio settings</string> </property> </widget> </item> <item> - <widget class="Line" name="line_configAudio" > - <property name="orientation" > + <widget class="Line" name="line_configAudio"> + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> </widget> </item> <item> - <widget class="QGroupBox" name="groupBox1_audio" > - <property name="mouseTracking" > + <widget class="QGroupBox" name="groupBox1_audio"> + <property name="mouseTracking"> <bool>false</bool> </property> - <property name="title" > + <property name="title"> <string/> </property> - <layout class="QFormLayout" name="formLayout_3" > - <property name="fieldGrowthPolicy" > + <layout class="QFormLayout" name="formLayout_3"> + <property name="fieldGrowthPolicy"> <enum>QFormLayout::AllNonFixedFieldsGrow</enum> </property> - <item row="0" column="0" > - <widget class="QLabel" name="label_interface" > - <property name="text" > + <item row="0" column="0"> + <widget class="QLabel" name="label_interface"> + <property name="text"> <string>Audio &device</string> </property> - <property name="buddy" > + <property name="buddy"> <cstring>comboBox_interface</cstring> </property> </widget> </item> - <item row="0" column="1" > - <widget class="QComboBox" name="comboBox_interface" > - <property name="minimumSize" > + <item row="0" column="1"> + <widget class="QComboBox" name="comboBox_interface"> + <property name="minimumSize"> <size> <width>100</width> <height>0</height> </size> </property> <item> - <property name="text" > + <property name="text"> <string>ALSA</string> </property> </item> <item> - <property name="text" > + <property name="text"> <string>PulseAudio</string> </property> </item> </widget> </item> - <item row="1" column="0" > - <widget class="QCheckBox" name="checkBox_ringtones" > - <property name="text" > + <item row="1" column="0"> + <widget class="QCheckBox" name="checkBox_ringtones"> + <property name="text"> <string>&Enable ringtones</string> </property> </widget> </item> - <item row="1" column="1" > - <widget class="KUrlComboRequester" name="urlComboRequester_ringtone" /> + <item row="1" column="1"> + <widget class="KUrlComboRequester" name="urlComboRequester_ringtone"/> </item> </layout> </widget> </item> <item> - <widget class="QGroupBox" name="groupBox2_codecs" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Preferred" hsizetype="Preferred" > + <widget class="QGroupBox" name="groupBox2_codecs"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="title" > + <property name="title"> <string>&Codecs</string> </property> - <layout class="QGridLayout" name="gridLayout" > - <item row="0" column="2" > - <layout class="QVBoxLayout" name="verticalLayout_codecsOrder" > - <property name="leftMargin" > + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="2"> + <layout class="QVBoxLayout" name="verticalLayout_codecsOrder"> + <property name="leftMargin"> <number>0</number> </property> - <property name="rightMargin" > + <property name="rightMargin"> <number>0</number> </property> <item> - <widget class="QToolButton" name="toolButton_codecUp" > - <property name="text" > + <widget class="QToolButton" name="toolButton_codecUp"> + <property name="text"> <string/> </property> </widget> </item> <item> - <widget class="QToolButton" name="toolButton_codecDown" > - <property name="text" > + <widget class="QToolButton" name="toolButton_codecDown"> + <property name="text"> <string/> </property> </widget> </item> </layout> </item> - <item row="0" column="0" > - <widget class="QTableWidget" name="tableWidget_codecs" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Preferred" hsizetype="Expanding" > + <item row="0" column="0"> + <widget class="QTableWidget" name="tableWidget_codecs"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize" > + <property name="minimumSize"> <size> <width>0</width> <height>100</height> </size> </property> - <property name="frameShape" > + <property name="frameShape"> <enum>QFrame::StyledPanel</enum> </property> - <property name="frameShadow" > + <property name="frameShadow"> <enum>QFrame::Sunken</enum> </property> - <property name="verticalScrollBarPolicy" > + <property name="verticalScrollBarPolicy"> <enum>Qt::ScrollBarAsNeeded</enum> </property> - <property name="textElideMode" > + <property name="textElideMode"> <enum>Qt::ElideRight</enum> </property> - <property name="verticalScrollMode" > + <property name="verticalScrollMode"> <enum>QAbstractItemView::ScrollPerPixel</enum> </property> - <property name="horizontalScrollMode" > + <property name="horizontalScrollMode"> <enum>QAbstractItemView::ScrollPerPixel</enum> </property> <column> - <property name="text" > + <property name="text"> <string>Active</string> </property> </column> <column> - <property name="text" > + <property name="text"> <string>Name</string> </property> </column> <column> - <property name="text" > + <property name="text"> <string>Frequency</string> </property> </column> <column> - <property name="text" > + <property name="text"> <string>Bitrate</string> </property> </column> <column> - <property name="text" > + <property name="text"> <string>Bandwidth</string> </property> </column> @@ -1026,30 +1027,30 @@ </widget> </item> <item> - <widget class="QStackedWidget" name="stackedWidget_interfaceSpecificSettings" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Fixed" hsizetype="Preferred" > + <widget class="QStackedWidget" name="stackedWidget_interfaceSpecificSettings"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="currentIndex" > + <property name="currentIndex"> <number>0</number> </property> - <widget class="QWidget" name="page1_alsa" > - <layout class="QVBoxLayout" name="verticalLayout_20" > - <property name="margin" > + <widget class="QWidget" name="page1_alsa"> + <layout class="QVBoxLayout" name="verticalLayout_20"> + <property name="margin"> <number>0</number> </property> <item> - <widget class="QGroupBox" name="groupBox_alsa" > - <property name="title" > + <widget class="QGroupBox" name="groupBox_alsa"> + <property name="title"> <string>ALSA settings</string> </property> - <layout class="QFormLayout" name="formLayout_4" > - <item row="2" column="1" > - <widget class="QComboBox" name="comboBox2_in" > - <property name="minimumSize" > + <layout class="QFormLayout" name="formLayout_4"> + <item row="2" column="1"> + <widget class="QComboBox" name="comboBox2_in"> + <property name="minimumSize"> <size> <width>100</width> <height>0</height> @@ -1057,29 +1058,29 @@ </property> </widget> </item> - <item row="2" column="0" > - <widget class="QLabel" name="label2_in" > - <property name="text" > + <item row="2" column="0"> + <widget class="QLabel" name="label2_in"> + <property name="text"> <string>&In</string> </property> - <property name="buddy" > + <property name="buddy"> <cstring>comboBox2_in</cstring> </property> </widget> </item> - <item row="3" column="0" > - <widget class="QLabel" name="label3_out" > - <property name="text" > + <item row="3" column="0"> + <widget class="QLabel" name="label3_out"> + <property name="text"> <string>&Out</string> </property> - <property name="buddy" > + <property name="buddy"> <cstring>comboBox3_out</cstring> </property> </widget> </item> - <item row="3" column="1" > - <widget class="QComboBox" name="comboBox3_out" > - <property name="minimumSize" > + <item row="3" column="1"> + <widget class="QComboBox" name="comboBox3_out"> + <property name="minimumSize"> <size> <width>100</width> <height>0</height> @@ -1087,19 +1088,19 @@ </property> </widget> </item> - <item row="0" column="0" > - <widget class="QLabel" name="label1_alsaPugin" > - <property name="text" > + <item row="0" column="0"> + <widget class="QLabel" name="label1_alsaPugin"> + <property name="text"> <string>ALSA &plugin</string> </property> - <property name="buddy" > + <property name="buddy"> <cstring>comboBox1_alsaPlugin</cstring> </property> </widget> </item> - <item row="0" column="1" > - <widget class="QComboBox" name="comboBox1_alsaPlugin" > - <property name="minimumSize" > + <item row="0" column="1"> + <widget class="QComboBox" name="comboBox1_alsaPlugin"> + <property name="minimumSize"> <size> <width>100</width> <height>0</height> @@ -1112,26 +1113,26 @@ </item> </layout> </widget> - <widget class="QWidget" name="page2_pulseAudio" > - <layout class="QVBoxLayout" name="verticalLayout_7" > + <widget class="QWidget" name="page2_pulseAudio"> + <layout class="QVBoxLayout" name="verticalLayout_7"> <item> - <widget class="QGroupBox" name="groupBox_pulseAudio" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Expanding" hsizetype="Expanding" > + <widget class="QGroupBox" name="groupBox_pulseAudio"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="title" > + <property name="title"> <string>Paramètres PulseAudio</string> </property> - <layout class="QFormLayout" name="formLayout_11" > - <property name="fieldGrowthPolicy" > + <layout class="QFormLayout" name="formLayout_11"> + <property name="fieldGrowthPolicy"> <enum>QFormLayout::ExpandingFieldsGrow</enum> </property> - <item row="0" column="0" > - <widget class="QCheckBox" name="checkBox_pulseAudioVolumeAlter" > - <property name="text" > + <item row="0" column="0"> + <widget class="QCheckBox" name="checkBox_pulseAudioVolumeAlter"> + <property name="text"> <string>Autoriser à &modifier le volume des autres applications</string> </property> </widget> @@ -1144,9 +1145,9 @@ </widget> </item> <item> - <widget class="QWidget" native="1" name="widget_fullConfigAudio" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Expanding" hsizetype="Preferred" > + <widget class="QWidget" name="widget_fullConfigAudio" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> @@ -1155,53 +1156,53 @@ </item> </layout> </widget> - <widget class="QWidget" name="page_record" > - <layout class="QVBoxLayout" name="verticalLayout_3" > + <widget class="QWidget" name="page_record"> + <layout class="QVBoxLayout" name="verticalLayout_3"> <item> - <widget class="QLabel" name="label_configRecord" > - <property name="text" > + <widget class="QLabel" name="label_configRecord"> + <property name="text"> <string>Configure record settings</string> </property> </widget> </item> <item> - <widget class="Line" name="line_configRecord" > - <property name="orientation" > + <widget class="Line" name="line_configRecord"> + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> </widget> </item> <item> - <widget class="QGroupBox" name="groupBox1_recordGeneral" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Fixed" hsizetype="Preferred" > + <widget class="QGroupBox" name="groupBox1_recordGeneral"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="title" > + <property name="title"> <string>General</string> </property> - <layout class="QFormLayout" name="formLayout" > - <item row="0" column="0" > - <widget class="QLabel" name="label_destinationFolder" > - <property name="text" > + <layout class="QFormLayout" name="formLayout"> + <item row="0" column="0"> + <widget class="QLabel" name="label_destinationFolder"> + <property name="text"> <string>Destination folder</string> </property> </widget> </item> - <item row="0" column="1" > - <widget class="KUrlComboRequester" name="urlcomborequester_destinationFolder" /> + <item row="0" column="1"> + <widget class="KUrlComboRequester" name="urlcomborequester_destinationFolder"/> </item> </layout> </widget> </item> <item> - <spacer name="verticalSpacer_configRecord" > - <property name="orientation" > + <spacer name="verticalSpacer_configRecord"> + <property name="orientation"> <enum>Qt::Vertical</enum> </property> - <property name="sizeHint" stdset="0" > + <property name="sizeHint" stdset="0"> <size> <width>20</width> <height>16777215</height> @@ -1211,66 +1212,66 @@ </item> </layout> </widget> - <widget class="QWidget" name="page_addressBook" > - <layout class="QVBoxLayout" name="verticalLayout_4" > + <widget class="QWidget" name="page_addressBook"> + <layout class="QVBoxLayout" name="verticalLayout_4"> <item> - <widget class="QLabel" name="label_configAddressBook" > - <property name="text" > + <widget class="QLabel" name="label_configAddressBook"> + <property name="text"> <string>Configure address book settings</string> </property> </widget> </item> <item> - <widget class="Line" name="line_configAddressBook" > - <property name="orientation" > + <widget class="Line" name="line_configAddressBook"> + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> </widget> </item> <item> - <widget class="QWidget" native="1" name="widget_configAddressBookGeneral" > - <layout class="QFormLayout" name="formLayout_5" > - <property name="fieldGrowthPolicy" > + <widget class="QWidget" name="widget_configAddressBookGeneral" native="true"> + <layout class="QFormLayout" name="formLayout_5"> + <property name="fieldGrowthPolicy"> <enum>QFormLayout::AllNonFixedFieldsGrow</enum> </property> - <item row="1" column="0" > - <widget class="QLabel" name="label_maxResults" > - <property name="text" > + <item row="1" column="0"> + <widget class="QLabel" name="label_maxResults"> + <property name="text"> <string>Maximum &results</string> </property> - <property name="buddy" > + <property name="buddy"> <cstring>horizontalSlider_maxResults</cstring> </property> </widget> </item> - <item row="1" column="1" > - <widget class="QWidget" native="1" name="widget_maxResults" > - <layout class="QHBoxLayout" name="horizontalLayout_4" > - <property name="spacing" > + <item row="1" column="1"> + <widget class="QWidget" name="widget_maxResults" native="true"> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <property name="spacing"> <number>0</number> </property> - <property name="margin" > + <property name="margin"> <number>0</number> </property> <item> - <widget class="QSlider" name="horizontalSlider_maxResults" > - <property name="minimum" > + <widget class="QSlider" name="horizontalSlider_maxResults"> + <property name="minimum"> <number>25</number> </property> - <property name="maximum" > + <property name="maximum"> <number>50</number> </property> - <property name="orientation" > + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> </widget> </item> <item> - <widget class="QSpinBox" name="spinBox_maxResults" > - <property name="minimum" > + <widget class="QSpinBox" name="spinBox_maxResults"> + <property name="minimum"> <number>25</number> </property> - <property name="maximum" > + <property name="maximum"> <number>50</number> </property> </widget> @@ -1278,45 +1279,39 @@ </layout> </widget> </item> - <item row="2" column="0" > - <widget class="QCheckBox" name="checkBox_displayPhoto" > - <property name="text" > + <item row="2" column="0"> + <widget class="QCheckBox" name="checkBox_displayPhoto"> + <property name="text"> <string>Display &photo if available</string> </property> </widget> </item> </layout> - <zorder>label_maxResults</zorder> - <zorder>spinBox_maxResults</zorder> - <zorder>horizontalSlider_maxResults</zorder> - <zorder>widget_maxResults</zorder> - <zorder>checkBox_displayPhoto</zorder> - <zorder>groupBox_displayTypes</zorder> </widget> </item> <item> - <widget class="QGroupBox" name="groupBox_displayTypes" > - <property name="title" > + <widget class="QGroupBox" name="groupBox_displayTypes"> + <property name="title"> <string>Display phone numbers of these &types :</string> </property> - <layout class="QHBoxLayout" name="horizontalLayout_7" > + <layout class="QHBoxLayout" name="horizontalLayout_7"> <item> - <widget class="QCheckBox" name="checkBox_business" > - <property name="text" > - <string>&Business</string> + <widget class="QCheckBox" name="checkBox_business"> + <property name="text"> + <string>&Work</string> </property> </widget> </item> <item> - <widget class="QCheckBox" name="checkBox_mobile" > - <property name="text" > + <widget class="QCheckBox" name="checkBox_mobile"> + <property name="text"> <string>&Mobile</string> </property> </widget> </item> <item> - <widget class="QCheckBox" name="checkBox_home" > - <property name="text" > + <widget class="QCheckBox" name="checkBox_home"> + <property name="text"> <string>&Home</string> </property> </widget> @@ -1325,11 +1320,11 @@ </widget> </item> <item> - <spacer name="verticalSpacer_configAddressBook" > - <property name="orientation" > + <spacer name="verticalSpacer_configAddressBook"> + <property name="orientation"> <enum>Qt::Vertical</enum> </property> - <property name="sizeHint" stdset="0" > + <property name="sizeHint" stdset="0"> <size> <width>20</width> <height>229</height> @@ -1344,36 +1339,36 @@ </layout> </item> <item> - <widget class="Line" name="lineDialog" > - <property name="orientation" > + <widget class="Line" name="lineDialog"> + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> </widget> </item> <item> - <widget class="QDialogButtonBox" name="buttonBoxDialog" > - <property name="layoutDirection" > + <widget class="QDialogButtonBox" name="buttonBoxDialog"> + <property name="layoutDirection"> <enum>Qt::LeftToRight</enum> </property> - <property name="orientation" > + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> - <property name="standardButtons" > + <property name="standardButtons"> <set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::RestoreDefaults</set> </property> - <property name="centerButtons" > + <property name="centerButtons"> <bool>false</bool> </property> </widget> </item> </layout> - <action name="actionAbout" > - <property name="text" > + <action name="actionAbout"> + <property name="text"> <string>about</string> </property> </action> </widget> - <layoutdefault spacing="4" margin="4" /> + <layoutdefault spacing="4" margin="4"/> <customwidgets> <customwidget> <class>KUrlComboRequester</class> @@ -1382,7 +1377,7 @@ </customwidget> </customwidgets> <resources> - <include location="resources.qrc" /> + <include location="resources.qrc"/> </resources> <connections> <connection> @@ -1391,11 +1386,11 @@ <receiver>ConfigurationDialog</receiver> <slot>reject()</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>300</x> <y>430</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>286</x> <y>274</y> </hint> @@ -1407,11 +1402,11 @@ <receiver>stackedWidget_options</receiver> <slot>setCurrentIndex(int)</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>73</x> <y>92</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>191</x> <y>82</y> </hint> @@ -1423,11 +1418,11 @@ <receiver>lineEdit_stun</receiver> <slot>setEnabled(bool)</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>228</x> <y>374</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>431</x> <y>378</y> </hint> @@ -1439,11 +1434,11 @@ <receiver>stackedWidget_interfaceSpecificSettings</receiver> <slot>setCurrentIndex(int)</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>488</x> <y>64</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>325</x> <y>286</y> </hint> @@ -1455,11 +1450,11 @@ <receiver>spinBox_historyCapacity</receiver> <slot>setValue(int)</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>352</x> <y>89</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>682</x> <y>98</y> </hint> @@ -1471,11 +1466,11 @@ <receiver>horizontalSlider_historyCapacity</receiver> <slot>setValue(int)</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>682</x> <y>98</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>352</x> <y>89</y> </hint> @@ -1487,11 +1482,11 @@ <receiver>spinBox_maxResults</receiver> <slot>setValue(int)</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>599</x> <y>52</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>661</x> <y>55</y> </hint> @@ -1503,11 +1498,11 @@ <receiver>horizontalSlider_maxResults</receiver> <slot>setValue(int)</slot> <hints> - <hint type="sourcelabel" > + <hint type="sourcelabel"> <x>650</x> <y>59</y> </hint> - <hint type="destinationlabel" > + <hint type="destinationlabel"> <x>585</x> <y>56</y> </hint> diff --git a/sflphone_kde/Contact.cpp b/sflphone_kde/Contact.cpp index 3e6b955fac..3929e609e3 100644 --- a/sflphone_kde/Contact.cpp +++ b/sflphone_kde/Contact.cpp @@ -26,15 +26,23 @@ #include "sflphone_const.h" -Contact::Contact(Addressee addressee, QString number) +Contact::Contact(Addressee addressee, const PhoneNumber & number, bool displayPhoto) { this->firstName = addressee.name(); this->secondName = addressee.familyName(); this->nickName = addressee.nickName(); - this->phoneNumber = number; - this->photo = new Picture(addressee.photo()); + this->phoneNumber = number.number(); + this->type = number.type(); + if(displayPhoto) + { + this->photo = new Picture(addressee.photo()); + } + else + { + this->photo = NULL; + } - initItem(); + initItem(displayPhoto); } @@ -42,11 +50,11 @@ Contact::~Contact() { } -void Contact::initItem() +void Contact::initItem(bool displayPhoto) { this->item = new QListWidgetItem(); this->item->setSizeHint(QSize(140,CONTACT_ITEM_HEIGHT)); - this->itemWidget = new ContactItemWidget(this); + this->itemWidget = new ContactItemWidget(this, displayPhoto); } QString Contact::getPhoneNumber() const @@ -74,7 +82,11 @@ const Picture * Contact::getPhoto() const return photo; } -//TODO +PhoneNumber::Type Contact::getType() const +{ + return type; +} + QListWidgetItem * Contact::getItem() { return item; diff --git a/sflphone_kde/Contact.h b/sflphone_kde/Contact.h index 62dbf39862..5fb25e526f 100644 --- a/sflphone_kde/Contact.h +++ b/sflphone_kde/Contact.h @@ -26,6 +26,7 @@ #include <kabc/addressee.h> #include <kabc/picture.h> +#include <kabc/phonenumber.h> using namespace KABC; @@ -41,12 +42,13 @@ private: QString nickName; QString phoneNumber; Picture * photo; + PhoneNumber::Type type; private: - void initItem(); + void initItem(bool displayPhoto); public: - Contact(Addressee addressee, QString number); + Contact(Addressee addressee, const PhoneNumber & number, bool displayPhoto); ~Contact(); @@ -55,6 +57,7 @@ public: QString getFirstName() const; QString getSecondName() const; const Picture * getPhoto() const; + PhoneNumber::Type getType() const; QListWidgetItem * getItem(); diff --git a/sflphone_kde/ContactItemWidget.cpp b/sflphone_kde/ContactItemWidget.cpp index ff1f848193..7c634481a4 100644 --- a/sflphone_kde/ContactItemWidget.cpp +++ b/sflphone_kde/ContactItemWidget.cpp @@ -27,7 +27,7 @@ #include "sflphone_const.h" -ContactItemWidget::ContactItemWidget(const Contact * contact, QWidget *parent) +ContactItemWidget::ContactItemWidget(const Contact * contact, bool displayPhoto, QWidget *parent) : QWidget(parent) { if(!contact->getNickName().isEmpty()) @@ -38,29 +38,33 @@ ContactItemWidget::ContactItemWidget(const Contact * contact, QWidget *parent) { contactName = new QLabel(contact->getFirstName()); } - if(!contact->getPhoto()->isEmpty()) + if(displayPhoto) { - QPixmap pixmap; - if(contact->getPhoto()->isIntern()) + if(!contact->getPhoto()->isEmpty()) { - contactPhoto = new QLabel(); - pixmap = QPixmap::fromImage(contact->getPhoto()->data()); + QPixmap pixmap; + if(contact->getPhoto()->isIntern()) + { + contactPhoto = new QLabel(); + pixmap = QPixmap::fromImage(contact->getPhoto()->data()); + } + else + { + contactPhoto = new QLabel(); + pixmap = QPixmap(contact->getPhoto()->url()); + } + if(pixmap.height() > pixmap.width()) + contactPhoto->setPixmap(pixmap.scaledToHeight(CONTACT_ITEM_HEIGHT-4)); + else + contactPhoto->setPixmap(pixmap.scaledToWidth(CONTACT_ITEM_HEIGHT-4)); } else { contactPhoto = new QLabel(); - pixmap = QPixmap(contact->getPhoto()->url()); + contactPhoto->setMinimumSize(CONTACT_ITEM_HEIGHT-4, 0); } - if(pixmap.height() > pixmap.width()) - contactPhoto->setPixmap(pixmap.scaledToHeight(CONTACT_ITEM_HEIGHT-4)); - else - contactPhoto->setPixmap(pixmap.scaledToWidth(CONTACT_ITEM_HEIGHT-4)); - } - else - { - contactPhoto = new QLabel(); - contactPhoto->setMinimumSize(CONTACT_ITEM_HEIGHT-4, 0); } + contactType = new QLabel(PhoneNumber::typeLabel(contact->getType())); contactNumber = new QLabel(contact->getPhoneNumber()); QSpacerItem * horizontalSpacer = new QSpacerItem(16777215, 20, QSizePolicy::Preferred, QSizePolicy::Minimum); QHBoxLayout * hlayout = new QHBoxLayout(this); @@ -71,9 +75,13 @@ ContactItemWidget::ContactItemWidget(const Contact * contact, QWidget *parent) vlayout->setSpacing(2); vlayout->addWidget(contactName); vlayout->addWidget(contactNumber); - hlayout->addWidget(contactPhoto); + if(displayPhoto) + { + hlayout->addWidget(contactPhoto); + } hlayout->addLayout(vlayout); hlayout->addItem(horizontalSpacer); + hlayout->addWidget(contactType); this->setLayout(hlayout); } diff --git a/sflphone_kde/ContactItemWidget.h b/sflphone_kde/ContactItemWidget.h index 4ea38c5a79..dd686bd0bb 100644 --- a/sflphone_kde/ContactItemWidget.h +++ b/sflphone_kde/ContactItemWidget.h @@ -36,9 +36,10 @@ private: QLabel * contactName; QLabel * contactNumber; QLabel * contactPhoto; + QLabel * contactType; public: - ContactItemWidget(const Contact * contact, QWidget *parent = 0); + ContactItemWidget(const Contact * contact, bool displayPhoto, QWidget *parent = 0); ~ContactItemWidget(); diff --git a/sflphone_kde/sflphone_const.h b/sflphone_kde/sflphone_const.h index e2c88c8a10..9ce756656c 100644 --- a/sflphone_kde/sflphone_const.h +++ b/sflphone_kde/sflphone_const.h @@ -142,6 +142,7 @@ + #define MAX_HISTORY_CAPACITY 60 diff --git a/sflphone_kde/sflphone_kdeview.cpp b/sflphone_kde/sflphone_kdeview.cpp index a77c4eeea9..70f80e4a79 100644 --- a/sflphone_kde/sflphone_kdeview.cpp +++ b/sflphone_kde/sflphone_kdeview.cpp @@ -605,13 +605,16 @@ void sflphone_kdeView::updateAddressBook() QString textSearched = lineEdit_addressBook->text(); if(textSearched.isEmpty()) { + label_addressBookFull->setVisible(false); return; } - QVector<Contact *> contactsFound = findContactsInKAddressBook(textSearched); + bool full = false; + QVector<Contact *> contactsFound = findContactsInKAddressBook(textSearched, full); + qDebug() << "Full : " << full; + label_addressBookFull->setVisible(full); for(int i = 0 ; i < contactsFound.size() ; i++) { Contact * contact = contactsFound[i]; - qDebug() << "contact->getItem()->text()=" << contact->getItem()->text() << " contains textSearched=" << textSearched; addContactToContactList(contact); } alternateColors(listWidget_addressBook); @@ -619,44 +622,69 @@ void sflphone_kdeView::updateAddressBook() void sflphone_kdeView::alternateColors(QListWidget * listWidget) { -//TODO qDebug() << "alternateColors"; - qDebug() << "listWidget->count() = " << listWidget->count(); for(int i = 0 ; i < listWidget->count(); i++) { QListWidgetItem* item = listWidget->item(i); QBrush c = (i % 2 == 1) ? palette().base() : palette().alternateBase(); - qDebug() << "brush = " << c; item->setBackground( c ); } listWidget->setUpdatesEnabled( true ); } -QVector<Contact *> sflphone_kdeView::findContactsInKAddressBook(QString textSearched) +QVector<Contact *> sflphone_kdeView::findContactsInKAddressBook(QString textSearched, bool & full) { + ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); + MapStringInt addressBookSettings = configurationManager.getAddressbookSettings().value(); + int maxResults = addressBookSettings[ADDRESSBOOK_MAX_RESULTS]; + int typesDisplayed = phoneNumberTypesDisplayed(); + bool displayPhoto = addressBookSettings[ADDRESSBOOK_DISPLAY_CONTACT_PHOTO]; + AddressBook * ab = KABC::StdAddressBook::self(); QVector<Contact *> results = QVector<Contact *>(); AddressBook::Iterator it; - for ( it = ab->begin(); it != ab->end(); ++it ) { + full = false; + int k = 0; + for ( it = ab->begin(); it != ab->end() && !full ; it++ ) { if(it->name().contains(textSearched, Qt::CaseInsensitive) || it->nickName().contains(textSearched, Qt::CaseInsensitive)) { for(int i = 0 ; i < it->phoneNumbers().count() ; i++) { - if(phoneNumberTypeDisplayed(it->phoneNumbers().at(i).type())) + int typeFlag = it->phoneNumbers().at(i).type(); + if((typesDisplayed & typeFlag) != 0) { - results.append(new Contact( *it, it->phoneNumbers().at(i).number() )); + results.append(new Contact( *it, it->phoneNumbers().at(i), displayPhoto )); + k++; } } } + if(k >= maxResults) + { + full = true; + } } return results; } -bool sflphone_kdeView::phoneNumberTypeDisplayed(int type) +int sflphone_kdeView::phoneNumberTypesDisplayed() { - //TODO - return true; + ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); + MapStringInt addressBookSettings = configurationManager.getAddressbookSettings().value(); + int typesDisplayed = 0; + if(addressBookSettings[ADDRESSBOOK_DISPLAY_BUSINESS]) + { + typesDisplayed = typesDisplayed | PhoneNumber::Work; + } + if(addressBookSettings[ADDRESSBOOK_DISPLAY_MOBILE]) + { + typesDisplayed = typesDisplayed | PhoneNumber::Cell; + } + if(addressBookSettings[ADDRESSBOOK_DISPLAY_HOME]) + { + typesDisplayed = typesDisplayed | PhoneNumber::Home; + } + return typesDisplayed; } void sflphone_kdeView::updateRecordButton() diff --git a/sflphone_kde/sflphone_kdeview.h b/sflphone_kde/sflphone_kdeview.h index 1aba7a7669..436719d32f 100644 --- a/sflphone_kde/sflphone_kdeview.h +++ b/sflphone_kde/sflphone_kdeview.h @@ -24,6 +24,7 @@ #include <QtGui/QWidget> #include <QtCore/QString> #include <QtCore/QVector> +#include <QtCore/QList> #include <QtGui/QListWidgetItem> #include <QtGui/QKeyEvent> #include <QErrorMessage> @@ -75,8 +76,8 @@ public: static Account * firstRegisteredAccount(); static QVector<Account *> registeredAccounts(); static AccountList * getAccountList(); - QVector<Contact *> findContactsInKAddressBook(QString textSearched); - bool phoneNumberTypeDisplayed(int type); + QVector<Contact *> findContactsInKAddressBook(QString textSearched, bool & full); + int phoneNumberTypesDisplayed(); QErrorMessage * getErrorWindow(); private slots: diff --git a/sflphone_kde/sflphone_kdeview_base.ui b/sflphone_kde/sflphone_kdeview_base.ui index e704a66c0d..f273340db8 100644 --- a/sflphone_kde/sflphone_kdeview_base.ui +++ b/sflphone_kde/sflphone_kdeview_base.ui @@ -6,7 +6,7 @@ <rect> <x>0</x> <y>0</y> - <width>329</width> + <width>327</width> <height>475</height> </rect> </property> @@ -63,6 +63,13 @@ <item> <widget class="QLineEdit" name="lineEdit_addressBook"/> </item> + <item> + <widget class="QLabel" name="label_addressBookFull"> + <property name="text"> + <string>Attention:number of results exceeds max displayed.</string> + </property> + </widget> + </item> </layout> </widget> </widget> -- GitLab