bound_color_selector.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /**
  2. * \file
  3. *
  4. * \author Mattia Basaglia
  5. *
  6. * \copyright Copyright (C) 2013-2020 Mattia Basaglia
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU Lesser General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU Lesser General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public License
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #ifndef BOUND_COLOR_SELECTOR_HPP
  23. #define BOUND_COLOR_SELECTOR_HPP
  24. #include "color_selector.hpp"
  25. namespace color_widgets {
  26. /**
  27. * \brief A color selector bound to a color reference
  28. * \todo Maybe this can be removed
  29. */
  30. class QCP_EXPORT BoundColorSelector : public ColorSelector
  31. {
  32. Q_OBJECT
  33. private:
  34. QColor* ref;
  35. public:
  36. explicit BoundColorSelector(QColor* reference, QWidget *parent = 0);
  37. private Q_SLOTS:
  38. void update_reference(QColor);
  39. };
  40. } // namespace color_widgets
  41. #endif // BOUND_COLOR_SELECTOR_HPP