16
|
1 |
#ifndef HOMEVIEW_H
|
|
2 |
#define HOMEVIEW_H
|
|
3 |
|
|
4 |
#include <qmainwindow.h>
|
|
5 |
#include <WidgetConstants.h>
|
|
6 |
//#include <smfglobal.h>
|
|
7 |
#include <smfcontact.h>
|
|
8 |
#include <smfpost.h>
|
|
9 |
#include <smfpicturealbum.h>
|
|
10 |
#include <smfactions.h>
|
|
11 |
#include <smfpicture.h>
|
|
12 |
#include <smfcontactfetcher.h>
|
|
13 |
#include <smfpostprovider.h>
|
|
14 |
#include <smfgallery.h>
|
|
15 |
#include <smfactivityfetcher.h>
|
|
16 |
#include "ImageDownload.h"
|
|
17 |
#include "ToolBar.h"
|
|
18 |
#include <qmenu.h>
|
|
19 |
|
|
20 |
class CustomListWidget;
|
|
21 |
class GridView;
|
|
22 |
|
|
23 |
class HomeView : public QObject
|
|
24 |
{
|
|
25 |
Q_OBJECT
|
|
26 |
public:
|
|
27 |
HomeView(QString aHeadName);
|
|
28 |
~HomeView();
|
|
29 |
void SetupUI(QMainWindow *Mainwindow);
|
|
30 |
void populateFriendsWidget();
|
|
31 |
void populatePostsWidget();
|
|
32 |
void populateActivitiesWidget();
|
|
33 |
void populatePhotosGridView();
|
|
34 |
|
|
35 |
private:
|
|
36 |
void getFriends();
|
|
37 |
void getPosts();
|
|
38 |
void downloadImages(const SmfItemIdentifier &identifier, const QMap<QString, QUrl> urlMap);
|
|
39 |
void getAlbums();
|
|
40 |
void getActivities();
|
|
41 |
void getPhotos();
|
|
42 |
|
|
43 |
private slots:
|
|
44 |
void friendsAvailable(SmfContactList* friendsList, SmfError , SmfResultPage );
|
|
45 |
void postsAvailable(SmfPostList* postsList, SmfError , SmfResultPage );
|
|
46 |
void albumsAvailable(SmfPictureAlbumList* albums, SmfError error, SmfResultPage resultPage);
|
|
47 |
void activitiesAvailable(SmfActivityEntryList* postsList, SmfError , SmfResultPage );
|
|
48 |
void picturesAvailable(SmfPictureList* albums, SmfError error, SmfResultPage resultPage);
|
|
49 |
void Navigated2OtherTab(int index);
|
|
50 |
|
|
51 |
private:
|
|
52 |
QString iHeadName;
|
|
53 |
ToolBar* ToolBarwidget;
|
|
54 |
QMainWindow *m_mainWindow;
|
|
55 |
QTabWidget *TabWidget;
|
|
56 |
CustomListWidget *iFrndsListWidget;
|
|
57 |
CustomListWidget *iPostsListWidget;
|
|
58 |
CustomListWidget *iActivityListWidget;
|
|
59 |
CustomListWidget *iAlbumWidget;
|
|
60 |
GridView *AlbumView;
|
|
61 |
ImageDownload m_downloader;
|
|
62 |
|
|
63 |
SmfContactFetcher *m_contactFetcher;
|
|
64 |
SmfPostProvider *m_postProvider;
|
|
65 |
SmfGallery *m_gallery;
|
|
66 |
SmfActivityFetcher *m_activityFetcher;
|
|
67 |
SmfContactList *m_friendsList;
|
|
68 |
SmfPostList *m_postsList;
|
|
69 |
SmfPictureAlbumList *m_albumsList;
|
|
70 |
SmfActivityEntryList *m_activitiesList;
|
|
71 |
SmfPictureList *m_picList;
|
|
72 |
|
|
73 |
};
|
|
74 |
|
|
75 |
#endif // HOMEVIEW_H
|