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