Example #1
0
void ConfirmBox::init(const QString &text) {
    _text.setText(st::boxTextFont, text, _informative ? _confirmBoxTextOptions : _textPlainOptions);

    connect(&_confirm, SIGNAL(clicked()), this, SLOT(onConfirmPressed()));
    connect(&_cancel, SIGNAL(clicked()), this, SLOT(onCancel()));
    if (_informative) {
        _cancel.hide();
        connect(this, SIGNAL(confirmed()), this, SLOT(onCancel()));
    }
    onTextUpdated();

    prepare();
}
Example #2
0
ledCheckBox::ledCheckBox( const QString & _text, QWidget * _parent,
				const QString & _name, LedColors _color ) :
	DEFAULT_LEDCHECKBOX_INITIALIZER_LIST,
	m_text( _text )
{
	initUi( _color );
}




ledCheckBox::ledCheckBox( QWidget * _parent,
				const QString & _name, LedColors _color ) :
	DEFAULT_LEDCHECKBOX_INITIALIZER_LIST
{
	initUi( _color );
}

#undef DEFAULT_LEDCHECKBOX_INITIALIZER_LIST



ledCheckBox::~ledCheckBox()
{
	delete m_ledOnPixmap;
	delete m_ledOffPixmap;
}




void ledCheckBox::setText( const QString &s )
{
	m_text = s;
	onTextUpdated();
}