Scope
|
#include <ScopeButton.h>
Inherited by scope::ScopeScanModeButton.
Public Member Functions | |
ScopeButton (const std::wstring &_name=L"None") | |
ScopeButton (const ScopeButton &sb) | |
std::wstring | Name () const |
bool | Enabled () const |
void | Enable (const bool &state) |
void | Click () |
Handles connections to the signal for click and control state | |
boost::signals2::connection | Connect (signalchange_t::slot_type slot) |
boost::signals2::connection | ConnectControlState (signalstate_t::slot_type slot) |
void | Disconnect (signalchange_t::slot_type slot) |
void | DisconnectControlState (signalstate_t::slot_type slot) |
Protected Types | |
typedef boost::signals2::signal< void()> | signalchange_t |
typedef boost::signals2::signal< void(bool)> | signalstate_t |
Protected Attributes | |
const std::wstring | name |
bool | enabled |
signalchange_t | m_changesig |
signalstate_t | m_ctrlstatesig |
Mimicks a button, glue between the GUI and controller, used in ScopeController.
Could have used a ScopeNumber<bool>?!
Definition at line 7 of file ScopeButton.h.
|
protected |
typedef for button click signal
Definition at line 21 of file ScopeButton.h.
|
protected |
typedef for control state
Definition at line 24 of file ScopeButton.h.
scope::ScopeButton::ScopeButton | ( | const std::wstring & | _name = L"None" | ) |
Construct and enable.
Definition at line 6 of file ScopeButton.cpp.
scope::ScopeButton::ScopeButton | ( | const ScopeButton & | sb | ) |
Copy constructor.
Definition at line 11 of file ScopeButton.cpp.
std::wstring scope::ScopeButton::Name | ( | ) | const |
Definition at line 22 of file ScopeButton.cpp.
|
inline |
Definition at line 43 of file ScopeButton.h.
void scope::ScopeButton::Enable | ( | const bool & | state | ) |
Enable/disable button.
Definition at line 26 of file ScopeButton.cpp.
void scope::ScopeButton::Click | ( | ) |
Call signal.
Definition at line 31 of file ScopeButton.cpp.
boost::signals2::connection scope::ScopeButton::Connect | ( | signalchange_t::slot_type | slot | ) |
Connect slot to signal.
Definition at line 35 of file ScopeButton.cpp.
boost::signals2::connection scope::ScopeButton::ConnectControlState | ( | signalstate_t::slot_type | slot | ) |
Connect slot to control state signal.
Definition at line 39 of file ScopeButton.cpp.
void scope::ScopeButton::Disconnect | ( | signalchange_t::slot_type | slot | ) |
Disconnect slot from signal.
Definition at line 43 of file ScopeButton.cpp.
void scope::ScopeButton::DisconnectControlState | ( | signalstate_t::slot_type | slot | ) |
Disconnect slot from control state signal.
Definition at line 47 of file ScopeButton.cpp.
|
protected |
name of the control
Definition at line 15 of file ScopeButton.h.
|
protected |
enabled/disabled status
Definition at line 18 of file ScopeButton.h.
|
protected |
button click signal
Definition at line 27 of file ScopeButton.h.
|
protected |
control state signal
Definition at line 30 of file ScopeButton.h.