contactengine/mainwindow.cpp
author John Kern <johnk@symbian.org>
Tue, 10 Aug 2010 14:05:55 -0700
changeset 23 51fcdd1558d8
parent 19 e4b6ee329501
child 25 adbe71832e2b
permissions -rwxr-xr-x
clean up

#include <QComboBox>

#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "contactsengine.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    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);
}



MainWindow::~MainWindow()
{
    delete ui;
}