25 bool loadImage(
const std::string& path,
int* width =
nullptr,
int* height =
nullptr)
override;
29 bool getImageDimensions(
const std::string& path,
int* width,
int* height)
const override;
32 QPixmap
getPixmap(
const std::string& path);
35 QPixmap
getScaledPixmap(
const std::string& path,
int maxWidth,
int maxHeight);
45 mutable std::mutex cacheMutex_;
46 std::map<std::string, CachedImage> cache_;
void unloadImage(const std::string &path) override
Unload a specific image and free resources.
bool loadImage(const std::string &path, int *width=nullptr, int *height=nullptr) override
Load an image from disk.
QPixmap getPixmap(const std::string &path)
void clearCache() override
Clear all cached images and free resources.
~QtImageService() override=default
bool getImageDimensions(const std::string &path, int *width, int *height) const override
Get dimensions of a loaded image.
QPixmap getScaledPixmap(const std::string &path, int maxWidth, int maxHeight)
bool isImageLoaded(const std::string &path) const override
Check if an image is already loaded/cached.
Abstract interface for image loading operations.