ZNewCheckBox.cpp
资源名称:timer_scr.rar [点击查看]
上传用户:karlzgj
上传日期:2020-03-01
资源大小:68k
文件大小:1k
源码类别:
TAPI编程
开发平台:
QT
- #include "ZNewCheckBox.h"
- ZNewCheckBox::ZNewCheckBox( const QString & text, QWidget * parent) : ZCheckBox ( text, parent, 0 )
- {
- setChecked(false);
- connect (this,SIGNAL(toggled(bool)),this,SLOT(slotSChanged(bool)));
- }
- ZNewCheckBox::~ZNewCheckBox()
- {
- };
- bool ZNewCheckBox::isChecked()
- {
- return curState;
- };
- void ZNewCheckBox::setChecked( bool check )
- {
- curState = check;
- if (check)
- {
- setState((ZBaseButton::ToggleState)2);
- }
- else
- {
- setState((ZBaseButton::ToggleState)0);
- }
- };
- void ZNewCheckBox::slotSChanged(bool state)
- {
- curState = state;
- }