button.cpp
来自「这个程序是对电梯的模拟」· C++ 代码 · 共 53 行
CPP
53 行
// Button.cpp: implementation of the Button class.
//
//////////////////////////////////////////////////////////////////////
#include "Button.h"
#include <iostream>
using namespace std;
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
Button::Button():status(false)
{
}
Button::Button(int cap):caption(cap),status(false)
{
}
Button::~Button()
{
}
bool Button::GetButtonStatus()
{
return status;
}
void Button::SetCaption(int cap)
{
caption=cap;
}
void Button::LightOn()
{
status=true;
cout<<" "<<caption<<" ";
bgLight.LinghtOn();
}
void Button::LightOff()
{
status=false;
bgLight.LinghtOff();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?