CMediaLoaderComp.h
Go to the documentation of this file.
1 #ifndef iqtmm_CMediaLoaderComp_included
2 #define iqtmm_CMediaLoaderComp_included
3 
4 
6 
7 #include "icomp/CComponentBase.h"
8 
9 #include "ilog/TLoggerCompWrap.h"
10 
11 #include "iqtmm/iqtmm.h"
12 
13 
14 namespace iqtmm
15 {
16 
17 
19  public QObject,
21  virtual public ifile::IFilePersistence
22 {
23 public:
25 
26  I_BEGIN_COMPONENT(CMediaLoaderComp);
27  I_REGISTER_INTERFACE(ifile::IFileTypeInfo);
28  I_REGISTER_INTERFACE(ifile::IFilePersistence);
29  I_ASSIGN(m_autoPlayAttrPtr, "AutoPlay", "If enabled, movie will be automatically played after loading", true, true);
30  I_END_COMPONENT;
31 
32  enum MessageId
33  {
34  MI_BAD_EXTENSION = 0xa7e0,
37  };
38 
39  // reimplemented (ifile::IFilePersistence)
40  virtual bool IsOperationSupported(
41  const istd::IChangeable* dataObjectPtr,
42  const QString* filePathPtr = NULL,
43  int flags = -1,
44  bool beQuiet = true) const;
45  virtual int LoadFromFile(istd::IChangeable& data, const QString& filePath) const;
46  virtual int SaveToFile(const istd::IChangeable& data, const QString& filePath) const;
47 
48  // reimplemented (ifile::IFileTypeInfo)
49  virtual bool GetFileExtensions(QStringList& result, int flags = -1, bool doAppend = false) const;
50  virtual QString GetTypeDescription(const QString* extensionPtr = NULL) const;
51 
52 private:
53  I_ATTR(bool, m_autoPlayAttrPtr);
54 };
55 
56 
57 } // namespace iqtmm
58 
59 
60 #endif // !iqtmm_CMediaLoaderComp_included
61 
virtual int LoadFromFile(istd::IChangeable &data, const QString &filePath) const
virtual bool GetFileExtensions(QStringList &result, int flags=-1, bool doAppend=false) const
virtual QString GetTypeDescription(const QString *extensionPtr=NULL) const
virtual bool IsOperationSupported(const istd::IChangeable *dataObjectPtr, const QString *filePathPtr=NULL, int flags=-1, bool beQuiet=true) const
ilog::CLoggerComponentBase BaseClass
virtual int SaveToFile(const istd::IChangeable &data, const QString &filePath) const

© 2007-2011 Witold Gantzke and Kirill Lepskiy