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

Fix config skeleton

parent 228bcb73
No related branches found
No related tags found
No related merge requests found
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include "lib/configurationmanager_interface_singleton.h" #include "lib/configurationmanager_interface_singleton.h"
#include "lib/Contact.h" #include "lib/Contact.h"
#include "AkonadiBackend.h" #include "AkonadiBackend.h"
#include "conf/ConfigurationSkeleton.h"
SFLPhone* SFLPhone::m_sApp = NULL; SFLPhone* SFLPhone::m_sApp = NULL;
...@@ -75,6 +76,8 @@ bool SFLPhone::initialize() ...@@ -75,6 +76,8 @@ bool SFLPhone::initialize()
return false; return false;
} }
ConfigurationSkeleton::self();
//Keep these template paramater or the static attribute wont be share between this and the call view, they need to be //Keep these template paramater or the static attribute wont be share between this and the call view, they need to be
CallModel<CallTreeItem*,QTreeWidgetItem*>* histoModel = new CallModel<CallTreeItem*,QTreeWidgetItem*>(CallModel<CallTreeItem*,QTreeWidgetItem*>::History); CallModel<CallTreeItem*,QTreeWidgetItem*>* histoModel = new CallModel<CallTreeItem*,QTreeWidgetItem*>(CallModel<CallTreeItem*,QTreeWidgetItem*>::History);
histoModel->initHistory(); histoModel->initHistory();
...@@ -193,8 +196,8 @@ void SFLPhone::setupActions() ...@@ -193,8 +196,8 @@ void SFLPhone::setupActions()
action_displayDialpad->setCheckable(true); action_displayDialpad->setCheckable(true);
action_displayVolumeControls->setCheckable(true); action_displayVolumeControls->setCheckable(true);
action_displayVolumeControls->setChecked(/*configurationManager.getVolumeControls()*/true); action_displayVolumeControls->setChecked(ConfigurationSkeleton::displayVolume());
action_displayDialpad->setChecked(/*configurationManager.getDialpad()*/true); action_displayDialpad->setChecked(ConfigurationSkeleton::displayDialpad());
action_accountCreationWizard = new KAction(i18n("Account creation wizard"), this); action_accountCreationWizard = new KAction(i18n("Account creation wizard"), this);
connect(action_accept, SIGNAL(triggered()), m_pView , SLOT(accept() )); connect(action_accept, SIGNAL(triggered()), m_pView , SLOT(accept() ));
......
...@@ -515,6 +515,7 @@ void SFLPhoneView::displayVolumeControls(bool checked) ...@@ -515,6 +515,7 @@ void SFLPhoneView::displayVolumeControls(bool checked)
void SFLPhoneView::displayDialpad(bool checked) void SFLPhoneView::displayDialpad(bool checked)
{ {
qDebug() << "Max res2: " << ConfigurationSkeleton::displayDialpad() << "\n\n\n\n\n\n";
ConfigurationSkeleton::setDisplayDialpad(checked); ConfigurationSkeleton::setDisplayDialpad(checked);
updateDialpad(); updateDialpad();
} }
......
...@@ -286,8 +286,9 @@ void ConfigurationSkeleton::writeConfig() ...@@ -286,8 +286,9 @@ void ConfigurationSkeleton::writeConfig()
configurationManager.setHookSettings(hooksSettings); configurationManager.setHookSettings(hooksSettings);
qDebug() << "Finished to write config\n";*/ qDebug() << "Finished to write config\n";*/
qDebug() << "Max res: " << displayDialpad() << "\n\n\n\n\n\n";
readConfig(); qDebug() << "Max res3: " << ConfigurationSkeletonBase::displayDialpad() << "\n\n\n\n\n\n";
ConfigurationSkeletonBase::writeConfig();
} }
// QStringList ConfigurationSkeleton::activeCodecList() const // QStringList ConfigurationSkeleton::activeCodecList() const
...@@ -299,3 +300,11 @@ void ConfigurationSkeleton::writeConfig() ...@@ -299,3 +300,11 @@ void ConfigurationSkeleton::writeConfig()
// { // {
// codecListModel->setActiveCodecList(v); // codecListModel->setActiveCodecList(v);
// } // }
// void ConfigurationSkeleton::writeConfig()
// {
// qDebug() << "Max res4: " << displayDialpad() << "\n\n\n\n\n\n";
// qDebug() << "Max res5: " << ConfigurationSkeletonBase::displayDialpad() << "\n\n\n\n\n\n";
//
// ConfigurationSkeletonBase::writeConfig();
// }
\ No newline at end of file
...@@ -62,7 +62,6 @@ public: ...@@ -62,7 +62,6 @@ public:
*/ */
virtual void writeConfig(); virtual void writeConfig();
static ConfigurationSkeleton * self(); static ConfigurationSkeleton * self();
//QStringList activeCodecList() const; //QStringList activeCodecList() const;
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE kcfg SYSTEM "http://www.kde.org/standards/kcfg/1.0/kcfg.dtd"> <!DOCTYPE kcfg SYSTEM "http://www.kde.org/standards/kcfg/1.0/kcfg.dtd">
<kcfg> <kcfg>
<kcfgfile name="ConfigDialogKDE" /> <kcfgfile/>
<group name="main"> <group name="main">
<!-- General Settings --> <!-- General Settings -->
......
...@@ -60,8 +60,8 @@ int main(int argc, char **argv) ...@@ -60,8 +60,8 @@ int main(int argc, char **argv)
int retVal = app.exec(); int retVal = app.exec();
ConfigurationSkeleton conf; ConfigurationSkeleton* conf = ConfigurationSkeleton::self();
conf.writeConfig(); conf->writeConfig();
return retVal; return retVal;
} }
catch(const char * msg) catch(const char * msg)
......
...@@ -83,6 +83,8 @@ ContactDock::ContactDock(QWidget* parent) : QDockWidget(parent) ...@@ -83,6 +83,8 @@ ContactDock::ContactDock(QWidget* parent) : QDockWidget(parent)
m_pShowHistoCK->setChecked(ConfigurationSkeleton::displayContactCallHistory()); m_pShowHistoCK->setChecked(ConfigurationSkeleton::displayContactCallHistory());
m_pShowHistoCK->setText("Display history"); m_pShowHistoCK->setText("Display history");
setHistoryVisible(ConfigurationSkeleton::displayContactCallHistory());
QVBoxLayout* mainLayout = new QVBoxLayout(mainWidget); QVBoxLayout* mainLayout = new QVBoxLayout(mainWidget);
mainLayout->addWidget ( m_pSortByCBB ); mainLayout->addWidget ( m_pSortByCBB );
...@@ -98,7 +100,7 @@ ContactDock::ContactDock(QWidget* parent) : QDockWidget(parent) ...@@ -98,7 +100,7 @@ ContactDock::ContactDock(QWidget* parent) : QDockWidget(parent)
connect (AkonadiBackend::getInstance(),SIGNAL(collectionChanged()), this, SLOT(reloadContact() )); connect (AkonadiBackend::getInstance(),SIGNAL(collectionChanged()), this, SLOT(reloadContact() ));
connect (m_pContactView, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)),this, SLOT(loadContactHistory(QTreeWidgetItem*) )); connect (m_pContactView, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)),this, SLOT(loadContactHistory(QTreeWidgetItem*) ));
connect (m_pFilterLE, SIGNAL(textChanged(QString)), this, SLOT(filter(QString) )); connect (m_pFilterLE, SIGNAL(textChanged(QString)), this, SLOT(filter(QString) ));
connect (m_pShowHistoCK, SIGNAL(toggled(bool)), m_pCallView, SLOT(setVisible(bool) )); connect (m_pShowHistoCK, SIGNAL(toggled(bool)), this, SLOT(setHistoryVisible(bool) ));
setWindowTitle("Contact"); setWindowTitle("Contact");
} }
...@@ -209,3 +211,10 @@ bool ContactTree::dropMimeData(QTreeWidgetItem *parent, int index, const QMimeDa ...@@ -209,3 +211,10 @@ bool ContactTree::dropMimeData(QTreeWidgetItem *parent, int index, const QMimeDa
return false; return false;
} }
void ContactDock::setHistoryVisible(bool visible)
{
qDebug() << "Toggling history visibility";
m_pCallView->setVisible(visible);
ConfigurationSkeleton::setDisplayContactCallHistory(visible);
}
\ No newline at end of file
...@@ -38,6 +38,7 @@ private slots: ...@@ -38,6 +38,7 @@ private slots:
void reloadContact(); void reloadContact();
void loadContactHistory(QTreeWidgetItem* item); void loadContactHistory(QTreeWidgetItem* item);
void filter(QString text); void filter(QString text);
void setHistoryVisible(bool visible);
}; };
class ContactTree : public QTreeWidget { class ContactTree : public QTreeWidget {
......
...@@ -52,6 +52,7 @@ HistoryDock::HistoryDock(QWidget* parent) : QDockWidget(parent) ...@@ -52,6 +52,7 @@ HistoryDock::HistoryDock(QWidget* parent) : QDockWidget(parent)
m_pLinkPB = new QPushButton(this); m_pLinkPB = new QPushButton(this);
m_pAllTimeCB->setChecked(ConfigurationSkeleton::displayDataRange()); m_pAllTimeCB->setChecked(ConfigurationSkeleton::displayDataRange());
enableDateRange(ConfigurationSkeleton::displayDataRange());
m_pSortByL->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Preferred); m_pSortByL->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Preferred);
m_pSortByCBB->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred); m_pSortByCBB->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment