123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- #ifndef SWITCHTABBASEWIDGET_H
- #define SWITCHTABBASEWIDGET_H
- #include <QWidget>
- #include <QWidget>
- #include <QSlider>
- #include <QLineEdit>
- #include <QIntValidator>
- #include <QProgressBar>
- #include <QLabel>
- #include "../CameraBind.h"
- #include "CameraMaterialGroupWnd/Group.h"
- namespace Ui {
- class LightJoystickSwitchPage;
- }
- class LightJoystickSwitchPage : public QWidget
- {
- Q_OBJECT
- public:
- explicit LightJoystickSwitchPage(QWidget *parent = nullptr);
- ~LightJoystickSwitchPage();
- void setLigthValue(int redLight,int greenLight,int blueLight,int dotLight);
- void setLightWidget(int value, QWidget *lightWidget, QLineEdit *lineEdit, QSlider *slider, QProgressBar *progressBar, QLabel *label);
- void resizeSingleUI();
- public slots:
- void on_move_Button_clicked();
- void on_moveTo_Button_clicked();
- void on_up_Button_clicked();
- void on_left_Button_clicked();
- void on_right_Button_clicked();
- void on_down_Button_clicked();
- public slots:
-
- void GetModuleTypeSlots(const ST_MOVE_AXIS& _module);
- public:
-
- void InitMainCameraBind(CameraBind* pCameraBind, bool bUpdate = true);
- void UpdatemPageGroup(Group* pGroup);
-
- void SwitchJoystickPage(bool bSwitch);
-
- void HideOrShowPage(bool isHide);
-
- void SetMoveJoystickInfo(const ST_MOVE_AXIS& movInfo);
- protected:
- void timerEvent(QTimerEvent* event) override;
- private slots:
- void on_xLineEdit_textChanged(const QString &arg1);
- void on_yLineEdit_textChanged(const QString &arg1);
- void on_zLineEdit_textChanged(const QString &arg1);
- void on_rLineEdit_textChanged(const QString &arg1);
- void on_forceLineEdit_textChanged(const QString &arg1);
- void on_modeComboBox_currentIndexChanged(int index);
- private:
-
- QString CombiningStr(bool isUpdate = false);
-
- void RealTimeUpdatesToU();
-
- void ResetIdleTimer(bool bStart = false);
-
- void MoveJoystick();
-
- void RunMoveOrMoveTo(bool isMove);
-
- void UpdataLightVal();
-
- EN_LIGHT_INDEX MatchSelectedLightIndex(QLineEdit* lineEdit);
- void InitForm();
- void BondSliderAndLineEdit(QSlider* slider, QLineEdit* lineEdit);
- void SliderBind();
- void InitLineEdits();
-
- void UpDataAxisToUi();
-
- void MoveModule(const QString strAxis, const QString pos);
- void DisableLayoutWidgets(QLayout* layout, bool isShow = false);
- template<class T>
- void DeduplicationBox(QComboBox* pCom, const T& veTemp, int nIndex);
- private:
- Ui::LightJoystickSwitchPage *ui;
-
- QPointer<CameraBind> m_pCameraBind;
-
- Group* m_pPageSwitchGroup = nullptr;
-
- ST_MOVE_AXIS m_moveAxisInfo;
-
- int m_idleTimer = -1;
- int m_nTimeShowPos = -1;
- bool m_isSlots = false;
-
- QList<QString> m_listCurrentShowAxis;
- int m_nUpdateUiAxis = -1;
- };
- #endif
|