56 lines
1.5 KiB
C++
56 lines
1.5 KiB
C++
#pragma once
|
|
#include "../Renderable.h"
|
|
namespace YSG {
|
|
enum class Planisphere_Type { Psk8 = 8 };
|
|
struct Planisphere_Private;
|
|
class LIB_DECL Planisphere : public Renderable {
|
|
public:
|
|
Planisphere_Private* d();
|
|
Render_Data* create_render_data() override;
|
|
Render_State* create_render_state() override;
|
|
Input_Data* create_input_data() override;
|
|
protected:
|
|
Planisphere();
|
|
friend struct Planisphere_Private;
|
|
friend struct PlanisphereRenderState;
|
|
friend struct PlanisphereInputData;
|
|
public:
|
|
void give_data(QPointF pos);
|
|
PROP(Axis*, i_axis)
|
|
PROP(Axis*, q_axis)
|
|
PROP(Range, i_range)
|
|
PROP(Range, q_range)
|
|
PROP(QColor, point_color)
|
|
PROP(QColor, anchor_color)
|
|
PROP(int, continue_millisecond)
|
|
PROP(Planisphere_Type, type)
|
|
void set_to_axis_center();
|
|
struct Builder;
|
|
};
|
|
struct Planisphere_Prop {
|
|
Axis* i_axis{};
|
|
Axis* q_axis{};
|
|
Range i_range{0, 100};
|
|
Range q_range{0, 100};
|
|
QColor point_color = Qt::red;
|
|
QColor anchor_color = Qt::yellow;
|
|
int continue_millisecond = 1000;
|
|
Planisphere_Type type = Planisphere_Type::Psk8;
|
|
};
|
|
struct LIB_DECL Planisphere::Builder : Planisphere_Prop {
|
|
PROP_B(Axis*, i_axis)
|
|
PROP_B(Axis*, q_axis)
|
|
PROP_B(Range, i_range)
|
|
PROP_B(Range, q_range)
|
|
PROP_B(QColor, point_color)
|
|
PROP_B(QColor, anchor_color)
|
|
PROP_B(int, continue_millisecond)
|
|
PROP_B(Planisphere_Type, type)
|
|
SETTER(QString, layerName, "plottable")
|
|
Builder(Axis* i_axis, Axis* q_axis);
|
|
Planisphere* build();
|
|
protected:
|
|
Plot* plot{};
|
|
};
|
|
}
|