Skip to content
Snippets Groups Projects
Commit 6ddf5306 authored by Emmanuel Lepage's avatar Emmanuel Lepage
Browse files

Update daemon dbus XML and port KDE config backend from dbus to local

parent 0c8db47c
Branches
Tags
No related merge requests found
......@@ -85,11 +85,11 @@
<method name="setCredentials" tp:name-for-bindings="setCredentials">
<tp:docstring>
</tp:docstring>
<annotation name="com.trolltech.QtDBus.QtTypeName.In2" value="MapStringString"/>
<arg type="s" name="accountID" direction="in">
<tp:docstring>
</tp:docstring>
</arg>
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorMapStringString"/>
<arg type="aa{ss}" name="credentialInformation" direction="in" tp:type="String_String_Map">
<tp:docstring>
</tp:docstring>
......@@ -137,11 +137,11 @@
<method name="getCredentials" tp:name-for-bindings="getCredentials">
<tp:docstring>
</tp:docstring>
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="MapStringString"/>
<arg type="s" name="accountID" direction="in">
<tp:docstring>
</tp:docstring>
</arg>
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorMapStringString"/>
<arg type="aa{ss}" name="credentialInformation" direction="out">
<tp:docstring>
</tp:docstring>
......@@ -284,7 +284,7 @@
<method name="getAudioCodecList" tp:name-for-bindings="getAudioCodecList">
<tp:docstring>
</tp:docstring>
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorInt"/>
<arg type="ai" name="list" direction="out">
<tp:docstring>
</tp:docstring>
......
......@@ -157,8 +157,8 @@ void SFLPhone::setupActions()
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_displayVolumeControls, SIGNAL(toggled(bool)), view, SLOT(displayVolumeControls(bool)));
connect(action_displayDialpad, SIGNAL(toggled(bool)), view, SLOT(displayDialpad(bool)));
connect(action_accountCreationWizard, SIGNAL(triggered()), view, SLOT(accountCreationWizard()));
action_screen->addAction(action_main);
......
......@@ -121,8 +121,6 @@ SFLPhoneView::SFLPhoneView(QWidget *parent)
this, SLOT(on1_incomingMessage(const QString &, const QString &)));
connect(&callManager, SIGNAL(voiceMailNotify(const QString &, int)),
this, SLOT(on1_voiceMailNotify(const QString &, int)));
//END Port to Call Model
connect(&callManager, SIGNAL(volumeChanged(const QString &, double)),
this, SLOT(on1_volumeChanged(const QString &, double)));
......@@ -132,6 +130,7 @@ SFLPhoneView::SFLPhoneView(QWidget *parent)
connect(&configurationManager, SIGNAL(audioManagerChanged()),
this, SLOT(on1_audioManagerChanged()));
//END Port to Call Model
// connect(configDialog, SIGNAL(clearCallHistoryAsked()), //TODO restore
// &callTreeModel, SLOT(clearHistory()));
......@@ -623,7 +622,7 @@ QVector<Contact *> SFLPhoneView::findContactsInKAddressBook(QString textSearched
Q_UNUSED(full);
// ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
// MapStringInt addressBookSettings = configurationManager.getAddressbookSettings().value();
// int maxResults = addressBookSettings[ADDRESSBOOK_MAX_RESULTS];
// // int maxResults = addressBookSettings[ADDRESSBOOK_MAX_RESULTS];
// int typesDisplayed = phoneNumberTypesDisplayed();
// bool displayPhoto = addressBookSettings[ADDRESSBOOK_DISPLAY_CONTACT_PHOTO];
// AddressBook * ab = KABC::StdAddressBook::self(true);
......@@ -737,7 +736,7 @@ void SFLPhoneView::updateVolumeBar()
void SFLPhoneView::updateVolumeControls()
{
ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
int display = 0;
int display = false;
if(QString(configurationManager.getAudioManager()) == "alsa") {
display = true;
......@@ -748,26 +747,19 @@ void SFLPhoneView::updateVolumeControls()
((SFLPhone*)parent())->action_displayVolumeControls->setEnabled(false);
}
qDebug() << "updateVolumeControls " << display;
((SFLPhone*)parent())->action_displayVolumeControls->setChecked(display);
//widget_recVol->setVisible(display);
//widget_sndVol->setVisible(display);
toolButton_recVol->setVisible(display);
toolButton_sndVol->setVisible(display);
slider_recVol->setVisible(display);
slider_sndVol->setVisible(display);
toolButton_recVol->setVisible(display && ConfigurationSkeleton::displayVolume());
toolButton_sndVol->setVisible(display && ConfigurationSkeleton::displayVolume());
slider_recVol->setVisible(display && ConfigurationSkeleton::displayVolume());
slider_sndVol->setVisible(display && ConfigurationSkeleton::displayVolume());
}
void SFLPhoneView::updateDialpad()
{
ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
int display = true;
qDebug() << "updateDialpad " << display;
widget_dialpad->setVisible(true);//TODO use display variable
widget_dialpad->setVisible(ConfigurationSkeleton::displayDialpad());//TODO use display variable
}
......@@ -792,20 +784,18 @@ void SFLPhoneView::updateStatusMessage()
************ Autoconnect *************
************************************************************/
void SFLPhoneView::displayVolumeControls()
void SFLPhoneView::displayVolumeControls(bool checked)
{
ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
int display = true;//configurationManager.getVolumeControls();
//configurationManager.setVolumeControls(!display);
ConfigurationSkeleton::setDisplayVolume(checked);
updateVolumeControls();
}
void SFLPhoneView::displayDialpad()
void SFLPhoneView::displayDialpad(bool checked)
{
ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
int display = true;// configurationManager.getDialpad();
//configurationManager.setDialpad(!display);
ConfigurationSkeleton::setDisplayDialpad(checked);
updateDialpad();
}
......
......@@ -283,8 +283,8 @@ public slots:
}
}
void displayVolumeControls();
void displayDialpad();
void displayVolumeControls(bool checked = true);
void displayDialpad(bool checked = true);
void configureSflPhone();
void accountCreationWizard();
void accept();
......
......@@ -52,6 +52,7 @@ ConfigurationSkeleton::~ConfigurationSkeleton()
void ConfigurationSkeleton::readConfig()
{
//ConfigurationSkeleton::readConfig();
qDebug() << "\nReading config";
ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
......@@ -172,6 +173,7 @@ void ConfigurationSkeleton::readConfig()
void ConfigurationSkeleton::writeConfig()
{
//ConfigurationSkeleton::writeConfig();
qDebug() << "\nWriting config";
/*ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
......
......@@ -613,11 +613,11 @@ void DlgAccounts::updateWidgets()
void DlgAccounts::loadCodecList()
{
ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
QStringList codecIdList = configurationManager.getAudioCodecList();
QVector<int> codecIdList = configurationManager.getAudioCodecList();
QStringList tmpNameList;
foreach (QString aCodec, codecIdList) {
QStringList codec = configurationManager.getAudioCodecDetails(aCodec.toInt());
foreach (int aCodec, codecIdList) {
QStringList codec = configurationManager.getAudioCodecDetails(aCodec);
QHash<QString, QString> _codec;
_codec["name"] = codec[0];
_codec["frequency"] = codec[1];
......
File=sflphone-client-kde.kcfg
ClassName=ConfigurationSkeletonBase
Singleton=false
Singleton=true
Mutators=true
......@@ -36,6 +36,12 @@
<entry name="displayOnCalls" type="Bool">
<label>Defines whether the main window should be displayed when receiving a message.</label>
</entry>
<entry name="displayDialpad" type="Bool">
<label>Defines whether the main window should be displayed when receiving a message.</label>
</entry>
<entry name="displayVolume" type="Bool">
<label>Defines whether the main window should be displayed when receiving a message.</label>
</entry>
<!-- Audio Settings -->
......
......@@ -283,8 +283,8 @@
<method name="getAudioCodecList" tp:name-for-bindings="getAudioCodecList">
<tp:docstring>
</tp:docstring>
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorString"/>
<arg type="as" name="list" direction="out">
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="VectorInt"/>
<arg type="ai" name="list" direction="out">
<tp:docstring>
</tp:docstring>
</arg>
......
......@@ -9,17 +9,20 @@
typedef QMap<QString, QString> MapStringString;
typedef QMap<QString, int> MapStringInt;
typedef QVector<int> VectorInt;
typedef QVector< QMap<QString, QString> > VectorMapStringString;
Q_DECLARE_METATYPE(MapStringString)
Q_DECLARE_METATYPE(MapStringInt)
Q_DECLARE_METATYPE(VectorMapStringString)
Q_DECLARE_METATYPE(VectorInt);
inline void registerCommTypes() {
qDBusRegisterMetaType<MapStringString>();
qDBusRegisterMetaType<MapStringInt>();
qDBusRegisterMetaType<VectorMapStringString>();
qDBusRegisterMetaType<VectorInt>();
}
#endif
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment