11-27-2012 02:49 PM
11-27-2012 06:06 PM
I've signed the contribution agreement and the code is with BB to commit. If it's not up in the next day or two I'll upload it somewhere else temporarily!
01-06-2013 11:51 PM
01-06-2013 11:54 PM
Long story short - I couldn't quite work out how to push my changes to Github.
Sorry about the delay, here is a link! ![]()
01-07-2013 10:16 AM
Hi men ,look this link
http://devblog.blackberry.com/2012/11/bbm-invocati
here is a active frames
01-07-2013 10:21 AM
01-10-2013 06:24 AM
Hi,
the example in this thread did not work for me, i dont know why. But the following worked fine and its very easy to change the content of the SceneCover because "Application.cover" is a reference to this component.
AppCover.qml:
import bb.cascades 1.0
SceneCover {
property alias extraText: testText.text
content: Container {
Container {
layout: DockLayout {
}
background: Color.Black
Label {
id: testText
horizontalAlignment: HorizontalAlignment.Center
verticalAlignment: VerticalAlignment.Center
text: "Intital Text"
textStyle.color: Color.create("#ebebeb")
}
}
}
}
in main.qml
onCreationCompleted: {
Application.cover = appCover.createObject();
Application.cover.extraText = "Changed Text"
}
//
attachedObjects: [
ComponentDefinition {
id: appCover
source: "AppCover.qml"
}
//
01-15-2013 05:57 PM
Community Sample is up!
https://github.com/blackberry/Cascades-Community-S
01-17-2013 10:18 PM - edited 01-17-2013 10:30 PM
This might be an old thread, but I did figure it out.
In main.cpp, you can use 'app.setCover(new ActiveFrame());' or you can do it else. Do it here. Makes sense!
Second,
// ActiveFrame.cpp
#include "ActiveFrame.hpp"
ActiveFrame::ActiveFrame() :SceneCover(this) {
// Load the QML for the cover and retrieve the root container
qml = QmlDocument::create("asset:///screenCover.qml").pa rent(this);
mMainContainer = qml->createRootObject<Container>();
// Set the content of ActiveFrame
setContent(mMainContainer);
// Trigger an initial update of the content
update();
}
ActiveFrame:: ~ ActiveFrame() {
}
void ActiveFrame::update() {
// ...Here's where you update the cover...
// You can trigger updates here as often as necessary
}
// ActiveFrame.hpp
#ifndef ACTIVEFRAME_HPP_
#define ACTIVEFRAME_HPP_
#include <bb/cascades/SceneCover>
#include <bb/cascades/Container>
#include <bb/cascades/QmlDocument>
using namespace bb::cascades;
namespace bb {
namespace cascades {
class Container;
class QmlDocument;
class QObject;
}
}
class ActiveFrame : public SceneCover {
Q_OBJECT
public:
ActiveFrame();
virtual ~ActiveFrame();
private:
Container *mMainContainer;
QmlDocument *qml;
};
#endif /* ACTIVEFRAME_HPP_ */Now, the QML is important. If you're coming from the QML example, you probably used "SceneCover {}". That was my problem!
Essentially, you're creating the SceneCover by new ActiveFrame() then calling the QML to load the Container{}. *NOTE* - You can't wrap this in a Page{}. Just tried it.
So pop in the import tag then Container{} into your screenCover.qml and you're done.
Mess around with this some more and you can get the signals to work
.