1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-22 03:57:45 +00:00
novus/common/include/vec3edit.h

31 lines
586 B
C
Raw Normal View History

// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include <QSpinBox>
#include <QWidget>
#include <glm/glm.hpp>
2023-10-12 23:44:48 -04:00
class Vector3Edit : public QWidget
{
2023-07-07 16:16:21 -04:00
Q_OBJECT
2023-10-12 23:44:48 -04:00
public:
2023-10-12 23:44:48 -04:00
explicit Vector3Edit(glm::vec3 &vec, QWidget *parent = nullptr);
2023-12-09 21:18:34 -05:00
~Vector3Edit() override;
2023-10-12 23:44:48 -04:00
void setVector(glm::vec3 &vec);
2023-09-26 00:37:55 -04:00
Q_SIGNALS:
void onValueChanged();
private:
struct {
2023-12-09 21:18:34 -05:00
QDoubleSpinBox *x = nullptr, *y = nullptr, *z = nullptr;
} spinBoxes;
2023-10-12 23:44:48 -04:00
glm::vec3 &vec;
2023-12-09 21:18:34 -05:00
QTimer *updateTimer = nullptr;
};