UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
CheckableUi Class Referenceabstract

#include <checkable_ui.hpp>

Inheritance diagram for CheckableUi:
Inheritance graph
Collaboration diagram for CheckableUi:
Collaboration graph

Public Member Functions

 CheckableUi (Settings *settings, const std::string &opt)
 
virtual ~CheckableUi ()
 
- Public Member Functions inherited from WidgetUi
 WidgetUi (const WidgetUi &)=delete
 
 WidgetUi (Settings *settings, const std::string &opt)
 
 WidgetUi (WidgetUi &&)=delete
 
virtual ~WidgetUi ()
 
WidgetUi & operator= (const WidgetUi &)=delete
 
WidgetUi & operator= (WidgetUi &&)=delete
 
virtual void refresh ()
 
void registerCallback (const std::string &option)
 
void registerCustomCallback (const std::string &option, Option::Callback callback, std::unique_ptr< ExtraCallbackData > &&extraDataPtr=nullptr)
 
void setOpt (const std::string &opt)
 

Protected Slots

void boxClicked (bool checked)
 

Protected Member Functions

virtual void connectSignals () override=0
 
bool getOptValue ()
 
void optChangeCallback (Option &opt, bool suboption) override
 
void updateUiState () override=0
 
virtual void updateUiState (bool checked)=0
 
- Protected Member Functions inherited from WidgetUi
void registerCallback ()
 

Additional Inherited Members

- Signals inherited from WidgetUi
void changed ()
 
- Static Protected Member Functions inherited from WidgetUi
static void optChangeCallbackStatic (Option &, bool, void *)
 
- Protected Attributes inherited from WidgetUi
std::vector< std::unique_ptr< ExtraCallbackData > > extraData
 
std::string opt
 
std::vector< std::pair< std::string, Option::Callback > > registeredCallbacks
 
Settings * settings
 

Detailed Description

Definition at line 9 of file checkable_ui.hpp.

Constructor & Destructor Documentation

◆ CheckableUi()

CheckableUi::CheckableUi ( Settings * settings,
const std::string & opt )

Definition at line 3 of file checkable_ui.cpp.

3 :
5{
7}
WidgetUi(Settings *settings, const std::string &opt)
Definition widget_ui.cpp:3
std::string opt
Definition widget_ui.hpp:34
void registerCallback()
Definition widget_ui.cpp:57
Settings * settings
Definition widget_ui.hpp:33

References WidgetUi::registerCallback().

Here is the call graph for this function:

◆ ~CheckableUi()

virtual CheckableUi::~CheckableUi ( )
inlinevirtual

Definition at line 15 of file checkable_ui.hpp.

15{ }

Member Function Documentation

◆ boxClicked

void CheckableUi::boxClicked ( bool checked)
protectedslot

Definition at line 9 of file checkable_ui.cpp.

9 {
10 settings->getOption(opt).setValue(checked ? "t" : "f");
11 //settings->getOption(opt).setEnabled(checked);
12 emit changed();
13}
virtual void setValue(const std::string &val, bool suppressCallback=false)
Definition settings.cpp:73
const Option & getOption(const std::string &opt) const
Definition settings.cpp:384
void changed()

References WidgetUi::changed(), Settings::getOption(), WidgetUi::opt, WidgetUi::settings, and Option::setValue().

Referenced by ActionCheckableUi::connectSignals(), CheckboxUi::connectSignals(), and GroupBoxUi::connectSignals().

Here is the call graph for this function:

◆ connectSignals()

virtual void CheckableUi::connectSignals ( )
overrideprotectedpure virtual

Implements WidgetUi.

Implemented in ActionCheckableUi, CheckboxUi, and GroupBoxUi.

◆ getOptValue()

bool CheckableUi::getOptValue ( )
protected

Definition at line 21 of file checkable_ui.cpp.

21 {
23}
bool isEnabled() const
Definition settings.hpp:61

References Settings::getOption(), Option::isEnabled(), WidgetUi::opt, and WidgetUi::settings.

Referenced by ActionCheckableUi::updateUiState(), CheckboxUi::updateUiState(), and GroupBoxUi::updateUiState().

Here is the call graph for this function:

◆ optChangeCallback()

void CheckableUi::optChangeCallback ( Option & opt,
bool suboption )
overrideprotectedvirtual

Implements WidgetUi.

Definition at line 15 of file checkable_ui.cpp.

15 {
16 if(changedOpt.getName() == opt){
17 updateUiState(changedOpt.isEnabled());
18 }
19}
void updateUiState() override=0

References Option::getName(), Option::isEnabled(), WidgetUi::opt, and updateUiState().

Here is the call graph for this function:

◆ updateUiState() [1/2]

void CheckableUi::updateUiState ( )
overrideprotectedpure virtual

Implements WidgetUi.

Implemented in ActionCheckableUi, CheckboxUi, and GroupBoxUi.

Referenced by optChangeCallback().

◆ updateUiState() [2/2]

virtual void CheckableUi::updateUiState ( bool checked)
protectedpure virtual

Implemented in ActionCheckableUi, CheckboxUi, and GroupBoxUi.


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