瀏覽代碼

change RemoteCtrl_Three for jeely.

yuchuli 2 年之前
父節點
當前提交
24451ee8fa

二進制
src/tool/RemoteCtrl_Wide/en_CN.qm


+ 39 - 2
src/tool/RemoteCtrl_Wide/mainwindowcenter.cpp

@@ -178,7 +178,9 @@ MainWindow::MainWindow(QWidget *parent)
 
     connect(this,SIGNAL(CamUpdate(int)),this,SLOT(onCamUpdate(int)));
 
-    setWindowTitle(mstrProgName +mstrVIN+  mstrGPSTime + mstrPicTime);
+    setWindowTitle(mstrProgName +mstrVIN+  mstrGPSTime );
+
+
 
 }
 
@@ -253,6 +255,11 @@ void MainWindow::CreateView()
 
     ui->radioButton_Null->setChecked(true);
 
+    connect(mmyview,SIGNAL(EscFull()),this,SLOT(onEscFull()));
+    connect(mmyviewRear,SIGNAL(EscFull()),this,SLOT(onEscFull()));
+
+
+
 
 }
 
@@ -826,7 +833,7 @@ void MainWindow::onTimerUpdateView()
    snprintf(strtem,100,"LT(%lld|%d|%lld) ",mgrpcpc->GetPicLatency(2),mgrpcpc->GetFrameRate(2),mgrpcpc->GetPicDownLatency(2));strncat(strlatency,strtem,1000);
    snprintf(strtem,100,"RT(%lld|%d|%lld) ",mgrpcpc->GetPicLatency(3),mgrpcpc->GetFrameRate(3),mgrpcpc->GetPicDownLatency(3));strncat(strlatency,strtem,1000);
 
-   mpLabelLatency->setText(strlatency);
+ //  mpLabelLatency->setText(strlatency);
 
 
     if(gTimeGPSIMUUpdate != time_gps)
@@ -1277,6 +1284,11 @@ void MainWindow::threadframe(int ncamppos)
             }
         }
     }
+
+    if(bSaving)
+    {
+        av_write_trailer(ofmt_ctx);
+    }
 }
 
 void MainWindow::threadpic(int ncampos)
@@ -1378,6 +1390,7 @@ void MainWindow::on_horizontalSlider_wheelspeed_valueChanged(int value)
 
 void MainWindow::on_actionSave_Video_triggered()
 {
+
     static bool bSave = false;
 
 
@@ -1403,3 +1416,27 @@ void MainWindow::on_actionSave_Video_triggered()
         }
     }
 }
+
+void MainWindow::closeEvent(QCloseEvent * event)
+{
+    switch( QMessageBox::information( this, tr("Exit"), tr("Do you really want exit?"), tr("Yes"), tr("No"), 0, 1 ) )
+    {
+        case 0:
+            event->accept();
+            gwleft->SetColse();
+            gwright->SetColse();
+            break;
+        case 1:
+        default:
+            event->ignore();
+            break;
+    }
+
+}
+
+void MainWindow::onEscFull()
+{
+    showNormal();
+    ui->menubar->setVisible(true);
+    ui->statusbar->setVisible(true);
+}

+ 5 - 1
src/tool/RemoteCtrl_Wide/mainwindowcenter.h

@@ -47,7 +47,9 @@ public:
 private slots:
     void on_pushButton_test_clicked();
 
-    virtual void paintEvent(QPaintEvent *);
+    virtual void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
+
+    virtual void closeEvent(QCloseEvent * event) Q_DECL_OVERRIDE;
 
     void on_radioButton_manual_clicked();
 
@@ -109,6 +111,8 @@ private slots:
 
     void on_actionSave_Video_triggered();
 
+    void onEscFull();
+
 signals:
     void CamUpdate(int ncampos);
     void CamUpdate(int ncampos,QImage image);

+ 28 - 0
src/tool/RemoteCtrl_Wide/mainwindowleft.cpp

@@ -1,6 +1,8 @@
 #include "mainwindowleft.h"
 #include "ui_mainwindowleft.h"
 
+#include <QMessageBox>
+
 MainWindowLeft::MainWindowLeft(QWidget *parent) :
     QMainWindow(parent),
     ui(new Ui::MainWindowLeft)
@@ -18,6 +20,8 @@ MainWindowLeft::MainWindowLeft(QWidget *parent) :
     connect(mmyview,SIGNAL(EscFull()),this,SLOT(onEscFull()));
 
     connect(this,SIGNAL(imageupdate()),this,SLOT(onImageUpdate()));
+
+    connect(this,SIGNAL(signalClose()),this,SLOT(onSetClose()));
 }
 
 MainWindowLeft::~MainWindowLeft()
@@ -117,4 +121,28 @@ void MainWindowLeft::paintEvent(QPaintEvent * event)
     }
 }
 
+void MainWindowLeft::SetColse()
+{
+    emit signalClose();
+}
+
+void MainWindowLeft::onSetClose()
+{
+    mbClose = true;
+    this->close();
+}
+
+void MainWindowLeft::closeEvent(QCloseEvent * event)
+{
+    (void)event;
+    if(mbClose)
+    {
+        event->accept();
+        return;
+    }
+    QMessageBox::warning(this,tr("Waring"),tr("Please Close MainWindow."),QMessageBox::YesAll);
+    event->ignore();
+}
+
+
 

+ 8 - 0
src/tool/RemoteCtrl_Wide/mainwindowleft.h

@@ -24,6 +24,7 @@ public:
     ~MainWindowLeft();
     void SetWT(QString strTitle);
     void SetImage(QImage & xImage);
+    void SetColse();
 
 private slots:
     void on_actionFullScreen_triggered();
@@ -32,8 +33,13 @@ private slots:
 
     void onImageUpdate();
 
+    void onSetClose();
+
+    virtual void closeEvent(QCloseEvent * event) Q_DECL_OVERRIDE;
+
 signals:
     void imageupdate();
+    void signalClose();
 
 private:
     Ui::MainWindowLeft *ui;
@@ -61,6 +67,8 @@ private:
     int mnFrameWidth = 1920;
     int mnFrameHeight = 1080;
 
+    bool mbClose = false;
+
 
 
 };

二進制
src/tool/RemoteCtrl_Wide/zh_CN.qm