author | Sebastian Brannstrom <sebastianb@symbian.org> |
Mon, 09 Aug 2010 14:37:31 +0100 | |
changeset 20 | a7451a8eb5dc |
parent 19 | e4b6ee329501 |
child 23 | 51fcdd1558d8 |
permissions | -rwxr-xr-x |
19
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
1 |
#include "mainwindow.h" |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
2 |
#include "ui_mainwindow.h" |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
3 |
#include "contactsengine.h" |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
4 |
|
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
5 |
MainWindow::MainWindow(QWidget *parent) : |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
6 |
QMainWindow(parent), |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
7 |
ui(new Ui::MainWindow) |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
8 |
{ |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
9 |
ui->setupUi(this); |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
10 |
this->ce = new ContactsEngine(this); |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
11 |
|
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
12 |
ui->comboBox->addItems(this->ce->dataSources()); |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
13 |
|
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
14 |
} |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
15 |
|
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
16 |
void MainWindow::backendSelected(QString txt) |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
17 |
{ |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
18 |
// based on this string create a contact manager. |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
19 |
this->ce->setManager(txt); |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
20 |
} |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
21 |
|
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
22 |
MainWindow::~MainWindow() |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
23 |
{ |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
24 |
delete ui; |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
25 |
} |