LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
Loading...
Searching...
No Matches
mvc::IView Class Referenceabstract

Interface for view components in the MVC architecture. More...

#include <IView.hpp>

Inheritance diagram for mvc::IView:
Inheritance graph
Collaboration diagram for mvc::IView:
Collaboration graph

Public Member Functions

 IView ()
 Default constructor.
 
virtual ~IView ()
 Default destructor.
 
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.
 
virtual void OnAttachedToModel (class IModelObservable *)
 Called when the view is attached to a model.
 
virtual void OnDetachedFromModel ()
 Called when the view is detached from a model.
 

Detailed Description

Interface for view components in the MVC architecture.

Note
This interface is designed to be implemented by classes that represent the user interface components displaying data from the model.

This interface defines the methods that any view component must implement to receive updates from the model. It allows the model to notify views about data changes and current index updates.

Constructor & Destructor Documentation

◆ IView()

mvc::IView::IView ( )
inline

Default constructor.

◆ ~IView()

virtual mvc::IView::~IView ( )
inlinevirtual

Default destructor.

Ensures proper cleanup of resources when the view is destroyed.

Member Function Documentation

◆ OnAttachedToModel()

virtual void mvc::IView::OnAttachedToModel ( class IModelObservable *  )
inlinevirtual

Called when the view is attached to a model.

This method is called after the view is registered with a model. Views can use this to initialize model-specific state.

Parameters
modelThe model the view was attached to (optional)

◆ OnCurrentIndexUpdated()

virtual void mvc::IView::OnCurrentIndexUpdated ( const int  index)
pure virtual

Called when the current item index in the model is updated.

This method should be implemented to update the view based on the new current item index.

Parameters
indexThe new current item index in the model

Implemented in ui::qt::EventsTableView, ui::qt::ItemDetailsView, and ui::qt::SignalPlotPanel.

◆ OnDataUpdated()

virtual void mvc::IView::OnDataUpdated ( )
pure virtual

Called when the model's data is updated.

This method should be implemented to refresh the view with the latest data from the model.

Implemented in ui::qt::EventsTableView, ui::qt::ItemDetailsView, and ui::qt::SignalPlotPanel.

◆ OnDetachedFromModel()

virtual void mvc::IView::OnDetachedFromModel ( )
inlinevirtual

Called when the view is detached from a model.

This method is called when the view is unregistered from a model. Views can use this to clean up model-specific state.


The documentation for this class was generated from the following file: