dynamic_image.h 534 B

123456789101112131415161718192021
  1. // This file is part of Desktop App Toolkit,
  2. // a set of libraries for developing nice desktop applications.
  3. //
  4. // For license and copyright information please follow this link:
  5. // https://github.com/desktop-app/legal/blob/master/LEGAL
  6. //
  7. #pragma once
  8. namespace Ui {
  9. class DynamicImage {
  10. public:
  11. virtual ~DynamicImage() = default;
  12. [[nodiscard]] virtual std::shared_ptr<DynamicImage> clone() = 0;
  13. [[nodiscard]] virtual QImage image(int size) = 0;
  14. virtual void subscribeToUpdates(Fn<void()> callback) = 0;
  15. };
  16. } // namespace Ui