contactengine/main.cpp
author John Kern <johnk@symbian.org>
Fri, 13 Aug 2010 15:37:06 -0700
changeset 31 7140311376c0
parent 27 afa910b5ae81
child 33 f6cf541961ad
permissions -rwxr-xr-x
created in memory contact mgr; populateAddress populates it
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
19
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
     1
#include <QtGui/QApplication>
24
2e833c2a6782 Added csv file to sis exports; improved csv file location in main.cpp
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 21
diff changeset
     2
#include <QDesktopServices>
2e833c2a6782 Added csv file to sis exports; improved csv file location in main.cpp
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 21
diff changeset
     3
#include <QDir>
19
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
     4
#include "mainwindow.h"
21
3bfc3227045d CSV reader works, kind of. contacts.csv file added to project, must live in c:\ at the moment
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 19
diff changeset
     5
#include "dbtools.h"
24
2e833c2a6782 Added csv file to sis exports; improved csv file location in main.cpp
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 21
diff changeset
     6
#include <QDebug>
19
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
     7
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
     8
int main(int argc, char *argv[])
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
     9
{
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
    10
    QApplication a(argc, argv);
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
    11
    MainWindow w;
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
    12
21
3bfc3227045d CSV reader works, kind of. contacts.csv file added to project, must live in c:\ at the moment
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 19
diff changeset
    13
    DBTools dbt;
27
afa910b5ae81 ok I did say to use QDesktopServices but treating contacts.csv is simpler
John Kern <johnk@symbian.org>
parents: 24
diff changeset
    14
    QString dbLocation(":/contacts.csv");
24
2e833c2a6782 Added csv file to sis exports; improved csv file location in main.cpp
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 21
diff changeset
    15
2e833c2a6782 Added csv file to sis exports; improved csv file location in main.cpp
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 21
diff changeset
    16
    qDebug() << "dbLocation=" << dbLocation << endl;
2e833c2a6782 Added csv file to sis exports; improved csv file location in main.cpp
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 21
diff changeset
    17
    dbt.importCSV(dbLocation);
21
3bfc3227045d CSV reader works, kind of. contacts.csv file added to project, must live in c:\ at the moment
Sebastian Brannstrom <sebastianb@symbian.org>
parents: 19
diff changeset
    18
19
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
    19
#if defined(Q_WS_S60)
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
    20
    w.showMaximized();
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
    21
#else
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
    22
    w.show();
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
    23
#endif
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
    return a.exec();
e4b6ee329501 WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff changeset
    26
}