Bläddra i källkod

调整切换页面

JonYang 1 dag sedan
förälder
incheckning
373f8b5a9b

+ 14 - 9
View/die-bonder-ui/OriginalWnd/MainAndSecondaryCamerasWnd.cpp

@@ -337,20 +337,22 @@ void MainAndSecondaryCamerasWnd::initLeftAndRightWidget() {
 
         }
     }
-
-
 }
 
-void MainAndSecondaryCamerasWnd::BindImageOrMaterial(int location, int index) {
-    if (location == m_nLastLeft) {
-        if (index == m_nImageIndex) {
+void MainAndSecondaryCamerasWnd::BindImageOrMaterial(int location, int index) 
+{
+    if (location == m_nLastLeft) 
+    {
+        if (index == m_nImageIndex) 
+        {
             m_veCurrentSelectGroup_L.isBond = true;
             connect(m_veCurrentSelectGroup_L.pSelectGroup, &Group::SetUpDataImageShowSig,
                 this, &MainAndSecondaryCamerasWnd::GetGroupImageShowSignalsTo_L);
             UpdataLightJoystickSwitchPage(m_veCurrentSelectGroup_L.pSelectGroup->m_nGroupId, 1, true);
 
         }
-        else {
+        else 
+        {
             //左边更新物料窗口
             QSettings settings("YourOrganization", "YourApplication");
             settings.beginGroup(QString::number(m_veCurrentSelectGroup_L.pSelectGroup->m_nGroupId));
@@ -362,8 +364,10 @@ void MainAndSecondaryCamerasWnd::BindImageOrMaterial(int location, int index) {
 
         }
     }
-    else {
-        if (index == m_nImageIndex) {
+    else 
+    {
+        if (index == m_nImageIndex) 
+        {
 
             m_veCurrentSelectGroup_R.isBond = true;
             connect(m_veCurrentSelectGroup_R.pSelectGroup, &Group::SetUpDataImageShowSig,
@@ -371,7 +375,8 @@ void MainAndSecondaryCamerasWnd::BindImageOrMaterial(int location, int index) {
             UpdataLightJoystickSwitchPage(m_veCurrentSelectGroup_R.pSelectGroup->m_nGroupId, 2, true);
 
         }
-        else {
+        else 
+        {
             //右边更新物料窗口
             QSettings settings("YourOrganization", "YourApplication");
             settings.beginGroup(QString::number(m_veCurrentSelectGroup_R.pSelectGroup->m_nGroupId));

+ 1 - 0
View/die-bonder-ui/Src/CameraBind.h

@@ -37,6 +37,7 @@ struct ST_LIGHT_VAL
 //ÒÆ¶¯Öá
 struct ST_MOVE_AXIS
 {
+    bool isNoNull; // ÏÂÃæÔÝʱ²»É¾³ý
     bool isSwitch;
     std::string ModuleType;
     std::string AxisType;

+ 15 - 2
View/die-bonder-ui/Src/RewriteControl/ControlOperationPage.cpp

@@ -349,11 +349,24 @@ void ControlOperationPage::setSwitchJoystickButEnable(bool isEnable)
 
 void ControlOperationPage::on_switchJoystickBut_clicked()
 {
-    m_isUserOnclick = true;
+    m_isOpenJoystick = !m_isOpenJoystick;
+
+    QString str = tr("Open light page", "打开灯光页面");
+    if (m_isOpenJoystick)
+    {
+        str = tr("Open Joystick page", "打开摇杆页面");
+    }
+
+    // 这里目前屏蔽
+    emit SendModuleTypeSignals({});
+
+    ui->switchJoystickBut->setToolTip(str);
+    // 目前屏蔽
+   /* m_isUserOnclick = true;
     ResetIdleTimer(true);
 
     UpdataModuleType("aaa", 3);
-    ui->switchJoystickBut->setEnabled(false);
+    ui->switchJoystickBut->setEnabled(false);*/
 }
 
 void ControlOperationPage::MouseMovedSlots(const QPoint& delta)

+ 1 - 0
View/die-bonder-ui/Src/RewriteControl/ControlOperationPage.h

@@ -162,6 +162,7 @@ private:
      */
     ST_MOVE_AXIS                m_currentSelectRunAxis = {};
     bool                        m_isAdd = false;
+    bool                        m_isOpenJoystick = true;
 };
 
 #endif // VIEWWIDGETGROUP_H

+ 6 - 0
View/die-bonder-ui/Src/RewriteControl/ControlOperationPage.ui

@@ -150,6 +150,12 @@
         <height>16777215</height>
        </size>
       </property>
+      <property name="cursor">
+       <cursorShape>PointingHandCursor</cursorShape>
+      </property>
+      <property name="toolTip">
+       <string extracomment="打开摇杆页面">Open Joystick page</string>
+      </property>
       <property name="text">
        <string>.......</string>
       </property>

+ 10 - 3
View/die-bonder-ui/Src/RewriteControl/LightJoystickSwitchPage.cpp

@@ -49,7 +49,7 @@ void LightJoystickSwitchPage::SliderBind()
 
 void LightJoystickSwitchPage::InitLineEdits()
 {
-    //ui->switchTabWidget->tabBar()->hide();
+    ui->switchTabWidget->tabBar()->hide();
     QList<QLineEdit*> lineEdits = {
         ui->RedLightlineEdit, ui->GreenLightlineEdit,
         ui->BlueLightlineEdit, ui->DotLightlineEdit,
@@ -369,8 +369,15 @@ void LightJoystickSwitchPage::on_down_Button_clicked()
 
 void LightJoystickSwitchPage::GetModuleTypeSlots(const ST_MOVE_AXIS& _module)
 {
-    m_isSlots = true;
-    SetMoveJoystickInfo(_module);
+    if (!_module.isNoNull)
+    {
+        int newIndex = (ui->switchTabWidget->currentIndex() + 1) % ui->switchTabWidget->count();
+        ui->switchTabWidget->setCurrentIndex(newIndex);
+    }
+
+
+    /*m_isSlots = true;
+    SetMoveJoystickInfo(_module);*/
 }
 
 void LightJoystickSwitchPage::InitMainCameraBind(CameraBind* pCameraBind, bool bUpdate /*= true*/)

+ 5 - 5
View/die-bonder-ui/Src/RewriteControl/LightJoystickSwitchPage.ui

@@ -23,7 +23,7 @@
     </rect>
    </property>
    <property name="currentIndex">
-    <number>1</number>
+    <number>0</number>
    </property>
    <widget class="QWidget" name="GreenLightTab">
     <attribute name="title">
@@ -36,7 +36,7 @@
      <property name="geometry">
       <rect>
        <x>80</x>
-       <y>0</y>
+       <y>10</y>
        <width>61</width>
        <height>114</height>
       </rect>
@@ -113,7 +113,7 @@
      <property name="geometry">
       <rect>
        <x>258</x>
-       <y>0</y>
+       <y>10</y>
        <width>61</width>
        <height>114</height>
       </rect>
@@ -190,7 +190,7 @@
      <property name="geometry">
       <rect>
        <x>347</x>
-       <y>0</y>
+       <y>10</y>
        <width>61</width>
        <height>114</height>
       </rect>
@@ -267,7 +267,7 @@
      <property name="geometry">
       <rect>
        <x>169</x>
-       <y>0</y>
+       <y>10</y>
        <width>61</width>
        <height>114</height>
       </rect>