diff -r 863c77d15828 -r d9d4ea56179a contactengine/contactlist.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/contactengine/contactlist.cpp Thu Sep 16 10:59:11 2010 -0700 @@ -0,0 +1,59 @@ +#include +#include +#include "contactlist.h" + +ContactList::ContactList(QWidget *parent) : + QWidget(parent), + ui(new Ui::Form) +{ + ui->setupUi(this); + + this->ce = new ContactsEngine(this); + + connect(this->ce, SIGNAL(errorOccurred(QString)), + this,SLOT(errorOccurred(QString))); + + this->ce->createManager(); + + connect(ui->comboBox, SIGNAL( activated ( const QString & )), + this->ce, SLOT(setManager(const QString &) )); + + + ui->comboBox->addItems(this->ce->dataSources()); + ui->listView->setModel(this->ce); + +} + + +void ContactList::errorOccurred(QString err) +{ + QMessageBox::information(this, "foo", err); +} + +// just should all contacts. +void ContactList::showAllContacts() +{ + OLApplication* app = dynamic_cast(qApp); + app->showBanner("(all) NYI", false); +} + +// source the list of contacts by proximity to the phone. +void ContactList::sortByGeo() +{ + OLApplication* app = dynamic_cast(qApp); + app->showBanner("(geo) NYI", false); +} + +// show all contacts at a particular event. +void ContactList::showEvents() +{ + OLApplication* app = dynamic_cast(qApp); + app->showBanner("(events) NYI", false); +} + +// show call log +void ContactList::showLogs() +{ + OLApplication* app = dynamic_cast(qApp); + app->showBanner("(logs) NYI", false); +}