editor_factory.cpp 1.6 KB

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