コード例 #1
0
static PyObject *meth_QCameraFocus_setFocusPointMode(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        QCameraFocus::FocusPointMode a0;
        QCameraFocus *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QCameraFocus, &sipCpp, sipType_QCameraFocus_FocusPointMode, &a0))
        {
            sipCpp->setFocusPointMode(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_QCameraFocus, sipName_setFocusPointMode, doc_QCameraFocus_setFocusPointMode);

    return NULL;
}
コード例 #2
0
ファイル: cameracontrol.cpp プロジェクト: tklam/See
void CameraControl::setupCamera(QCamera * camera)
{
    this->camera = camera;

    QCameraFocus * focus = camera->focus();
    focus->setFocusMode(QCameraFocus::ContinuousFocus);
    focus->setFocusPointMode(QCameraFocus::FocusPointAuto);

    camera->imageProcessing()->setWhiteBalanceMode(QCameraImageProcessing::WhiteBalanceAuto);
    camera->setCaptureMode(QCamera::CaptureViewfinder);

    QCameraExposure * exposure = camera->exposure();
    exposure->setExposureMode(QCameraExposure::ExposureAuto);
    exposure->setExposureCompensation(0);
    exposure->setMeteringMode(QCameraExposure::MeteringSpot);

    imageCapture = new QCameraImageCapture(camera, this);

    connect(imageCapture, SIGNAL(imageSaved(int, QString)), this, SLOT(onSavedImageCaptured(int, QString)));

    //camera->load();
    //camera->start();
}