author | John Kern <johnk@symbian.org> |
Thu, 09 Sep 2010 20:03:34 -0700 | |
changeset 47 | c6e75ec74fc8 |
parent 34 | 93c5a58496b6 |
child 49 | d9d4ea56179a |
permissions | -rwxr-xr-x |
19
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
1 |
#ifndef MAINWINDOW_H |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
2 |
#define MAINWINDOW_H |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
3 |
|
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
4 |
#include <QMainWindow> |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
5 |
#include "contactsengine.h" |
34
93c5a58496b6
add graphics view which presents contacts details
John Kern <johnk@symbian.org>
parents:
30
diff
changeset
|
6 |
#include "detailsgv.h" |
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 |
namespace Ui { |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
9 |
class 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 |
|
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
12 |
class MainWindow : public QMainWindow |
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 |
Q_OBJECT |
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 |
public: |
34
93c5a58496b6
add graphics view which presents contacts details
John Kern <johnk@symbian.org>
parents:
30
diff
changeset
|
17 |
// this enum is used as in index for the QStackedWidget. |
93c5a58496b6
add graphics view which presents contacts details
John Kern <johnk@symbian.org>
parents:
30
diff
changeset
|
18 |
enum {EListPage = 0, // lists of contacts |
93c5a58496b6
add graphics view which presents contacts details
John Kern <johnk@symbian.org>
parents:
30
diff
changeset
|
19 |
EDetailsGV}; // presents list of details for a contact based on Graphics View |
93c5a58496b6
add graphics view which presents contacts details
John Kern <johnk@symbian.org>
parents:
30
diff
changeset
|
20 |
|
19
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
21 |
explicit MainWindow(QWidget *parent = 0); |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
22 |
~MainWindow(); |
30 | 23 |
void createMenus(); |
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 |
public slots: |
25
adbe71832e2b
runs on-device now; testing on 5800
John Kern <johnk@symbian.org>
parents:
23
diff
changeset
|
26 |
void errorOccurred(QString errMsg); |
30 | 27 |
void displayVersion(); |
34
93c5a58496b6
add graphics view which presents contacts details
John Kern <johnk@symbian.org>
parents:
30
diff
changeset
|
28 |
void displayDetails(); |
93c5a58496b6
add graphics view which presents contacts details
John Kern <johnk@symbian.org>
parents:
30
diff
changeset
|
29 |
void displayList(); |
19
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
30 |
|
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
31 |
private: |
34
93c5a58496b6
add graphics view which presents contacts details
John Kern <johnk@symbian.org>
parents:
30
diff
changeset
|
32 |
DetailsGV *details; |
93c5a58496b6
add graphics view which presents contacts details
John Kern <johnk@symbian.org>
parents:
30
diff
changeset
|
33 |
QAction *detailsAction; |
30 | 34 |
QAction *verAction; |
35 |
QAction *exitAction; |
|
34
93c5a58496b6
add graphics view which presents contacts details
John Kern <johnk@symbian.org>
parents:
30
diff
changeset
|
36 |
|
19
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
37 |
Ui::MainWindow *ui; |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
38 |
ContactsEngine *ce; |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
39 |
}; |
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
40 |
|
e4b6ee329501
WIP: first draft of contact engine
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
41 |
#endif // MAINWINDOW_H |