ICF 3.1.1.10
Technical documentation of ICF Libraries
CTextEditorComp.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/QTextEdit>
12
13// ICF includes
19#include <idoc/ITextDocument.h>
20
21
22namespace idocgui
23{
24
25
28 istdgui::TGuiComponentBase<QTextEdit>,
29 imod::TSingleModelObserverBase<idoc::ITextDocument> >,
30 virtual public ibase::ICommandsProvider
31{
32 Q_OBJECT
33
34public:
38
39 I_BEGIN_COMPONENT(CTextEditorComp);
40 I_REGISTER_INTERFACE(imod::IModelEditor);
41 I_REGISTER_INTERFACE(imod::IObserver);
42 I_END_COMPONENT;
43
45
46 // reimplemented (ibase::ICommandsProvider)
48
49protected Q_SLOTS:
54
55protected:
56 // reimplemented (istdgui::TGuiObserverWrap)
57 void UpdateModel() const override;
58 void UpdateGui(const istd::IChangeable::ChangeSet& changeSet) override;
59
60 // reimplemented (istdgui::CGuiComponentBase)
61 void OnGuiCreated() override;
62 void OnRetranslate() override;
63
64private:
66 istdgui::CHierarchicalCommand m_editorCommand;
67 istdgui::CHierarchicalCommand m_lowercaseCommand;
68 istdgui::CHierarchicalCommand m_uppercaseCommand;
69};
70
71
72} // namespace idocgui
73
74
Interface for a provider of the heriarchical commands.
void UpdateModel() const override
Do update of the model to reflect the current contents of GUI.
istdgui::TGuiObserverWrap< istdgui::TGuiComponentBase< QTextEdit >, imod::TSingleModelObserverBase< idoc::ITextDocument > > BaseClass
void OnGuiCreated() override
Called just after GUI is initialized.
void UpdateGui(const istd::IChangeable::ChangeSet &changeSet) override
Do update of the GUI to reflect the state of model.
void OnRetranslate() override
Called when non-GUI elements (like commands) should be retranslated.
const ibase::IHierarchicalCommand * GetCommands() const override
Get list of menu commands.
Common interface for an model editor.
Common interface for all classes implementing the Observer functionality in the Model/Observer design...
Definition IObserver.h:30
Basic implementation for a single model observer with binding to concrete data object interface.
Set of change flags (its IDs).
Definition IChangeable.h:38
Common interface to define the hierarchical graph structures.
Implementation of hierarchical command based on QAction from Qt.
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