cisst-saw
Loading...
Searching...
No Matches
vctForceTorqueQtWidget.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3
4/*
5 Author(s): Anton Deguet, Dorothy Hu
6 Created on: 2017-01-20
7
8 (C) Copyright 2017-2020 Johns Hopkins University (JHU), All Rights Reserved.
9
10--- begin cisst license - do not edit ---
11
12This software is provided "as is" under an open source license, with
13no warranty. The complete license can be found in license.txt and
14http://www.cisst.org/cisst/license.txt.
15
16--- end cisst license ---
17*/
18
19
20#ifndef _vctForceTorqueQtWidget_h
21#define _vctForceTorqueQtWidget_h
22
23// cisst include
29
30#include <QWidget>
31#include <QtOpenGL>
32
33class QWidget;
34class QVBoxLayout;
35
36// Always include last
38
41{
42 Q_OBJECT;
43
44 public:
47 typedef enum {UNDEFINED_WIDGET,
48 TEXT_WIDGET, // text display
49 PLOT_2D_WIDGET, // 2D plot
50 PLOT_3D_WIDGET // 3D display
51 } DisplayModeType;
52
56
57 inline ~vctForceTorqueQtWidget(void) {};
58
61 void SetValue(const vct3 & force,
62 const vct3 & torque,
63 const double & time = 0.0) {
64 mForce.Assign(force);
65 mTorque.Assign(torque);
66 mTime = time;
67 this->UpdateCurrentWidget();
68 }
69
75 void SetDisplayMode(const DisplayModeType displayMode);
76
77 protected slots:
79 void ShowContextMenu(const QPoint & position);
80
81 protected:
86
92
95 double mTime;
96
97 // Text widgets
102
103 // 2D/3D widgets
106
107 // current widget
108 QWidget * CurrentWidget;
109 QVBoxLayout * Layout;
110};
111
112#endif // _vctForceTorqueQtWidget_h
Definition vctForceTorque2DQtWidget.h:36
Definition vctForceTorque3DQtWidget.h:32
vctQtWidgetDynamicVectorDoubleRead * NormWidget
Definition vctForceTorqueQtWidget.h:100
void ShowContextMenu(const QPoint &position)
void SetDisplayMode(const DisplayModeType displayMode)
vctQtWidgetDynamicVectorDoubleRead * TorqueWidget
Definition vctForceTorqueQtWidget.h:99
double mTime
Definition vctForceTorqueQtWidget.h:95
void UpdateCurrentWidget(void)
vct3 mForce
Definition vctForceTorqueQtWidget.h:94
DisplayModeType
Definition vctForceTorqueQtWidget.h:47
@ PLOT_3D_WIDGET
Definition vctForceTorqueQtWidget.h:50
@ TEXT_WIDGET
Definition vctForceTorqueQtWidget.h:48
@ UNDEFINED_WIDGET
Definition vctForceTorqueQtWidget.h:47
@ PLOT_2D_WIDGET
Definition vctForceTorqueQtWidget.h:49
~vctForceTorqueQtWidget(void)
Definition vctForceTorqueQtWidget.h:57
vct3 mTorque
Definition vctForceTorqueQtWidget.h:94
vctQtWidgetDynamicVectorDoubleRead * ForceWidget
Definition vctForceTorqueQtWidget.h:98
QWidget * ForceTorqueWidget
Definition vctForceTorqueQtWidget.h:101
QWidget * CurrentWidget
Definition vctForceTorqueQtWidget.h:108
vctForceTorque3DQtWidget * Plot3DWidget
Definition vctForceTorqueQtWidget.h:105
vctForceTorqueQtWidget(const DisplayModeType displayMode=PLOT_3D_WIDGET)
DisplayModeType DisplayMode
Definition vctForceTorqueQtWidget.h:85
vctForceTorque2DQtWidget * Plot2DWidget
Definition vctForceTorqueQtWidget.h:104
void SetValue(const vct3 &force, const vct3 &torque, const double &time=0.0)
Definition vctForceTorqueQtWidget.h:61
QVBoxLayout * Layout
Definition vctForceTorqueQtWidget.h:109
#define CISST_EXPORT
Definition cmnExportMacros.h:50
Macros to export the symbols of cisstVectorQt (in a Dll).
Typedef for fixed size vectors.
vctFixedSizeVector< double, 3 > vct3
Definition vctFixedSizeVectorTypes.h:46
Forward declarations and #define for cisstVector.
vctQtWidgetDynamicVectorReadFloating< double > vctQtWidgetDynamicVectorDoubleRead
Definition vctForwardDeclarationsQt.h:39