Namespace sh::tools::thumbnailprovidersΒΆ

namespace sh::tools::thumbnailproviders

Thumbnail providers.

Subclasses of sh::tools::ThumbnailProvider (and possibly some auxiliary stuff). Those classes are used for generating thumbnail pictures for files.

class DefaultImageThumbnailProvider : public sh::tools::ThumbnailProvider
#include <defaultimagethumbnailprovider.h>

Thumbnail provider for images.

Public Functions

DefaultImageThumbnailProvider() = default
void getThumbnail(sh::filesystem::Operation *operation, std::shared_ptr<sh::filesystem::FilesystemNode> node, QString contentType, int width, int height, QIcon *icon) override

Public Static Functions

void doInitialize()
void doShutdown()
class FfmpegVideoThumbnailProvider : public QObject, public sh::tools::ThumbnailProvider
#include <ffmpegvideothumbnailprovider.h>

Thumbnail provider for videos using the ffmpeg tool.

Public Functions

FfmpegVideoThumbnailProvider()
void getThumbnail(sh::filesystem::Operation *operation, std::shared_ptr<sh::filesystem::FilesystemNode> node, QString contentType, int width, int height, QIcon *icon) override

Public Static Functions

void doInitialize()
void doShutdown()

Private Members

QString pathToFfmpegTool
QString pathToFfprobeTool
const QRegularExpression reDuration
QMutex mutexReDuration

Private Static Attributes

std::shared_ptr<sh::configuration::ConfigurationValue> cfgvalFfmpegPath = sh::configuration::ConfigurationManager::instance()->registerConfigValue("sh::tools::thumbnailproviders::FfmpegVideoThumbnailProvider.FfmpegPath", "/usr/bin/ffmpeg", sh::configuration::ConfigurationValue::valueTypeLocalFilePath(), QObject::tr("Path to the 'ffmpeg' tool"), sh::configuration::ConfigurationCategory::CategoryExternalTools, QObject::tr("This tool is possibly used for getting infos about video files."))
class ImageMagickPdfThumbnailProvider : public QObject, public sh::tools::ThumbnailProvider
#include <imagemagickpdfthumbnailprovider.h>

Thumbnail provider for videos using the ffmpeg tool.

Public Functions

ImageMagickPdfThumbnailProvider()
void getThumbnail(sh::filesystem::Operation *operation, std::shared_ptr<sh::filesystem::FilesystemNode> node, QString contentType, int width, int height, QIcon *icon) override

Public Static Functions

void doInitialize()
void doShutdown()

Private Members

QString pathToImagemagickConvertTool

Private Static Attributes

std::shared_ptr<sh::configuration::ConfigurationValue> cfgvalImagemagickConvertPath = sh::configuration::ConfigurationManager::instance()->registerConfigValue("sh::tools::thumbnailproviders::ImageMagickPdfThumbnailProvider.ImagemagickConvertPath", "/usr/bin/convert", sh::configuration::ConfigurationValue::valueTypeLocalFilePath(), QObject::tr("Path to the 'convert' tool of ImageMagick"), sh::configuration::ConfigurationCategory::CategoryExternalTools, QObject::tr("This tool is used for getting thumbnails of some file types."))
class PlaintextThumbnailProvider : public sh::tools::ThumbnailProvider
#include <plaintextthumbnailprovider.h>

Thumbnail provider for plain text.

Public Functions

PlaintextThumbnailProvider()
void getThumbnail(sh::filesystem::Operation *operation, std::shared_ptr<sh::filesystem::FilesystemNode> node, QString contentType, int width, int height, QIcon *icon) override

Public Static Functions

void doInitialize()
void doShutdown()

Private Members

QColor brandingcolor