Exemplo n.º 1
0
void Barbel::Scene::setActiveCamera(Qt3D::QCamera *activeCamera)
{
    if (m_activeCamera == activeCamera)
        return;

    m_activeCamera = activeCamera;
    m_activeCamera->lens()->setAspectRatio(m_cameraAspectRatio);
    m_forwardRenderer->setCamera(m_activeCamera);
    emit activeCameraChanged(activeCamera);
}
SkyeCameraReconfigure::SkyeCameraReconfigure(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::SkyeCameraReconfigure),
    activeCamId(MAV_CAM_ID_PROSILICA),
    msgId(MAVLINK_MSG_ID_SKYE_CAM_RECONFIGURE_PROSILICA_SETTINGS),
    uasId(0)
{
    ui->setupUi(this);
    ui->scrollAreaWidgetContents->setLayout(ui->groupBoxVerticalLayout);
    ui->scrollArea->setMinimumSize(300, 400);
    connect(UASManager::instance(), SIGNAL(activeUASSet(UASInterface*)), this, SLOT(setUAS(UASInterface*)));
    setUAS(UASManager::instance()->getActiveUAS());
    connect(ui->cameraComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(activeCameraChanged(QString)));
    updateAvailableCameras();

    connect(ui->applyButton, SIGNAL(clicked()), this, SLOT(accept()));
    connect(ui->cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
}