CComponentPromotorDialogComp.h
Go to the documentation of this file.
1 #ifndef icmpstr_CComponentPromotorDialogComp_included
2 #define icmpstr_CComponentPromotorDialogComp_included
3 
4 
5 // Qt includes
6 #include<QtCore/QtGlobal>
7 #if QT_VERSION >= 0x050000
8 #include <QtWidgets/QDialog>
9 #else
10 #include <QtGui/QDialog>
11 #endif
12 
13 // ACF includes
15 #include "icomp/IMetaInfoManager.h"
16 #include "icomp/CComponentBase.h"
21 
22 #include "GeneratedFiles/icmpstr/ui_CComponentPromotorDialogComp.h"
23 
24 
25 namespace icmpstr
26 {
27 
28 
30  public icomp::CComponentBase,
31  public imod::TSingleModelObserverBase<IElementSelectionInfo>
32 {
33 public:
34 };
35 
36 
38  public QDialog,
39  public Ui::CComponentPromotorDialogComp,
40  public ibase::TModelObserverCompWrap<CComponentPromotorDialogCompBase>,
41  virtual public ibase::ICommandsProvider
42 {
43  Q_OBJECT
44 
45 public:
48  typedef QDialog BaseClass3;
49 
50  I_BEGIN_COMPONENT(CComponentPromotorDialogComp);
51  I_REGISTER_INTERFACE(ibase::ICommandsProvider);
52  I_ASSIGN(m_metaInfoManagerCompPtr, "MetaInfoManager", "Access to manager of components meta information", true, "MetaInfoManager");
53  I_END_COMPONENT;
54 
55 public:
57 
58  // reimpemented (ibase::ICommandsProvider)
59  virtual const ibase::IHierarchicalCommand* GetCommands() const;
60 
61 protected:
62  enum GroupId
63  {
64  GI_COMPONENT = 0x5430
65  };
66 
71  const icomp::IRegistry& registry,
72  const QByteArray& elementName,
73  const icomp::IRegistry::ElementInfo& elementInfo);
74 
75  void CreatePackagesList();
76  void CreateComponentsList();
78  void DoRetranslate();
79 
80  // reimplemented (imod::CSingleModelObserverBase)
81  virtual void OnUpdate(int updateFlags, istd::IPolymorphic* updateParamsPtr);
82 
83 protected Q_SLOTS:
89  void OnPromoteCommand();
90 
91 private:
92  enum FilterType
93  {
94  FT_IGNORED,
95  FT_USED,
96  FT_SUPPORTED
97  };
98 
99  struct Filter
100  {
101  icomp::IElementStaticInfo::Ids elements;
102  icomp::IElementStaticInfo::Ids interfaces;
103  icomp::IElementStaticInfo::Ids attributes;
104  icomp::IElementStaticInfo::Ids subcomponents;
105  };
106 
107  I_REF(icomp::IMetaInfoManager, m_metaInfoManagerCompPtr);
108 
109  Filter m_supportedFilter;
110  Filter m_usedFilter;
111 
112  icomp::IMetaInfoManager::ComponentAddresses m_filteredComponents;
113 
114  iqtgui::CHierarchicalCommand m_rootMenuCommand;
115  iqtgui::CHierarchicalCommand m_registryMenu;
116  iqtgui::CHierarchicalCommand m_promoteComponentCommand;
117 };
118 
119 
120 } // namespace icmpstr
121 
122 
123 #endif // !icmpstr_CComponentPromotorDialogComp_included
124 
125 
void on_SubcomponentsPolicyCB_currentIndexChanged(int index)
void on_AttributesPolicyCB_currentIndexChanged(int index)
imod::TSingleModelObserverBase< IElementSelectionInfo > BaseClass2
void on_InterfacesPolicyCB_currentIndexChanged(int index)
virtual void OnUpdate(int updateFlags, istd::IPolymorphic *updateParamsPtr)
void on_PackageNameCB_currentIndexChanged(int index)
void on_ComponentNameCB_currentIndexChanged(int index)
virtual const ibase::IHierarchicalCommand * GetCommands() const
void InsertElementToFilters(const icomp::IRegistry &registry, const QByteArray &elementName, const icomp::IRegistry::ElementInfo &elementInfo)
Insert supported and used features to list of component filter.
ibase::TModelObserverCompWrap< CComponentPromotorDialogCompBase > BaseClass

© 2007-2011 Witold Gantzke and Kirill Lepskiy