CRegistryPropEditorComp.h
Go to the documentation of this file.
1 #ifndef icmpstr_CRegistryPropEditorComp_included
2 #define icmpstr_CRegistryPropEditorComp_included
3 
4 
5 // ACF includes
6 #include <icomp/IRegistry.h>
10 
11 // ACF-Solutions includes
13 #include <GeneratedFiles/icmpstr/ui_CRegistryPropEditorComp.h>
14 
15 
16 namespace icmpstr
17 {
18 
19 
20 class CRegistryPropEditorComp: public iqtgui::TDesignerGuiObserverCompBase<Ui::CRegistryPropEditorComp, icomp::IRegistry>
21 {
22  Q_OBJECT
23 
24 public:
26 
27  enum ItemType
28  {
31  };
32 
33  enum DataRole
34  {
38  DR_COMPONENT_ID = Qt::UserRole + 1,
39  DR_ITEM_TYPE = Qt::UserRole + 2,
40  DR_EXPORT_ID = Qt::UserRole + 3
41  };
42 
43  I_BEGIN_COMPONENT(CRegistryPropEditorComp);
44  I_ASSIGN(m_consistInfoCompPtr, "ConsistencyInfo", "Allows to check consistency of registries and attributes", false, "ConsistencyInfo");
45  I_ASSIGN(m_envManagerCompPtr, "MetaInfoManager", "Allows access to component meta information", true, "MetaInfoManager");
46  I_ASSIGN_TO(m_envManagerModelCompPtr, m_envManagerCompPtr, false);
47  I_END_COMPONENT;
48 
49 protected:
50  class TextLog:
51  public QString,
52  virtual public ilog::IMessageConsumer
53  {
54  public:
55  // reimplemented (ilog::IMessageConsumer)
56  virtual bool IsMessageSupported(
57  int messageCategory = -1,
58  int messageId = -1,
59  const istd::IInformationProvider* messagePtr = NULL) const;
60  virtual void AddMessage(const MessagePtr& messagePtr);
61  };
62 
63  void CreateOverview();
64 
65  // reimplemented (imod::TGuiObserverWrap)
66  virtual void OnGuiModelAttached();
67  virtual void OnGuiModelDetached();
68  virtual void UpdateGui(const istd::IChangeable::ChangeSet& changeSet);
69 
70  // reimplemented (iqtgui::CGuiComponentBase)
71  virtual void OnGuiCreated();
72 
73 protected Q_SLOTS:
74  void OnUpdateExportsTree();
75  void OnUpdateKeywords();
77  void on_OverviewTree_itemChanged(QTreeWidgetItem* itemPtr, int column);
78 
79 signals:
80  void AfterExportsChanged();
81 
82 private:
83  void UpdateConsistencyStatus(
84  QTreeWidgetItem* exportedtemPtr,
85  const icomp::IRegistry& registry,
86  const QByteArray& componentId,
87  const QByteArray& exportId,
88  ItemType itemType);
89 
90  static QString ConvertToKeyword(const QString& input, const QString& key = QString());
91 
92 private:
93  I_REF(IRegistryConsistInfo, m_consistInfoCompPtr);
94  I_REF(icomp::IMetaInfoManager, m_envManagerCompPtr);
95  I_REF(imod::IModel, m_envManagerModelCompPtr);
96 };
97 
98 
99 } // namespace icmpstr
100 
101 
102 #endif // !icmpstr_CRegistryPropEditorComp_included
103 
#define NULL
iqtgui::TDesignerGuiObserverCompBase< Ui::CRegistryPropEditorComp, icomp::IRegistry > BaseClass
virtual bool IsMessageSupported(int messageCategory=-1, int messageId=-1, const istd::IInformationProvider *messagePtr=NULL) const
virtual void UpdateGui(const istd::IChangeable::ChangeSet &changeSet)
void on_OverviewTree_itemChanged(QTreeWidgetItem *itemPtr, int column)
virtual void AddMessage(const MessagePtr &messagePtr)

© 2007-2017 Witold Gantzke and Kirill Lepskiy