结构优化
This commit is contained in:
+1
-15
@@ -30,11 +30,6 @@ QColor to_qcolor(Color color) {
|
||||
return QColor(color.r, color.g, color.b, color.a);
|
||||
}
|
||||
|
||||
std::string to_utf8_string(const QString& text) {
|
||||
const QByteArray bytes = text.toUtf8();
|
||||
return {bytes.constData(), static_cast<std::size_t>(bytes.size())};
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Abs_Plot_Private::Abs_Plot_Private(bool continuous_rendering)
|
||||
@@ -80,19 +75,10 @@ Scene2D* Abs_Plot::scene() const {
|
||||
return d ? d->scene.get() : nullptr;
|
||||
}
|
||||
|
||||
std::shared_ptr<Renderable> Abs_Plot::root_renderable() const {
|
||||
renderive_Owner<Renderable> Abs_Plot::root_renderable() const {
|
||||
return d->scene->root_renderable();
|
||||
}
|
||||
|
||||
std::shared_ptr<Renderable> Abs_Plot::create_renderable_node(
|
||||
const std::shared_ptr<Renderable>& parent, const QString& object_name) const {
|
||||
return d->scene->create_renderable_node(parent, to_utf8_string(object_name));
|
||||
}
|
||||
|
||||
void Abs_Plot::remove_renderable(const std::shared_ptr<Renderable>& renderable) {
|
||||
d->scene->remove_renderable(renderable);
|
||||
}
|
||||
|
||||
QColor Abs_Plot::background_color() const {
|
||||
return to_qcolor(d->scene->background_color());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user