CSelectableFileConverterComp.h
Go to the documentation of this file.
1 #ifndef ifileproc_CSelectableFileConverterComp_included
2 #define ifileproc_CSelectableFileConverterComp_included
3 
4 
5 // ACF includes
6 #include "icomp/CComponentBase.h"
7 
8 #include "iprm/ISelectionParam.h"
9 #include "iprm/IOptionsList.h"
10 
12 
13 
14 namespace ifileproc
15 {
16 
17 
19  public icomp::CComponentBase,
20  virtual public ifileproc::IFileConvertCopy,
21  virtual public iprm::ISelectionParam,
22  virtual protected iprm::IOptionsList
23 {
24 public:
26 
27  I_BEGIN_COMPONENT(CSelectableFileConverterComp);
28  I_REGISTER_INTERFACE(ifileproc::IFileConvertCopy);
29  I_REGISTER_INTERFACE(iprm::ISelectionParam);
30  I_REGISTER_INTERFACE(iser::ISerializable);
31  I_ASSIGN_MULTI_0(m_slaveConvertersCompPtr, "SlaveConverters", "List of the slave converters", true);
32  I_ASSIGN_MULTI_0(m_slaveConverterNamesAttrPtr, "SlaveConverterNames", "List of the converter names", true);
33  I_ASSIGN_MULTI_0(m_slaveConverterDescriptionsAttrPtr, "SlaveConverterDescriptions", "List of the converter's descriptions", true);
34  I_END_COMPONENT;
35 
37 
38  // reimplemented (ifileproc::IFileConvertCopy)
39  virtual bool ConvertFiles(
40  const QString& inputPath,
41  const QString& outputPath,
42  const iprm::IParamsSet* paramsPtr = NULL) const;
43 
44  // reimplemented (iprm::ISelectionParam)
45  virtual const IOptionsList* GetSelectionConstraints() const;
46  virtual int GetSelectedOptionIndex() const;
47  virtual bool SetSelectedOptionIndex(int index);
48  virtual ISelectionParam* GetSubselection(int index) const;
49 
50  // reimplemented (iser::ISerializable)
51  virtual bool Serialize(iser::IArchive& archive);
52 
53  // reimplemented (icomp::CComponentBase)
54  virtual void OnComponentCreated();
55 
56 protected:
57  // reimplemented (iprm::IOptionsList)
58  virtual int GetOptionsFlags() const;
59  virtual int GetOptionsCount() const;
60  virtual QString GetOptionName(int index) const;
61  virtual QString GetOptionDescription(int index) const;
62  virtual QByteArray GetOptionId(int index) const;
63  virtual bool IsOptionEnabled(int index) const;
64 
65 private:
66  I_MULTIREF(ifileproc::IFileConvertCopy, m_slaveConvertersCompPtr);
67  I_MULTIATTR(QString, m_slaveConverterNamesAttrPtr);
68  I_MULTIATTR(QString, m_slaveConverterDescriptionsAttrPtr);
69 
70  int m_optionsCount;
71  int m_selectedOptionIndex;
72 };
73 
74 
75 } // namespace ifileproc
76 
77 
78 #endif // !ifileproc_CSelectableFileConverterComp_included
virtual const IOptionsList * GetSelectionConstraints() const
virtual bool ConvertFiles(const QString &inputPath, const QString &outputPath, const iprm::IParamsSet *paramsPtr=NULL) const
Copy a file or files from inputPath to destination outputPath.
Common interface for file copying.
virtual int GetSelectedOptionIndex() const
virtual QString GetOptionName(int index) const
virtual QString GetOptionDescription(int index) const
virtual bool IsOptionEnabled(int index) const
virtual QByteArray GetOptionId(int index) const
virtual bool Serialize(iser::IArchive &archive)
virtual bool SetSelectedOptionIndex(int index)
virtual ISelectionParam * GetSubselection(int index) const

© 2007-2011 Witold Gantzke and Kirill Lepskiy