UsTK : Ultrasound ToolKit  version 2.0.1 under development (2023-12-07)
usRobotManualControlWidget.h
1 /****************************************************************************
2  *
3  * This file is part of the ustk software.
4  * Copyright (C) 2016 - 2017 by Inria. All rights reserved.
5  *
6  * This software is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * ("GPL") version 2 as published by the Free Software Foundation.
9  * See the file LICENSE.txt at the root directory of this source
10  * distribution for additional information about the GNU GPL.
11  *
12  * For using ustk with software that can not be combined with the GNU
13  * GPL, please contact Inria about acquiring a ViSP Professional
14  * Edition License.
15  *
16  * This software was developed at:
17  * Inria Rennes - Bretagne Atlantique
18  * Campus Universitaire de Beaulieu
19  * 35042 Rennes Cedex
20  * France
21  *
22  * If you have questions regarding the use of this file, please contact
23  * Inria at ustk@inria.fr
24  *
25  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
26  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27  *
28  * Authors:
29  * Marc Pouliquen
30  * Pedro Patlan Rosales
31  *
32  *****************************************************************************/
33 
39 #ifndef __usRobotManualControlWidget_h_
40 #define __usRobotManualControlWidget_h_
41 
42 // VISP includes
43 #include <visp3/ustk_core/usConfig.h>
44 
45 #ifdef USTK_HAVE_VTK_QT
46 
47 #include <QGridLayout>
48 #include <QGroupBox>
49 #include <QLabel>
50 #include <QPushButton>
51 #include <QSlider>
52 
53 class VISP_EXPORT usRobotManualControlWidget : public QGroupBox
54 {
55  Q_OBJECT
56 public:
59 
60 private:
61  void setUpConnections();
62  // Labels
63  QLabel *txLabel;
64  QLabel *tyLabel;
65  QLabel *tzLabel;
66  QLabel *wxLabel;
67  QLabel *wyLabel;
68  QLabel *wzLabel;
69  // Sliders
70  QSlider *txSlider;
71  QSlider *tySlider;
72  QSlider *tzSlider;
73  QSlider *wxSlider;
74  QSlider *wySlider;
75  QSlider *wzSlider;
76  // Start / stop button
77  QPushButton *initPushButton;
78  QPushButton *startStopPushButton;
79  QLabel *labelRobotState;
80  QPushButton *automaticForceButton;
81  // Layouts
82  QGridLayout *L;
83 
84  bool automaticForceControl;
85 
86 signals:
87  // Linear velocities
88  void changeVX(int);
89  void changeVY(int);
90  void changeVZ(int);
91  // Angular velocities
92  void changeWX(int);
93  void changeWY(int);
94  void changeWZ(int);
95 
96  void initRobot();
97  void startRobot();
98  void stopRobot();
99 
102 
103 public slots:
104  void robotErrorSlot();
105  void robotInitialized(void);
106  void releaseSlider(void);
107  void setRobotState(QString text);
108  void setRobotActivation();
109 
110 private slots:
111  void activateAutomaticForceControlSlot();
112 };
113 
114 #endif // USTK_HAVE_VTK_QT
115 #endif // __usRobotManualControlWidget_h_