cisst-saw
Loading...
Searching...
No Matches
vctQtWidgetFrame.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
6 Created on: 2013-04-20
7
8 (C) Copyright 2013-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 _vctQtWidgetFrame_h
21#define _vctQtWidgetFrame_h
22
23// cisst include
30
31#include <QWidget>
32
33class QVBoxLayout;
34
35
36// Always include last
38
41{
42 Q_OBJECT;
43
44 public:
45
50
54
56
60 template <class _rotationType>
62 vctMatRot3 rotationMatrix;
63 rotationMatrix.FromNormalized(frame.Rotation());
64 this->RotationWidget->SetValue(rotationMatrix);
65 vctDoubleVec translation(frame.Translation());
66 translation.Multiply(mPrismaticFactor);
67 this->TranslationWidget->SetValue(translation);
68 }
69
72 inline void SetDisplayMode(const DisplayModeType displayMode) {
73 this->RotationWidget->SetDisplayMode(displayMode);
74 }
75
76 inline void SetPrismaticRevoluteFactors(const double & prismatic, const double & revolute) {
77 mPrismaticFactor = prismatic;
78 RotationWidget->SetPrismaticRevoluteFactors(prismatic, revolute);
79 }
80
81 protected:
82 // widgets
85 // layout
86 QVBoxLayout * Layout;
87 // conversion factors
89};
90
91#endif // _vctQtWidgetFrame_h
Template base class for a frame.
Definition vctFrameBase.h:49
const RotationType & Rotation(void) const
Definition vctFrameBase.h:205
const TranslationType & Translation(void) const
Definition vctFrameBase.h:186
ThisType & FromNormalized(const vctMatrixRotation3Base< __containerType > &other) CISST_THROW(std
Definition vctMatrixRotation3Base.h:232
QVBoxLayout * Layout
Definition vctQtWidgetFrame.h:86
vctQtWidgetDynamicVectorDoubleRead * TranslationWidget
Definition vctQtWidgetFrame.h:84
void SetDisplayMode(const DisplayModeType displayMode)
Definition vctQtWidgetFrame.h:72
void SetValue(const vctFrameBase< _rotationType > &frame)
Definition vctQtWidgetFrame.h:61
vctQtWidgetRotationDoubleRead * RotationWidget
Definition vctQtWidgetFrame.h:83
~vctQtWidgetFrameDoubleRead(void)
Definition vctQtWidgetFrame.h:55
vctQtWidgetFrameDoubleRead(const DisplayModeType displayMode=RotationWidgetType::MATRIX_WIDGET)
double mPrismaticFactor
Definition vctQtWidgetFrame.h:88
vctQtWidgetRotationDoubleRead RotationWidgetType
Definition vctQtWidgetFrame.h:48
void SetPrismaticRevoluteFactors(const double &prismatic, const double &revolute)
Definition vctQtWidgetFrame.h:76
RotationWidgetType::DisplayModeType DisplayModeType
Definition vctQtWidgetFrame.h:49
Definition vctQtWidgetRotation.h:68
DisplayModeType
Definition vctQtWidgetRotation.h:74
@ MATRIX_WIDGET
Definition vctQtWidgetRotation.h:74
#define CISST_EXPORT
Definition cmnExportMacros.h:50
Typedef for dynamic vectors.
vctDynamicVector< double > vctDoubleVec
Definition vctDynamicVectorTypes.h:37
Macros to export the symbols of cisstVectorQt (in a Dll).
Forward declarations and #define for cisstVector.
vctQtWidgetDynamicVectorReadFloating< double > vctQtWidgetDynamicVectorDoubleRead
Definition vctForwardDeclarationsQt.h:39
Typedef for different transformations.
vctMatrixRotation3< double, VCT_ROW_MAJOR > vctMatRot3
Definition vctTransformationTypes.h:107