UsTK : Ultrasound ToolKit  version 2.0.1 under development (2024-12-11)
usUltrasonixClientWidget.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 __usUltrasonixClientWidget_h_
40 #define __usUltrasonixClientWidget_h_
41 
42 // VISP includes
43 #include <visp3/ustk_core/usConfig.h>
44 
45 #if defined(USTK_HAVE_VTK_QT) && defined(VISP_HAVE_MODULE_USTK_GRABBER)
46 
47 #include <QApplication>
48 #include <QComboBox>
49 #include <QGridLayout>
50 #include <QHostAddress>
51 #include <QLabel>
52 #include <QLineEdit>
53 #include <QMessageBox>
54 #include <QPushButton>
55 #include <QWidget>
56 #include <visp3/ustk_grabber/usNetworkGrabber.h>
57 
58 class VISP_EXPORT usUltrasonixClientWidget : public QWidget
59 {
60  Q_OBJECT
61 public:
62  usUltrasonixClientWidget();
63  virtual ~usUltrasonixClientWidget();
64 
65 signals:
66  void connectToServer(QHostAddress adress);
67  void initAcquisition(usNetworkGrabber::usInitHeaderSent initHeader);
68  void center3DProbeMotor();
69  void runAcquisition();
70  void stopAcquisition();
71 
72 private slots:
73  void initAcquisitionSlot();
74  void connectToServerSlot();
75 
76 private:
77  // Labels
78  QLabel *serverIpAdressLabel;
79  QLabel *probeSelectionLabel;
80 
81  // Connect, init, run, stop buttons
82  QPushButton *connectPushButton;
83  QPushButton *initPushButton;
84  QPushButton *center3Dprobe;
85  QPushButton *startPushButton;
86  QPushButton *stopPushButton;
87 
88  // selection
89  QLineEdit *ipTextEdit;
90  QComboBox *probeSelectComboBox;
91 
92  QRegExpValidator *ipValidator;
93 
94  // Layouts
95  QGridLayout *Layout;
96 
97  QHostAddress hostAddress;
99 };
100 #endif // USTK_HAVE_VTK_QT && VISP_HAVE_VIPER850
101 #endif // __usUltrasonixClientWidget_h_