contactengine/mainwindow.cpp
changeset 23 51fcdd1558d8
parent 19 e4b6ee329501
child 25 adbe71832e2b
--- a/contactengine/mainwindow.cpp	Tue Aug 10 19:10:57 2010 +0100
+++ b/contactengine/mainwindow.cpp	Tue Aug 10 14:05:55 2010 -0700
@@ -1,3 +1,5 @@
+#include <QComboBox>
+
 #include "mainwindow.h"
 #include "ui_mainwindow.h"
 #include "contactsengine.h"
@@ -8,16 +10,20 @@
 {
     ui->setupUi(this);
     this->ce = new ContactsEngine(this);
+  //  this->ce->enumerateMgrs();
+    this->ce->setManager(QString("memory"));
+
+    connect(ui->comboBox, SIGNAL( activated ( const QString &  )),
+            this->ce, SLOT(setManager(const QString &) ));
 
     ui->comboBox->addItems(this->ce->dataSources());
-
+    this->ce->populateAddresses();
+ //   this->ce->enumerateMgrs();
+  //  this->ce->dumpContactMgr();
+    ui->listView->setModel(this->ce);
 }
 
-void MainWindow::backendSelected(QString txt)
-{
-    // based on this string create a contact manager.
-    this->ce->setManager(txt);
-}
+
 
 MainWindow::~MainWindow()
 {