当前位置: 首页>>代码示例>>C++>>正文


C++ CCamera::GetAvailableDevices方法代码示例

本文整理汇总了C++中CCamera::GetAvailableDevices方法的典型用法代码示例。如果您正苦于以下问题:C++ CCamera::GetAvailableDevices方法的具体用法?C++ CCamera::GetAvailableDevices怎么用?C++ CCamera::GetAvailableDevices使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CCamera的用法示例。


在下文中一共展示了CCamera::GetAvailableDevices方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: showEvent


//.........这里部分代码省略.........
    ui->sbFlashInterval->setValue(CGlobal::Instance()->GetNotifiationFlashInterval());
    ui->sbShowMessageDelay->setValue(CGlobal::Instance()->GetNotifiationBarShowMessageDelay());
    ui->cbMessageSound->setChecked(CGlobal::Instance()->GetMessageSound());
    ui->sbWindowDelayTime->setValue(CGlobal::Instance()->GetAnimationHideMainWindow());
    ui->sbAnimationDuration->setValue(CGlobal::Instance()->GetAnimationDuration());
    ui->cbAutoHideMainWindow->setChecked(CGlobal::Instance()->IsAnimationHideMainWindow());

    CGlobal::E_ROSTER_SHOW_TYPE type = CGlobal::Instance()->GetRosterShowType();
    switch (type) {
    case CGlobal::E_ROSTER_SHOW_JID:
        ui->rbJID->setChecked(true);
        break;
    case CGlobal::E_ROSTER_SHOW_NAME:
        ui->rbName->setChecked(true);
        break;
    case CGlobal::E_ROSTER_SHOW_NICK:
    default:
        ui->rbNick->setChecked(true);
        break;
    }

    CGlobal::E_CLOSE_TYPE closeType = CGlobal::Instance()->GetCloseType();
    switch(closeType)
    {
    case CGlobal::E_CLOSE_TYPE_NO:
        ui->tBtnPrompt->setChecked(true);
        break;
    case CGlobal::E_CLOSE_TYPE_CLOSE_PROGRAME:
        ui->rBtnClosePrograme->setChecked(true);
        break;
    case CGlobal::E_CLOSE_TYPE_LOGOUT:
        ui->rBtnLogout->setChecked(true);
        break;
    }

    CGlobal::E_MESSAGE_SEND_TYPE messageType = CGlobal::Instance()->GetMessageSendType();
    switch(messageType){
    case CGlobal::E_MESSAGE_SEND_TYPE_ENTER:
        ui->rbtnENTER->setChecked(true);
        break;
    case CGlobal::E_MESSAGE_SEND_TYPE_CTRL_ENTER:
    default:
        ui->rBtnCTRLENTER->setChecked(true);
        break;
    }

    QPalette pa;
    pa.setColor(QPalette::WindowText, CGlobal::Instance()->GetUserColor());
    ui->lbLocalUserColor->setPalette(pa);
    pa.setColor(QPalette::WindowText, CGlobal::Instance()->GetRosterColor());
    ui->lbRosterColor->setPalette(pa);
    pa.setColor(QPalette::WindowText, CGlobal::Instance()->GetRosterMessageColor());
    ui->lbRosterMessageColor->setPalette(pa);
    pa.setColor(QPalette::WindowText, CGlobal::Instance()->GetUserMessageColor());
    ui->lbLocalUserMessageColor->setPalette(pa);
    pa.setColor(QPalette::WindowText, CGlobal::Instance()->GetUnreadMessageCountColor());
    ui->lbUnreadMessageCountColor->setPalette(pa);

    CGlobal::E_SCREEN_SHOT_TO_TYPE screenShotType = CGlobal::Instance()->GetScreenShotToType();
    switch (screenShotType) {
    case CGlobal::E_TO_CLIPBOARD:
        ui->rBtn_clipboard->setChecked(true);
        break;
    case CGlobal::E_TO_SAVE:
        ui->rBtn_save->setChecked(true);
        break;
    case CGlobal::E_TO_SEND:
    default:
        ui->rBtn_send->setChecked(true);
        break;
    }

    CGlobal::E_UPDATE updateType = CGlobal::Instance()->GetUpdate();
    switch(updateType)
    {
    case CGlobal::E_UPDATE_EVERY_TIME:
        ui->rbEveryTime->setChecked(true);
        break;
    case CGlobal::E_UPDATE_DAY:
        ui->rbDay->setChecked(true);
        break;
    case CGlobal::E_UPDATE_WEEK:
        ui->rbWeek->setChecked(true);
        break;
    case CGlobal::E_UPDATE_MONTH:
        ui->rbMonth->setChecked(true);
        break;
    case CGlobal::E_UPDATE_DONOT:
        ui->rbDont->setChecked(true);
        break;
    default:
        ui->rbDay->setChecked(true);
        break;
    }

    CCamera camera;
    QList<QString> lstVideoDevices = camera.GetAvailableDevices();
    foreach (QString cam, lstVideoDevices) {
        ui->cbVideo->addItem(cam);
    }
开发者ID:s18leoare,项目名称:rabbitim,代码行数:101,代码来源:DlgOptions.cpp


注:本文中的CCamera::GetAvailableDevices方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。