Browse Source

Change RemoteCtrl_Thread. for change bigview show.

yuchuli 3 years ago
parent
commit
33a856cb9d

+ 32 - 2
src/tool/RemoteCtrl_Thread/dialogbigpic.cpp

@@ -15,13 +15,30 @@ DialogBigPic::DialogBigPic(QWidget *parent) :
 
     mpview = new MyView(this);
     mpview->setObjectName(QStringLiteral("graphicsView"));
-    mpview->setGeometry(QRect(30, 30, 600, 600));
+    mpview->setGeometry(QRect(30, 30, 1000, 600));
     mpview->setCacheMode(mpview->CacheBackground);
 
     mscene = new QGraphicsScene;
 
     mpPicView = new IVPicView();
     mpPicView->start();
+
+    mpviewLeft = new MyView(this);
+    mpviewLeft->setObjectName(QStringLiteral("graphicsView"));
+    mpviewLeft->setGeometry(QRect(30, 30, 450, 300));
+    mpviewLeft->setCacheMode(mpview->CacheBackground);
+    msceneLeft = new QGraphicsScene;
+    mpPicViewLeft = new IVPicView();
+    mpPicViewLeft->start();
+
+    mpviewRight = new MyView(this);
+    mpviewRight->setObjectName(QStringLiteral("graphicsView"));
+    mpviewRight->setGeometry(QRect(30, 30, 450, 300));
+    mpviewRight->setCacheMode(mpview->CacheBackground);
+    msceneRight = new QGraphicsScene;
+    mpPicViewRight = new IVPicView();
+    mpPicViewRight->start();
+
     mnLastPicTime = 0;
     mbDraw = false;
     connect(mpPicView,SIGNAL(painterupadate()),this,SLOT(onPainterUpdate()));
@@ -70,6 +87,16 @@ void DialogBigPic::paintEvent(QPaintEvent *)
         mscene->addPixmap(QPixmap::fromImage(image));
         mpview->setScene(mscene);
         mpview->show();
+
+        msceneLeft->clear();
+        msceneLeft->addPixmap(QPixmap::fromImage(image));
+        mpviewLeft->setScene(msceneLeft);
+        mpviewLeft->show();
+
+        msceneRight->clear();
+        msceneRight->addPixmap(QPixmap::fromImage(image));
+        mpviewRight->setScene(msceneRight);
+        mpviewRight->show();
     }
 
 }
@@ -80,7 +107,10 @@ void DialogBigPic::resizeEvent(QResizeEvent *event)
      QRect rect = this->geometry();
      double fwidth = rect.width()/1;
      double fheight = rect.height()/1;
-     mpview->setGeometry(0,0,fwidth,fheight);
+ //    mpview->setGeometry(0,0,fwidth,fheight);
+     mpview->setGeometry(fwidth/4,0,fwidth/2,fheight);
+     mpviewLeft->setGeometry(0,0,fwidth/4,fheight/2);
+     mpviewRight->setGeometry(fwidth*3/4,0,fwidth/4,fheight/2);
 //     rect.setX(rect.x());
 }
 

+ 8 - 1
src/tool/RemoteCtrl_Thread/dialogbigpic.h

@@ -37,9 +37,16 @@ private:
 
     MyView * mpview;
     QGraphicsScene *mscene;
-
     IVPicView * mpPicView;
 
+    MyView * mpviewLeft;
+    QGraphicsScene *msceneLeft;
+    IVPicView * mpPicViewLeft;
+
+    MyView * mpviewRight;
+    QGraphicsScene *msceneRight;
+    IVPicView * mpPicViewRight;
+
     qint64 mnLastPicTime;
 
     bool mbDraw;

+ 3 - 2
src/tool/RemoteCtrl_Thread/dialogbigpic.ui

@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <ui version="4.0">
  <class>DialogBigPic</class>
  <widget class="QDialog" name="DialogBigPic">
@@ -5,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>400</width>
-    <height>300</height>
+    <width>1920</width>
+    <height>600</height>
    </rect>
   </property>
   <property name="windowTitle">

+ 2 - 2
src/tool/RemoteCtrl_Thread/dialogpic.ui

@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>931</width>
-    <height>648</height>
+    <width>1366</width>
+    <height>680</height>
    </rect>
   </property>
   <property name="windowTitle">