CConvertComponentCommandComp.h
Go to the documentation of this file.
1 #ifndef icmpstr_CConvertComponentCommandComp_included
2 #define icmpstr_CConvertComponentCommandComp_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>
20 
21 #include <GeneratedFiles/icmpstr/ui_CConvertComponentCommandComp.h>
22 
23 
24 namespace icmpstr
25 {
26 
27 
29  public QDialog,
30  public Ui::CConvertComponentCommandComp,
31  public icomp::CComponentBase,
32  public imod::TSingleModelObserverBase<IElementSelectionInfo>,
33  virtual public ibase::ICommandsProvider
34 {
35  Q_OBJECT
36 
37 public:
40  typedef QDialog BaseClass3;
41 
42  I_BEGIN_COMPONENT(CConvertComponentCommandComp);
43  I_REGISTER_INTERFACE(ibase::ICommandsProvider);
44  I_ASSIGN(m_metaInfoManagerCompPtr, "MetaInfoManager", "Access to manager of components meta information", true, "MetaInfoManager");
45  I_END_COMPONENT;
46 
47 public:
49 
50  // reimpemented (ibase::ICommandsProvider)
51  virtual const ibase::IHierarchicalCommand* GetCommands() const;
52 
53 protected:
54  enum GroupId
55  {
56  GI_COMPONENT = 0x5430
57  };
58 
63  const icomp::IRegistry& registry,
64  const QByteArray& elementName,
65  const icomp::IRegistry::ElementInfo& elementInfo);
66 
67  void CreatePackagesList();
68  void CreateComponentsList();
70  void DoRetranslate();
71 
72  // reimplemented (imod::CSingleModelObserverBase)
73  virtual void OnUpdate(const istd::IChangeable::ChangeSet& changeSet);
74 
75 protected Q_SLOTS:
79  void on_FilterEdit_textChanged(const QString& text);
82  void OnPromoteCommand();
83 
84 private:
85  enum FilterType
86  {
87  FT_IGNORED,
88  FT_USED,
89  FT_SUPPORTED
90  };
91 
92  struct Filter
93  {
94  icomp::IElementStaticInfo::Ids elements;
95  icomp::IElementStaticInfo::Ids interfaces;
96  iattr::IAttributesProvider::AttributeIds attributes;
97  icomp::IElementStaticInfo::Ids subcomponents;
98  };
99 
100  I_REF(icomp::IMetaInfoManager, m_metaInfoManagerCompPtr);
101 
102  Filter m_supportedFilter;
103  Filter m_usedFilter;
104 
105  icomp::IMetaInfoManager::ComponentAddresses m_filteredComponents;
106 
107  iqtgui::CHierarchicalCommand m_rootMenuCommand;
108  iqtgui::CHierarchicalCommand m_registryMenu;
109  iqtgui::CHierarchicalCommand m_convertComponentCommand;
110 };
111 
112 
113 } // namespace icmpstr
114 
115 
116 #endif // !icmpstr_CConvertComponentCommandComp_included
117 
118 
void on_SubcomponentsPolicyCB_currentIndexChanged(int index)
imod::TSingleModelObserverBase< IElementSelectionInfo > BaseClass2
virtual void OnUpdate(const istd::IChangeable::ChangeSet &changeSet)
void on_AttributesPolicyCB_currentIndexChanged(int index)
void on_ComponentNameCB_currentIndexChanged(int index)
virtual const ibase::IHierarchicalCommand * GetCommands() const
void on_PackageNameCB_currentIndexChanged(int index)
void on_FilterEdit_textChanged(const QString &text)
void InsertElementToFilters(const icomp::IRegistry &registry, const QByteArray &elementName, const icomp::IRegistry::ElementInfo &elementInfo)
Insert supported and used features to list of component filter.
void on_InterfacesPolicyCB_currentIndexChanged(int index)

© 2007-2017 Witold Gantzke and Kirill Lepskiy