2016-10-21 19:24:29 +00:00
|
|
|
/*
|
2016-10-22 22:56:38 +00:00
|
|
|
* Copyright (C) 2016 Morgan McMillian <gilag@monkeystew.com>
|
2016-10-21 19:24:29 +00:00
|
|
|
*
|
2016-10-22 22:56:38 +00:00
|
|
|
* This file is apart of the Goober application, a client for pnut.io
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2016-10-21 19:24:29 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#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);
|
2016-10-22 14:11:28 +00:00
|
|
|
// home_unread_label = mainContainer->findChild<Label*>("home_label");
|
|
|
|
// home_unread_label->setParent(mainContainer);
|
2016-10-21 19:24:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ActiveFrameQML::~ActiveFrameQML()
|
|
|
|
{
|
|
|
|
// TODO Auto-generated destructor stub
|
|
|
|
}
|
|
|
|
|
|
|
|
void ActiveFrameQML::setGlobalUnread(QString count)
|
|
|
|
{
|
|
|
|
global_unread_label->setText(count);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ActiveFrameQML::setHomeUnread(QString count)
|
|
|
|
{
|
2016-10-22 14:11:28 +00:00
|
|
|
global_unread_label->setText(count);
|
2016-10-21 19:24:29 +00:00
|
|
|
}
|