KoMo2  1.0.0
A modern ARM emulator GUI.
Public Member Functions | Private Member Functions | Private Attributes | List of all members
RegistersView Class Reference

Stores data and functions related to the displaying of the KoMo2 GUI element - no particular logic or data should be stored here other than what can be directly seen on screen. More...

#include <RegistersView.h>

Inheritance diagram for RegistersView:

Public Member Functions

 RegistersView (MainWindowView *const parent)
 Constructs a new RegisterView object. More...
 
RegistersModel *const getModel () const
 gets the model for this view. More...
 
void setModel (RegistersModel *const val)
 Sets the model for this view. More...
 
std::array< std::array< Gtk::Label, 16 >, 2 > *const getLabels ()
 Return a reference to the member array of labels, labelArray. More...
 

Private Member Functions

void initRegisterViewContainer ()
 Initialises the register view.
 
void initLeftHandLabel (const int j)
 Initialises the left hand labels within the array. More...
 
void initRightHandLabel (const int j)
 Initialises the right hand labels within the array. More...
 
void initAllLabels (const int i, const int j)
 Initialisations that have to happen for both sides of the table. More...
 
void initGrid ()
 Initialisation instructions for the grid.
 
 RegistersView (const RegistersView &)=delete
 
 RegistersView (const RegistersView &&)=delete
 
RegistersViewoperator= (const RegistersView &)=delete
 
RegistersViewoperator= (const RegistersView &&)=delete
 

Private Attributes

Gtk::Grid grid
 The layout that stores all of the labelArray members.
 
std::array< std::array< Gtk::Label, 16 >, 2 > labelArray
 An array of labels, with the left side representing the registers name and the right side representing the registers value.
 
MainWindowViewparent
 A pointer to the parent view.
 
RegistersModelmodel
 A pointer to the related model.
 

Detailed Description

Stores data and functions related to the displaying of the KoMo2 GUI element - no particular logic or data should be stored here other than what can be directly seen on screen.

Definition at line 26 of file RegistersView.h.

Constructor & Destructor Documentation

RegistersView::RegistersView ( MainWindowView *const  parent)

Constructs a new RegisterView object.

Parameters
parentA pointer to the parent view.

Definition at line 21 of file RegistersView.cpp.

Member Function Documentation

std::array< std::array< Gtk::Label, 16 >, 2 > *const RegistersView::getLabels ( )

Return a reference to the member array of labels, labelArray.

Returns
std::array<std::array<Gtk::Label, 16>, 2>* const A constant pointer the member labelArray.

Definition at line 112 of file RegistersView.cpp.

RegistersModel *const RegistersView::getModel ( ) const

gets the model for this view.

Returns
RegistersModel* The model.

Definition at line 104 of file RegistersView.cpp.

void RegistersView::initAllLabels ( const int  i,
const int  j 
)
private

Initialisations that have to happen for both sides of the table.

Parameters
iThe index of the outer label array.
jThe index of the inner label array.

Definition at line 73 of file RegistersView.cpp.

void RegistersView::initLeftHandLabel ( const int  j)
private

Initialises the left hand labels within the array.

Parameters
jThe index of the inner label array.

Definition at line 50 of file RegistersView.cpp.

void RegistersView::initRightHandLabel ( const int  j)
private

Initialises the right hand labels within the array.

Parameters
jThe index of the inner label array.

Definition at line 63 of file RegistersView.cpp.

void RegistersView::setModel ( RegistersModel *const  val)

Sets the model for this view.

Parameters
valThe model.

Definition at line 97 of file RegistersView.cpp.


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