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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
23
51fcdd1558d8 clean up
John Kern <johnk@symbian.org>
parents: 19
diff changeset
     1
#include <QComboBox>
51fcdd1558d8 clean up
John Kern <johnk@symbian.org>
parents: 19
diff changeset
     2
19
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
     3
#include "mainwindow.h"
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
     4
#include "ui_mainwindow.h"
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
     5
#include "contactsengine.h"
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
     6
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
     7
MainWindow::MainWindow(QWidget *parent) :
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
     8
    QMainWindow(parent),
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
     9
    ui(new Ui::MainWindow)
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
    10
{
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
    11
    ui->setupUi(this);
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
    12
    this->ce = new ContactsEngine(this);
23
51fcdd1558d8 clean up
John Kern <johnk@symbian.org>
parents: 19
diff changeset
    13
  //  this->ce->enumerateMgrs();
51fcdd1558d8 clean up
John Kern <johnk@symbian.org>
parents: 19
diff changeset
    14
    this->ce->setManager(QString("memory"));
51fcdd1558d8 clean up
John Kern <johnk@symbian.org>
parents: 19
diff changeset
    15
51fcdd1558d8 clean up
John Kern <johnk@symbian.org>
parents: 19
diff changeset
    16
    connect(ui->comboBox, SIGNAL( activated ( const QString &  )),
51fcdd1558d8 clean up
John Kern <johnk@symbian.org>
parents: 19
diff changeset
    17
            this->ce, SLOT(setManager(const QString &) ));
19
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
    18
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
    19
    ui->comboBox->addItems(this->ce->dataSources());
23
51fcdd1558d8 clean up
John Kern <johnk@symbian.org>
parents: 19
diff changeset
    20
    this->ce->populateAddresses();
51fcdd1558d8 clean up
John Kern <johnk@symbian.org>
parents: 19
diff changeset
    21
 //   this->ce->enumerateMgrs();
51fcdd1558d8 clean up
John Kern <johnk@symbian.org>
parents: 19
diff changeset
    22
  //  this->ce->dumpContactMgr();
51fcdd1558d8 clean up
John Kern <johnk@symbian.org>
parents: 19
diff changeset
    23
    ui->listView->setModel(this->ce);
19
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
    24
}
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
    25
23
51fcdd1558d8 clean up
John Kern <johnk@symbian.org>
parents: 19
diff changeset
    26
19
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
    27
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
    28
MainWindow::~MainWindow()
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
    29
{
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
    30
    delete ui;
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
    31
}