13#include <QtCore/QDateTime>
39 I_ASSIGN_MULTI_0(m_fileLoadersCompPtr,
"FileLoaders",
"List of the supported file loaders, which will be used to open the input file",
true);
40 I_ASSIGN_MULTI_0(m_dataObjectFactCompPtr,
"DataObjectFactories",
"List of factories used for creation of preview's data model",
true);
41 I_ASSIGN_MULTI_0(m_previewGenerationProcessorsCompPtr,
"PreviewGenerationProcessors",
"Processor used for generation of the preview bitmap",
true);
42 I_ASSIGN(m_widthAttrPtr,
"BitmapWidth",
"Width of the generated preview bitmap",
true, 128);
43 I_ASSIGN(m_heightAttrPtr,
"BitmapHeight",
"Height of the generated preview bitmap",
true, 128);
44 I_ASSIGN(m_maxCacheSizeAttrPtr,
"MaxCacheSize",
"Maximal number of bitmaps in cache",
false, 100);
45 I_ASSIGN(m_useTempFileAttrPtr,
"UseTempFile",
"If enabled, the temporary copy of the input file will be created and used for rendering",
true,
true);
51 const QString* filePathPtr =
nullptr,
53 bool beQuiet =
true)
const override;
56 const QString& filePath = QString(),
60 const QString& filePath = QString(),
87 I_ATTR(
int, m_widthAttrPtr);
88 I_ATTR(
int, m_heightAttrPtr);
89 I_ATTR(
int, m_maxCacheSizeAttrPtr);
90 I_ATTR(
bool, m_useTempFileAttrPtr);
94 QDateTime fileTimeStamp;
95 std::unique_ptr<iimg::CBitmap> fileBitmapPtr;
98 mutable std::map<QString, FileInfo> m_previewCache;
100 std::list<Configuration> m_workingConfigurations;
Base class for component implementation.
Interface providing loading and saving of data objects.
void OnComponentCreated() override
virtual iproc::CTaskState SaveToFile(const istd::IChangeable &data, const QString &filePath=QString(), iproc::IProgressManager *progressManagerPtr=nullptr) const override
This function saves data data to file filePath.
bool Serialize(iser::IArchive &archive) override
Load or store state of this object as a archive stream.
virtual bool IsOperationSupported(const istd::IChangeable *dataObjectPtr, const QString *filePathPtr=nullptr, int flags=-1, bool beQuiet=true) const override
Returns true if object dataObject can be loaded/saved.
virtual iproc::CTaskState LoadFromFile(istd::IChangeable &data, const QString &filePath=QString(), iproc::IProgressManager *progressManagerPtr=nullptr) const override
This function loads data data from file filePath.
const Configuration * GetConfigForFile(const QString &filePath) const
QString GetTypeDescription(const QString *extensionPtr=nullptr) const override
Get description of object type associated with single extension.
bool GetFileExtensions(QStringList &result, const istd::IChangeable *dataObjectPtr=nullptr, int flags=-1, bool doAppend=false) const override
Get file extensions supported by this loader.
icomp::CComponentBase BaseClass
Represent state of asynchronous operation.
Interface for all synchrone and asynchrone processors with "push data" model.
Consume information about progress of some process.
Represent input/output persistence archive.
Common class for all classes which objects can be archived or restored from archive.
Common interface for data model objects, which can be changed.
Contains the image processing classes.
ifile::IFilePersistence & filePersistence
iproc::IProcessor & previewGenerationProcessor
std::unique_ptr< istd::IChangeable > dataObjectPtr