Example #1
0
void TCUFPE::onCameraCardDone(const bb::system::CardDoneMessage & message) {
	disconnect(m_iManager,
			SIGNAL(childCardDone(const bb::system::CardDoneMessage &)), this,
			SLOT(onCameraCardDone(const bb::system::CardDoneMessage &)));
	qDebug() << message.data();
	emit this->newPicture(message.data());
}
void ApplicationUI::handleCardPooled(
		const bb::system::CardDoneMessage& message) {
	// reason can be: "closed" or "Success"
	qDebug() << "handleCardPooled data: " << message.data() << " reason: "
			<< message.reason();
	// TODO do we need this ?
	mCardStatus = "Pooled";
	emit cardStatusChanged();
}
void OpenDataSpace::handleCardPooled(
		const bb::system::CardDoneMessage& message) {
	// reason can be: "closed" or "Success"
	qDebug() << "handleCardPooled data: " << message.data() << " reason: "
			<< message.reason();
	// TODO do we need this ?
	m_cardStatus = tr("Pooled");
	emit cardStatusChanged();
}
void SocialInvocation::childCardDone(const bb::system::CardDoneMessage &doneMessage)
{
	SystemToast* toast = new SystemToast(this);
	if (doneMessage.dataType().compare("application/json") == 0)
	{
		// The data type from the venue search card is application/json
		// so we need to convert the json data to a map here. This will match
		// the json format from the Foursquare docs at http://developer.foursquare.com
		JsonDataAccess jda;
		const QVariantMap venueMap = jda.loadFromBuffer(doneMessage.data()).toMap();
		toast->setBody(QString("User Picked: ") + venueMap.value("name","").toString());
	}
	else
	{
		toast->setBody(doneMessage.data());
	}
	toast->show();
}
void BarcodeInvoker::onChildCardDone(const bb::system::CardDoneMessage &message)
{
    setBarcode(message.data());
}
void BarcodeInvoker::onChildCardDone(const bb::system::CardDoneMessage
		&message){
	qDebug() << "+++++++ Child card done: " << message.data() << endl;
	_resultsLabel->setText("Results: " + message.data());
}