CSvgBitmapLoaderComp.h
Go to the documentation of this file.
1 #ifndef iqtmm_CSvgBitmapLoaderComp_included
2 #define iqtmm_CSvgBitmapLoaderComp_included
3 
4 
5 // ACF includes
7 #include <icomp/CComponentBase.h>
8 #include <ilog/TLoggerCompWrap.h>
9 #include <iimg/CBitmap.h>
10 
11 // ACF-Solutions includes
12 #include <iqtmm/iqtmm.h>
13 
14 
15 namespace iqtmm
16 {
17 
18 
23  public QObject,
25  virtual public ifile::IFilePersistence
26 {
27  Q_OBJECT
28 
29 public:
31 
32  I_BEGIN_COMPONENT(CSvgBitmapLoaderComp);
33  I_REGISTER_INTERFACE(ifile::IFileTypeInfo);
34  I_REGISTER_INTERFACE(ifile::IFilePersistence);
35  I_ASSIGN(m_bitmapWidthAttrPtr, "BitmapWidth", "Width of rendered bitmap in pixels", true, 100);
36  I_ASSIGN(m_bitmapHeightAttrPtr, "BitmapHeight", "Height of rendered bitmap in pixels", true, 100);
37  I_END_COMPONENT;
38 
39  enum MessageId
40  {
41  MI_BITMAP_TYPE = 0x5f7e0
42  };
43 
44  // reimplemented (ifile::IFilePersistence)
45  virtual bool IsOperationSupported(
46  const istd::IChangeable* dataObjectPtr,
47  const QString* filePathPtr = NULL,
48  int flags = -1,
49  bool beQuiet = true) const;
50  virtual int LoadFromFile(
51  istd::IChangeable& data,
52  const QString& filePath = QString(),
53  ibase::IProgressManager* progressManagerPtr = NULL) const;
54  virtual int SaveToFile(
55  const istd::IChangeable& data,
56  const QString& filePath = QString(),
57  ibase::IProgressManager* progressManagerPtr = NULL) const;
58 
59  // reimplemented (ifile::IFileTypeInfo)
60  virtual bool GetFileExtensions(QStringList& result, const istd::IChangeable* dataObjectPtr = NULL, int flags = -1, bool doAppend = false) const;
61  virtual QString GetTypeDescription(const QString* extensionPtr = NULL) const;
62 
63 private:
64  I_ATTR(int, m_bitmapWidthAttrPtr);
65  I_ATTR(int, m_bitmapHeightAttrPtr);
66 
67  mutable QString m_lastFilePath;
68  mutable iimg::CBitmap m_lastBitmap;
69 };
70 
71 
72 } // namespace iqtmm
73 
74 
75 #endif // !iqtmm_CSvgBitmapLoaderComp_included
76 
77 
virtual bool GetFileExtensions(QStringList &result, const istd::IChangeable *dataObjectPtr=NULL, int flags=-1, bool doAppend=false) const
virtual int SaveToFile(const istd::IChangeable &data, const QString &filePath=QString(), ibase::IProgressManager *progressManagerPtr=NULL) const
ilog::CLoggerComponentBase BaseClass
virtual bool IsOperationSupported(const istd::IChangeable *dataObjectPtr, const QString *filePathPtr=NULL, int flags=-1, bool beQuiet=true) const
Load SVG files to bitmap.
virtual QString GetTypeDescription(const QString *extensionPtr=NULL) const
virtual int LoadFromFile(istd::IChangeable &data, const QString &filePath=QString(), ibase::IProgressManager *progressManagerPtr=NULL) const

© 2007-2017 Witold Gantzke and Kirill Lepskiy