ICF 3.0.5.47
Technical documentation of ICF Libraries
CDocumentMetaInfoEditorComp.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#pragma once
7
8
9// Qt includes
10#include <QtCore/QtGlobal>
11#include <QtWidgets/QLabel>
12#include <QtWidgets/QLineEdit>
13
14// ICF includes
19
20
21namespace idocgui
22{
23
24
27 istdgui::TGuiComponentBase<QWidget>,
28 imod::TSingleModelObserverBase<idoc::IDocumentMetaInfo> >
29{
30 Q_OBJECT
31public:
35
36 I_BEGIN_COMPONENT(CDocumentMetaInfoEditorComp);
37 I_END_COMPONENT;
38
39protected:
40 // reimplemented (istdgui::TGuiObserverWrap)
41 void OnGuiModelAttached() override;
42 void OnGuiModelDetached() override;
43 void UpdateGui(const istd::IChangeable::ChangeSet& changeSet) override;
44
45 // reimplemented (istdgui::CComponentBase)
46 void OnGuiCreated() override;
47
48protected Q_SLOTS:
50
51private:
52 void ResetItems();
53
54private:
55 struct MetaInfoItem
56 {
57 MetaInfoItem()
58 :labelPtr(nullptr),
59 editPtr(nullptr)
60 {
61 }
62
63 QLabel* labelPtr;
64 QLineEdit* editPtr;
65 };
66
67 typedef QMap<int, MetaInfoItem> MetaInfoItemsMap;
68
69 MetaInfoItemsMap m_metaInfoItemsMap;
70};
71
72
73} // namespace idocgui
74
75
void OnGuiCreated() override
Called just after GUI is initialized.
istdgui::TGuiObserverWrap< istdgui::TGuiComponentBase< QWidget >, imod::TSingleModelObserverBase< idoc::IDocumentMetaInfo > > BaseClass
void UpdateGui(const istd::IChangeable::ChangeSet &changeSet) override
Do update of the GUI to reflect the state of model.
void OnGuiModelDetached() override
Called when model is detached or GUI is destroyed.
void OnGuiModelAttached() override
Called when model is attached and GUI is created.
Basic implementation for a single model observer with binding to concrete data object interface.
Set of change flags (its IDs).
Definition IChangeable.h:38
Base class for all Qt GUI componentes.
Join functionality of istdgui::IGuiObject interface and imod::IObserver.
This package contains Qt implementations related to Document/View concept.

© Witold Gantzke and Kirill Lepskiy