permutation of cameras using QML?

Hey gang,

trying to swap the rear camera to the front camera.

I'm just trying to call:

Camera1.close ();

Camera1.open (CameraUnit.front);

I do this on an ActionItem button...

ActionItem {
                title: "Switch Camera"
                ActionBar.placement: ActionBarPlacement.OnBar
                onTriggered: {
                // what do you do to reverse the camera??
                console.log("  ->App: camera unit: " + camera1.cameraUnit);
                switch (camera1.cameraUnit)  {
                    case 0:
                        //
                        break;
                    case 1:
                        // front camera is open, open the front
                        camera1.close();
                        camera1.open(CameraUnit.Rear);
                        break;
                    case 2:
                        // rear is opoen, open the rear
                        camera1.close()
                        camera1.open(CameraUnit.Front);
                        break;
                }  // end of switch
              }
         }

but does not work... I have to reopen the viewfinder too?  something escapes me?

THX,

J

Maybe call you open/close too close together for the cameras, you must first

  1. stop the viewfinder
  2. close the camera
  3. Start the camera
  4. start the viewfinder

in your case, you can set some variables to keep track of things

property bool switchCamsproperty int currentCamera

then listen to

onViewFinderStopped: {
      if (!switchCams) {
          console.log("Viewfinder stopped Don't switch cameras")
      } else {
          camera.close()
      }
}

onCameraClosed: {
    if (!switchCams){
       console.log("Camera Closed Don't switch cameras")
    } else {        if (currentCamera == 0){             //Open a Camera             currentCamera = 1        } else if (currentCamera == 1){            // Open a Camera            currentCamera = 0        }
    }

}

best practice if you have used this method would be to put any device you initially open as 0 for currentCamera and then the camera that gets switched to should be 1

Tags: BlackBerry Developers

Similar Questions

  • DEVOUR: Camera uses battery

    When I check what is using my battery (settings, phone, battery use) it says that my camera uses 90% of my battery. I do not use the camera. Is there a way to turn off the camera to save the life of the battery?

    I checked mine and it said any camera or I use the camera... Have you tried a soft reset by remove the battery and a min wait then go back to settings and using the battery to check again...

  • How to parse RSS feeds using QML (waterfalls)?

    Hallo native devs! I am a beginner in native development and I want to know how to parse RSS feeds using QML cascading?

    I see the example like this:

    Page {
        content: Container {
            background: Color.White
            ListView {
                rootIndexpath: [1]
                dataModel: XmlDataModel { source: "model.xml" }
            }
        }
    }
    

    but, can I to ' source: ' use 'http://example.com/rss.xml'?

    If Yes, how can I analyze?

    Thanks for the help!

    The QML in your message assumes that the XML file is local, if you use a remote XML file then you will need to firstly using a few backend Qt C++ network code, download, then you can use QML.

    I would recommend from the Cascades sample quotes to get an idea of how XmlDataModel analysis work can start to look into the network access code and the file.

  • I can't make a connection wifi with my Nook Color camera using a Microsoft MN - 700 wireless router. Can someone help me with the settings that could take care of this problem?

    I can't make a connection wifi with my Nook Color camera using a Microsoft MN - 700 wireless router.  Can someone help me with the settings that could take care of this problem? I have a Dell netbook and a laptop HP working with the router so I know it works.  The Nook also works in a Barnes & Noble store it seems so that the works of Nook.  I have a similar problem with a LG Vortex phone where I can't do the wi - fi connection.

    Please post on the Support forums technical Nook for help because it is not a Windows 7 problem...

    http://bookclubs.barnesandnoble.com/T5/nook-technical-support/BD-p/nooksupport

    .. .also than that...

    http://www.barnesandnoble.com/u/nook-support-connectivity/379002491/

    Don't forget the network encryption type, IE. WPA2/WPA and key/password / password must match the wireless router/access point.

    See also this about WPA2 on the MN-700...

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-networking/cant-connect-to-MN-700-wireless-router/1789978f-7C90-4686-A956-2d17eb79960d

  • Synchronization multi camera using points, but no point

    Hi all

    The question is quite simple:

    Can I synchronize two clips for multi-cam using the point in but but not starting from the point.

    I thought it should be a basic option, given that many times, I have a point a minute in the video sync, but I still need this minute in the sequence obtained from multi-cam.

    This minute to lose since the multi-cam sequence starts from where was the sync point.

    Any ideas?

    Use markers instead of points.

  • Can I attach my camera using Photoshop CS6? If yes how?

    Can I attach my camera using Photoshop CS6? How can I do? I have the cable and other articles as well.

    Hi picturemansteve,

    No, Photoshop does not have shooting tethered.

    Lightroom is a program that allows shooting tethered for devices mentioned in this list: a list of cameras that can be attached to Lightroom.

    Kind regards

    Claes

  • How to convert my raw Filws extracted from my new Nikon d750 camera using Photoshop elements 11?

    How to convert my raw Filws extracted from my new Nikon d750 camera using Photoshop elements 11? How to convert my

    The D750 is not yet supported. It may be a few weeks before Adobe proposes an update to the latest versions of Photoshop/Elements. Perhaps in October/November.

    They generally provide a pre-release version of a few weeks in advance (any day now, I hope), but as far as I KNOW, they do not usually work on Photoshop Elements.

  • At iPad2 in publication of DPS camera using

    We are studying the feasibility of creating a HTML cell that appears Mid-question, allowing users to take a photo with their camera and insert the page layout. Wondering if this is possible in the environment of DPS?

    Thank you very much!

    Stephen

    You can use the camera inside DPS publications on devices running iOS 6 or later version. It is a built-in feature of HTML in iOS6. Earlier versions of the operating system is not supported for this.

    To access the camera using something like this:

    <inputtype=fileaccept="video/*">  (for video files)

    <inputtype=fileaccept="image/*"> (for pictures)

    It is not possible to get on the GPS in a publication of DPS currently.

    Neil

  • Use QML ImageView in C++

    Hello

    I can see how to use one ImageView, or any other QML declared, stated purpose in QML the constructor method that creates the scene using the QML document, and then sets the AbstractPane root. But how to access an ImageView to anywhere else in the same class? I will keep a reference to the root or document QML?

    You can call Application: instance()-> scene() and cast your object type to top level, something like this:

    Page * appPage = (Page *) Application::instance()-> scene();
    Camera * camera = appPage->findChild ("myCamera");
    etc.

    Or let the appPage pointer or other controls in member variables. In this way, the code will be cleaner.

  • Will be A Officejet 6500 all-in-one printed my pictures from my camera using my sheets of Photo 4 x 6?

    Using Windows 7 64 bit and my all in one HP Officejet 6500 a can print photos from my camera on my HP 4 x 6 photo paper?

    The printer handle sheets of 4 x 6 because I do not see a photo paper tray I had in a previous HP printer all in one?

    Thank you for your help. Websites that recommend you explained what I needed to know.

  • I'm trying to image download from a Sony mavica camera using the disk and nothing is displayed. Is there a file I need to download? __

    How can I upload photos using an a Sony Mavica Floppy? I tried to use the file and nothing came up... help

    How can I upload photos using an a Sony Mavica Floppy? I tried to use the file and nothing came up... help

    ===============================
    I used to have a Mavica and after insertion
    the floppy drive... I want to go... My computer and
    the reader has to view the photos, click left.

    The following forum might be useful:

    Exchanging information Mavicahttp://forums.mavican.org/viewforum.php?f=16 John Inzer - MS - MVP - Digital Media Experience

  • Canon T1i and Speedlite 580EX off camera use for

    I have a T1i and 580EX (not 580EX II) flash. I would like to use the flash on the camera. Would need other devices (trigger, transmitter)? If not, then could you give me the guide the way in which it is defined. Thanks in advance.

    The 580EX can works as a Canon E - TTL wireless (optical line-of-sight) master or slave flash.  You can use a commander of on-camera flash or get another able to work as a master or slave flash.  A few hot flashes like the 430EX II cannot function as a 'slave' (non-master).  The 580's can be.

    The bult - in flash on a T1i will not trigger a slave Canon E - TTL remote.  I think the T3i was the first of the rebel line to achieve this functionality.

    You can use triggers to 3rd party... optical or radio.  Some of them are extremely cheap, but do not have E - TTL.  The end part 3 higher units that manage the E - TTL are quite expensive (Skirball mentioned the brand of POCKETWIZARD (English) which has a very good reputation... but is not cheap.  )

    POCKETWIZARD (English) has a problem of reliability with Canon 580EX II units (do not know if it would have the same problem with a 580EX II).  The real problem is that when you do E - TTL, there's a pre-Flash and certain communications made before the actual shooting takes place (it's very fast-), but when the preflash fires, the 580EX II was generating enough RF interference that the PocketWizards could not communicate reliably and the flash would not be triggered as expected.  There were a few attempts to create RFI shielding and I even heard of services that change the guts of the flash to reduce the interference (which would, of course, canceled warranty.)

  • Can I use my Switch SW3-013-1566 as a monitor of the camera using the HDMI port?

    I did research on this scenario but see no mention of the possibility of using my Acer

    SW3-013-1566 tablet as a digital monitor for my Canon 7 d DSLR camera. If anyone knows how this can be done please let me know and which downloadable programs I could use.

    Thank you

    Well, according to this video , you can. You use the USB connection and software from Canon. You wouldn't be able with the HDMI port without any other additional hardware to do the video cpture.

  • Upload photos to the v5-571p-6657 acer laptop my camera using a sandisk pro duo memory card

    my computer laptop, v5-571p-6657, will accept a SanDisk pro duo memory card in the slot of the player card to download photos from my camera. The card does not seem to fit. If not, what is the procedure using a usb port? Additional software must be installed. Thank you.

    You cannot use this map on the card reader in your laptop. I suggest you get something like this to be able to import your photos.

    http://www.Newegg.com/product/product.aspx?item=N82E16820276006

  • Insert a disc for camera use kodak & now I can't get out of car

    I just put a kodak disc in for use with a camera & now I can't get out.

    Hi MAUREENNORTH,
     
    -When you now say "I can't get out", does that mean that you are unable to eject the CD from the drive?
    -If so, you receive an error message or error code while trying eject the CD from the drive?
     
    Run the fix tool from the given article and if it helps to fix the problem:

Maybe you are looking for