mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Support for third party qt image plugins
This commit is contained in:
parent
948ed595e7
commit
f6bed8590f
@ -23,6 +23,26 @@ enum YACReaderPageSortingMode {
|
|||||||
|
|
||||||
void comic_pages_sort(QList<QString> &pageNames, YACReaderPageSortingMode sortingMode);
|
void comic_pages_sort(QList<QString> &pageNames, YACReaderPageSortingMode sortingMode);
|
||||||
|
|
||||||
|
QStringList Comic::getSupportedImageFormats()
|
||||||
|
{
|
||||||
|
QList<QByteArray> supportedImageFormats = QImageReader::supportedImageFormats();
|
||||||
|
QStringList supportedImageFormatStrings;
|
||||||
|
for (QByteArray item : supportedImageFormats) {
|
||||||
|
supportedImageFormatStrings.append(QString::fromLocal8Bit("*." + item));
|
||||||
|
}
|
||||||
|
return supportedImageFormatStrings;
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList Comic::getSupportedImageLiteralFormats()
|
||||||
|
{
|
||||||
|
QList<QByteArray> supportedImageFormats = QImageReader::supportedImageFormats();
|
||||||
|
QStringList supportedImageFormatStrings;
|
||||||
|
for (QByteArray item : supportedImageFormats) {
|
||||||
|
supportedImageFormatStrings.append(QString::fromLocal8Bit(item));
|
||||||
|
}
|
||||||
|
return supportedImageFormatStrings;
|
||||||
|
}
|
||||||
|
|
||||||
const QStringList Comic::imageExtensions = QStringList() << "*.jpg"
|
const QStringList Comic::imageExtensions = QStringList() << "*.jpg"
|
||||||
<< "*.jpeg"
|
<< "*.jpeg"
|
||||||
<< "*.png"
|
<< "*.png"
|
||||||
|
@ -76,8 +76,8 @@ public:
|
|||||||
//check if the comic has failed loading
|
//check if the comic has failed loading
|
||||||
bool hasBeenAnErrorOpening();
|
bool hasBeenAnErrorOpening();
|
||||||
|
|
||||||
inline static QStringList getSupportedImageFormats() { return imageExtensions; }
|
static QStringList getSupportedImageFormats();
|
||||||
inline static QStringList getSupportedImageLiteralFormats() { return literalImageExtensions; }
|
static QStringList getSupportedImageLiteralFormats();
|
||||||
|
|
||||||
static bool fileIsComic(const QString &path);
|
static bool fileIsComic(const QString &path);
|
||||||
static QList<QString> findValidComicFiles(const QList<QUrl> &list);
|
static QList<QString> findValidComicFiles(const QList<QUrl> &list);
|
||||||
|
Loading…
Reference in New Issue
Block a user