diff --git a/sflphone-client-kde/src/SFLPhone.cpp b/sflphone-client-kde/src/SFLPhone.cpp index e7e1c7453e26f3c3bf02a7e0fb2d2cd3b5ef9278..68d2ddeff6611af1fdbb3ebb2a1bf15ba7a2d5b2 100644 --- a/sflphone-client-kde/src/SFLPhone.cpp +++ b/sflphone-client-kde/src/SFLPhone.cpp @@ -137,23 +137,26 @@ void SFLPhone::setupActions() action_configureSflPhone = KStandardAction::preferences(view, SLOT(configureSflPhone()), this); action_configureSflPhone->setText(i18n("Configure SFLphone")); - action_displayVolumeControls = new KAction(KIcon(QIcon(ICON_DISPLAY_VOLUME_CONSTROLS)), i18n("Display volume controls"), this); + action_displayVolumeControls = new KAction(KIcon(QIcon(ICON_DISPLAY_VOLUME_CONSTROLS)), i18n("Display volume controls"), this); action_displayDialpad = new KAction(KIcon(QIcon(ICON_DISPLAY_DIALPAD)), i18n("Display dialpad"), this); + action_displayDialpad->setCheckable(true); + + action_displayVolumeControls->setCheckable(true); action_displayVolumeControls->setChecked(configurationManager.getVolumeControls()); action_displayDialpad->setChecked(configurationManager.getDialpad()); action_accountCreationWizard = new KAction(i18n("Account creation wizard"), this); - connect(action_accept, SIGNAL(triggered()), view, SLOT(accept())); - connect(action_refuse, SIGNAL(triggered()), view, SLOT(refuse())); - connect(action_hold, SIGNAL(triggered()), view, SLOT(hold())); - connect(action_transfer, SIGNAL(triggered()), view, SLOT(transfer())); - connect(action_record, SIGNAL(triggered()), view, SLOT(record())); - connect(action_screen, SIGNAL(triggered(QAction *)), this, SLOT(updateScreen(QAction *))); - connect(action_mailBox, SIGNAL(triggered()), view, SLOT(mailBox())); - connect(action_displayVolumeControls, SIGNAL(triggered()), view, SLOT(displayVolumeControls())); - connect(action_displayDialpad, SIGNAL(triggered()), view, SLOT(displayDialpad())); - connect(action_accountCreationWizard, SIGNAL(triggered()), view, SLOT(accountCreationWizard())); - + connect(action_accept, SIGNAL(triggered()), view, SLOT(accept())); + connect(action_refuse, SIGNAL(triggered()), view, SLOT(refuse())); + connect(action_hold, SIGNAL(triggered()), view, SLOT(hold())); + connect(action_transfer, SIGNAL(triggered()), view, SLOT(transfer())); + connect(action_record, SIGNAL(triggered()), view, SLOT(record())); + connect(action_screen, SIGNAL(triggered(QAction *)), this, SLOT(updateScreen(QAction *))); + connect(action_mailBox, SIGNAL(triggered()), view, SLOT(mailBox())); + connect(action_displayVolumeControls, SIGNAL(triggered()), view, SLOT(displayVolumeControls())); + connect(action_displayDialpad, SIGNAL(triggered()), view, SLOT(displayDialpad())); + connect(action_accountCreationWizard, SIGNAL(triggered()), view, SLOT(accountCreationWizard())); + action_screen->addAction(action_main); action_screen->addAction(action_history); action_screen->addAction(action_addressBook); diff --git a/sflphone-client-kde/src/SFLPhone.h b/sflphone-client-kde/src/SFLPhone.h index ef63e298e33bfd576579c028c182f531a413d7e8..b9a467727cf9746f3a6c8b26a6a07f907e18b02b 100644 --- a/sflphone-client-kde/src/SFLPhone.h +++ b/sflphone-client-kde/src/SFLPhone.h @@ -94,8 +94,8 @@ private: SFLPhoneView * view; QMenu *trayIconMenu; bool iconChanged; - SFLPhoneTray *trayIcon; - KNotification *notification; + SFLPhoneTray *trayIcon; + KNotification *notification; QLabel * statusBarWidget; private: @@ -115,6 +115,8 @@ public: void trayIconSignal(); SFLPhoneView * getView(); QList<QAction *> getCallActions(); + + friend class SFLPhoneView; private slots: @@ -127,8 +129,8 @@ private slots: void on_view_recordCheckStateChangeAsked(bool recordCheckState); void on_view_addressBookEnableAsked(bool enabled); void on_view_screenChanged(int screen); - void on_view_incomingCall(const Call * call); - + void on_view_incomingCall(const Call * call); + void updateScreen(QAction * action); void quitButton(); diff --git a/sflphone-client-kde/src/SFLPhoneView.cpp b/sflphone-client-kde/src/SFLPhoneView.cpp index 89dbf65b0b0c22d7be822df2ac42d2ab08e4a318..1ff97127976a706875b1f2fdf5d3a3838ff03fcb 100644 --- a/sflphone-client-kde/src/SFLPhoneView.cpp +++ b/sflphone-client-kde/src/SFLPhoneView.cpp @@ -23,7 +23,6 @@ #include <QtGui/QLabel> #include <QtGui/QContextMenuEvent> -#include <QtGui/QMenu> #include <QtGui/QBrush> #include <QtGui/QPalette> #include <QtGui/QInputDialog> @@ -32,12 +31,14 @@ #include <kstandardaction.h> #include <kactioncollection.h> #include <kaction.h> +#include <kmenu.h> #include <kabc/addressbook.h> #include <kabc/stdaddressbook.h> #include <kabc/addresseelist.h> #include "sflphone_const.h" +#include "conf/ConfigurationSkeleton.h" #include "configurationmanager_interface_singleton.h" #include "callmanager_interface_singleton.h" #include "instance_interface_singleton.h" @@ -65,6 +66,7 @@ SFLPhoneView::SFLPhoneView(QWidget *parent) errorWindow = new QErrorMessage(this); callList = new CallList(this); historyLoaded = false; + for(int i = 0 ; i < callList->size() ; i++) { Call * call = (*callList)[i]; @@ -107,6 +109,9 @@ SFLPhoneView::SFLPhoneView(QWidget *parent) connect(&configurationManager, SIGNAL(accountsChanged()), accountList, SLOT(updateAccounts())); + + connect(&configurationManager, SIGNAL(audioManagerChanged()), + this, SLOT(on1_audioManagerChanged())); connect(configDialog, SIGNAL(clearCallHistoryAsked()), callList, SLOT(clearHistory())); @@ -746,27 +751,22 @@ void SFLPhoneView::updateRecordButton() if(recVol == 0.00) { toolButton_recVol->setIcon(QIcon(ICON_REC_VOL_0)); - toolButton_recVolAlone->setIcon(QIcon(ICON_REC_VOL_0)); } else if(recVol < 0.33) { toolButton_recVol->setIcon(QIcon(ICON_REC_VOL_1)); - toolButton_recVolAlone->setIcon(QIcon(ICON_REC_VOL_1)); } else if(recVol < 0.67) { toolButton_recVol->setIcon(QIcon(ICON_REC_VOL_2)); - toolButton_recVolAlone->setIcon(QIcon(ICON_REC_VOL_2)); } else { toolButton_recVol->setIcon(QIcon(ICON_REC_VOL_3)); - toolButton_recVolAlone->setIcon(QIcon(ICON_REC_VOL_3)); } if(recVol > 0) { toolButton_recVol->setChecked(false); - toolButton_recVolAlone->setChecked(false); } } void SFLPhoneView::updateVolumeButton() @@ -777,27 +777,22 @@ void SFLPhoneView::updateVolumeButton() if(sndVol == 0.00) { toolButton_sndVol->setIcon(QIcon(ICON_SND_VOL_0)); - toolButton_sndVolAlone->setIcon(QIcon(ICON_SND_VOL_0)); } else if(sndVol < 0.33) { toolButton_sndVol->setIcon(QIcon(ICON_SND_VOL_1)); - toolButton_sndVolAlone->setIcon(QIcon(ICON_SND_VOL_1)); } else if(sndVol < 0.67) { toolButton_sndVol->setIcon(QIcon(ICON_SND_VOL_2)); - toolButton_sndVolAlone->setIcon(QIcon(ICON_SND_VOL_2)); } else { toolButton_sndVol->setIcon(QIcon(ICON_SND_VOL_3)); - toolButton_sndVolAlone->setIcon(QIcon(ICON_SND_VOL_3)); } if(sndVol > 0) { toolButton_sndVol->setChecked(false); - toolButton_sndVolAlone->setChecked(false); } } @@ -809,7 +804,6 @@ void SFLPhoneView::updateRecordBar() double recVol = callManager.getVolume(RECORD_DEVICE); int value = (int)(recVol * 100); slider_recVol->setValue(value); - slider_recVolAlone->setValue(value); } void SFLPhoneView::updateVolumeBar() { @@ -818,26 +812,38 @@ void SFLPhoneView::updateVolumeBar() double sndVol = callManager.getVolume(SOUND_DEVICE); int value = (int)(sndVol * 100); slider_sndVol->setValue(value); - slider_sndVolAlone->setValue(value); } void SFLPhoneView::updateVolumeControls() { - qDebug() << "updateVolumeControls"; ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); - int display = configurationManager.getVolumeControls(); - int displayDialpad = configurationManager.getDialpad(); - widget_recVol->setVisible(display && displayDialpad); - widget_sndVol->setVisible(display && displayDialpad); - widget_recVolAlone->setVisible(display && ! displayDialpad); - widget_sndVolAlone->setVisible(display && ! displayDialpad); + int display = 0; + + if(configurationManager.getAudioManager() == ConfigurationSkeleton::EnumInterface::ALSA) + { + display = configurationManager.getVolumeControls(); + + ((SFLPhone*)parent())->action_displayVolumeControls->setEnabled(true); + } + else + { + ((SFLPhone*)parent())->action_displayVolumeControls->setEnabled(false); + } + + qDebug() << "updateVolumeControls " << display; + + ((SFLPhone*)parent())->action_displayVolumeControls->setChecked(display); + widget_recVol->setVisible(display); + widget_sndVol->setVisible(display); } void SFLPhoneView::updateDialpad() { - qDebug() << "updateDialpad"; ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); int display = configurationManager.getDialpad(); + + qDebug() << "updateDialpad " << display; + widget_dialpad->setVisible(display); } @@ -846,13 +852,16 @@ void SFLPhoneView::updateStatusMessage() { qDebug() << "updateStatusMessage"; Account * account = accountInUse(); + if(account == NULL) { emit statusMessageChangeAsked(i18n("No registered accounts")); } else { - emit statusMessageChangeAsked(i18n("Using account") + " \'" + account->getAlias() + "\' (" + account->getAccountDetail(ACCOUNT_TYPE) + ")") ; + emit statusMessageChangeAsked(i18n("Using account") + + " \'" + account->getAlias() + + "\' (" + account->getAccountDetail(ACCOUNT_TYPE) + ")") ; } } @@ -865,20 +874,25 @@ void SFLPhoneView::updateStatusMessage() void SFLPhoneView::displayVolumeControls() { ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); - configurationManager.setVolumeControls(); + int display = configurationManager.getVolumeControls(); + configurationManager.setVolumeControls(!display); updateVolumeControls(); } void SFLPhoneView::displayDialpad() { ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); - configurationManager.setDialpad(); + int display = configurationManager.getDialpad(); + + configurationManager.setDialpad(!display); updateDialpad(); - updateVolumeControls(); } -void SFLPhoneView::on_widget_dialpad_typed(QString text) { typeString(text); } +void SFLPhoneView::on_widget_dialpad_typed(QString text) +{ + typeString(text); +} void SFLPhoneView::on_lineEdit_searchHistory_textChanged() @@ -921,19 +935,14 @@ void SFLPhoneView::on_toolButton_recVol_clicked(bool checked) { qDebug() << "checked"; toolButton_recVol->setChecked(false); - toolButton_recVolAlone->setChecked(false); slider_recVol->setEnabled(true); - slider_recVolAlone->setEnabled(true); callManager.setVolume(RECORD_DEVICE, (double)slider_recVol->value() / 100.0); } else { qDebug() << "unchecked"; toolButton_recVol->setChecked(true); - qDebug() << "toolButton_recVolAlone->setChecked(true);"; - toolButton_recVolAlone->setChecked(true); slider_recVol->setEnabled(false); - slider_recVolAlone->setEnabled(false); callManager.setVolume(RECORD_DEVICE, 0.0); } updateRecordButton(); @@ -948,18 +957,14 @@ void SFLPhoneView::on_toolButton_sndVol_clicked(bool checked) { qDebug() << "checked"; toolButton_sndVol->setChecked(false); - toolButton_sndVolAlone->setChecked(false); slider_sndVol->setEnabled(true); - slider_sndVolAlone->setEnabled(true); callManager.setVolume(SOUND_DEVICE, (double)slider_sndVol->value() / 100.0); } else { qDebug() << "unchecked"; toolButton_sndVol->setChecked(true); - toolButton_sndVolAlone->setChecked(true); slider_sndVol->setEnabled(false); - slider_sndVolAlone->setEnabled(false); callManager.setVolume(SOUND_DEVICE, 0.0); } updateVolumeButton(); @@ -1053,11 +1058,11 @@ void SFLPhoneView::on_stackedWidget_screen_currentChanged(int index) void SFLPhoneView::contextMenuEvent(QContextMenuEvent *event) { - QMenu menu(this); + KMenu menu(this); if( ( stackedWidget_screen->currentWidget() == page_callHistory && listWidget_callHistory->currentItem() ) || ( stackedWidget_screen->currentWidget() == page_addressBook && listWidget_addressBook->currentItem() ) ) { - QAction * action_edit = new QAction(&menu); + KAction * action_edit = new KAction(&menu); action_edit->setText(i18n("Edit before call")); connect(action_edit, SIGNAL(triggered()), this , SLOT(editBeforeCall())); @@ -1363,6 +1368,13 @@ void SFLPhoneView::on1_volumeChanged(const QString & /*device*/, double value) updateVolumeBar(); } +void SFLPhoneView::on1_audioManagerChanged() +{ + qDebug() << "Signal : Audio Manager Changed !"; + + updateVolumeControls(); +} + void SFLPhoneView::enableAddressBook() { qDebug() << "\nenableAddressBook\n"; diff --git a/sflphone-client-kde/src/SFLPhoneView.h b/sflphone-client-kde/src/SFLPhoneView.h index 5d8b726ac66c70d8d005c32b98bb2bbd903a5a4d..3b6c97193b490ba10d331417baf36b29d0bf67b7 100644 --- a/sflphone-client-kde/src/SFLPhoneView.h +++ b/sflphone-client-kde/src/SFLPhoneView.h @@ -331,7 +331,7 @@ public slots: void on1_incomingMessage(const QString &accountID, const QString &message); void on1_voiceMailNotify(const QString &accountID, int count); void on1_volumeChanged(const QString &device, double value); - + void on1_audioManagerChanged(); void changeScreen(int screen); signals: diff --git a/sflphone-client-kde/src/SFLPhoneapplication.cpp b/sflphone-client-kde/src/SFLPhoneapplication.cpp index 6d65d67fe2dd96dfe2326c6f849ede4db0d9d098..bbb54dd82e90392fcc6b9549fad3de8cf44e24e8 100644 --- a/sflphone-client-kde/src/SFLPhoneapplication.cpp +++ b/sflphone-client-kde/src/SFLPhoneapplication.cpp @@ -16,13 +16,8 @@ SFLPhoneApplication::SFLPhoneApplication() : KApplication() , sflphoneWindow_(0) -// , quitSelected_(false) { // SFLPhoneApplication is created from main.cpp. - // It continues the initialisation of the application. - - // Install a message handler, so KMESS_ASSERT won't do a exit(1) or abort() - // It makes debugging output on Windows disappear, so don't use it there // Start remaining initialisation initializePaths(); diff --git a/sflphone-client-kde/src/SFLPhoneapplication.h b/sflphone-client-kde/src/SFLPhoneapplication.h index 38bd15c09375f4c85cba2ffe0acbe211505e5428..69bab3386503734b748a5c3ce06999fbfc4a3548 100644 --- a/sflphone-client-kde/src/SFLPhoneapplication.h +++ b/sflphone-client-kde/src/SFLPhoneapplication.h @@ -21,14 +21,6 @@ class SFLPhoneApplication : public KApplication // Return the contact list window SFLPhone* getSFLPhoneWindow() const; - // Return true if quit was selected - //bool quitSelected() const; - // Tell the application that quit was selected - //void setQuitSelected(bool quitSelected); - - // private slots: - //void slotAboutToQuit(); - // void slotLastWindowClosed(); private: // private methods void initializeMainWindow(); @@ -37,8 +29,6 @@ class SFLPhoneApplication : public KApplication private: // Reference to the sflphone window SFLPhone *sflphoneWindow_; - // True when quit was selected - //bool quitSelected_; }; #endif // SFLPHONEAPPLICATION_H diff --git a/sflphone-client-kde/src/conf/dlgaccounts.cpp b/sflphone-client-kde/src/conf/dlgaccounts.cpp index fba3dbd3c4a4ed76698a46eaa1f46996f12c8d42..8407a204e445a5aaa6a58450d40fa25557e4cb88 100644 --- a/sflphone-client-kde/src/conf/dlgaccounts.cpp +++ b/sflphone-client-kde/src/conf/dlgaccounts.cpp @@ -170,7 +170,7 @@ void DlgAccounts::saveAccount(QListWidgetItem * item) account->setAccountDetail(ACCOUNT_MAILBOX, edit6_mailbox->text()); account->setAccountDetail(ACCOUNT_RESOLVE_ONCE, checkBox_conformRFC->isChecked() ? "FALSE" : "TRUE"); account->setAccountDetail(ACCOUNT_EXPIRE, QString::number(spinbox_regExpire->value())); - account->setAccountDetail(ACCOUNT_ENABLED, is_checked ? ACCOUNT_ENABLED_TRUE : ACCOUNT_ENABLED_FALSE); + account->setAccountDetail(ACCOUNT_ENABLED, account->isChecked() ? ACCOUNT_ENABLED_TRUE : ACCOUNT_ENABLED_FALSE); } void DlgAccounts::loadAccount(QListWidgetItem * item) diff --git a/sflphone-client-kde/src/dbus/configurationmanager-introspec.xml b/sflphone-client-kde/src/dbus/configurationmanager-introspec.xml index cea75a0441eac026bdb3b562f379f1cc6c0bde27..d0bd440ab3a8b67cb94cfbadc0fd6a2c4305de6a 100644 --- a/sflphone-client-kde/src/dbus/configurationmanager-introspec.xml +++ b/sflphone-client-kde/src/dbus/configurationmanager-introspec.xml @@ -201,6 +201,7 @@ </method> <method name="setDialpad"> + <arg type="b" name="display" direction="in"/> </method> <method name="getSearchbar"> @@ -222,6 +223,7 @@ </method> <method name="setVolumeControls"> + <arg type="b" name="display" direction="in"/> </method> <method name="getHistoryLimit"> @@ -321,7 +323,10 @@ <signal name="accountsChanged"> - </signal> + </signal> + + <signal name="audioManagerChanged"> + </signal> <signal name="errorAlert"> <arg type="i" name="code" direction="out"/> diff --git a/sflphone-client-kde/src/ui/SFLPhoneView_base.ui b/sflphone-client-kde/src/ui/SFLPhoneView_base.ui index 4d026f13ed56e6cefb2062bc11e6594094f0e1a0..081d9efaa8d92486ebbb34921c70bacbd2ac306a 100644 --- a/sflphone-client-kde/src/ui/SFLPhoneView_base.ui +++ b/sflphone-client-kde/src/ui/SFLPhoneView_base.ui @@ -92,95 +92,11 @@ </widget> </item> <item> - <widget class="QWidget" name="widget_dialpadAndControls" native="true"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>160</height> - </size> + <widget class="QWidget" name="widget_controls" native="true"> + <property name="enabled"> + <bool>true</bool> </property> - <layout class="QHBoxLayout" name="horizontalLayout_dialpadAndControls"> - <property name="spacing"> - <number>1</number> - </property> - <property name="margin"> - <number>0</number> - </property> - <item> - <widget class="QWidget" name="widget_recVol" native="true"> - <property name="layoutDirection"> - <enum>Qt::RightToLeft</enum> - </property> - <layout class="QVBoxLayout" name="verticalLayout_4"> - <property name="spacing"> - <number>0</number> - </property> - <property name="margin"> - <number>0</number> - </property> - <item> - <widget class="QSlider" name="slider_recVol"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>50</height> - </size> - </property> - <property name="toolTip"> - <string>Mic volume</string> - </property> - <property name="layoutDirection"> - <enum>Qt::RightToLeft</enum> - </property> - <property name="autoFillBackground"> - <bool>false</bool> - </property> - <property name="maximum"> - <number>100</number> - </property> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="invertedAppearance"> - <bool>false</bool> - </property> - <property name="invertedControls"> - <bool>false</bool> - </property> - <property name="tickPosition"> - <enum>QSlider::NoTicks</enum> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="toolButton_recVol"> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset> - <normaloff>:/Images/mic_75.svg</normaloff>:/Images/mic_75.svg</iconset> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - </widget> - </item> - </layout> - </widget> - </item> + <layout class="QVBoxLayout" name="verticalLayout_2"> <item> <widget class="Dialpad" name="widget_dialpad" native="true"> <property name="sizePolicy"> @@ -192,88 +108,10 @@ </widget> </item> <item> - <widget class="QWidget" name="widget_sndVol" native="true"> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <property name="spacing"> - <number>0</number> - </property> - <property name="margin"> - <number>0</number> - </property> - <item> - <widget class="QSlider" name="slider_sndVol"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>50</height> - </size> - </property> - <property name="toolTip"> - <string>Speakers volume</string> - </property> - <property name="layoutDirection"> - <enum>Qt::LeftToRight</enum> - </property> - <property name="autoFillBackground"> - <bool>false</bool> - </property> - <property name="maximum"> - <number>100</number> - </property> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="tickPosition"> - <enum>QSlider::NoTicks</enum> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="toolButton_sndVol"> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset> - <normaloff>:/Images/speaker_75.svg</normaloff>:/Images/speaker_75.svg</iconset> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - <property name="checked"> - <bool>false</bool> - </property> - </widget> - </item> - </layout> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QWidget" name="widget_controlsAlone" native="true"> - <property name="enabled"> - <bool>true</bool> - </property> - <layout class="QVBoxLayout" name="verticalLayout_6"> - <property name="spacing"> - <number>0</number> - </property> - <property name="margin"> - <number>0</number> - </property> - <item> - <widget class="QWidget" name="widget_recVolAlone" native="true"> + <widget class="QWidget" name="widget_recVol" native="true"> <layout class="QHBoxLayout" name="horizontalLayout_4"> <item> - <widget class="QToolButton" name="toolButton_recVolAlone"> + <widget class="QToolButton" name="toolButton_recVol"> <property name="text"> <string/> </property> @@ -287,7 +125,7 @@ </widget> </item> <item> - <widget class="QSlider" name="slider_recVolAlone"> + <widget class="QSlider" name="slider_recVol"> <property name="orientation"> <enum>Qt::Horizontal</enum> </property> @@ -297,10 +135,10 @@ </widget> </item> <item> - <widget class="QWidget" name="widget_sndVolAlone" native="true"> + <widget class="QWidget" name="widget_sndVol" native="true"> <layout class="QHBoxLayout" name="horizontalLayout"> <item> - <widget class="QToolButton" name="toolButton_sndVolAlone"> + <widget class="QToolButton" name="toolButton_sndVol"> <property name="text"> <string/> </property> @@ -314,7 +152,7 @@ </widget> </item> <item> - <widget class="QSlider" name="slider_sndVolAlone"> + <widget class="QSlider" name="slider_sndVol"> <property name="orientation"> <enum>Qt::Horizontal</enum> </property> @@ -344,70 +182,5 @@ <resources> <include location="../qrc/resources.qrc"/> </resources> - <connections> - <connection> - <sender>slider_recVolAlone</sender> - <signal>valueChanged(int)</signal> - <receiver>slider_recVol</receiver> - <slot>setValue(int)</slot> - <hints> - <hint type="sourcelabel"> - <x>158</x> - <y>434</y> - </hint> - <hint type="destinationlabel"> - <x>19</x> - <y>342</y> - </hint> - </hints> - </connection> - <connection> - <sender>slider_sndVolAlone</sender> - <signal>valueChanged(int)</signal> - <receiver>slider_sndVol</receiver> - <slot>setValue(int)</slot> - <hints> - <hint type="sourcelabel"> - <x>264</x> - <y>463</y> - </hint> - <hint type="destinationlabel"> - <x>637</x> - <y>368</y> - </hint> - </hints> - </connection> - <connection> - <sender>toolButton_recVolAlone</sender> - <signal>clicked()</signal> - <receiver>toolButton_recVol</receiver> - <slot>click()</slot> - <hints> - <hint type="sourcelabel"> - <x>32</x> - <y>429</y> - </hint> - <hint type="destinationlabel"> - <x>12</x> - <y>402</y> - </hint> - </hints> - </connection> - <connection> - <sender>toolButton_sndVolAlone</sender> - <signal>clicked()</signal> - <receiver>toolButton_sndVol</receiver> - <slot>click()</slot> - <hints> - <hint type="sourcelabel"> - <x>18</x> - <y>462</y> - </hint> - <hint type="destinationlabel"> - <x>637</x> - <y>411</y> - </hint> - </hints> - </connection> - </connections> + <connections/> </ui> diff --git a/sflphone-common/src/dbus/configurationmanager-introspec.xml b/sflphone-common/src/dbus/configurationmanager-introspec.xml index 018917eaa4db5f890284d00d99d93be1b6871747..c45ff4c873df6e93614b4bb6d464258d9b82c3f1 100644 --- a/sflphone-common/src/dbus/configurationmanager-introspec.xml +++ b/sflphone-common/src/dbus/configurationmanager-introspec.xml @@ -337,6 +337,9 @@ <signal name="accountsChanged"> </signal> + <signal name="audioManagerChanged"> + </signal> + <signal name="errorAlert"> <arg type="i" name="code" direction="out"/> </signal> diff --git a/sflphone-common/src/managerimpl.cpp b/sflphone-common/src/managerimpl.cpp index ca8ed41903e580d63fa4401e42e545d5ae38b541..f65f3d4d63a66598a022f105255de8f534c16b95 100644 --- a/sflphone-common/src/managerimpl.cpp +++ b/sflphone-common/src/managerimpl.cpp @@ -2960,6 +2960,9 @@ void ManagerImpl::setAudioManager (const int32_t& api) setConfig (PREFERENCES , CONFIG_AUDIO , api) ; switchAudioManager(); + + if (_dbus) _dbus->getConfigurationManager()->audioManagerChanged(); + return; }