LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
Loading...
Searching...
No Matches
IView.hpp
Go to the documentation of this file.
1
9#pragma once
10
11namespace mvc
12{
25class IView
26{
27 public:
31 IView() { }
37 virtual ~IView() { }
44 virtual void OnDataUpdated() = 0;
53 virtual void OnCurrentIndexUpdated(const int index) = 0;
54
63 virtual void OnAttachedToModel(class IModelObservable* /*model*/) { }
64
71 virtual void OnDetachedFromModel() { }
72};
73
74} // namespace mvc
Improved IModel with weak_ptr observers for automatic cleanup.
Definition IModelObservable.hpp:52
Interface for view components in the MVC architecture.
Definition IView.hpp:26
virtual void OnDetachedFromModel()
Called when the view is detached from a model.
Definition IView.hpp:71
virtual void OnAttachedToModel(class IModelObservable *)
Called when the view is attached to a model.
Definition IView.hpp:63
virtual ~IView()
Default destructor.
Definition IView.hpp:37
IView()
Default constructor.
Definition IView.hpp:31
virtual void OnDataUpdated()=0
Called when the model's data is updated.
virtual void OnCurrentIndexUpdated(const int index)=0
Called when the current item index in the model is updated.
Definition IControler.hpp:27