Scope
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ScopeButton.cpp
1
#include "
StdAfx.h
"
2
#include "ScopeButton.h"
3
4
namespace
scope
{
5
6
ScopeButton::ScopeButton
(
const
std::wstring& _name)
7
: name(_name)
8
, enabled(true) {
9
}
10
11
ScopeButton::ScopeButton
(
const
ScopeButton
& sb)
12
: name(sb.name)
13
, enabled(sb.enabled) {
14
}
15
16
/*ScopeButton operator=(const ScopeButton& sb) {
17
name = sb.name;
18
enabled = sb.enabled;
19
return *this;
20
}*/
21
22
std::wstring
ScopeButton::Name
()
const
{
23
return
name
;
24
}
25
26
void
ScopeButton::Enable
(
const
bool
& state) {
27
enabled
= state;
28
m_ctrlstatesig
(
enabled
);
29
}
30
31
void
ScopeButton::Click
() {
32
m_changesig
();
33
}
34
35
boost::signals2::connection
ScopeButton::Connect
(signalchange_t::slot_type slot) {
36
return
m_changesig
.connect(slot);
37
}
38
39
boost::signals2::connection
ScopeButton::ConnectControlState
(signalstate_t::slot_type slot) {
40
return
m_ctrlstatesig
.connect(slot);
41
}
42
43
void
ScopeButton::Disconnect
(signalchange_t::slot_type slot) {
44
m_changesig
.disconnect(&slot);
45
}
46
47
void
ScopeButton::DisconnectControlState
(signalstate_t::slot_type slot) {
48
m_ctrlstatesig
.disconnect(&slot);
49
}
50
51
}
scope::ScopeButton::m_ctrlstatesig
signalstate_t m_ctrlstatesig
control state signal
Definition:
ScopeButton.h:30
scope::ScopeButton::Name
std::wstring Name() const
Definition:
ScopeButton.cpp:22
scope::ScopeButton::ScopeButton
ScopeButton(const std::wstring &_name=L"None")
Construct and enable.
Definition:
ScopeButton.cpp:6
scope
Definition:
BaseController.h:6
scope::ScopeButton::enabled
bool enabled
enabled/disabled status
Definition:
ScopeButton.h:18
scope::ScopeButton::Click
void Click()
Call signal.
Definition:
ScopeButton.cpp:31
scope::ScopeButton::name
const std::wstring name
name of the control
Definition:
ScopeButton.h:15
stdafx.h
This is the include file for standard system include files, or project specific include files that ar...
scope::ScopeButton::Enable
void Enable(const bool &state)
Enable/disable button.
Definition:
ScopeButton.cpp:26
scope::ScopeButton
Mimicks a button, glue between the GUI and controller, used in ScopeController.
Definition:
ScopeButton.h:7
scope::ScopeButton::Disconnect
void Disconnect(signalchange_t::slot_type slot)
Disconnect slot from signal.
Definition:
ScopeButton.cpp:43
scope::ScopeButton::Connect
boost::signals2::connection Connect(signalchange_t::slot_type slot)
Connect slot to signal.
Definition:
ScopeButton.cpp:35
scope::ScopeButton::m_changesig
signalchange_t m_changesig
button click signal
Definition:
ScopeButton.h:27
scope::ScopeButton::DisconnectControlState
void DisconnectControlState(signalstate_t::slot_type slot)
Disconnect slot from control state signal.
Definition:
ScopeButton.cpp:47
scope::ScopeButton::ConnectControlState
boost::signals2::connection ConnectControlState(signalstate_t::slot_type slot)
Connect slot to control state signal.
Definition:
ScopeButton.cpp:39
scope
helpers
ScopeButton.cpp
Generated on Sun Feb 15 2015 13:20:53 for Scope by
1.8.9