Пример #1
0
RongHe::RongHe(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::RongHe)
{
    ui->setupUi(this);
    //脡猫脰脙脭虏陆脟麓掳脤氓
    setWindowFlags(Qt::FramelessWindowHint);
    QPixmap mask(":/Images/images/ui_fix_min3.png");//录脫脭脴脩脷脗毛脥录脧帽
    setMask(QBitmap(mask.mask())); //脡猫脰脙麓掳脤氓碌脛脩脷脗毛脥录脧帽,驴脵鲁媒脥录脧帽碌脛掳脳脡芦脟酶脫貌脢碌脧脰虏禄鹿忙脭貌麓掳脤氓
    QPalette p;//脡猫脰脙碌梅脡芦掳氓
    p.setBrush(QPalette::Window, QBrush(mask));//陆芦碌梅脡芦掳氓碌脛禄颅脣垄脡猫脰脙脦陋脩脷脗毛脦禄脥录,脭脷虏禄鹿忙脭貌麓掳脤氓脡脧脧脭脢戮鲁枚脩脷脗毛脦禄脥录
    setPalette(p);
    //QPainter painter(this);
    //painter.drawPixmap(0,0,width(),height(),QPixmap(":/Images/images/ui_fix.png"));

    ui->pushButton->setStyleSheet("QPushButton{border-image: url(:/Images/images/pb_fix_work_normal.png);}"
                                   "QPushButton:hover{border-image: url(:/Images/images/pb_fix_work_hover.png);}"
                                     "QPushButton:pressed{border-image: url(:/Images/images/pb_fix_work_press.png);}");
    ui->pushButton_5->setStyleSheet("QPushButton{border-image: url(:/Images/images/pb_windwork_normal.png);}"
                                   "QPushButton:hover{border-image: url(:/Images/images/pb_windwork_hover.png);}"
                                     "QPushButton:pressed{border-image: url(:/Images/images/pb_windwork_press.png);}");
//    ui->pushButton_8->setStyleSheet("QPushButton{border-image: url(:/Images/images/pb_wavework_normal.png);}"
//                                   "QPushButton:hover{border-image: url(:/Images/images/pb_wavework_hover.png);}"
//                                     "QPushButton:pressed{border-image: url(:/Images/images/pb_wavework_press.png);}");
    //显示结果样式

    ui->pushButton_8->setStyleSheet("QPushButton{border-image: url(:/Images/images/pb_datatrans_normal.png);}"
                                   "QPushButton:hover{border-image: url(:/Images/images/pb_datatrans_hover.png);}"
                                     "QPushButton:pressed{border-image: url(:/Images/images/pb_datatrans_press.png);}");
    ui->pushButton_9->setStyleSheet("QPushButton{border-image: url(:/Images/images/pb_fix_result_normal.png);}"
                                   "QPushButton:hover{border-image: url(:/Images/images/pb_fix_result_hover.png);}"
                                     "QPushButton:pressed{border-image: url(:/Images/images/pb_fix_result_press.png);}");
    ui->pushButton_10->setStyleSheet("QPushButton{border-image: url(:/Images/images/pb_datamix_normal.png);}"
                                   "QPushButton:hover{border-image: url(:/Images/images/pb_datamix_hover.png);}"
                                     "QPushButton:pressed{border-image: url(:/Images/images/pb_datamix_press.png);}");
    ui->pushButton_6->setStyleSheet("QPushButton{border-image: url(:/Images/images/pb_mainui_return_normal2.png);}"
                                   "QPushButton:hover{border-image: url(:/Images/images/pb_mainui_return_hover2.png);}"
                                     "QPushButton:pressed{border-image: url(:/Images/images/pb_mainui_return_press2.png);}");
    /*source button
    ui->pushButton_bf->setStyleSheet("QPushButton{border-image: url(:/Images/images/pb_play_normal.png);}"
                                   "QPushButton:hover{border-image: url(:/Images/images/pb_play_hover.png);}"
                                     "QPushButton:pressed{border-image: url(:/Images/images/pb_play_press.png);}");
    ui->pushButton_zt->setStyleSheet("QPushButton{border-image: url(:/Images/images/pb_pause_normal.png);}"
                                   "QPushButton:hover{border-image: url(:/Images/images/pb_pause_hover.png);}"
                                     "QPushButton:pressed{border-image: url(:/Images/images/pb_pause_press.png);}");
    ui->pushButton_jias->setStyleSheet("QPushButton{border-image: url(:/Images/images/pb_foreward_normal.png);}"
                                   "QPushButton:hover{border-image: url(:/Images/images/pb_foreward_hover.png);}"
                                     "QPushButton:pressed{border-image: url(:/Images/images/pb_foreward_press.png);}");
    ui->pushButton_jians->setStyleSheet("QPushButton{border-image: url(:/Images/images/pb_back_normal.png);}"
                                   "QPushButton:hover{border-image: url(:/Images/images/pb_back_hover.png);}"
                                     "QPushButton:pressed{border-image: url(:/Images/images/pb_back_press.png);}");
    */

	timer = new QTimer;
    speed = 500;
    label = NULL;
    iterator = NULL;
    connect(timer,SIGNAL(timeout()),this,SLOT(nextPicture()));
}
Пример #2
0
RongHe::~RongHe()
{
    delete label;
    delete ui;
    disconnect(timer,SIGNAL(timeout()),this,SLOT(nextPicture()));
    delete iterator;
    delete timer;

}
Пример #3
0
Forecast::Forecast(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::Forecast)
{
    ui->setupUi(this);

    //ÉèÖô°Ìå
    setWindowFlags(Qt::FramelessWindowHint);
    QPixmap mask(":/Images/images/ui_pre_min2.png");
    setMask(QBitmap(mask.mask()));
    QPalette p;
    p.setBrush(QPalette::Window, QBrush(mask));
    setPalette(p);
    ui->pushButton->setStyleSheet("QPushButton{border-image: url(:/Images/images/pb_pre_3dstream_normal.png);}"
                                  "QPushButton:hover{border-image: url(:/Images/images/pb_pre_3dstream_hover.png);}"
                                  "QPushButton:pressed{border-image: url(:/Images/images/pb_pre_3dstream_press.png);}");
    ui->pushButton_6->setStyleSheet("QPushButton{border-image: url(:/Images/images/pb_mainui_return_normal2.png);}"
                                    "QPushButton:hover{border-image: url(:/Images/images/pb_mainui_return_hover2.png);}"
                                    "QPushButton:pressed{border-image: url(:/Images/images/pb_mainui_return_press2.png);}");
    ui->pushButton_hyf->setStyleSheet("QPushButton{border-image: url(:/Images/images/pb_pre_workocean_normal.png);}"
                                      "QPushButton:hover{border-image: url(:/Images/images/pb_pre_workocean_hover.png);}"
                                      "QPushButton:pressed{border-image: url(:/Images/images/pb_pre_workocean_press.png);}");
    ui->pushButton_xw->setStyleSheet("QPushButton{border-image: url(:/Images/images/pb_pre_workoral_normal.png);}"
                                     "QPushButton:hover{border-image: url(:/Images/images/pb_pre_workoral_hover.png);}"
                                     "QPushButton:pressed{border-image: url(:/Images/images/pb_pre_workoral_press.png);}");
    ui->pushButton_yc->setStyleSheet("QPushButton{border-image: url(:/Images/images/pb_pre_uplayer_normal.png);}"
                                     "QPushButton:hover{border-image: url(:/Images/images/pb_pre_uplayer_hover.png);}"
                                     "QPushButton:pressed{border-image: url(:/Images/images/pb_pre_uplayer_press.png);}");
    ui->pushButton_2->setStyleSheet("QPushButton{border-image: url(:/Images/images/pb_fix_result_normal2.png);}"
                                    "QPushButton:hover{border-image: url(:/Images/images/pb_fix_result_hover2.png);}"
                                    "QPushButton:pressed{border-image: url(:/Images/images/pb_fix_result_press2.png);}");
//    ui->pushButton_bf->setStyleSheet("QPushButton{border-image: url(:/Images/images/pb_play_normal.png);}"
//                                   "QPushButton:hover{border-image: url(:/Images/images/pb_play_hover.png);}"
//                                     "QPushButton:pressed{border-image: url(:/Images/images/pb_play_press.png);}");
//    ui->pushButton_zt->setStyleSheet("QPushButton{border-image: url(:/Images/images/pb_pause_normal.png);}"
//                                   "QPushButton:hover{border-image: url(:/Images/images/pb_pause_hover.png);}"
//                                     "QPushButton:pressed{border-image: url(:/Images/images/pb_pause_press.png);}");
//    ui->pushButton_jias->setStyleSheet("QPushButton{border-image: url(:/Images/images/pb_foreward_normal.png);}"
//                                   "QPushButton:hover{border-image: url(:/Images/images/pb_foreward_hover.png);}"
//                                     "QPushButton:pressed{border-image: url(:/Images/images/pb_foreward_press.png);}");
//    ui->pushButton_jians->setStyleSheet("QPushButton{border-image: url(:/Images/images/pb_back_normal.png);}"
//                                   "QPushButton:hover{border-image: url(:/Images/images/pb_back_hover.png);}"
//                                     "QPushButton:pressed{border-image: url(:/Images/images/pb_back_press.png);}");

    timer = new QTimer;
    speed = 500;
    label = NULL;
    iterator = NULL;
    connect(timer,SIGNAL(timeout()),this,SLOT(nextPicture()));

    select_window=NULL;
}
/**
    \fn decodeTillPicture
    \brief that one is a bit different compare to goToTime as we
                dont want to decode the targetPts if it is a keyframe
                but have the frame before
*/
bool ADM_Composer::decodeTillPictureAtPts(uint64_t targetPts,ADMImage *image)
{
 // Go to the previous keyframe and decode forward...
                uint32_t thisSeg=_currentSegment;
                _SEGMENT *seg=_segments.getSegment(_currentSegment);
                int ref=seg->_reference;

                uint64_t refTime;
                if(false==_segments.LinearToRefTime(_currentSegment,targetPts-1,&refTime))
                {
                    ADM_warning("Cannot find ref time\n");
                    return false;
                }
                uint64_t previousKf;
                if(false==searchPreviousKeyFrameInRef(ref,refTime,&previousKf))
                {
                    ADM_warning("Cannot find previous keyframe in ref %d, time=%"PRIu64" \n",ref,refTime);
                    return false;
                }
                // go to it...
                if(false==seektoTime(ref,previousKf,false))
                {
                    ADM_warning("Cannot seek to time=%"PRIu64" \n",previousKf);
                    return false;            
                }
                // Now forward till we reach out frame
                while(1)
                {
                    if(false==nextPicture(image,true))
                    {
                            ADM_warning("Error in decoding forward");
                            return false;
                    }
                    if(image->Pts>=targetPts)
                            break;
                    if(thisSeg!=_currentSegment)
                            break;
                }
                if(image->Pts!=targetPts)
                {
                    ADM_error("Could not retrieve our own frame at PTS=%"PRIu64" ms\n",targetPts/1000);
                    return false;
                }
                return true;
}