7#ifndef CHECKIMAGESIZE_H
8#define CHECKIMAGESIZE_H
12#include <klocalizedstring.h>
14#include "kritaimpex_export.h"
20 ImageSizeCheck(
int maxWidth,
int maxHeight,
const QString &
id,
Level level,
const QString &customWarning = QString())
25 if (customWarning.isEmpty()) {
26 m_warning = i18nc(
"image conversion warning",
"This image is larger than <b>%1 x %2</b>. Images this size cannot be saved to this format.", m_maxW, m_maxH);
32 return image->
width() >= m_maxW && image->
height() >= m_maxH;
54 return new ImageSizeCheck(100000000, 100000000,
id(), level, customWarning);
59 return new ImageSizeCheck(maxWidth, maxHeight,
id(), level, customWarning);
62 QString
id()
const override {
63 return "ImageSizeCheck";
KisExportCheckBase * create(KisExportCheckBase::Level level, const QString &customWarning=QString()) override
KisExportCheckBase * create(int maxWidth, int maxHeight, KisExportCheckBase::Level level, const QString &customWarning=QString())
QString id() const override
~ImageSizeCheckFactory() override
bool checkNeeded(KisImageSP image) const override
Level check(KisImageSP) const override
ImageSizeCheck(int maxWidth, int maxHeight, const QString &id, Level level, const QString &customWarning=QString())
The KisExportCheckBase class defines the interface of the individual checks of an export filter's cap...