Beta 3: call the application menu NavigationPane

Now we can define menus of applications of Cascades in Beta 3, I tried to find how we can call all windows in a SettingsActionItem.

I have a pane with tabs with a declared MenuDefination. I want to call a QML file that is a NavigationPane that contains the list of parameters. I have tried to seem so all documentation and sample applications and do not see the right way to do this. It would be nice to have a applications examples with an application menu that calls a settings screen.

Can anyone help or recommend best practices for this?

Thanks in advance.

Ok. I managed to do the work.

hand. QML

import bb.cascades 1.0

TabbedPane {
    showTabsOnActionBar: true

     Menu.definition: MenuDefinition {
        helpAction: HelpActionItem {
            imageSource: "asset:///icons/help.png"
        }
        settingsAction: SettingsActionItem {
            imageSource: "asset:///icons/setting.png"
            onTriggered : {
               settingsSheet.open()
            }
        }
        actions: [
            ActionItem {
                title: "Info"
                imageSource: "asset:///icons/info.png"
            }
        ]
    } 

    attachedObjects: [
       Sheet {
           id: settingsSheet
           objectName: "settingsSheet"
           content: SettingsSheet {
               id: settingsContent
           }
       }
   ]

    Tab {
        title: qsTr("Tab 1")
        Page {
            id: tab1
            Container {
                Label {
                    text: qsTr("Tab 1 title")
                }
            }
        }
    }
    Tab {
        title: qsTr("Tab 2")
        Page {
            id: tab2
            Container {
                 Label {
                    text: qsTr("Tab 2 title")
                }
            }
        }
    }
    Tab {
        title: qsTr("Tab 3")
        Page {
            id: tab3
            Container {
                Label {
                    text: qsTr("Tab 3 title")
                }
            }
        }
    }
    onCreationCompleted: {
        OrientationSupport.supportedDisplayOrientation = SupportedDisplayOrientation.All;
    }
}

SettingsSheet.qml

import bb.cascades 1.0

NavigationPane {
    Page {
        Container {
            Label {
                text: "Settings Page"
            }
        }
    }
}

Tags: BlackBerry Developers

Similar Questions

  • How do to call the BlackBerry menu form share an Adobe Air application?

    Hello

    I'm looking for a tutorial or demo code that describes how to call the BlackBerry menu sharing an Adobe Air based application.

    I found a tutorial of waterfalls for it - there's one for Adobe Air too?
    - http://bbcascadescode.tumblr.com/post/38998702671/invoke-share-for-bb10

    This is a screenshot of the Action menu:

    Advice welcome!

    Here you go:

    package com.lib.playbook.invocation
    {
        import com.lib.playbook.controls.List;
        import com.lib.playbook.pages.TitlePage;
        import com.lib.playbook.renderers.IconListRenderer;
    
        import flash.events.Event;
        import flash.events.IEventDispatcher;
    
        import qnx.events.InvokeEvent;
        import qnx.events.InvokeQueryTargetEvent;
        import qnx.fuse.ui.core.Action;
        import qnx.fuse.ui.events.ActionEvent;
        import qnx.fuse.ui.events.ListEvent;
        import qnx.invoke.ActionQuery;
        import qnx.invoke.InvokeManager;
        import qnx.invoke.InvokeRequest;
        import qnx.invoke.InvokeTarget;
    
        public class InvokeSearchPage extends TitlePage
        {
            private var request : InvokeRequest = null;
            private var targets : List = new List();
    
            /////////////////////////////////////////////////////////////////////////////////////////
            public function InvokeSearchPage()
            {
                super();
                this.title = 'Search With';
                this.titlebar.dismissAction = new Action( 'Cancel', null, {id:'cancel'} );
                this.titlebar.addEventListener(ActionEvent.ACTION_SELECTED, ActionSelected );
    
                this.targets.cellRenderer = com.lib.playbook.renderers.IconListRenderer;
                this.targets.addEventListener(ListEvent.ITEM_CLICKED, TargetSelected );
                this.targets.rowHeight = 140;
                this.addChild( this.targets );
            }
    
            ///////////////////////////////////////////////////////////////////////////////////////////
            public function filter( request :InvokeRequest ) : void
            {
                this.targets.removeAll();
    
                this.request = request;
    
                //trace( 'filter ' + request.mimeType );
                InvokeManager.invokeManager.addEventListener( InvokeQueryTargetEvent.SUCCESS, TargetsFound );
                InvokeManager.invokeManager.queryInvokeTargets( request.mimeType, request.uri, request.action, request.targetOptions );
            }
    
            ///////////////////////////////////////////////////////////////////////////////////////////
            private function TargetsFound( event : InvokeQueryTargetEvent ) : void
            {
                InvokeManager.invokeManager.removeEventListener(InvokeQueryTargetEvent.SUCCESS, TargetsFound );
                //trace( 'TargetsFound' );
                var action : ActionQuery;
                var target : InvokeTarget;
                for each( action in event.actions )
                {
                    for each( target in action.targets )
                    {
                      this.targets.addItem( { data : target.target, label : target.label, icon : 'file://' + target.icon } );
                    }
                }
            }
    
            ////////////////////////////////////////////////////////////////////
            private function TargetSelected( event :Event ) : void
            {
                if( this.targets.selectedIndex >= 0 )
                {
                  this.request.target = this.targets.selection;
                  InvokeManager.invokeManager.invoke( this.request );
                }
            }
    
            ////////////////////////////////////////////////////////////////////
            private function ActionSelected( event :ActionEvent ) : void
            {
                switch( event.action.data.id )
                {
                    case 'cancel' : this.dispatchEvent( new Event( Event.CANCEL ) ); break;
                }
            }
    
            //////////////////////////////////////////////////////////////////////
            override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
            {
                super.updateDisplayList( unscaledWidth, unscaledHeight );
    
                this.targets.setPosition( 10, this.top + 10 );
                this.targets.setActualSize( unscaledWidth - 20, unscaledHeight - this.targets.y - 10 );
            }
        }
    }
    

    And the rendering engine:

    package com.lib.playbook.renderers
    {
    
        import qnx.fuse.ui.display.Image;
        import qnx.fuse.ui.listClasses.CellRenderer;
    
        public class IconListRenderer extends CellRenderer
        {
    
            private var icon    :Image = new Image();
    
            /////////////////////////////////////////////////////////////////////////
            public function IconListRenderer()
            {
                super();
            }
    
            ///////////////////////////////////////////////////////////////
            override protected function onAdded():void
            {
                super.onAdded();
                this.addChild( this.icon );
            }
    
            ///////////////////////////////////////////////////////////////
            override protected function onRemoved():void
            {
                super.onRemoved();
                this.removeChild( this.icon );
            }
    
            /////////////////////////////////////////////////////////////////////////////////////
            override protected function drawLabel(unscaledWidth:Number, unscaledHeight:Number):void
            {
                super.drawLabel( unscaledWidth, unscaledHeight );
    
                if( this.data )
                {
    
                    if( this.data.hasOwnProperty( 'icon' ) && this.data.icon != null )
                    {
                        this.icon.setImage( this.data.icon );
                        this.icon.setPosition( 10, 15 );//( unscaledHeight - this.icon.height ) / 2 );
                    }
                    else
                    {
                        this.icon.setImage( null );
                    }
    
                }
    
                this.label.x = 140;
                this.label.width = unscaledWidth - this.label.x - 20;
            }
        }
    }
    

    references com.lib.playbook our our inner classes, but you should get the approach to apply.

  • How to create the application menu?

    Hello

    I want to add to the settings page for my application.

    I created the application menu in the Navigation pane.

    See my coding:

    NavigationPane {
        id: navigationPane
          Page {
                id: mainpage
                               Menu.definition: MenuDefinition {
                            actions: [
                        ActionItem {
                             title: "Action"
                                  imageSource: "asset:///images/setting.png"
    
                            onTriggered: {
    
                   navigationPane.push(settings.createObject())
                                                           }
                                   attachedObjects: [
                                  ComponentDefinition {
                                        id: settings
                                           source: "setting.qml"
                                 }
                             ]
                         }
                      ActionItem {
                                   title: "help"
                                        imageSource: "asset:///images/help.png"
                                    }
                           ]
                         }
                         titleBar: TitleBar {
                                   title: "Main Bar"
                                                        }
                                                  }
                                              }
    

    and on settings.qml

    Page {
                  id: settings
                   titleBar: TitleBar {
                          title: "Settings"
                }
                Container {
                    background: Color.Yellow
                    Label {
                     text: "Want [Dark or White] theme selet below"
                }
                  DropDown {
                    title: "Select Theme"
    
                    Option {
                         text: "Dark"
                                 onSelectedChanged: {
    
                              if (Application.themeSupport.theme.colorTheme.style == VisualStyle.Bright) {
                                          Application.themeSupport.setVisualStyle(VisualStyle.Dark);
                                      }
                                else {
                                     Application.themeSupport.setVisualStyle(VisualStyle.Bright);
                                          }
    
                                 }
                           }
    
                    Option {
                            text: "white"
                             selected: true
    
                                    onSelectedChanged: {
    
                                     if (Application.themeSupport.theme.colorTheme.style == VisualStyle.Bright) {
                                      Application.themeSupport.setVisualStyle(VisualStyle.Dark);
                                               } 
    
                                           }
    
                                        }
                                   }
                                }
                           }
    

    and I see not the menu look at this picture

    now, I want the solution please can someone help.

    -shaishad

    the definition of menu on the navigationpane

  • Disable the Application Menu

    I have a navigationPane with an Application Menu. One of the items in this menu is settings so
    When I click on parameter I shows the Settings Page but I would like to turn off the Menu of the Application
    When the user on the Configuration page

    I put in the onCreationCompleted of my settingPage
    Application.menuEnabled = false;

    And when I click on the back button I do:
    Application.menuEnabled = true;
    navigationPane.pop ();

    However, the Application Menu is always displayed in the settings page, so how can I disable it?

    I did it!

    When I press settings page, I disbale the application from the page menu, then

    ActionItem {
        title: "Preferencias"
        imageSource: "asset:///images/ic_settings.png"
        onTriggered: {
            var page = getPreferenciasPage();
            page.onRefreshDropDownLicencia.connect(onRefreshDropDownLicencia);
            Application.menuEnabled = false;
            navigationPane.push(page);
        }
        function getPreferenciasPage() {
            if (! preferenciasPage) {
                preferenciasPage = idPreferenciasPage.createObject();
            }
            return preferenciasPage;
        }
    },
    
  • How to call the setting menu of the BIOS on HP DV4 1540us netbook?

    Hi all

    How to call the setting menu of the BIOS on HP DV4 1540us netbook?

    F2 does NOT an on-screen BIOS setting.

    Is there another trick?  Or, perhaps, defining the procedure step by step to start the BIOS?

    TIA

    Power on the laptop and all logo HP being displayed, press F10.

  • How to view the application menu in the app?

    Hi all

    Does anyone know how to view the application menu in the app?
    The ultimate effect is that when you see the user swipe down from the top of the screen, the menu of the application.

    Thank you very much.

    Please check the recent threads or duplicate search before posting questions: http://supportforums.blackberry.com/t5/Cascades-Development/Application-Menus/td-p/1785653

  • Move between Pages in the Application Menu

    I added an Application Menu, use the example of C++ from here: https://developer.blackberry.com/cascades/documentation/ui/navigation/menus.html

    // Create the application menu
    Menu *menu = new Menu;
    
    // Create the actions and add them to the menu
    ActionItem *actionOne = ActionItem::create()
                            .title("Action 1");
    ActionItem *actionTwo = ActionItem::create()
                            .title("Action 2");
    menu->addAction(actionOne);
    menu->addAction(actionTwo);
    
    // Set the menu of the application
    Application::instance()->setMenu(menu);
    

    Unfortunately the example wrong in how to edit a page by pressing action.

    Does anyone know how to do this?

    bool res = QObject::connect(actionOne, SIGNAL(triggered()), this, SLOT(handleAction1()));
         Q_ASSERT(res);
         Q_UNUSED(res);
    

    This method works.

  • I'm following the steps described in the version beta to build the application of 'Launch' test, but the tool of signed digital app has no ios tab when I go to the for use. Is this a bug or am I missing something?

    I'm following the steps described in the version beta to build the application of 'Launch' test, but the tool of signed digital app has no ios tab when I go to the for use. Is this a bug or am I missing something?

    Note that iOS signature is only available on Mac. If you're on a Windows machine, you won't see the iOS tab.

    Neil

  • The application menu, calling other applications

    Hello

    I'm with the following situation:

    I have an application that will call the other applications, but each time I have called another application and request a new connection, how do I use authentication even the first request and transmits to the other?

    Thank you

    Márcio Goncalez

    Mag.goncalez wrote:
    Hello

    I'm with the following situation:

    I have an application that will call the other applications, but each time I have called another application and request a new connection, how do I use authentication even the first request and transmits to the other?

    See + {: identifier of the thread = 515240} + for the basic technique and the present statutes Oracle Magazine for extended examples:

  • Create a custom authentication
  • Build a framework for Menu

    Note that the APEX has an integrated model of publication and subscription. You create a 'master' application publishable elements such as authentication schemes, LOVs and models. Theme templates are created, maintained and published by means of this application, and other applications of reference standard by subscription to the main application. Changes may be expelled from the main application to all subscribing applications.

    To avoid having to recreate the subscriptions when creating new applications you can have a startup application with all subscriptions set up, then copy this request as a base line when you want to create a new.

    Note that the model of publication-and-subscribe-you only works in a single workspace.

    Unfortunately, the documentation is not exactly complete on this function...

    -----

    This is a frequently asked question and there are a number of previous discussions on it. Please visit our forum carefully for previous coverage of a topic before posting a new question. Most of the questions that newcomers have been asked (and answered) many times before.

  • How to add the application menu

    Hi guys, I want to add a menu to the application. I can not get the menu.

    I just tried to add the menu for the lettering of calendar and I can't get any code, what could be the problem

    public class Main extends Application
    {
        Main()
        {
    
           MyMenuItem myMenuitem = new MyMenuItem(0);
           ApplicationMenuItemRepository.getInstance().addMenuItem( ApplicationMenuItemRepository.MENUITEM_CALENDAR,myMenuitem);
    
        }
        public static void main(String arg[])
        {
            Main m=new Main();
            m.enterEventDispatcher();
        }
    
    }
    
    class MyMenuItem extends ApplicationMenuItem{
    
        //using the default constructors here.
        MyMenuItem(int order){
            super(order);
        }
    
        //methods we must implement
        //Run is called when the menuItem is invoked
        public Object run(Object context){
            //context object should be a email message
            if (context instanceof Message){
                Message message = (Message)context;
                //this is where we would work the message
              //do something here
            }
            return context;
        }
    
        //toString should return the string we want to
        //use as the lable of the menuItem
        public String toString(){
            return "MyMenu Name";
        }
    }
    

    Hi I don't get menus. Where would be the problem? And I used the (4.7.0) storm Simulator

    Concerning

    Rakesh Shankar.P

    If you want to launch your application, you can use ApplicationManager to achieve

  • Noob question: call the new Menu screen

    Hello.

    I have two screens. The first is called myScreen and is defined in a class file called plotter.java. It works very well. It has a menu that also works.

    What I want to do is to launch a new screen called windshield which is defined in windscreen.java. I tried to do it with the following menu item code, but it does not compile because it does not recognize the windScreen() method:

    private MenuItem menuWind = new MenuItem("Set Wind", 1, 1)
    {
        public void run(){
            pushScreen(windScreen());
        }
    };
    

    What I am doing wrong?

    P.S. My apologies for the basicness of this issue, you can tell I'm new to the Java/BlackBerry development.

    Try this,

    Windshield wn = new windScreen();

    UiApplication () .getUiApplication () .pushscreen (wn);

    This will help u.

    ------------------------------------------------------------------------------------

    Kudo press to say thank you to the developer.
    Also, press accept it as a button when you got the Solution.

  • Is there a navto: or goto: link to call the side menu?

    looking for call the retractable side menu with a button in the new 15 DPS.

    Not currently, no.

    Neil

  • How to access the applications menu of photo editing Photo editing

    How do you get Macphum Creative Kit mounting application via the menu of photo editing?

    Then I use that tone, but it was easy to install:

    -Make sure you have osx version 10.11

    -To open the pictures and click on 'edit '.

    -get off at extensions and click on 'more '.

    -in the pop-up window, click on 'all' and select the extensions that you want to save photos.

  • In the applications menu Goes black screen

    Hello Nicole,.

    I have attached the image please don't see that. If I enter the menu icons disappear and its black complete this article. I saw that when I hit the "back" button back. What happened several times. Why this is happening?

    Hey all,.

    This is a known bug that sometimes appears as white squares instead of text or as black icons where app icons should be. It is related to the way Android stops the Launcher when you run memory intensive applications, and it can be avoided by using a different pitcher such as Aviate, pitcher the next or other. Restart the phone or do anything else to this subject probably is back to normal.

    The patch will be not available very soon, so no worries.

    See you soon,.

    Tina

  • How to check if the menuitem application has already added to the application menu?

    Hi all

    I want to insert some menutime at the request of RIM, for example,

    I have create a new menuitem Application named customizedMenuitem and add it to the request Message RIM.

    Since then, each time when my application is started, it will add again.

    So I want to check if it has already been added, if so, ignore to add it. If this isn't the case, application adds one more time.

    I called removemenuitem before system.exit (0) when quiting my request, however, it doesn't seem to work.

    That's why I check menuitem before I add.

    Source code like this,

    Constructor()

    {

    Super();

    If (the _appMenuitem is not added to the RIM Application) {}

    create a new menuitem application

    ApplicationMenuItemRepostory.addMenuItem (int, applicationmenuitem)

    }

    }

    Any word would be much appreciated!

    Thanks in advance!

    The most common way to deal with this is to store a value in the store of Runtime.  Your application can save a value when it adds the ApplicationMenuItem, and then check to see if it is there when it is run a second time.

    The Runtime store is erased when the BlackBerry is reset, which would coincide with the ApplicationMenuItem being deleted.

Maybe you are looking for

  • Advanced tab of the options does not work. Firefox is no longer the default browser. How can I fix it?

    Firefox left being my default browser without warning. The Advanced tab does not work so I can't reset by default. When I click on the Advanced tab, nothing happens. How can I fix it?

  • Record French text to speech as a mp3 file

    I need to save French speech synthesis in the form of MP3 file I save and reproduce on my iPad or iPhone. I know how to make an MP3 file as a track to iTunes from a text file on my MacBook Pro, but I don't have access to my iPhone and iPad now. I sea

  • "err 06.

    I have an EOS 40 d (oldie but goodie). Sometimes camera will not turn on (power off switch to it), even with a freshly charged battery. When you turn it on, the camera shows 06 ERR in cleaning sensor unit, and I can't use the camera at all. I could f

  • T2300 out of notification paper

    I have two different types of paper in my T2300. The default behavior of the machine, when #1 roll is empty, is to automatically switch to roll #2 without any notification.  What I want is tell me when #1 roll is empty, so I can load another roll. Is

  • Vista security question: my Windows Firewall must be on? The McAfee Firewall is enabled

    I have Vista Home Premium. I got to enter the Dell support center. "I think this is the first time that I did. It showed that I have Windows Defender on, but not the Windows Firewall and it does not show that I have McAfee Sequrity Version 9.15. My q