Physics Simulation & Visualization Tool 0.1
A C++ physics simulation engine with real-time 3D visualization
Loading...
Searching...
No Matches
InspectorRow Class Reference

#include <InspectorRow.h>

Public Member Functions

 InspectorRow (const QString &lbl, QWidget *parent=nullptr)
 
 InspectorRow (const QString &lbl, QWidget *customEditor, std::function< void()> updateLogic)
 
InspectorRowaddVec3 (const std::function< glm::vec3()> &get, const std::function< void(glm::vec3)> &set, const QString &unit="", const std::function< void(Vector3Widget *)> &onInit=nullptr)
 
InspectorRowaddScalar (const std::function< double()> &get, const std::function< void(double)> &set, const QString &unit="", const std::function< void(ScalarWidget *)> &onInit=nullptr)
 
InspectorRowaddCheckbox (const std::function< bool()> &get, const std::function< void(bool)> &set, const std::function< void(QCheckBox *)> &onInit=nullptr)
 
InspectorRowaddButton (const QString &text, const std::function< void()> &onClick, const std::function< void(QPushButton *)> &onInit=nullptr)
 
QString getLabel () const
 
QWidget * getEditor () const
 
void refresh ()
 
void setEnabled (bool enabled)
 

Detailed Description

Definition at line 14 of file InspectorRow.h.

Constructor & Destructor Documentation

◆ InspectorRow() [1/2]

InspectorRow::InspectorRow ( const QString &  lbl,
QWidget *  parent = nullptr 
)
explicit

Definition at line 6 of file InspectorRow.cpp.

◆ InspectorRow() [2/2]

InspectorRow::InspectorRow ( const QString &  lbl,
QWidget *  customEditor,
std::function< void()>  updateLogic 
)

Definition at line 13 of file InspectorRow.cpp.

Member Function Documentation

◆ addButton()

InspectorRow & InspectorRow::addButton ( const QString &  text,
const std::function< void()> &  onClick,
const std::function< void(QPushButton *)> &  onInit = nullptr 
)

Definition at line 86 of file InspectorRow.cpp.

◆ addCheckbox()

InspectorRow & InspectorRow::addCheckbox ( const std::function< bool()> &  get,
const std::function< void(bool)> &  set,
const std::function< void(QCheckBox *)> &  onInit = nullptr 
)

Definition at line 62 of file InspectorRow.cpp.

◆ addScalar()

InspectorRow & InspectorRow::addScalar ( const std::function< double()> &  get,
const std::function< void(double)> &  set,
const QString &  unit = "",
const std::function< void(ScalarWidget *)> &  onInit = nullptr 
)

Definition at line 40 of file InspectorRow.cpp.

Here is the call graph for this function:

◆ addVec3()

InspectorRow & InspectorRow::addVec3 ( const std::function< glm::vec3()> &  get,
const std::function< void(glm::vec3)> &  set,
const QString &  unit = "",
const std::function< void(Vector3Widget *)> &  onInit = nullptr 
)

Definition at line 19 of file InspectorRow.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getEditor()

QWidget * InspectorRow::getEditor ( ) const
inline

Definition at line 26 of file InspectorRow.h.

Here is the caller graph for this function:

◆ getLabel()

QString InspectorRow::getLabel ( ) const
inline

Definition at line 25 of file InspectorRow.h.

Here is the caller graph for this function:

◆ refresh()

void InspectorRow::refresh ( )
inline

Definition at line 28 of file InspectorRow.h.

◆ setEnabled()

void InspectorRow::setEnabled ( bool  enabled)
inline

Definition at line 34 of file InspectorRow.h.


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