Overte C++ Documentation
ModelPropertiesDialog.h
1 //
2 // ModelPropertiesDialog.h
3 //
4 //
5 // Created by Clement on 3/10/15.
6 // Copyright 2015 High Fidelity, Inc.
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 
12 #ifndef hifi_ModelPropertiesDialog_h
13 #define hifi_ModelPropertiesDialog_h
14 
15 #include <QDialog>
16 
17 #include <hfm/HFM.h>
18 #include <FSTReader.h>
19 
20 #include "ui/ModelsBrowser.h"
21 
22 class QDoubleSpinBox;
23 class QComboBox;
24 class QCheckBox;
25 class QVBoxLayout;
26 
28 class ModelPropertiesDialog : public QDialog {
29  Q_OBJECT
30 
31 public:
32  ModelPropertiesDialog(const QVariantHash& originalMapping,
33  const QString& basePath, const HFMModel& hfmModel);
34 
35  QVariantHash getMapping() const;
36 
37 private slots:
38  void reset();
39  void chooseTextureDirectory();
40  void chooseScriptDirectory();
41  void updatePivotJoint();
42 
43 private:
44  QComboBox* createJointBox(bool withNone = true) const;
45  QDoubleSpinBox* createTranslationBox() const;
46  void insertJointMapping(QVariantHash& joints, const QString& joint, const QString& name) const;
47 
48  QVariantHash _originalMapping;
49  QString _basePath;
50  HFMModel _hfmModel;
51  QLineEdit* _name = nullptr;
52  QPushButton* _textureDirectory = nullptr;
53  QPushButton* _scriptDirectory = nullptr;
54  QDoubleSpinBox* _scale = nullptr;
55  QDoubleSpinBox* _translationX = nullptr;
56  QDoubleSpinBox* _translationY = nullptr;
57  QDoubleSpinBox* _translationZ = nullptr;
58  QCheckBox* _pivotAboutCenter = nullptr;
59  QComboBox* _pivotJoint = nullptr;
60  QComboBox* _leftEyeJoint = nullptr;
61  QComboBox* _rightEyeJoint = nullptr;
62  QComboBox* _neckJoint = nullptr;
63  QComboBox* _rootJoint = nullptr;
64  QComboBox* _leanJoint = nullptr;
65  QComboBox* _headJoint = nullptr;
66  QComboBox* _leftHandJoint = nullptr;
67  QComboBox* _rightHandJoint = nullptr;
68 };
69 
70 #endif // hifi_ModelPropertiesDialog_h
A dialog that allows customization of various model properties.
Definition: ModelPropertiesDialog.h:28
The runtime model format.
Definition: HFM.h:302