editor_factory.cpp 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* editor_factory.cpp - value editors factory instances
  2. * Copyright (C) 2017 caryoscelus
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #include <QDebug>
  18. #include <QPushButton>
  19. #include <core/class_init.h>
  20. #include <core/color/color.h>
  21. #include <geom_helpers/knots.h>
  22. #include <geom_helpers/rectangle.h>
  23. #include <generic/custom_widgets.h>
  24. #include <generic/node_editor_widget.h>
  25. #include "color_button.h"
  26. #include "point_value_editor.h"
  27. #include <canvas/editors/bezier_editor.h>
  28. #include <widgets/canvas.h>
  29. namespace rainynite::studio {
  30. REGISTER_CUSTOM_WIDGET(ColorEdit, core::colors::Color, (NodeEditorWidget<ColorButton, core::colors::Color>));
  31. REGISTER_CUSTOM_WIDGET(PointValueEdit, Geom::Point, (NodeEditorWidget<PointValueEditor, Geom::Point>));
  32. REGISTER_CANVAS_EDITOR(Canvas, BezierEditor, Geom::BezierKnots);
  33. REGISTER_NODE_EDITOR_SHOW_CHILDREN(RectangleAB, true);
  34. REGISTER_NODE_EDITOR_SHOW_CHILDREN(CirclePR, true);
  35. REGISTER_NODE_EDITOR_SHOW_CHILDREN(RenderShape, true);
  36. REGISTER_NODE_EDITOR_SHOW_CHILDREN(PathXY, true);
  37. REGISTER_NODE_EDITOR_SHOW_CHILDREN(Translate, true);
  38. REGISTER_NODE_EDITOR_SHOW_CHILDREN(Rotate, true);
  39. REGISTER_NODE_EDITOR_SHOW_CHILDREN(Scale, true);
  40. REGISTER_TEMPLATE_NODE_EDITOR_SHOW_CHILDREN(Frame, "Frame", true)
  41. REGISTER_TEMPLATE_NODE_EDITOR_SHOW_CHILDREN(List, "List", true)
  42. REGISTER_TEMPLATE_NODE_EDITOR_SHOW_CHILDREN(ListFrame, "List/Frame", true)
  43. REGISTER_TEMPLATE_NODE_EDITOR_SHOW_CHILDREN(Interpolate, "Interpolate", true)
  44. } // namespace rainynite::studio