Tome
A generic data editor for games supporting arbitrary input and output formats.
vector3rwidget.h
1 #ifndef VECTOR3RWIDGET_H
2 #define VECTOR3RWIDGET_H
3 
4 
5 #include <QHBoxLayout>
6 #include <QSpinBox>
7 #include <QVariant>
8 #include <QWidget>
9 
10 
11 namespace Tome
12 {
16  class Vector3RWidget : public QWidget
17  {
18  Q_OBJECT
19 
20  public:
25  explicit Vector3RWidget(QWidget* parent = 0);
26  ~Vector3RWidget();
27 
32  QVariant getValue() const;
33 
38  void setValue(const QVariant& v);
39 
40  private:
41  QHBoxLayout* layout;
42 
43  QDoubleSpinBox* spinBoxX;
44  QDoubleSpinBox* spinBoxY;
45  QDoubleSpinBox* spinBoxZ;
46  };
47 }
48 
49 #endif // VECTOR3RWIDGET_H
Definition: commandlineoptions.h:6
Allows editing three-dimensional vectors with real components.
Definition: vector3rwidget.h:16
void setValue(const QVariant &v)
Sets the current vector.
Definition: vector3rwidget.cpp:58
Vector3RWidget(QWidget *parent=0)
Constructs a new widget for editing three-dimensional vectors with real components.
Definition: vector3rwidget.cpp:11
QVariant getValue() const
Returns the vector as QVariantMap with keys BuiltInType::Vector::X, BuiltInType::Vector::Y and BuiltI...
Definition: vector3rwidget.cpp:49