author | John Kern <johnk@symbian.org> |
Fri, 13 Aug 2010 16:18:58 -0700 | |
changeset 32 | 884c1b5354d7 |
parent 20 | a7451a8eb5dc |
permissions | -rw-r--r-- |
20
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
1 |
#ifndef DBTOOLS_H |
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
2 |
#define DBTOOLS_H |
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
3 |
|
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
4 |
#include <QObject> |
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
5 |
|
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
6 |
class DBTools : QObject |
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
7 |
{ |
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
8 |
Q_OBJECT |
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
9 |
public: |
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
10 |
explicit DBTools(QObject *parent = 0); |
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
11 |
~DBTools(); |
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
12 |
|
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
13 |
public: |
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
14 |
void importCSV(QString fileName); |
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
15 |
void testDB(); |
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
16 |
|
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
17 |
signals: |
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
18 |
|
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
19 |
public slots: |
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
20 |
|
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
21 |
private: |
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
22 |
bool createDB(); |
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
23 |
void insertContact( QString name, QString mobile, QString deskphone, |
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
24 |
int xtn, QString email, QString skype, |
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
25 |
QString twitter, QString title, int site, |
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
26 |
int department, int floor); |
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
27 |
int getLastInsertRowId(); |
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
28 |
bool createTable(QString sqlStmt); |
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
29 |
|
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
30 |
}; |
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
31 |
|
a7451a8eb5dc
Added DB framework for CSV import - doesn't work yet though
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
diff
changeset
|
32 |
#endif // DBTOOLS_H |