×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    20

    QCamera::Status vs QCamera::State ?

    While implementing QCamera I noticed 2 signals which describe camera status/state...

    Code:
    void	stateChanged ( QCamera::State state )
    void	statusChanged ( QCamera::Status status )
    What is exactly the difference between these QCamera::State and QCamera::Status?

    - QCamera::Status has a QCamera::ActiveStatus value which is: "The camera has been started and can produce data. The viewfinder displays video frames in active state."

    - QCamera::State has a QCamera::ActiveState value which is: "In the active state as soon as camera is started the viewfinder displays video frames and the camera is ready for capture."

    I'm coding now a wrapper only for still images. In which situation should I emit a MyWrapper::canGetStillImage( true ); signal?

    1) QCamera status == QCamera::ActiveStatus AND state == QCamera::ActiveState
    2) QCamera status == QCamera::ActiveStatus OR state == QCamera::ActiveState

    Regards,
    Andy

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,175

    Re: QCamera::Status vs QCamera::State ?

    Looks that Status just has more states: http://doc.qt.nokia.com/qtmobility-1...tml#State-enum

    I suppose the OR should work, but AND might be safer.

  3. #3
    Registered User
    Join Date
    Nov 2010
    Posts
    32

    Re: QCamera::Status vs QCamera::State ?

    I agree this is one of the most confusing parts of the QCamera API;

    state = "The camera state requested by the application"
    status = "The actual state of the camera backend"

    Thus; Changing camera state eventually changes the camera status to the corresponding one.
    So you should follow the status in your application.

    Quoting QCameraControl documentation:
    "void QCameraControl::setState ( QCamera::State state ) [pure virtual]
    Sets the camera state.
    State changes are synchronous and indicate user intention, while camera status is used as a feedback mechanism to inform application about backend status. Status changes are reported asynchronously with QCameraControl::statusChanged() signal.
    See also state() and QCamera::State."

  4. #4
    Registered User
    Join Date
    Oct 2008
    Posts
    20

    Re: QCamera::Status vs QCamera::State ?

    Hi witsku,

    Thnx for pointing this out!

Similar Threads

  1. Using QCamera and QCameraViewfinder
    By marcelofardo in forum [Archived] Beginning Qt
    Replies: 26
    Last Post: 2011-05-17, 15:34
  2. Using QCamera
    By Arvis17 in forum [Archived] Beginning Qt
    Replies: 18
    Last Post: 2011-01-26, 16:16
  3. grab Frame/Image using QCamera
    By AcidJunkie in forum [Archived] Qt Mobility Project
    Replies: 4
    Last Post: 2010-05-03, 19:42

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×