Files
Renderive/Qt/plot/Plot.h
T
2026-08-16 21:50:12 +08:00

30 lines
855 B
C++

#pragma once
#include "render_2D/export.h"
#include <QColor>
#include <QEvent>
#include <QPaintEvent>
#include <QWidget>
namespace renderive {
struct Abs_Plot_Private;
class Latency_Eager_Plot;
class Explicit_Plot;
class LIB_DECL Abs_Plot : public QWidget {
Q_OBJECT
public:
virtual void init();
[[nodiscard]] QColor background_color() const;
[[nodiscard]] Render_Scene_2D* scene() const;
[[nodiscard]] renderive_Owner<Renderable> root_renderable() const;
void set_background_color(const QColor& color);
~Abs_Plot() override;
protected:
explicit Abs_Plot(Abs_Plot_Private* private_data);
void start_render_timer();
void stop_render_timer();
void update_render_interval();
bool event(QEvent* event) final;
void paintEvent(QPaintEvent* event) final;
Abs_Plot_Private* d{};
};
} // namespace renderive