GroupDataModel in an active Frame (aka Cover)?

Hey guys,.

I have an active frame for my application that uses a simple ActiveFrame class (derived from examples on the ' net).  He received an ImageView and a label.  in my main.qml I connect the signal of thumbnail() to an onThumbnail() function and send the text to the ActiveFrame class to update the label by a Q_INVOKABLE update() method.   Everything works beautifully.

I would replace the label with a ListItemView that is attached to a GroupDataModel in my main class (a class of client Manager 'work').

How can I go on the passage of the GroupDataModel to the SceneCover?

the job manager and the scene covers both are exposed to QML via setContextProperty.

Can I put a GroupDataModel as a property on my SceneCover and set it with a Set accessor method?

is there a better way to do it?

EDIT: update, I tried simply adding a ListItemView to the SceneCover.qml page and some properties Label.text of binding to the property of the presentation object workManager representing the GroupDataModel, but the ListItemView on the SceneCover is empty.

Thank you!

J

OK, solved it myself.

First of all, in the applicationui.cpp file, I put the parent to my WorkManager object and the SceneCover object:

    // Create a WorkManager
    WorkManager * workManager = new WorkManager(this);
    qml->setContextProperty("workManager", workManager);

    // Active Frame
    ActiveFrame * activeFrame = new ActiveFrame(this);
    Application::instance()->setCover(activeFrame);
    qml->setContextProperty("activeFrame", activeFrame);

Then, in the constructor for the class ActiveFrame, I find the WorkManager and define a context property.

    qDebug() << "ActiveFrame;:ActiveFrame(), my parent is " << parent;
    wm = parent->findChild("myWorkManager");    QmlDocument *qml = QmlDocument::create("asset:///SceneCover.qml")
            .parent(parent);
    Container *mainContainer = qml->createRootObject();
    setContent(mainContainer);    qml->setContextProperty("myWorkMgr", wm);

After having done that, I can access properties, in particular, the GroupDataModel property of the WorkManager.

not sure if it's the "right" way to do it, but it seems to work reliably.

see you soon,

J

Tags: BlackBerry Developers

Similar Questions

  • Cover (active Frame) alarm SHOOTING when wide screen

    While my application is in Active Frame mode, I have an alarm that fires based on a set of users. The user gets to set the interval on how often updates the screen of the frame of the cover.

    When debugging my application using the Alpha of DEV, I noticed the continues to fire even when the screen turns off alarm. To help reduce battery drain I would cover alarm to stop cooking when the screen turns off and start over when the screen is back on. Is this possible?

    The alarm I set is: QNXSystem.system.setAlarm (1000 * alarmTime, True);

    IowWindowEvent.WINDOW_STATE_CHANGED allows you to control exactly if your app is only minimized or totally hidden, so you can cancel the events system, while they are not necessary (IowWindowState.THUMBNAIL, IowWindowState.HIDDEN, and IowWindowState.NORMAL

    My app: Get set - get up!   Get ready for the revolution snooze.

  • The Devs creating their active Frame for a separate QML file covers? I'm stuck

    Bit in trouble, I do my best to bring my Apps support 10.2.1 10.2.2 I practically everything by working the * beep * covers Active, I did do a check and create the file QML according to less than 10.3 or greater

     ComponentDefinition {
                id: creator;
                source: ""
                function createQMLObject(sourceUrl){source=sourceUrl; creator.createObject()}
            }
    

    Feel free to use that btw ^.

    if(olderFirmware===true)  Application.setCover(creator.createQMLObject("CoverOlderFirmware.qml"))
            else{Application.setCover(creator.createQMLObject("Cover.qml"))}
    

    Now for some reason, they do not work, they seem to be created, but do not want to show, normally I would create it from my main.qml but the passport and its lid Multi forced me to separate the covers in their own QML files

    Begins like (not included UI code)

    import bb.cascades 1.2
    
        SceneCover {
            id: large
    
            content: Container {
                background: Color.create("#000000")
                layout: DockLayout {}
    }
    }
    

    Place in a container gives me a weird error on not able to create a list in an object, probably referring to MultiCover and SceneCover as a child of the container.

    Any suggestions?

    I use active selector to do this, find in this application example:
    https://github.com/RodgerLeblanc/AssetSelector

    This method can support 10.2.1 users and below, don't forget to add the lines of c ++ this blog:
    https://bb10code.WordPress.com/2014/12/10/active-frame-made-easy/

    Check your email, I also sent you something on your last post on the forum.

  • Waterfalls: NotificationDialog in the active Frame

    Hi @all,

    I want to implement a "alarm" - functionality of my application, which displays a Notification dialog box in some situations. I get the job of Notification dialog when the application is in the foreground. However, the application will be often minimized. I tried to create a Notification dialog box in the active Frame, but it is not displayed.

    Now my question: is it possible to display a Notification dialog box, while the app is an active Frame (and how)? I think that it should be possible because it is an important feature, but I couldn't make it work.

    Thanks a lot for your help!

    Peter

    OK, I found the solution on my own. It is possible to display active frames notification dialog boxes. The implementation is the same as put forward app. My problem was that I got another error that prevented the projection dialog.

  • Active frame, the Splashscreen being thumbnailed-&gt; error

    Hi, I am adding active frame on my apps (dynamic image as a backdrop)

    It works well, but it has a problem: app still the splashscreen-> being thumbnailed-> (see only black)-> when tap in the foreground, near app.

    What could cause the problem?

    Thank you

    Hi, I have change the location to setCover after some process done httpRequest. And the app will not fill again.

    Was before I put setCover on constructor ApplicationUI.

    void ApplicationUI::setActiveFrame()
        {
        iIsActiveFrameSet = true;
        MyActiveFrame *activeFrame = new MyActiveFrame();
        Application::instance()->setCover(activeFrame);
        iQmlDocument->setContextProperty("_activeFrame", activeFrame);
        }
    

    Thank you

  • All tuned if app is put in the active frame?

    I have an application that uses the constant GPS, but it doesn't have GPS if the user does not interact with it. Is there a way I can hear if my application is put in and outside the active? I want to be able to have the GPS off when my application is in active frame mode and turned on when it is open.

    Thanks in advance. The answers will be be loved and solutions marked as resolved.

    Hi bmrr,

    You can find this blog useful to make your application to listen to the signal of thumbnail():

    http://devBlog.BlackBerry.com/2013/08/listen-up-to-those-important-lifecycle-event-signals/

  • Dynamic active frame with the data from a file

    Hello

    I'm looking in creating a dynamic active setting (like the BBM active frame that has a title of the header and moves through updates).

    I will create a page that has a heading "interesting facts" and then labels different facts and I was wondering how I would go on the establishment in order to create a dynamic active frame that scroll the different labels?

    Thanks in advance

    Hello

    You can follow the example of code here.

    https://github.com/BlackBerry/Cascades-samples/tree/master/BFB-showcase

    The "activeFrameQML.cpp" has this feature

    {voidActiveFrameQML::update()}

    TODO: Replace with piloted by data update instead.

    If {(isActiveFrame)

    QTimer::singleShot (10000, this, SLOT (update ()));

    issue of updateChanged();

    }

    }

    And you can place your updated code in the 'AppCover.qml' to update your ActiveFrame

  • How to disable or remove an extension of the active frame?

    How to disable or remove an extension of the active frame?

    Hello

    Get access to the responsibility of the functional administrator, click personalization - > search path - > go ahead and select Update customization
    You can check / uncheck peronalization (use box) and select personlization to disable or remove customization to undo changes.

    Note: Customization of Delete will delete the data server (MDS) Meta peraonlization

    -Had

  • The C/C++ libs give access to the active Frame outside the waterfalls?

    Native libraries in C/C++ can access the Frame active outside waterfalls?

    Inside of the waterfalls, I would use ScreenCover but this class is connected to the object Application of Cascades. As a QT application my code has only the QApplication object available.

    There is a set of functions in navigator.h 'cover of window' bunch, and I suspect that what you use is among them.

    They appear roughly underdocumented, however, so I don't know to what extent you will have with him unless there is a sample. See for example: https://developer.blackberry.com/native/reference/bb10/com.qnx.doc.bps.lib_ref/com.qnx.doc.bps.lib_r...

  • New window (active Frame) of the API File Path coverage helps

    I'm still learning, but I can't understand how to deliver the active location of my frame image in the new window cover api.  Here's my function that is called from the entercover event listener.  The image is a jpg in the images of my webworks app folder.  Any ideas?

    
    

    Few things to note-

    Also, you must wait until you entercover. You can do it anytime and entercover is for you to know when the cover is about to go, then you can start an interval or something, if you want to be updated with the information from your server

    path must be a full path
    'file:///accounts/1000/shared/downloads/windowcover.png '.

    If you want a path to local file, you can use (for files in your content)

    'local:///images/active_frame.jpg '.

    I have not yet complete samples but you can take a look at our test scenarios

    local path-
    https://github.com/BlackBerry/BB10-WebWorks-framework/BLOB/master/test/functional/manual/BlackBerry...

    https://github.com/BlackBerry/BB10-WebWorks-framework/BLOB/master/test/functional/manual/BlackBerry...

    Samples should be available soon.

  • Active frames

    I don't see any documentation or tutorials on these.  Anyone know how to make them?

    Nevermind, I found it in the fundamentals of waterfalls

    For those who want her here: https://developer.blackberry.com/cascades/documentation/dev/fundamentals/index.html

    and its Application: setCover()

  • Not Actived frame "CHASSIS-LIMIT-EXCEEDED."

    Hi all,

    We have an infrastructure with two fabrics of interconnection Cisco UCS 6120, the version installed is 1.2 (1 d), now that we have connected 12 chassis UCS 5108 with 1 link in 'Political discovery Chassis', so we have 12 port configured server and we have installed all the port licenses required on each interconnection fabric.

    We have the 1.2 (1 d) version supports up to 12 chassis running, but we can not activate more than 10 chassis, in the UCS Manager appear this message "CHASSIS-LIMIT-a EXCEEDED."

    Can anyone help us.

    Thank you, bye

    Marco Pagani

    In 1.2 (1 d) UCS does support more than 10 chassis. In support of more, the UCS must be upgraded to 1.3 (1 c) or higher.

    Hope that helps.

    Thank you
    Michael

  • How to create the cover of the app for my application

    Dear,

    Please help me with step by step tutorial how to create an appcover for my application! I'm kinda noob on C++ and I read the paper, but could not apply! (didn't know where to put the code - C++ part) not Qml

    I want to put a picture of the asset as a cover of the app

    Your prompt response is much appreciated!

    You can do with QML also.

    Follow this Code:

    import bb.cascades 1.4
    Page {
    
        attachedObjects: [
            //Active Frame is called as Scene Cover
            SceneCover {
                id: activeFrame
                content: Container {
                    //To Do Fill Me with QML
                    //fill what you want. Image, Label, much more
                }
    
            }
        ]
        Label {
            text: "Hello World"
    
        }
    // After Application is minimised or Active Framed This Function shows
    onCreationCompleted: {
        Application.setCover(activeFrame)
    }
    
    }
    

    This is how you create with QML. C++ is used for highly recommended as animative and well known to the user.

    When you love it, you can accept it as snap

  • Change the Position of the label of the window cover

    Is there a way to show the label to cover over the top or medium instead of the lower part of the active frame?

    If I want the label to be full height, should what size I choose?

    Also, if I update the label & smear the code below:

    blackberry.ui.cover.labels.push({
            label: 'Test',
            size: 10,
            wrap: true
        });
    
        blackberry.ui.cover.updateCover();
    

    Is it supposed to continue to add Test Test Test... or just once and replace it on the previous! Because sometimes I see two lines of the word, I don't know why.

    Thank you

    To align with instructions for interface user BB10, blanket labels appear on the bottom of the frame. A workaround that you can try is to set an image as the cover and in this image, design it so that the text is everywhere where you want it to be.

  • Active image tag

    Hello

    I am trying to create a framework of active and wanted that she look like active frames the native BlackBerry apps where there is a label at the top of the active frame and icon at the top right.

    I have sorted out etiquette:

    Container {
            background: Color.Black
            opacity: 0.8
            leftPadding: 10
            rightPadding: 10
            topPadding: 10
            bottomPadding: 10
            horizontalAlignment: HorizontalAlignment.Fill
    
            Label {
                text: qsTr("Useful Facts")
                textStyle.color: Color.White
                textStyle.fontSize: FontSize.Medium
            }
    
        }
    

    But I don't know how to get my icon to sit in line with the label, like the image below. Also, what size the icon should be for both devices Q & Z and I'd be able to change the calibration in Momentics or I need to create more than two copies of the icon?

    Thank you

    Use a DockLayout

    Then place the label first and second Image

    The horizontal label LEFT and vertically CENTER

    CENTER of RIGHT and vertically image Hor.

    Maybe using translateX and translateY to justify

Maybe you are looking for

  • Why each 'page info' is not within the parameters of plug-ins?

    When I check my plugins, add ons, updates, there is the option blocks right that define whether or not to 'Always enable' or 'always ask '. My question is:-for each page that opens, there is an "information page" option, we can check to see/check wha

  • Satellite A500 - Windows won't start, how to get back now?

    Hello guys,. Recently, a week, I bought a new Satellite A500 - 1HK. I installed everything and after I installed Office 2007, after restarting my PC put on the Windows 7 Logo. PLS, please note that at this time one had a connected external HARD disk.

  • OfficeJet Pro 8600: disable auto-answer

    Whenever someone calls me (she is not a fax, but a regular phone call) talk to me, I get a message on my printer there is a ' incoming call auto answer on ", then the name and number of the person calling.  I am unable to answer the phone manually. 

  • New Xbox - profile Email

    New Xbox today and my son cannot access his profile to play online. Request by e-mail, then password when he tries. I remember only an email and password I used to put in place years ago. When I go to the xbox live web, it allows me to connect, but t

  • HP Pavilion dv7t-3000 does not start

    My HP Pavilion dv7t-3000 does not start. I checked this article: http://support.hp.com/us-en/document/c01732674 According to who, the error condition is: 'non-functional CPU. So if I buy a new processor and disassemble the laptop and replace the proc