# HG changeset patch
# User cgandhi
# Date 1281006333 -19800
# Node ID b78fa4cdbf2bdf4105ff71b0dcd86735cab593f6
# Parent 9b00ca3cc20652bb1d587d0d7964d588782680da
pushing the demo application
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/.cproject
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/.cproject Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,133 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/CustomListWidget.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/CustomListWidget.cpp Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,401 @@
+#include "CustomListWidget.h"
+#include
+#include
+#include
+#include
+#include "ScreenSize.h"
+#include
+#include "WidgetConstants.h"
+
+CustomListWidget::CustomListWidget()
+{
+ setStyleSheet("selection-color: yellow;"
+ "selection-background-color: grey;");
+}
+CustomListWidget::~CustomListWidget()
+{
+
+}
+
+void CustomListWidget::AddListItem(QString aIconPath,QString aFirstLine,QString aSecondLine)
+{
+ QWidget* customwidget = new QWidget;
+ QHBoxLayout* HMainlayout = new QHBoxLayout(customwidget);
+ QLabel *lab =new QLabel();
+ lab->setPixmap(QPixmap(aIconPath));
+ lab->setFixedSize(60,60);
+ HMainlayout->addWidget(lab);
+
+ //To add First & second row horizontal layouts
+ QVBoxLayout* VTextlayout = new QVBoxLayout;
+
+ QHBoxLayout* HFirstrowLayout = new QHBoxLayout;
+ //Add FirstLine label
+ QLabel *lab1 =new QLabel(aFirstLine);
+ lab1->setStyleSheet("font: bold 20px;");
+ HFirstrowLayout->addWidget(lab1);
+ //Add Images to
+ QLabel *Img1lab =new QLabel();
+ Img1lab->setPixmap(QPixmap(aIconPath));
+ Img1lab->setFixedSize(10,10);
+ QLabel *Img2lab =new QLabel();
+ Img2lab->setPixmap(QPixmap(aIconPath));
+ Img2lab->setFixedSize(10,10);
+ QLabel *Img3lab =new QLabel();
+ Img3lab->setPixmap(QPixmap(aIconPath));
+ Img3lab->setFixedSize(10,10);
+
+ HFirstrowLayout->addWidget(Img1lab);
+ HFirstrowLayout->addWidget(Img2lab);
+ HFirstrowLayout->addWidget(Img3lab);
+
+// HFirstrowLayout->setAlignment(Img3lab,Qt::AlignRight);
+// HFirstrowLayout->setAlignment(Img2lab,Qt::AlignRight);
+// HFirstrowLayout->setAlignment(Img1lab,Qt::AlignRight);
+
+ VTextlayout->addLayout(HFirstrowLayout);
+
+
+ QHBoxLayout* HSecondrowLayout = new QHBoxLayout;
+ QLabel *lab2 =new QLabel(aSecondLine);
+ lab2->setStyleSheet("font: 16px;");
+ HSecondrowLayout->addWidget(lab2);
+
+ QLabel *Timestamplabel =new QLabel("00:00 JUL 12");
+ Timestamplabel->setStyleSheet("font: 12px;");
+ HSecondrowLayout->addWidget(Timestamplabel);
+
+ HSecondrowLayout->setAlignment(Timestamplabel,Qt::AlignRight);
+
+ VTextlayout->addLayout(HSecondrowLayout);
+
+
+ HMainlayout->addLayout(VTextlayout);
+ customwidget->setLayout(HMainlayout);
+ QListWidgetItem *item=new QListWidgetItem;
+
+ //customlist->adjustSize();
+ //customlist->adjustSize();
+ item->setSizeHint(QSize(60,60));
+
+ addItem(item);
+ setItemWidget(item,customwidget);
+}
+
+void CustomListWidget::AddListItem(QMainWindow *mainWindow,QStringList aIconPath,QStringList aNames)
+{
+ qDebug()<<"Inside GridView::CreateGridView()";
+ qDebug()<<"aIconPath count = "<addWidget(pushBtn,i,j);
+
+ index++;
+ if(index == aNames.count())
+ {
+ qDebug()<<"Count became same so exiting";
+ break;
+ }
+ }
+ if(index == aNames.count())
+ {
+ qDebug()<<"Count became same so exiting";
+ break;
+ }
+ }
+ //Its required please don't remove
+ show();
+}
+
+
+QWidget* CustomListWidget::CreateListwidget(SmfContactList* friendsList)
+ {
+ qDebug()<<"Inside CustomListWidget::CreateListwidget() for friends";
+ qDebug()<<"Friends count = "<count();
+
+ QListWidget* customlist = new QListWidget();
+
+ // Todo:- Display something when no friends are available
+ foreach(SmfContact contact, *friendsList)
+ {
+ QString name(contact.value("Name").value().firstName());
+ QString status(contact.value("Presence").value().customMessage());
+ if(!status.size())
+ status.append("Not available");
+ //QUrl url(contact.value("Avatar").value().imageUrl());
+ QString url("C:\\data\\sample.bmp"); // ToDo:- should be the profile image path
+
+ QWidget* widgetItem = new QWidget();
+ QHBoxLayout* HMainlayout = new QHBoxLayout(widgetItem);
+ QLabel *lab =new QLabel();
+ lab->setPixmap(QPixmap(url));
+ lab->setFixedSize(60,60);
+ HMainlayout->addWidget(lab);
+
+ //To add First & second row horizontal layouts
+ QVBoxLayout* VTextlayout = new QVBoxLayout;
+
+ QHBoxLayout* HFirstrowLayout = new QHBoxLayout;
+
+ //Add FirstLine label
+ QLabel *lab1 = new QLabel(name);
+ lab1->setStyleSheet("font: bold 16px;");
+ HFirstrowLayout->addWidget(lab1);
+
+ //Add Images to
+ QLabel *Img1lab =new QLabel();
+ Img1lab->setPixmap(QPixmap(url));
+ Img1lab->setFixedSize(10,10);
+ QLabel *Img2lab =new QLabel();
+ Img2lab->setPixmap(QPixmap(url));
+ Img2lab->setFixedSize(10,10);
+ QLabel *Img3lab =new QLabel();
+ Img3lab->setPixmap(QPixmap(url));
+ Img3lab->setFixedSize(10,10);
+
+ HFirstrowLayout->addWidget(Img1lab);
+ HFirstrowLayout->addWidget(Img2lab);
+ HFirstrowLayout->addWidget(Img3lab);
+
+// HFirstrowLayout->setAlignment(Img3lab,Qt::AlignRight);
+// HFirstrowLayout->setAlignment(Img2lab,Qt::AlignRight);
+// HFirstrowLayout->setAlignment(Img1lab,Qt::AlignRight);
+
+ VTextlayout->addLayout(HFirstrowLayout);
+
+
+ QHBoxLayout* HSecondrowLayout = new QHBoxLayout;
+ QLabel *lab2 =new QLabel(status);
+ lab2->setStyleSheet("font: 8px;");
+ HSecondrowLayout->addWidget(lab2);
+
+ QLabel *Timestamplabel =new QLabel("");
+ Timestamplabel->setStyleSheet("font: 7px;");
+ HSecondrowLayout->addWidget(Timestamplabel);
+
+ HSecondrowLayout->setAlignment(Timestamplabel,Qt::AlignRight);
+
+ VTextlayout->addLayout(HSecondrowLayout);
+
+
+ HMainlayout->addLayout(VTextlayout);
+ widgetItem->setLayout(HMainlayout);
+ QListWidgetItem *item=new QListWidgetItem;
+
+ //customlist->adjustSize();
+ //customlist->adjustSize();
+ item->setSizeHint(QSize(60,60));
+
+ customlist->addItem(item);
+ customlist->setItemWidget(item,widgetItem);
+ }
+ customlist->setStyleSheet("selection-color: yellow;"
+ "selection-background-color: grey;");
+ return customlist;
+ }
+
+
+QWidget* CustomListWidget::CreateListwidget(SmfPostList *postsList)
+ {
+ qDebug()<<"Inside CustomListWidget::CreateListwidget() for posts";
+ qDebug()<<"Posts count = "<count();
+
+ QListWidget* customlist = new QListWidget();
+
+ // Todo:- Display something when no posts are available
+ foreach(SmfPost post, *postsList)
+ {
+ QString text(post.description());
+ QString ownerName(post.owner().value("Name").value().firstName());
+
+ //QUrl url(contact.value("Avatar").value().imageUrl());
+ QString url("C:\\data\\sample.bmp"); // ToDo:- should be the profile image path
+
+ QWidget* widgetItem = new QWidget();
+ QHBoxLayout* HMainlayout = new QHBoxLayout(widgetItem);
+ QLabel *lab =new QLabel();
+ lab->setPixmap(QPixmap(url));
+ lab->setFixedSize(60,60);
+ HMainlayout->addWidget(lab);
+
+ //To add First & second row horizontal layouts
+ QVBoxLayout* VTextlayout = new QVBoxLayout;
+
+ QHBoxLayout* HFirstrowLayout = new QHBoxLayout;
+
+ //Add FirstLine label
+ QLabel *lab1 = new QLabel(ownerName);
+ lab1->setStyleSheet("font: bold 16px;");
+ HFirstrowLayout->addWidget(lab1);
+
+ //Add Images to
+ QLabel *Img1lab =new QLabel();
+ Img1lab->setPixmap(QPixmap(url));
+ Img1lab->setFixedSize(10,10);
+ QLabel *Img2lab =new QLabel();
+ Img2lab->setPixmap(QPixmap(url));
+ Img2lab->setFixedSize(10,10);
+ QLabel *Img3lab =new QLabel();
+ Img3lab->setPixmap(QPixmap(url));
+ Img3lab->setFixedSize(10,10);
+
+ HFirstrowLayout->addWidget(Img1lab);
+ HFirstrowLayout->addWidget(Img2lab);
+ HFirstrowLayout->addWidget(Img3lab);
+
+// HFirstrowLayout->setAlignment(Img3lab,Qt::AlignRight);
+// HFirstrowLayout->setAlignment(Img2lab,Qt::AlignRight);
+// HFirstrowLayout->setAlignment(Img1lab,Qt::AlignRight);
+
+ VTextlayout->addLayout(HFirstrowLayout);
+
+
+ QHBoxLayout* HSecondrowLayout = new QHBoxLayout;
+ QLabel *lab2 =new QLabel(text);
+ lab2->setStyleSheet("font: 8px;");
+ HSecondrowLayout->addWidget(lab2);
+
+ QLabel *Timestamplabel =new QLabel("");
+ Timestamplabel->setStyleSheet("font: 7px;");
+ HSecondrowLayout->addWidget(Timestamplabel);
+
+ HSecondrowLayout->setAlignment(Timestamplabel,Qt::AlignRight);
+
+ VTextlayout->addLayout(HSecondrowLayout);
+
+
+ HMainlayout->addLayout(VTextlayout);
+ widgetItem->setLayout(HMainlayout);
+ QListWidgetItem *item=new QListWidgetItem;
+
+ //customlist->adjustSize();
+ //customlist->adjustSize();
+ item->setSizeHint(QSize(60,60));
+
+ customlist->addItem(item);
+ customlist->setItemWidget(item,widgetItem);
+ }
+ customlist->setStyleSheet("selection-color: yellow;"
+ "selection-background-color: grey;");
+ return customlist;
+
+ }
+QWidget* CreateListwidget(SmfActivityEntryList *activityList)
+ {
+
+ }
+
+/*QWidget* CustomListWidget::CreateListwidget(QString aIconPath,QString aFirstLine,QString aSecondLine)
+{
+ qDebug()<<"Inside CustomListWidget::CreateListwidget()";
+ qDebug()<<"Icon path = "<addWidget(lab1);
+ //Add Images to
+ QLabel *Img1lab =new QLabel();
+ Img1lab->setPixmap(QPixmap(aIconPath));
+ Img1lab->setFixedSize(10,10);
+ QLabel *Img2lab =new QLabel();
+ Img2lab->setPixmap(QPixmap(aIconPath));
+ Img2lab->setFixedSize(10,10);
+ QLabel *Img3lab =new QLabel();
+ Img3lab->setPixmap(QPixmap(aIconPath));
+ Img3lab->setFixedSize(10,10);
+
+ HFirstrowLayout->addWidget(Img1lab);
+ HFirstrowLayout->addWidget(Img2lab);
+ HFirstrowLayout->addWidget(Img3lab);
+
+// HFirstrowLayout->setAlignment(Img3lab,Qt::AlignRight);
+// HFirstrowLayout->setAlignment(Img2lab,Qt::AlignRight);
+// HFirstrowLayout->setAlignment(Img1lab,Qt::AlignRight);
+
+ VTextlayout->addLayout(HFirstrowLayout);
+
+
+ QHBoxLayout* HSecondrowLayout = new QHBoxLayout;
+ QLabel *lab2 =new QLabel(aSecondLine);
+ lab2->setStyleSheet("font: 8px;");
+ HSecondrowLayout->addWidget(lab2);
+
+ QLabel *Timestamplabel =new QLabel("00:00 JUN 29");
+ Timestamplabel->setStyleSheet("font: 7px;");
+ HSecondrowLayout->addWidget(Timestamplabel);
+
+ HSecondrowLayout->setAlignment(Timestamplabel,Qt::AlignRight);
+
+ VTextlayout->addLayout(HSecondrowLayout);
+
+
+ HMainlayout->addLayout(VTextlayout);
+ widgetItem->setLayout(HMainlayout);
+ QListWidgetItem *item=new QListWidgetItem;
+
+ //customlist->adjustSize();
+ //customlist->adjustSize();
+ item->setSizeHint(QSize(60,60));
+
+ customlist->addItem(item);
+ customlist->setItemWidget(item,widgetItem);
+ //}
+customlist->setStyleSheet("selection-color: yellow;"
+ "selection-background-color: grey;");
+ return customlist;
+}*/
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/CustomListWidget.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/CustomListWidget.h Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,25 @@
+#ifndef CUSTOMLISTWIDGET_H
+#define CUSTOMLISTWIDGET_H
+
+#include
+#include
+#include
+#include
+#include "qmainwindow.h"
+
+class CustomListWidget : public QListWidget
+{
+public:
+ CustomListWidget();
+ //QWidget* CreateListwidget(QStrng aIconPath,QString aFirstLine,QString aSecondLine);
+ QWidget* CreateListwidget(SmfContactList* friendsList);
+ QWidget* CreateListwidget(SmfPostList *postsList);
+ QWidget* CreateListwidget(SmfActivityEntryList *activityList);
+ void AddListItem(QString aIconPath,QString aFirstLine,QString aSecondLine);
+ void AddListItem(QMainWindow *mainWindow,QStringList aIconPath, QStringList iconName);
+ ~CustomListWidget();
+
+};
+
+
+#endif // CUSTOMLISTWIDGET_H
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/DemoGUI.loc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/DemoGUI.loc Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,13 @@
+// ============================================================================
+// * Generated by qmake (2.01a) (Qt 4.6.2) on: 2010-07-30T14:14:37
+// * This file is generated by qmake and should not be modified by the
+// * user.
+// ============================================================================
+
+#ifdef LANGUAGE_SC
+#define STRING_r_short_caption "DemoGUI"
+#define STRING_r_caption "DemoGUI"
+#else
+#define STRING_r_short_caption "DemoGUI"
+#define STRING_r_caption "DemoGUI"
+#endif
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/DemoGUI.pro
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/DemoGUI.pro Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,40 @@
+# -------------------------------------------------
+# Project created by QtCreator 2010-06-29T13:53:43
+# -------------------------------------------------
+TARGET = DemoGUI
+TEMPLATE = app
+QT += network
+CONFIG += mobility
+MOBILITY += contacts \
+ location
+SOURCES += ImageDownload.cpp \
+ main.cpp \
+ mainwindow.cpp \
+ CustomListWidget.cpp \
+ HomeView.cpp \
+ GridView.cpp \
+ ToolBar.cpp
+HEADERS += ImageDownload.h \
+ mainwindow.h \
+ CustomListWidget.h \
+ HomeView.h \
+ ScreenSize.h \
+ GridView.h \
+ ToolBar.h \
+ WidgetConstants.h
+FORMS += mainwindow.ui
+symbian: {
+ TARGET.CAPABILITY = NetworkServices \
+ ReadUserData \
+ WriteUserData \
+ LocalServices \
+ UserEnvironment \
+ ReadDeviceData \
+ WriteDeviceData
+ LIBS += -lsmfclient.dll \
+ -lcone \
+ -leikcore \
+ -lavkon \
+ -lsmfcommon
+ ICON = sasken_logo.svg
+}
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/DemoGUI.rss
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/DemoGUI.rss Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,21 @@
+// ============================================================================
+// * Generated by qmake (2.01a) (Qt 4.6.2) on: 2010-07-30T14:14:37
+// * This file is generated by qmake and should not be modified by the
+// * user.
+// ============================================================================
+
+#include
+#include "DemoGUI.loc"
+
+RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info
+ {
+ short_caption = STRING_r_short_caption;
+ caption_and_icon =
+ CAPTION_AND_ICON_INFO
+ {
+ caption = STRING_r_caption;
+ number_of_icons = 1;
+ icon_file = "\\resource\\apps\\DemoGUI.mif";
+ };
+ }
+
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/DemoGUI_installer.pkg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/DemoGUI_installer.pkg Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,30 @@
+; DemoGUI_installer.pkg generated by qmake at 2010-07-30T14:14:37
+; This file is generated by qmake and should not be modified by the user
+;
+
+; Language
+&EN
+
+; SIS header: name, uid, version
+#{"DemoGUI installer"},(0xA000D7CE),1,0,0
+
+; Localised Vendor name
+%{"Vendor"}
+
+; Unique Vendor name
+:"Vendor"
+
+
+; Manual PKG pre-rules from PRO files
+; Default HW/platform dependencies
+[0x101F7961],0,0,0,{"S60ProductID"}
+[0x102032BE],0,0,0,{"S60ProductID"}
+[0x102752AE],0,0,0,{"S60ProductID"}
+[0x1028315F],0,0,0,{"S60ProductID"}
+
+; Default dependency to Qt libraries
+; Default dependency to QtMobility libraries
+
+
+"D:/smf/MissingCode/DemoGUI/DemoGUI.sis" - "c:\adm\DemoGUI.sis"
+@"D:/Qt/4.6.2/smartinstaller.sis",(0x2002CCCD)
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/DemoGUI_reg.rss
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/DemoGUI_reg.rss Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,18 @@
+// ============================================================================
+// * Generated by qmake (2.01a) (Qt 4.6.2) on: 2010-07-30T14:14:37
+// * This file is generated by qmake and should not be modified by the
+// * user.
+// ============================================================================
+
+#include
+#include
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0xE9d1bae8
+
+RESOURCE APP_REGISTRATION_INFO
+ {
+ app_file="DemoGUI";
+ localisable_resource_file="\\resource\\apps\\DemoGUI";
+
+ }
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/DemoGUI_template.pkg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/DemoGUI_template.pkg Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,37 @@
+; DemoGUI_template.pkg generated by qmake at 2010-07-30T14:14:37
+; This file is generated by qmake and should not be modified by the user
+;
+
+; Language
+&EN
+
+; SIS header: name, uid, version
+#{"DemoGUI"},(0xE9d1bae8),1,0,0
+
+; Localised Vendor name
+%{"Vendor"}
+
+; Unique Vendor name
+:"Vendor"
+
+
+; Manual PKG pre-rules from PRO files
+; Default HW/platform dependencies
+[0x101F7961],0,0,0,{"S60ProductID"}
+[0x102032BE],0,0,0,{"S60ProductID"}
+[0x102752AE],0,0,0,{"S60ProductID"}
+[0x1028315F],0,0,0,{"S60ProductID"}
+
+; Default dependency to Qt libraries
+(0x2001E61C), 4, 6, 2, {"Qt"}
+; Default dependency to QtMobility libraries
+(0x2002AC89), 1, 0, 0, {"QtMobility"}
+
+; Executable and default resource files
+"/S60/devices/Nokia_Symbian3_SDK_v0.8/epoc32/release/$(PLATFORM)/$(TARGET)/DemoGUI.exe" - "!:\sys\bin\DemoGUI.exe"
+"/S60/devices/Nokia_Symbian3_SDK_v0.8/epoc32/data/z/resource/apps/DemoGUI.rsc" - "!:\resource\apps\DemoGUI.rsc"
+"/S60/devices/Nokia_Symbian3_SDK_v0.8/epoc32/data/z/private/10003a3f/import/apps/DemoGUI_reg.rsc" - "!:\private\10003a3f\import\apps\DemoGUI_reg.rsc"
+"/S60/devices/Nokia_Symbian3_SDK_v0.8/epoc32/data/z/resource/apps/DemoGUI.mif" - "!:\resource\apps\DemoGUI.mif"
+
+
+; Manual PKG post-rules from PRO files
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/FriendView.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/FriendView.cpp Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,71 @@
+#include "FriendView.h"
+#include "ScreenSize.h"
+#include "qpushbutton.h"
+#include "ToolBar.h"
+#include
+
+//Forward declaration
+class ScreenSize;
+class CustomListWidget;
+class GridView;
+
+FriendView::FriendView(QString aHeadName):
+ iHeadName(aHeadName)
+{
+
+}
+FriendView::~FriendView()
+{
+
+}
+void FriendView::SetupUI()
+{
+ //iMainwindow = Mainwindow;
+ QPushButton* HomeButton = new QPushButton(this);
+ HomeButton->setText(iHeadName);
+ HomeButton->setGeometry(0,0,ScreenSize::GetScreenRect().width(),KHeadNameHeight);
+ HomeButton->setStyleSheet("background-color: rgb(0,0,0);"
+ "border-width: 2px;"
+ "font: bold 16px;"
+ "min-width: 10em;"
+ "padding: 4px;"
+ "color: white;"
+ );
+
+ HomeButton->setDisabled(true);
+
+ TabWidget = new QTabWidget(this);
+
+ iPostsListWidget = new CustomListWidget();
+ TabWidget->addTab(iPostsListWidget,"Posts");
+
+ AlbumView = new GridView();
+ QStringList Iconpathlist;
+ Iconpathlist.append("E:/Images/SMF/SMF.JPG");
+ Iconpathlist.append("E:/Images/SMF/SMF.JPG");
+ Iconpathlist.append("E:/Images/SMF/SMF.JPG");
+ Iconpathlist.append("E:/Images/SMF/SMF.JPG");
+ Iconpathlist.append("E:/Images/SMF/SMF.JPG");
+ Iconpathlist.append("E:/Images/SMF/SMF.JPG");
+
+ TabWidget->addTab(AlbumView->CreateGridView(Iconpathlist),"Album");
+
+ TabWidget->setGeometry(0,KHeadNameHeight + KWidgetGapFactor,ScreenSize::GetScreenRect().width(),ScreenSize::GetScreenRect().height() - (ToolbarIconHeight + KWidgetGapFactor));
+
+ connect(TabWidget,SIGNAL(currentChanged(int)),this,SLOT(Navigated2OtherTab(int)));
+ //Drawing Tool bar
+ ToolBar* ToolBarwidget = new ToolBar;
+ QStringList actionList;
+ actionList.append("Post");
+ actionList.append("Reply");
+ actionList.append("Add Service");
+ ToolBarwidget->GetToolBar(this,actionList);
+ showFullScreen();
+}
+
+void FriendView::Navigated2OtherTab(int tabIndex)
+{
+ if(tabIndex == 0)
+ iPostsListWidget->AddListItem("E:/Images/SMF/SMF.JPG","Rajat","Hello !");
+
+}
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/FriendView.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/FriendView.h Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,29 @@
+#ifndef FRIENDVIEW_H
+#define FRIENDVIEW_H
+
+#include
+#include
+#include "customListwidget.h"
+#include "GridView.h"
+#include
+
+
+class FriendView : public QMainWindow
+{
+ Q_OBJECT
+public:
+ FriendView(QString aHeadName);
+ void SetupUI();
+ ~FriendView();
+private:
+ QString iHeadName;
+private slots:
+ void Navigated2OtherTab(int tabIndex);
+private:
+ QMainWindow *iMainwindow;
+ QTabWidget* TabWidget;
+ GridView* AlbumView;
+ CustomListWidget* iPostsListWidget;
+};
+
+#endif // FRIENDVIEW_H
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/GridView.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/GridView.cpp Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,77 @@
+#include "GridView.h"
+#include "ScreenSize.h"
+#include
+#include
+#include
+
+GridView::GridView()
+{
+
+}
+GridView::~GridView()
+{
+
+}
+void GridView::CreateGridView(QStringList aIconPath, QStringList names)
+{
+ qDebug()<<"Inside GridView::CreateGridView()";
+ qDebug()<<"aIconPath count = "<
+#include "WidgetConstants.h"
+#include
+
+class GridView : public QWidget
+{
+Q_OBJECT
+
+public:
+ GridView();
+ void CreateGridView(QStringList aIconPath, QStringList names);
+ ~GridView();
+
+};
+
+
+#endif // GRIDVIEW_H
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/HomeView.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/HomeView.cpp Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,758 @@
+#include "HomeView.h"
+#include "ScreenSize.h"
+#include "qpushbutton.h"
+#include "customListwidget.h"
+#include "GridView.h"
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include "ImageDownload.h"
+
+static int tab = 0;
+
+HomeView::HomeView(QString aHeadName):
+ iHeadName(aHeadName)
+ {
+ //m_providerList = NULL;
+ m_mainWindow = NULL;
+ TabWidget = NULL;
+ iFrndsListWidget = NULL;
+ iPostsListWidget = NULL;
+ iActivityListWidget = NULL;
+ AlbumView = NULL;
+
+ m_contactFetcher = NULL;
+ m_postProvider = NULL;
+ m_gallery = NULL;
+ m_activityFetcher = NULL;
+ m_friendsList = NULL;
+ m_postsList = NULL;
+ m_albumsList = NULL;
+ m_activitiesList = NULL;
+ m_picList = NULL;
+ }
+
+HomeView::~HomeView()
+ {
+ if(TabWidget)
+ {
+ delete TabWidget;
+ TabWidget = NULL;
+ }
+ if(iFrndsListWidget)
+ {
+ delete iFrndsListWidget;
+ iFrndsListWidget = NULL;
+ }
+ if(iPostsListWidget)
+ {
+ delete iPostsListWidget;
+ iPostsListWidget = NULL;
+ }
+ if(iActivityListWidget)
+ {
+ delete iActivityListWidget;
+ iActivityListWidget = NULL;
+ }
+ if(AlbumView)
+ {
+ delete AlbumView;
+ AlbumView = NULL;
+ }
+
+ if(m_contactFetcher)
+ {
+ delete m_contactFetcher;
+ m_contactFetcher =NULL;
+ }
+ if(m_postProvider)
+ {
+ delete m_postProvider;
+ m_postProvider =NULL;
+ }
+ if(m_gallery)
+ {
+ delete m_gallery;
+ m_gallery =NULL;
+ }
+ if(m_activityFetcher)
+ {
+ delete m_activityFetcher;
+ m_activityFetcher =NULL;
+ }
+ if(m_friendsList)
+ {
+ delete m_friendsList;
+ m_friendsList =NULL;
+ }
+ if(m_postsList)
+ {
+ delete m_postsList;
+ m_postsList =NULL;
+ }
+ if(m_albumsList)
+ {
+ delete m_albumsList;
+ m_albumsList =NULL;
+ }
+ if(m_activitiesList)
+ {
+ delete m_activitiesList;
+ m_activitiesList =NULL;
+ }
+ if(m_picList)
+ {
+ delete m_picList;
+ m_picList =NULL;
+ }
+ }
+
+
+void HomeView::SetupUI(QMainWindow *Mainwindow)
+ {
+ qDebug()<<"Inside HomeView::SetupUI()";
+
+ m_mainWindow = Mainwindow;
+
+ QPushButton* HomeButton = new QPushButton(m_mainWindow);
+ HomeButton->setText(iHeadName);
+ HomeButton->setGeometry(0,0,ScreenSize::GetScreenRect().width(),KHeadNameHeight);
+ HomeButton->setStyleSheet("background-color: rgb(0,0,0);"
+ "border-width: 2px;"
+ "font: bold 16px;"
+ "min-width: 10em;"
+ "padding: 4px;"
+ "color: white;"
+ );
+
+ HomeButton->setDisabled(true);
+ qDebug()<<"Home button created and setup";
+
+ TabWidget = new QTabWidget(m_mainWindow);
+ connect(TabWidget,SIGNAL(currentChanged(int)),this,SLOT(Navigated2OtherTab(int)));
+ qDebug()<<"Tab widget created";
+
+ iFrndsListWidget = new CustomListWidget();
+ TabWidget->addTab(iFrndsListWidget,"Friends");
+ qDebug()<<"Friends Tab created";
+
+ iPostsListWidget = new CustomListWidget();
+ TabWidget->addTab(iPostsListWidget,"Posts");
+ qDebug()<<"Posts Tab created";
+
+ //AlbumView = new GridView();
+ /*QWidget *widget = new QWidget();
+ TabWidget->addTab(widget,"Album");*/
+ iAlbumWidget = new CustomListWidget();
+ TabWidget->addTab(iAlbumWidget,"Album");
+
+ qDebug()<<"Albums Tab created";
+
+/*
+ QStringList Iconpathlist;
+ Iconpathlist.append("C:\\data\\AlbumDefault.JPG");
+ Iconpathlist.append("C:\\data\\AlbumDefault.JPG");
+ Iconpathlist.append("C:\\data\\AlbumDefault.JPG");
+ Iconpathlist.append("C:\\data\\AlbumDefault.JPG");
+
+
+ TabWidget->addTab(AlbumView->CreateGridView(Iconpathlist),"Album");
+ qDebug()<<"Albums Tab created";
+*/
+
+ iActivityListWidget = new CustomListWidget();
+ TabWidget->addTab(iActivityListWidget,"Activity");
+ qDebug()<<"Activity Tab created";
+
+ TabWidget->setGeometry(0,KHeadNameHeight + KWidgetGapFactor,ScreenSize::GetScreenRect().width(),ScreenSize::GetScreenRect().height() - 100);
+
+ //Drawing Tool bar
+ ToolBarwidget = new ToolBar;
+ QStringList actionList;
+ actionList.append("Add Services");
+ //actionList.append("Open");
+ //actionList.append("Reply");
+ ToolBarwidget->GetToolBar(m_mainWindow,actionList);
+ qDebug()<<"Tool bar created";
+ }
+
+
+void HomeView::getFriends()
+ {
+ qDebug()<<"Inside HomeView::getFriends()";
+
+ // Get the list of providers
+ SmfClient client;
+ QString intfName("org.symbian.smf.plugin.contact.fetcher");
+
+ SmfProviderList *providerList = client.GetServices(intfName);
+ qDebug()<<"client.GetServices returned a list with count = "<count();
+
+ // flag to check if required plugin is there
+ bool pluginFound = false;
+ foreach(SmfProvider provider, *providerList)
+ {
+ if("Facebook" == provider.serviceName())
+ {
+ qDebug()<<"Plugin for Facebook found";
+ pluginFound = true;
+ m_contactFetcher = new SmfContactFetcher(&provider);
+ bool ret = connect(m_contactFetcher, SIGNAL(friendsListAvailable(SmfContactList*, SmfError , SmfResultPage)),
+ this, SLOT(friendsAvailable(SmfContactList*, SmfError , SmfResultPage)));
+
+ qDebug()<<"Connected ?"<friends(1,5);
+ }
+ }
+
+ if(!pluginFound)
+ {
+ qDebug()<<"Plugin for Facebook not found!!!";
+ QString smferrString("No Facebook plugin found!!!");
+ QMessageBox::information(m_mainWindow,"Error",smferrString,QMessageBox::Ok);
+ }
+ }
+
+
+void HomeView::friendsAvailable(SmfContactList* friendsList, SmfError error, SmfResultPage resultPage)
+ {
+ qDebug()<<"Inside HomeView::friendsAvailable()";
+
+ m_friendsList = friendsList;
+ if(error)
+ {
+ SmfClient client;
+ QString errStr = client.errorString(error);
+ qDebug()<<"Error found, code = "< urlMap;
+ foreach(SmfContact contact, *friendsList)
+ {
+ QString name(contact.value("Name").value().firstName());
+ QString status(contact.value("Presence").value().customMessage());
+ if(!status.size())
+ status.append("Not available");
+ QUrl url(contact.value("Avatar").value().imageUrl());
+
+ qDebug()<<"Friends name = "<().firstName();
+ qDebug()<<"Friends status msg desc = "<().customMessage();
+ qDebug()<<"Friends profile image URL = "<().imageUrl();
+ urlMap.insert(name, url);
+ }
+
+ // Download Images
+ downloadImages(SmfFriendsFetch, urlMap);
+
+ }
+
+void HomeView::populateFriendsWidget()
+ {
+ foreach(SmfContact contact, *m_friendsList)
+ {
+ QString name(contact.value("Name").value().firstName());
+ QString status(contact.value("Presence").value().customMessage());
+ if(!status.size())
+ status.append("Not available");
+ QString url("C:\\data\\");
+ url.append(name);
+ url.append(".jpg");
+
+ // Add this contact to the list widget
+ iFrndsListWidget->AddListItem(url,name,status);
+ }
+ }
+
+void HomeView::downloadImages(const SmfItemIdentifier &identifier, const QMap urlMap)
+ {
+ qDebug()<<"Inside HomeView::downloadImages()";
+ QMapIterator iter(urlMap);
+
+ while(iter.hasNext())
+ {
+ iter.next();
+ m_downloader.downloadImage(this, iter.key(), iter.value(), identifier);
+ downloading = true;
+ }
+ }
+
+void HomeView::Navigated2OtherTab(int tabIndex)
+ {
+ qDebug()<<"Inside HomeView::Navigated2OtherTab() for tab index = "<count())
+ {
+ if(!downloading)
+ {
+ getFriends();
+
+ /*if (10 == tab)
+ {
+ ToolBarwidget->newAction1->setVisible(false);
+ ToolBarwidget->newAction2->setVisible(false);
+ }*/
+ }
+ }
+ }
+
+ // Display albums
+ else if(tabIndex == 1)
+ {
+ if(!iPostsListWidget->count())
+ {
+ if(!downloading)
+ {
+ getPosts();
+ /*ToolBarwidget->menu->addAction(ToolBarwidget->newAction1);
+ ToolBarwidget->menu->addAction(ToolBarwidget->newAction2);
+ tab = 10;
+ qDebug()<<"Action is visible ?"<<(ToolBarwidget->newAction1->isVisible());
+ if (10 == tab || !(ToolBarwidget->newAction1->isVisible()))
+ {
+ ToolBarwidget->newAction1->setVisible(true);
+ ToolBarwidget->newAction2->setVisible(true);
+ }*/
+ }
+ }
+ }
+
+ // Display albums
+ else if(tabIndex == 2)
+ {
+ if(!m_picList)
+ {
+ if(!downloading)
+ {
+ getPhotos();
+ /*if (ToolBarwidget->newAction1->isVisible())
+ {
+ ToolBarwidget->newAction1->setVisible(false);
+ ToolBarwidget->newAction2->setVisible(false);
+ }*/
+ }
+ }
+
+ }
+
+ // Display activities
+ else if(tabIndex == 3)
+ {
+ if(!iActivityListWidget->count())
+ {
+ getActivities();
+ /*if (ToolBarwidget->newAction1->isVisible())
+ {
+ ToolBarwidget->newAction1->setVisible(false);
+ ToolBarwidget->newAction2->setVisible(false);
+ }*/
+ }
+ }
+ }
+
+void HomeView::getPosts()
+ {
+ qDebug()<<"Inside HomeView::getPosts()";
+
+ SmfClient client;
+ QString intfName("org.symbian.smf.client.contact.posts");
+ SmfProviderList *providerList = client.GetServices(intfName);
+ bool pluginFound = false;
+ qDebug()<<"client.GetServices returned a list with count = "<count();
+ foreach(SmfProvider provider, *providerList)
+ {
+ if("Facebook" == provider.serviceName())
+ {
+ qDebug()<<"Plugin for facebook found";
+ pluginFound = true;
+ m_postProvider = new SmfPostProvider(&provider);
+ bool ret = connect(m_postProvider, SIGNAL(postsAvailable(SmfPostList*, SmfError , SmfResultPage)),
+ this, SLOT(postsAvailable(SmfPostList*, SmfError , SmfResultPage)));
+
+ qDebug()<<"Connected ?"<posts();
+ }
+ }
+
+ if(!pluginFound)
+ {
+ qDebug()<<"Plugin for facebook not found!!!";
+ QString smferrString("No Facebook plugin found!!!");
+ QMessageBox::information(m_mainWindow,"Error",smferrString,QMessageBox::Ok);
+ }
+ }
+
+void HomeView::postsAvailable(SmfPostList* postsList, SmfError error, SmfResultPage page)
+ {
+ Q_UNUSED(page);
+
+ qDebug()<<"Inside HomeView::postsAvailable()";
+
+ m_postsList = postsList;
+ if(error)
+ {
+ SmfClient client;
+ QString errStr = client.errorString(error);
+ qDebug()<<"Error found, code = "< urlMap;
+ foreach(SmfPost post, *postsList)
+ {
+ QString name(post.owner().value("Name").value().firstName());
+ QUrl url(post.owner().value("Avatar").value().imageUrl());
+
+ qDebug()<<"Post text = "<().firstName());
+ QString text(post.description());
+
+ QString url("C:\\data\\");
+ url.append(name);
+ url.append(".jpg");
+
+ // Add this contact to the list widget
+ iPostsListWidget->AddListItem(url,name,text);
+ }
+ }
+
+void HomeView::getAlbums()
+ {
+ qDebug()<<"Inside HomeView::getAlbums()";
+
+ SmfClient client;
+ QString intfName("org.symbian.smf.client.gallery");
+ SmfProviderList *providerList = client.GetServices(intfName);
+ bool pluginFound = false;
+ qDebug()<<"client.GetServices returned a list with count = "<count();
+ foreach(SmfProvider provider, *providerList)
+ {
+ if("Flickr" == provider.serviceName())
+ {
+ qDebug()<<"Plugin for flickr found";
+ pluginFound = true;
+ m_gallery = new SmfGallery(&provider);
+ bool ret = connect(m_gallery, SIGNAL(albumsAvailable(SmfPictureAlbumList*, SmfError , SmfResultPage)),
+ this, SLOT(albumsAvailable(SmfPictureAlbumList*, SmfError , SmfResultPage)));
+
+ qDebug()<<"Connected ?"<albums(names, &user);
+ }
+ }
+ if(!pluginFound)
+ {
+ qDebug()<<"Plugin for flickr not found!!!";
+ QString smferrString("No flickr plugin found!!!");
+ QMessageBox::information(m_mainWindow,"Error",smferrString,QMessageBox::Ok);
+ }
+ }
+
+void HomeView::albumsAvailable(SmfPictureAlbumList* albums, SmfError error, SmfResultPage resultPage)
+ {
+ Q_UNUSED(resultPage);
+
+ qDebug()<<"Inside HomeView::albumsAvailable()";
+
+ m_albumsList = albums;
+ if(error)
+ {
+ SmfClient client;
+ QString errStr = client.errorString(error);
+ qDebug()<<"Error found, code = "<CreateGridView(albumPicList, albumNameList);
+ }
+
+
+void HomeView::getActivities()
+ {
+ qDebug()<<"Inside HomeView::getActivities()";
+
+ // Get the list of providers
+ SmfClient client;
+ QString intfName("org.symbian.smf.client.activity.fetcher");
+
+ SmfProviderList *providerList = client.GetServices(intfName);
+ qDebug()<<"client.GetServices returned a list with count = "<count();
+
+ // flag to check if required plugin is there
+ bool pluginFound = false;
+ int index = 0;
+ foreach(SmfProvider provider, *providerList)
+ {
+ if("Facebook" == provider.serviceName())
+ {
+ qDebug()<<"Plugin for Facebook found";
+ pluginFound = true;
+ m_activityFetcher = new SmfActivityFetcher(&provider);
+ bool ret = connect(m_activityFetcher, SIGNAL(resultsAvailable(SmfActivityEntryList*, SmfError , SmfResultPage)),
+ this, SLOT(activitiesAvailable(SmfActivityEntryList*, SmfError , SmfResultPage)));
+
+ qDebug()<<"Connected ?"<selfActivities();
+ }
+ index++;
+ }
+
+ if(!pluginFound)
+ {
+ qDebug()<<"Plugin for Facebook not found!!!";
+ QString smferrString("No Facebook plugin found!!!");
+ QMessageBox::information(m_mainWindow,"Error",smferrString,QMessageBox::Ok);
+ }
+ }
+
+
+void HomeView::activitiesAvailable(SmfActivityEntryList* activitiesList, SmfError error, SmfResultPage resultPage)
+ {
+ qDebug()<<"Inside HomeView::activitiesAvailable()";
+
+ m_activitiesList = activitiesList;
+ qDebug()<<"Number of activities retrieved = "<count();
+ if(error)
+ {
+ SmfClient client;
+ QString errStr = client.errorString(error);
+ qDebug()<<"Error found, code = "<().firstName();
+ qDebug()<<"Activity title = "<().firstName());
+ QString title(activity.title().title());
+
+
+ // Add this contact to the list widget
+ iActivityListWidget->AddListItem(defImagePath, name, title);
+ }
+ }
+
+
+
+void HomeView::getPhotos()
+ {
+ qDebug()<<"Inside HomeView::getPhotos()";
+
+ // Get the list of providers
+ SmfClient client;
+ QString intfName("org.symbian.smf.client.gallery");
+
+ SmfProviderList *providerList = client.GetServices(intfName);
+ qDebug()<<"client.GetServices returned a list with count = "<count();
+
+ // flag to check if required plugin is there
+ bool pluginFound = false;
+ int index = 0;
+ foreach(SmfProvider provider, *providerList)
+ {
+ if("Flickr" == provider.serviceName())
+ {
+ qDebug()<<"Plugin for flickr found";
+ pluginFound = true;
+ if(!m_gallery)
+ m_gallery = new SmfGallery(&provider);
+ bool ret = connect(m_gallery, SIGNAL(picturesAvailable(SmfPictureList*, SmfError , SmfResultPage)),
+ this, SLOT(picturesAvailable(SmfPictureList*, SmfError , SmfResultPage)));
+
+ qDebug()<<"Connected ?"<pictures(list);
+ }
+ index++;
+ }
+
+ if(!pluginFound)
+ {
+ qDebug()<<"Plugin for flickr not found!!!";
+ QString smferrString("No Flickr plugin found!!!");
+ QMessageBox::information(m_mainWindow,"Error",smferrString,QMessageBox::Ok);
+ }
+ }
+
+
+void HomeView::picturesAvailable(SmfPictureList* picList, SmfError error, SmfResultPage resultPage)
+ {
+ qDebug()<<"Inside HomeView::picturesAvailable()";
+
+ m_picList = picList;
+ if(error)
+ {
+ SmfClient client;
+ QString errStr = client.errorString(error);
+ qDebug()<<"Error found, code = "<AddListItem(m_mainWindow,albumPicList,albumNameList);
+// AlbumView->CreateGridView(albumPicList,albumNameList);
+
+ }
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/HomeView.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/HomeView.h Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,75 @@
+#ifndef HOMEVIEW_H
+#define HOMEVIEW_H
+
+#include
+#include
+//#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include "ImageDownload.h"
+#include "ToolBar.h"
+#include
+
+class CustomListWidget;
+class GridView;
+
+class HomeView : public QObject
+{
+ Q_OBJECT
+public:
+ HomeView(QString aHeadName);
+ ~HomeView();
+ void SetupUI(QMainWindow *Mainwindow);
+ void populateFriendsWidget();
+ void populatePostsWidget();
+ void populateActivitiesWidget();
+ void populatePhotosGridView();
+
+private:
+ void getFriends();
+ void getPosts();
+ void downloadImages(const SmfItemIdentifier &identifier, const QMap urlMap);
+ void getAlbums();
+ void getActivities();
+ void getPhotos();
+
+private slots:
+ void friendsAvailable(SmfContactList* friendsList, SmfError , SmfResultPage );
+ void postsAvailable(SmfPostList* postsList, SmfError , SmfResultPage );
+ void albumsAvailable(SmfPictureAlbumList* albums, SmfError error, SmfResultPage resultPage);
+ void activitiesAvailable(SmfActivityEntryList* postsList, SmfError , SmfResultPage );
+ void picturesAvailable(SmfPictureList* albums, SmfError error, SmfResultPage resultPage);
+ void Navigated2OtherTab(int index);
+
+private:
+ QString iHeadName;
+ ToolBar* ToolBarwidget;
+ QMainWindow *m_mainWindow;
+ QTabWidget *TabWidget;
+ CustomListWidget *iFrndsListWidget;
+ CustomListWidget *iPostsListWidget;
+ CustomListWidget *iActivityListWidget;
+ CustomListWidget *iAlbumWidget;
+ GridView *AlbumView;
+ ImageDownload m_downloader;
+
+ SmfContactFetcher *m_contactFetcher;
+ SmfPostProvider *m_postProvider;
+ SmfGallery *m_gallery;
+ SmfActivityFetcher *m_activityFetcher;
+ SmfContactList *m_friendsList;
+ SmfPostList *m_postsList;
+ SmfPictureAlbumList *m_albumsList;
+ SmfActivityEntryList *m_activitiesList;
+ SmfPictureList *m_picList;
+
+};
+
+#endif // HOMEVIEW_H
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/ImageDownload.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/ImageDownload.cpp Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,146 @@
+/****************************************************************************
+**
+** Trolltech hereby grants a license to use the Qt/Eclipse Integration
+** plug-in (the software contained herein), in binary form, solely for the
+** purpose of creating code to be used with Trolltech's Qt software.
+**
+** Qt Designer is licensed under the terms of the GNU General Public
+** License versions 2.0 and 3.0 ("GPL License"). Trolltech offers users the
+** right to use certain no GPL licensed software under the terms of its GPL
+** Exception version 1.2 (http://trolltech.com/products/qt/gplexception).
+**
+** THIS SOFTWARE IS PROVIDED BY TROLLTECH AND ITS CONTRIBUTORS (IF ANY) "AS
+** IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+** TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+** PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+** OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+** PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+** LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+** NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** Since we now have the GPL exception I think that the "special exception
+** is no longer needed. The license text proposed above (other than the
+** special exception portion of it) is the BSD license and we have added
+** the BSD license as a permissible license under the exception.
+**
+****************************************************************************/
+
+#include
+#include
+#include
+#include
+#include
+#include "ImageDownload.h"
+#include "HomeView.h"
+
+bool downloading = false;
+
+#define EMULATORTESTING
+
+ImageDownload::ImageDownload(QObject *parent)
+ {
+ manager = new QNetworkAccessManager(this);
+
+#ifdef EMULATORTESTING
+ qDebug()<<"Using PROXY SETTINGS!!!, change for device testing in image download";
+
+ // Reading the keys, CSM Stubbed - START
+ QFile winFile("c:\\data\\DoNotShare.txt");
+ if (!winFile.open(QIODevice::ReadOnly))
+ {
+ qDebug()<<"File to read the windows username and password could not be opened, returning!!!";
+ return;
+ }
+
+ QByteArray winArr = winFile.readAll();
+ QList winList = winArr.split(' ');
+ winFile.close();
+
+ QString httpUser(winList[0]);
+ QString httpPass(winList[1]);
+
+ // For proxy settings on emulator only - REMOVE for device
+ QString httpProxy = "10.1.0.214";
+ QString httpPort = "3128";
+
+ qDebug()<populateFriendsWidget();
+ else if(SmfPostsFetch == m_identifier)
+ m_homeView->populatePostsWidget();
+ else if(SmfPhotosFetch == m_identifier)
+ m_homeView->populatePhotosGridView();
+ // ToDo:- for albums, photos and activity
+ else
+ qDebug()<<"Unknown request for download, so do nothing";
+ }
+ }
+ else
+ {
+ qDebug()<<"Response data is NULL";
+ }
+ }
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/ImageDownload.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/ImageDownload.h Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Trolltech hereby grants a license to use the Qt/Eclipse Integration
+** plug-in (the software contained herein), in binary form, solely for the
+** purpose of creating code to be used with Trolltech's Qt software.
+**
+** Qt Designer is licensed under the terms of the GNU General Public
+** License versions 2.0 and 3.0 ("GPL License"). Trolltech offers users the
+** right to use certain no GPL licensed software under the terms of its GPL
+** Exception version 1.2 (http://trolltech.com/products/qt/gplexception).
+**
+** THIS SOFTWARE IS PROVIDED BY TROLLTECH AND ITS CONTRIBUTORS (IF ANY) "AS
+** IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+** TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+** PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+** OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+** PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+** LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+** NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** Since we now have the GPL exception I think that the "special exception
+** is no longer needed. The license text proposed above (other than the
+** special exception portion of it) is the BSD license and we have added
+** the BSD license as a permissible license under the exception.
+**
+****************************************************************************/
+
+#ifndef IMAGEDOWNLOAD_H_
+#define IMAGEDOWNLOAD_H_
+
+#include
+#include
+#include
+#include
+
+class HomeView;
+
+extern bool downloading;
+
+enum SmfItemIdentifier
+ {
+ SmfFriendsFetch = 0,
+ SmfPostsFetch,
+ SmfAlbumsFetch,
+ SmfPhotosFetch,
+ SmfActivityFetch
+ };
+
+class ImageDownload : public QObject
+{
+ Q_OBJECT
+public:
+ ImageDownload(QObject *parent = 0);
+ ~ImageDownload();
+ void downloadImage(HomeView *homeView, QString name, QUrl url, const SmfItemIdentifier &identifier);
+
+public slots:
+ void networkReplyFinished ( QNetworkReply *aNetworkReply );
+
+private:
+ SmfItemIdentifier m_identifier;
+ QNetworkAccessManager *manager;
+ HomeView *m_homeView;
+ QString m_name;
+ QHash m_nameReplyHash;
+};
+
+#endif /* IMAGEDOWNLOAD_H_ */
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/SMF.loc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/SMF.loc Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,13 @@
+// ============================================================================
+// * Generated by qmake (2.01a) (Qt 4.6.2) on: 2010-07-10T15:20:20
+// * This file is generated by qmake and should not be modified by the
+// * user.
+// ============================================================================
+
+#ifdef LANGUAGE_SC
+#define STRING_r_short_caption "SMF"
+#define STRING_r_caption "SMF"
+#else
+#define STRING_r_short_caption "SMF"
+#define STRING_r_caption "SMF"
+#endif
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/SMF.rss
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/SMF.rss Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,21 @@
+// ============================================================================
+// * Generated by qmake (2.01a) (Qt 4.6.2) on: 2010-07-10T15:20:20
+// * This file is generated by qmake and should not be modified by the
+// * user.
+// ============================================================================
+
+#include
+#include "SMF.loc"
+
+RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info
+ {
+ short_caption = STRING_r_short_caption;
+ caption_and_icon =
+ CAPTION_AND_ICON_INFO
+ {
+ caption = STRING_r_caption;
+ number_of_icons = 1;
+ icon_file = "\\resource\\apps\\SMF.mif";
+ };
+ }
+
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/SMF_reg.rss
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/SMF_reg.rss Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,18 @@
+// ============================================================================
+// * Generated by qmake (2.01a) (Qt 4.6.2) on: 2010-07-10T15:20:20
+// * This file is generated by qmake and should not be modified by the
+// * user.
+// ============================================================================
+
+#include
+#include
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0xE850fc7b
+
+RESOURCE APP_REGISTRATION_INFO
+ {
+ app_file="SMF";
+ localisable_resource_file="\\resource\\apps\\SMF";
+
+ }
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/ScreenSize.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/ScreenSize.h Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,18 @@
+#ifndef SCREENSIZE_H
+#define SCREENSIZE_H
+
+#include
+#include
+#include
+#include
+
+class ScreenSize : public QObject
+{
+public:
+ inline static QRect GetScreenRect()
+ {
+ return QApplication::desktop()->screenGeometry();
+ }
+};
+
+#endif // SCREENSIZE_H
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/ToolBar.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/ToolBar.cpp Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,262 @@
+#include "ToolBar.h"
+#include "ScreenSize.h"
+#include
+#include
+#include //Checl lateer
+#include
+#include
+#include
+//#include
+//#include
+
+
+//MACRO
+#define KNullUid TUid::Null()
+
+//Forward declaration
+class ScreenSize;
+
+ToolBar::ToolBar()
+{
+
+}
+ToolBar::~ToolBar()
+{
+
+}
+void ToolBar::GetToolBar(QMainWindow *Mainwindow,QStringList aListOfActions)
+{
+ //iMainWindow = new QMainWindow;
+ iMainWindow = Mainwindow;
+
+ QHBoxLayout* layout = new QHBoxLayout;
+ QToolBar* tool = new QToolBar(Mainwindow);
+ QToolButton* button1 = new QToolButton(Mainwindow);
+ QToolButton* button2 = new QToolButton(Mainwindow);
+ QToolButton* button3 = new QToolButton(Mainwindow);
+ QToolButton* button4 = new QToolButton(Mainwindow);
+
+ tool->setGeometry(0,ScreenSize::GetScreenRect().height() - (ToolbarIconHeight + KWidgetGapFactor),(ScreenSize::GetScreenRect().width()-(KWidgetGapFactor)),ToolbarIconHeight);
+
+ //ToDo :- Ankit to check on button resizing
+ const int IconWidth = ScreenSize::GetScreenRect().width()/7;
+ button1->setGeometry(0,ScreenSize::GetScreenRect().height() - (ToolbarIconHeight + KWidgetGapFactor),IconWidth,ToolbarIconHeight);
+
+ button1->setFixedWidth(IconWidth);
+ button2->setFixedWidth(IconWidth);
+ button3->setFixedWidth(IconWidth);
+ button4->setFixedWidth(IconWidth);
+
+
+ QIcon icon1("E:/Images/SMF/home.svg");
+ QIcon icon2("E:/Images/SMF/all_friends.svg"); //next.PNG
+ QIcon icon3("E:/Images/SMF/mail-message-new.svg");
+ QIcon icon4("E:/Images/SMF/Phone.svg");
+ QIcon icon5("E:/Images/SMF/system-log-out.svg");
+
+ button1->setIcon(icon1);
+ button2->setIcon(icon3);
+ button3->setIcon(icon4);
+ button4->setIcon(icon5);
+
+ button1->setToolTip("Home");
+
+ menu = new QMenu(Mainwindow);
+ icon2.actualSize(QSize(IconWidth-10,ToolbarIconHeight));
+ //menu->setFixedWidth(IconWidth+10);
+ menu->setIcon(icon2);
+
+ QMenu *addServ = new QMenu(Mainwindow);
+ addServ->setTitle(aListOfActions.at(0));
+
+ //For Facebook and Flickr SP
+ QAction *addServ_Facebk = new QAction("FaceBook",Mainwindow);
+ QAction *addServ_Flickr = new QAction("Flickr",Mainwindow);
+
+
+ addServ->addAction(addServ_Facebk);
+ addServ->addAction(addServ_Flickr);
+
+ // }
+ //Create Actions
+ //newAction1 = new QAction(aListOfActions.at(1),Mainwindow);
+ //newAction2 = new QAction(aListOfActions.at(2),Mainwindow);
+
+ //need to be modified
+ //menu->addAction(newAction1);
+ //menu->addAction(newAction2);
+
+ //to add services to the menu button
+ menu->addMenu(addServ);
+
+ //TODO: button to be disabled
+ //button2->setEnabled(false);
+ //button3->setEnabled(false);
+
+ tool->addWidget(button1);
+ tool->addAction(menu->menuAction());
+ tool->addWidget(button2);
+ tool->addWidget(button3);
+ tool->addWidget(button4);
+
+ layout->addWidget(tool);
+
+ //connect actions
+ connect(button1,SIGNAL(clicked()),this,SLOT(homeView()));
+ connect(button2,SIGNAL(clicked()),this,SLOT(msg()));
+ connect(button3,SIGNAL(clicked()),this,SLOT(call()));
+ connect(button4,SIGNAL(clicked()),this,SLOT(exitApp()));
+ //connect(newAction1,SIGNAL(triggered()),this,SLOT(post()));
+ //connect(newAction2,SIGNAL(triggered()),this,SLOT(reply()));
+
+ //connect for authentication
+ connect(addServ_Facebk,SIGNAL(triggered()),this,SLOT(authApp_Fb()));
+ connect(addServ_Flickr,SIGNAL(triggered()),this,SLOT(authApp_Flkr()));
+
+}
+
+//changing to home view
+void ToolBar::homeView()
+{
+ //debug
+ qDebug()<<"Inside View_Change()";
+}
+
+
+
+//slot for post comment
+/*void ToolBar::post()
+{
+ //debug purpose
+ qDebug()<<"Inside My Post";
+ bool ok;
+ QInputDialog inptDialg;
+ inptDialg.setStyleSheet("background: black;");//rgb(255,255,255);");
+ QString text = inptDialg.getText(iMainWindow, tr("QInputDialog::getText()"),tr("Post"),
+ QLineEdit::Normal,QString::null, &ok,Qt::Window);
+
+
+ if ( ok && !text.isEmpty() ) {
+ // user entered something and pressed OK
+ } else {
+ // user entered nothing or pressed Cancel
+ }
+
+
+}*/
+
+//slot for reply comment
+/*void ToolBar::reply()
+{
+ //debug purpose
+ qDebug()<<"Inside Reply";
+
+ bool ok;
+ QString text = QInputDialog::getText(iMainWindow, tr("QInputDialog::getText()"),tr("Reply To Post"),
+ QLineEdit::Normal,QString::null, &ok,Qt::Window);
+
+
+ if ( ok && !text.isEmpty() ) {
+ // user entered something and pressed OK
+ } else {
+ // user entered nothing or pressed Cancel
+ }
+
+
+}*/
+//calling
+//calling
+void ToolBar::call()
+ {
+ QMessageBox msgbox;
+ QString msg ("Calling not configured!");
+ msgbox.setText(msg);
+ msgbox.exec();
+ }
+
+
+
+//msging
+void ToolBar::msg()
+ {
+ QMessageBox msgbox;
+ QString msg ("Messaging not configured!");
+ msgbox.setText(msg);
+ msgbox.exec();
+ }
+//exiting application
+void ToolBar::exitApp()
+{
+ //qDebug()<<"Inside Exit_App()";
+ QApplication::exit();
+}
+
+
+//Auth_App for FaceBook
+void ToolBar::authApp_Fb()
+{
+ //debug
+ qDebug()<<"Inside Auth app of faceBook";
+ launchFB();
+}
+
+//Auth App for Flickr
+void ToolBar::authApp_Flkr()
+{
+ //debug
+ qDebug()<<"Inside Auth App of Flickr";
+ launchFlickr();
+}
+
+
+//Facebook AuthApp Launch
+void ToolBar::launchFB()
+ {
+ qDebug()<<"Inside Launch FB AuthApp";
+ QMessageBox msgbox;
+ QString msg ("Please Login Using Facebook Auth App!");
+ msgbox.setText(msg);
+ msgbox.exec();
+ /*TInt result;
+ _LIT(KExecutableName,"release\\winscw\\udeb\\AuthApp.exe");
+
+ //we can ignore using UID
+ //const TProcessId FBUid(KFBUid3);
+ RProcess fbProc;
+ result = fbProc.Create(KExecutableName,KNullDesC);
+ if(result != KErrNone)
+ {
+ qDebug()<<"FB Can't be opened";
+ return;
+ }
+ qDebug()<<"FB AuthApp Launched";
+ fbProc.Resume();
+ fbProc.Close();*/
+ return;
+
+ }
+
+void ToolBar::launchFlickr()
+ {
+ qDebug()<<"Inside Launch FB AuthApp";
+ QMessageBox msgbox;
+ QString msg ("Please Login Using Flickr Auth App!");
+ msgbox.setText(msg);
+ msgbox.exec();
+ /*TInt result;
+ _LIT(KExecutableName,"release\\winscw\\udeb\\Flickr.exe");
+
+ //we can ignore using UID
+ //const TProcessId FBUid(KFBUid3);
+ RProcess flickrProc;
+ result = flickrProc.Create(KExecutableName,KNullDesC);
+ if(result != KErrNone)
+ {
+ qDebug()<<"Flickr Can't be opened";
+ return;
+ }
+ qDebug()<<"Flickr AuthApp Launched";
+ flickrProc.Resume();
+ flickrProc.Close();*/
+ return;
+ }
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/ToolBar.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/ToolBar.h Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,44 @@
+#ifndef TOOLBAR_H
+#define TOOLBAR_H
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include "WidgetConstants.h"
+#include
+
+//FaceBook AuthApp UID
+const TUint32 KFBUid3 = { 0xEFE2FD23 };
+const TUint32 KFlickUid3 = { 0xE1D8C7D7 };
+
+class ToolBar : public QObject
+{
+ Q_OBJECT
+public:
+ ToolBar();
+ void GetToolBar(QMainWindow *Mainwindow,QStringList aListOfActions);
+ void launchFB();
+ void launchFlickr();
+ ~ToolBar();
+public slots:
+ //void post();
+ //void reply();
+ void exitApp();
+ void homeView();
+ void msg();
+ void call();
+ void authApp_Fb();
+ void authApp_Flkr();
+private:
+ QMainWindow *iMainWindow;
+ QSignalMapper *signal;
+public:
+ QMenu* menu;
+ //QAction *newAction1;
+ //QAction *newAction2;
+};
+
+#endif // TOOLBAR_H
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/WidgetConstants.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/WidgetConstants.h Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,10 @@
+#ifndef WIDGETCONSTANTS_H
+#define WIDGETCONSTANTS_H
+
+//For Home Screen
+const int KHeadNameHeight = 40;
+const int KWidgetGapFactor = 5;
+const int ToolbarIconHeight = 50;
+
+
+#endif // WIDGETCONSTANTS_H
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/debug/.svn/all-wcprops
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/debug/.svn/all-wcprops Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,5 @@
+K 25
+svn:wc:ra_dav:version-url
+V 122
+/svn/symbian/!svn/ver/414/products/s-series/engg/symbian/s60-app-dev/SocialMobileFrameWork/MissingCodeForSmf/DemoGUI/debug
+END
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/debug/.svn/entries
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/debug/.svn/entries Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,28 @@
+10
+
+dir
+415
+http://svnz02/svn/symbian/products/s-series/engg/symbian/s60-app-dev/SocialMobileFrameWork/MissingCodeForSmf/DemoGUI/debug
+http://svnz02/svn/symbian
+
+
+
+2010-07-30T12:20:29.303136Z
+414
+nalinah
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ddc49ed9-7720-479e-b42b-43a572c34f33
+
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/main.cpp Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,60 @@
+#include
+#include "mainwindow.h"
+#include
+#include
+#ifdef Q_OS_SYMBIAN
+#include
+#include
+#include
+#include
+#endif
+
+void debugOutput(QtMsgType type, const char *msg)
+ {
+ QFile logFile("c://data//SmfLog.txt");
+ Q_ASSERT(logFile.open( QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append ));
+ QTextStream stream(&logFile);
+
+ switch (type)
+ {
+ case QtDebugMsg:
+ stream< (CEikonEnv::Static()->AppUi());
+TRAPD(error,
+if (appUi) { // Lock application orientation into landscape
+appUi->SetOrientationL(CAknAppUi::EAppUiOrientationPortrait);
+}
+);
+#endif
+
+
+ w.showFullScreen();
+ return a.exec();
+}
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/mainwindow.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/mainwindow.cpp Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,33 @@
+#include "mainwindow.h"
+#include "ui_mainwindow.h"
+
+MainWindow::MainWindow(QWidget *parent) :
+ QMainWindow(parent),
+ ui(new Ui::MainWindow)
+{
+ //ui->setupUi(this);
+ setStyleSheet("selection-color: Black;");
+
+ Ptr2HomeView = new HomeView("SMF");
+ //Ptr2HomeView->getFriends(this);
+ Ptr2HomeView->SetupUI(this);
+}
+
+MainWindow::~MainWindow()
+{
+ //delete ui;
+ delete Ptr2HomeView;
+
+}
+
+void MainWindow::changeEvent(QEvent *e)
+{
+ QMainWindow::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+}
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/mainwindow.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/mainwindow.h Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,25 @@
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include
+#include "HomeView.h"
+
+namespace Ui {
+ class MainWindow;
+}
+
+class MainWindow : public QMainWindow {
+ Q_OBJECT
+public:
+ MainWindow(QWidget *parent = 0);
+ ~MainWindow();
+
+protected:
+ void changeEvent(QEvent *e);
+
+private:
+ Ui::MainWindow *ui;
+ HomeView* Ptr2HomeView;
+};
+
+#endif // MAINWINDOW_H
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/mainwindow.ui
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/mainwindow.ui Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,51 @@
+
+
+ MainWindow
+
+
+
+ 0
+ 0
+ 600
+ 400
+
+
+
+ MainWindow
+
+
+
+
+
+ 40
+ 50
+ 104
+ 64
+
+
+
+
+
+
+
+ TopToolBarArea
+
+
+ false
+
+
+
+
+
+
+
+
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/object_script.DemoGUI.Debug
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/object_script.DemoGUI.Debug Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,13 @@
+INPUT(
+./debug\main.o
+./debug\mainwindow.o
+./debug\CustomListWidget.o
+./debug\HomeView.o
+./debug\GridView.o
+./debug\ToolBar.o
+./debug\Documents.o
+./debug\and.o
+./debug\My.o
+./debug\GridView.o
+./debug\moc_mainwindow.o
+);
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/object_script.DemoGUI.Release
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/object_script.DemoGUI.Release Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,13 @@
+INPUT(
+./release\main.o
+./release\mainwindow.o
+./release\CustomListWidget.o
+./release\HomeView.o
+./release\GridView.o
+./release\ToolBar.o
+./release\Documents.o
+./release\and.o
+./release\My.o
+./release\GridView.o
+./release\moc_mainwindow.o
+);
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/release/.svn/all-wcprops
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/release/.svn/all-wcprops Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,5 @@
+K 25
+svn:wc:ra_dav:version-url
+V 124
+/svn/symbian/!svn/ver/414/products/s-series/engg/symbian/s60-app-dev/SocialMobileFrameWork/MissingCodeForSmf/DemoGUI/release
+END
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/release/.svn/entries
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/release/.svn/entries Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,28 @@
+10
+
+dir
+415
+http://svnz02/svn/symbian/products/s-series/engg/symbian/s60-app-dev/SocialMobileFrameWork/MissingCodeForSmf/DemoGUI/release
+http://svnz02/svn/symbian
+
+
+
+2010-07-30T12:20:29.303136Z
+414
+nalinah
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ddc49ed9-7720-479e-b42b-43a572c34f33
+
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/sasken_logo.svg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/sasken_logo.svg Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,1501 @@
+
+
+
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/smfdemo.svg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/smfdemo.svg Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,10 @@
+
+
+]>
+
+
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/tmp/.svn/all-wcprops
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/tmp/.svn/all-wcprops Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,5 @@
+K 25
+svn:wc:ra_dav:version-url
+V 120
+/svn/symbian/!svn/ver/414/products/s-series/engg/symbian/s60-app-dev/SocialMobileFrameWork/MissingCodeForSmf/DemoGUI/tmp
+END
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/tmp/.svn/entries
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/tmp/.svn/entries Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,28 @@
+10
+
+dir
+415
+http://svnz02/svn/symbian/products/s-series/engg/symbian/s60-app-dev/SocialMobileFrameWork/MissingCodeForSmf/DemoGUI/tmp
+http://svnz02/svn/symbian
+
+
+
+2010-07-30T12:20:29.303136Z
+414
+nalinah
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ddc49ed9-7720-479e-b42b-43a572c34f33
+
diff -r 9b00ca3cc206 -r b78fa4cdbf2b example/DemoGUI/ui_mainwindow.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/example/DemoGUI/ui_mainwindow.h Thu Aug 05 16:35:33 2010 +0530
@@ -0,0 +1,76 @@
+/********************************************************************************
+** Form generated from reading UI file 'mainwindow.ui'
+**
+** Created: Fri Jul 30 12:42:18 2010
+** by: Qt User Interface Compiler version 4.6.2
+**
+** WARNING! All changes made in this file will be lost when recompiling UI file!
+********************************************************************************/
+
+#ifndef UI_MAINWINDOW_H
+#define UI_MAINWINDOW_H
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+QT_BEGIN_NAMESPACE
+
+class Ui_MainWindow
+{
+public:
+ QWidget *centralWidget;
+ QTextEdit *textEdit;
+ QMenuBar *menuBar;
+ QToolBar *mainToolBar;
+ QStatusBar *statusBar;
+
+ void setupUi(QMainWindow *MainWindow)
+ {
+ if (MainWindow->objectName().isEmpty())
+ MainWindow->setObjectName(QString::fromUtf8("MainWindow"));
+ MainWindow->resize(600, 400);
+ centralWidget = new QWidget(MainWindow);
+ centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
+ textEdit = new QTextEdit(centralWidget);
+ textEdit->setObjectName(QString::fromUtf8("textEdit"));
+ textEdit->setGeometry(QRect(40, 50, 104, 64));
+ MainWindow->setCentralWidget(centralWidget);
+ menuBar = new QMenuBar(MainWindow);
+ menuBar->setObjectName(QString::fromUtf8("menuBar"));
+ menuBar->setGeometry(QRect(0, 0, 600, 21));
+ MainWindow->setMenuBar(menuBar);
+ mainToolBar = new QToolBar(MainWindow);
+ mainToolBar->setObjectName(QString::fromUtf8("mainToolBar"));
+ MainWindow->addToolBar(Qt::TopToolBarArea, mainToolBar);
+ statusBar = new QStatusBar(MainWindow);
+ statusBar->setObjectName(QString::fromUtf8("statusBar"));
+ MainWindow->setStatusBar(statusBar);
+
+ retranslateUi(MainWindow);
+
+ QMetaObject::connectSlotsByName(MainWindow);
+ } // setupUi
+
+ void retranslateUi(QMainWindow *MainWindow)
+ {
+ MainWindow->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", 0, QApplication::UnicodeUTF8));
+ } // retranslateUi
+
+};
+
+namespace Ui {
+ class MainWindow: public Ui_MainWindow {};
+} // namespace Ui
+
+QT_END_NAMESPACE
+
+#endif // UI_MAINWINDOW_H