This repository has been archived on 2023-11-19. You can view files and clone it, but cannot push or open issues or pull requests.
goober-bb10/src/ActiveFrameQML.cpp

42 lines
1 KiB
C++
Raw Normal View History

2016-10-21 19:24:29 +00:00
/*
* ActiveFrameQML.cpp
*
* Created on: Oct 21, 2016
* Author: morga
*/
#include <src/ActiveFrameQML.h>
#include <bb/cascades/SceneCover>
#include <bb/cascades/Container>
#include <bb/cascades/Application>
#include <bb/cascades/QmlDocument>
using namespace bb::cascades;
ActiveFrameQML::ActiveFrameQML(QObject *parent) : SceneCover(parent)
{
QmlDocument *qml = QmlDocument::create("asset:///AppCover.qml").parent(parent);
Container *mainContainer = qml->createRootObject<Container>();
setContent(mainContainer);
global_unread_label = mainContainer->findChild<Label*>("global_label");
global_unread_label->setParent(mainContainer);
home_unread_label = mainContainer->findChild<Label*>("home_label");
home_unread_label->setParent(mainContainer);
}
ActiveFrameQML::~ActiveFrameQML()
{
// TODO Auto-generated destructor stub
}
void ActiveFrameQML::setGlobalUnread(QString count)
{
global_unread_label->setText(count);
}
void ActiveFrameQML::setHomeUnread(QString count)
{
home_unread_label->setText(count);
}