Beispiel #1
0
void VisuoThread::run()
{
    updateImages();
    updatePFTracker();
    updateLocationsMIL();
    updateMotionCUT();
}
Beispiel #2
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow),
    sfmapp(SFMApp::getInstance()) {
  ui->setupUi(this);


  connect(this, SIGNAL(imagesUpdated()), ui->featureDetectionTab, SLOT(updateImages()));
  connect(this, SIGNAL(imagePairsUpdated()), ui->matrixFindingTab, SLOT(updateImagePairs()));
  connect(this, SIGNAL(imagePairsUpdated()), ui->featureMatchingTab, SLOT(updateImagePairs()));

  connect(ui->featureMatchingTab, SIGNAL(imagePairsUpdated()), ui->matrixFindingTab, SLOT(updateImagePairs()));
  connect(ui->matrixFindingTab, SIGNAL(imagePairsUpdated()), ui->featureMatchingTab, SLOT(updateImage()));
}
void TvShowWidgetSeason::setSeason(TvShow *show, int season)
{
    onClear();

    m_show = show;
    m_season = season;

    emit sigSetActionSearchEnabled(false, WidgetTvShows);
    ui->title->setText(QString(show->name()) + " - " + tr("Season %1").arg(season));

    updateImages(QList<ImageType>() << TypeSeasonPoster << TypeSeasonBackdrop << TypeSeasonBanner);

    onSetEnabled(!show->downloadsInProgress());
    emit sigSetActionSaveEnabled(!show->downloadsInProgress(), WidgetTvShows);
}
Beispiel #4
0
/*!
  \internal
*/
void PhoneLauncherView::changeEvent(QEvent *e)
{
    if (e->type() == QEvent::PaletteChange && selectedItem) {
        for ( int row = 0; row < m_rows; row++ ) {
            for ( int col = 0; col < m_columns; col++ ) {
                GridItem *item = selectedItem->item(row,col);
                if ( item )
                    item->paletteChanged();
            }
        }
        selectedItem->paletteChanged();
    } else if (e->type() == QEvent::StyleChange) {
        //icons may have changed size
        updateImages();
    }
}
/**
 * 实际计划校正时的原图浏览设置信息函数,有seqnostart版本
 */
void ImageViewer::setInfo(QString projectpath, QString tmpimg_project_path, int tunnelid, int startseqno, QString tunnelname)
{
    this->currentprojpath = projectpath;
    this->currentprojectpath_tmpimg = tmpimg_project_path;
    this->currenttunnelid = tunnelid;
    datetime = projectpath.right(8);
    this->currenttunnelname = tunnelname;

    bool ret = LzProjectAccess::getLzProjectAccessInstance()->getLzCheckedList(LzProjectClass::Main).getCheckedTunnelModel(tunnelid, startseqno, currentCheckedModel);
    if (!ret)
    {
        currentseqno = -1;
        currenttunnelid = -1;
        hasinitmodel = false;

        current_fc_master = 0;
        current_fc_1 = 0;
        current_fc_2 = 0;
        current_fc_3 = 0;
        current_fc_4 = 0;
        current_fc_5 = 0;

        // 默认向后申请
        viewdirection = false;

        qDebug() << QObject::tr("无法获取当前CheckedTunnelModel,其tunnelid为%1").arg(tunnelid);
        hasinitmodel = false; 
    }
    else
    {
        std::list<CheckedItem>::iterator it = currentCheckedModel.begin();
        if (it != currentCheckedModel.end())
        {
            // 还没有找到起始时找起始帧所在文件
            currentseqno = (*it).seqno;
            current_fc_master = (*it).start_frame_master;
            currenttmpimgpath = projectpath + "/tmp_img/" + QString("%1_%2_%3").arg(currentseqno).arg(QObject::tr((*it).tunnel_name.c_str())).arg(datetime);
            setCamerasCurrentFCs(current_fc_master);
        }

        hasinitmodel = true;

        // 更新显示原图
        updateImages();
    }
}
/**
 * 上五帧
 */
void ImageViewer::viewLastFiveFrameImages()
{
    // 向前申请
    viewdirection = true;

    current_fc_master -= 1;
    current_fc_1 -= 1;
    current_fc_2 -= 1;
    current_fc_3 -= 1;
    current_fc_4 -= 1;
    current_fc_5 -= 1;

    updateImages();

    /*if(currentstartnumber == value)
    {
        QMessageBox::warning(this,tr("温馨提示"), tr("当前已是初始五帧"),QMessageBox::Ok|QMessageBox::Cancel);
    }*/
}
/**
 * 下五帧
 */
void ImageViewer::viewNextFiveFrameImages()
{
    // 向后申请
    viewdirection = false;

    current_fc_master += 1;
    current_fc_1 += 1;
    current_fc_2 += 1;
    current_fc_3 += 1;
    current_fc_4 += 1;
    current_fc_5 += 1;

    updateImages();
    
    /*if(!info.exists())
    {
        QMessageBox::warning(this,tr("温馨提示"), tr("当前已是最后五帧,请申请图像。"),QMessageBox::Ok|QMessageBox::Cancel);
    }*/
}
/**
 * 设置当前currentfc,外部调用
 */
bool ImageViewer::setCurrentFCs(__int64 master_fc)
{
    // 已经到最前只能向后申请
    viewdirection = false;

    bool ret = LzProjectAccess::getLzProjectAccessInstance()->getLzCheckedList(LzProjectClass::Main).getCheckedTunnelModel(currenttunnelid, master_fc, currentCheckedModel);
    if (!ret)
        return false;

    bool findstart = false;
    int tmpseqno;
    string tmptunnelname; // 实际采集时当成的隧道名,非实际隧道名
    __int64 tmpmasterstartfc;
    __int64 tmpmasterendfc;
    std::list<CheckedItem>::iterator it = currentCheckedModel.begin();
    while (it != currentCheckedModel.end())
    {
        // 还没有找到起始时找起始帧所在文件
        if (!findstart && master_fc >= (*it).start_frame_master)
        {
            tmpseqno = (*it).seqno;
            tmptunnelname = (*it).tunnel_name;
            tmpmasterstartfc = (*it).start_frame_master;
            tmpmasterendfc = (*it).end_frame_master;
            findstart = true;
            break;
        }
        it++;
    }

    if (!findstart)
        return false;

    // 还没有找到起始时找起始帧所在文件
    currentseqno = tmpseqno;
    current_fc_master = master_fc;

    setCamerasCurrentFCs(master_fc);
    currenttmpimgpath = this->currentprojpath + "/tmp_img/" + QString("%1_%2_%3").arg(currentseqno).arg(QObject::tr((*it).tunnel_name.c_str())).arg(datetime);
    
    updateImages();
    return true;
}
/**
 * 末尾五帧
 */
void ImageViewer::viewEndFiveImages()
{
    // 已经到最后只能向前申请
    viewdirection = true;

    // 设置帧号,图片路径
    std::list<CheckedItem>::reverse_iterator it = currentCheckedModel.rbegin();
    if (it != currentCheckedModel.rend())
    {
        // 还没有找到起始时找起始帧所在文件
        currentseqno = (*it).seqno;
        current_fc_master = (*it).end_frame_master - 5;

        setCamerasCurrentFCs(current_fc_master);

        currenttmpimgpath = this->currentprojpath + "/tmp_img/" + QString("%1_%2_%3").arg(currentseqno).arg(QObject::tr((*it).tunnel_name.c_str())).arg(datetime);
    }

    updateImages();
}
void ImageViewer::updateCameraandImages()
{
    // 关闭所有灯
    changeCamera("", false);

    // 打开灯
    QString cameraindex = ui->cam1->itemText(tmpUpdateCameraImage_cam1index);
    //qDebug() << uicameraindex << cameraindex;
    changeCamera(cameraindex, true);
    cameraindex = ui->cam1->itemText(tmpUpdateCameraImage_cam2index);
    changeCamera(cameraindex, true);
    cameraindex = ui->cam1->itemText(tmpUpdateCameraImage_cam3index);
    changeCamera(cameraindex, true);
    cameraindex = ui->cam1->itemText(tmpUpdateCameraImage_cam4index);
    changeCamera(cameraindex, true);
    cameraindex = ui->cam1->itemText(tmpUpdateCameraImage_cam5index);
    changeCamera(cameraindex, true);

    setCamerasCurrentFCs(current_fc_master);
    updateImages();
}
// 图像增强处理
void ImageViewer::imgEnhance(int newif)
{
    ifimgenhance = newif;
    updateImages();
}
/**
 * 收到解压完成信号
 */
void ImageViewer::receivedepressfinish(QString dir)
{
    updateImages();
    // 强制更新界面
    this->repaint();
}
Beispiel #13
0
void TvShowWidgetSeason::onDeleteBanner()
{
    m_show->removeImage(TypeSeasonBanner, m_season);
    updateImages(QList<ImageType>() << TypeSeasonBanner);
}
Beispiel #14
0
void ImageDisplay::showEvent(QShowEvent *)
{
  updateImages();
}
Beispiel #15
0
void ImageDisplay::resizeEvent(QResizeEvent *)
{
  if (isVisible()) updateImages();
}