example/smfclientapp/testscreen.cpp
changeset 14 a469c0e6e7fb
parent 6 c39a6cfd1fb9
child 17 106a4bfcb866
equal deleted inserted replaced
13:b5d63d5fc252 14:a469c0e6e7fb
    33 	QString c = QString::number(providerList->count());
    33 	QString c = QString::number(providerList->count());
    34 	writeLog(c);
    34 	writeLog(c);
    35 	SmfProvider smfP(providerList->at(0));
    35 	SmfProvider smfP(providerList->at(0));
    36 	
    36 	
    37 	writeLog("0th SmfProvider=");
    37 	writeLog("0th SmfProvider=");
    38 	writeLog(smfP.m_description);
    38 	writeLog(smfP.description());
    39 	writeLog(smfP.m_serviceUrl.toString());
    39 		writeLog(smfP.serviceUrl().toString());
    40 	writeLog(smfP.m_appUrl.toString());
    40 		writeLog(smfP.applicationUrl().toString());
    41 	m_postProvider = new SmfPostProvider(&smfP);
    41 		m_postProvider = new SmfPostProvider(&smfP);
    42 	//connect to appropriate slot
    42 	//connect to appropriate slot
    43 	connect(m_postProvider,
    43 	connect(m_postProvider,
    44 			SIGNAL(postsAvailable(SmfPostList*, SmfError, SmfResultPage)),
    44 			SIGNAL(postsAvailable(SmfPostList*, SmfError, SmfResultPage)),
    45 			this,
    45 			this,
    46 			SLOT(showPosts(SmfPostList* , SmfError , SmfResultPage )));
    46 			SLOT(showPosts(SmfPostList* , SmfError , SmfResultPage )));
    59 	int providerIndex = ui.comboBox->currentIndex();
    59 	int providerIndex = ui.comboBox->currentIndex();
    60 	//now create contact fetcher with 0th
    60 	//now create contact fetcher with 0th
    61 	SmfProvider smfP(providerList->at(providerIndex));
    61 	SmfProvider smfP(providerList->at(providerIndex));
    62 	
    62 	
    63 	writeLog("0th SmfProvider=");
    63 	writeLog("0th SmfProvider=");
    64 	writeLog(smfP.m_description);
    64 	writeLog(smfP.description());
    65 	writeLog(smfP.m_serviceUrl.toString());
    65 		writeLog(smfP.serviceUrl().toString());
    66 	writeLog(smfP.m_appUrl.toString());
    66 		writeLog(smfP.applicationUrl().toString());
       
    67 		
    67 	m_contactFetcher = new SmfContactFetcher(&smfP);
    68 	m_contactFetcher = new SmfContactFetcher(&smfP);
    68 	//connect to appropriate slot
    69 	//connect to appropriate slot
    69 	connect(m_contactFetcher,SIGNAL(friendsListAvailable(SmfContactList*, SmfError , SmfResultPage)),
    70 	connect(m_contactFetcher,SIGNAL(friendsListAvailable(SmfContactList*, SmfError , SmfResultPage)),
    70 			this,SLOT(showFriends(SmfContactList*, SmfError , SmfResultPage)));
    71 			this,SLOT(showFriends(SmfContactList*, SmfError , SmfResultPage)));
    71 	/*connect(m_contactFetcher,SIGNAL(groupListAvailable(SmfGroupList*, SmfError , SmfResultPage)),
    72 	/*connect(m_contactFetcher,SIGNAL(groupListAvailable(SmfGroupList*, SmfError , SmfResultPage)),
    82 	int providerIndex = ui.comboBox->currentIndex();
    83 	int providerIndex = ui.comboBox->currentIndex();
    83 	//now create contact fetcher with 0th
    84 	//now create contact fetcher with 0th
    84 	SmfProvider smfP(providerList->at(providerIndex));
    85 	SmfProvider smfP(providerList->at(providerIndex));
    85 	
    86 	
    86 	writeLog("0th SmfProvider=");
    87 	writeLog("0th SmfProvider=");
    87 	writeLog(smfP.m_description);
    88 	writeLog(smfP.description());
    88 	writeLog(smfP.m_serviceUrl.toString());
    89 		writeLog(smfP.serviceUrl().toString());
    89 	writeLog(smfP.m_appUrl.toString());
    90 		writeLog(smfP.applicationUrl().toString());
       
    91 		
    90 	m_postProvider = new SmfPostProvider(&smfP);
    92 	m_postProvider = new SmfPostProvider(&smfP);
    91 //	//connect to appropriate slot
    93 //	//connect to appropriate slot
    92 	connect(m_postProvider,
    94 	connect(m_postProvider,
    93 			SIGNAL(postsAvailable(SmfPostList*, SmfError, SmfResultPage)),
    95 			SIGNAL(postsAvailable(SmfPostList*, SmfError, SmfResultPage)),
    94 			this,
    96 			this,
   148 		QVariant nameVar = frnd.value("Name");
   150 		QVariant nameVar = frnd.value("Name");
   149 		QContactName name = nameVar.value<QContactName>();
   151 		QContactName name = nameVar.value<QContactName>();
   150 //		QString nick = name.value("Nickname");
   152 //		QString nick = name.value("Nickname");
   151 		QString fname;
   153 		QString fname;
   152 		QString lname;
   154 		QString lname;
   153 #ifdef OLDER_QT_MOBILITY
       
   154 		fname = name.first();
       
   155 		lname = name.last();
       
   156 #else
       
   157 		fname = name.firstName();
   155 		fname = name.firstName();
   158 		lname = name.lastName();
   156 		lname = name.lastName();
   159 #endif
       
   160 		
   157 		
   161 		ui.listWidget->addItem(fname);
   158 		ui.listWidget->addItem(fname);
   162 //		QMessageBox::information(this,QString("First Name"),fname,QMessageBox::Ok);
   159 //		QMessageBox::information(this,QString("First Name"),fname,QMessageBox::Ok);
   163 //		QMessageBox::information(this,QString("Last Name"),lname,QMessageBox::Ok);
   160 //		QMessageBox::information(this,QString("Last Name"),lname,QMessageBox::Ok);
   164 			}
   161 			}